1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Clang imposed changes in thirdparty that should be noop and have no effect on classic compiler (3rd after 74fdf539)

Source commit: adaaa520f1fcbdfcfd84d92013249a049d1ee303
This commit is contained in:
Martin Prikryl
2025-07-29 11:12:54 +00:00
parent a23e73c987
commit cea3db7f78
7 changed files with 16 additions and 12 deletions

6
libs/Makefile.inc vendored
View File

@@ -1,5 +1,7 @@
CC = "$(BDS)\bin\bcc32"
MKLIB = "$(BDS)\bin\tlib" /a /C
CFLAG_COMMON=-O2 -c -fp -tWM
CFLAG_BASE=-O2 -c -fp -tWM
# These are defaults anyway
CFLAG_COMMON=$(CFLAG_COMMON) -a8 -vi -ff
CFLAG_BASE=$(CFLAG_BASE) -a8 -vi -ff
CFLAG_COMMON=$(CFLAG_BASE)
CFLAG_CPP=$(CFLAG_BASE) /P

View File

@@ -3,9 +3,8 @@
# Set your compiler options
DEFINES = WIN32;WIN32_LEAN_AND_MEAN;WINSCP;NE_LFS
WARNINGS = -w-aus -w-par
# Compile like C++ (it's probably only to support newer features and won't be needed with Clang)
CFLAG = -P
CFLAG = $(CFLAG_COMMON) $(CFLAG) -D$(DEFINES:;= -D) $(WARNINGS)
# Compile like C++
CFLAG = $(CFLAG_CPP) -D$(DEFINES:;= -D) $(WARNINGS)
# The output directory for all the temporary muck
TMP_D=tmp

View File

@@ -68,7 +68,7 @@ void S3_put_object(const S3BucketContext *bucketContext, const char *key,
putProperties, // putProperties
handler->responseHandler.propertiesCallback, // propertiesCallback
handler->putObjectDataCallback, // toS3Callback
contentLength, // toS3CallbackTotalSize
static_cast<int64_t>(contentLength), // toS3CallbackTotalSize (WINSCP cast)
0, // fromS3Callback
handler->responseHandler.completeCallback, // completeCallback
callbackData, // callbackData
@@ -302,8 +302,8 @@ void S3_get_object(const S3BucketContext *bucketContext, const char *key,
0, // copySourceBucketName
0, // copySourceKey
getConditions, // getConditions
startByte, // startByte
byteCount, // byteCount
static_cast<size_t>(startByte), // startByte (WINSCP cast)
static_cast<size_t>(byteCount), // byteCount (WINSCP cast)
0, // putProperties
handler->responseHandler.propertiesCallback, // propertiesCallback
0, // toS3Callback

View File

@@ -58,7 +58,7 @@
#pragma warning(disable: 4390) // empty controlled statement
#endif //!ALL_WARNINGS
#define UNUSED(x) x
#define UNUSED(x) (static_cast<const void *>(&x) == static_cast<const void *>(&x))
/////////////////////////////////////////////////////////////////////////////
// Basic object model

View File

@@ -41,7 +41,7 @@ OBJS=$(CPP_OBJS)
# Set CPPFLAGS for use with .cpp.obj and .c.obj rules
# Define rule for use with OBJ directory
CPPFLAGS=$(CFLAG_COMMON) $(CL_OPT) -D$(DEFS:;= -D)
CPPFLAGS=$(CFLAG_CPP) $(CL_OPT) -D$(DEFS:;= -D)
BORFLAGS=$(CPPFLAGS) -I$(INCL:;= -I)

View File

@@ -33,8 +33,9 @@ CFLAG=$(CFLAG) -D$(DEFINES:;= -D)
# Copied from generated OpenSSL "makefile"
# (but the OPENSSL_BUILDING_OPENSSL, _stricmp, _strnicmp and _setmode are not needed)
# (and DSO_WIN32 removed as it clashes with dso_conf.h)
CFLAG= $(CFLAG) \
-D"OPENSSL_BUILDING_OPENSSL" -D"WIN32_LEAN_AND_MEAN" -D"OPENSSL_SYS_WIN32" -D"L_ENDIAN" -D"DSO_WIN32" \
-D"OPENSSL_BUILDING_OPENSSL" -D"WIN32_LEAN_AND_MEAN" -D"OPENSSL_SYS_WIN32" -D"L_ENDIAN" \
-D"_stricmp=stricmp" -D"_strnicmp=strnicmp" -D"_malloca=malloc" -D"_freea=free" -D"_setmode=setmode" \
-D"NDEBUG"
@@ -70,7 +71,7 @@ O_CRYPTO= $(OUT_D)\$(CRYPTO).lib
# Don't touch anything below this point
######################################################
INC=-Iinclude -Icommon\include -Iproviders\implementations\include -Iproviders\common\include
INC=-Iinclude -Icommon\include -Iproviders\implementations\include -Iproviders\common\include -I.
LIB_CFLAGS=$(CFLAG) $(INC)
LIBS_DEP=$(O_CRYPTO) $(O_SSL)

View File

@@ -48,7 +48,9 @@
#define ossl_rcu_write_unlock CRYPTO_THREAD_unlock
#define ossl_rcu_read_unlock CRYPTO_THREAD_unlock
#define ossl_synchronize_rcu(lock)
#undef ossl_rcu_deref
#define ossl_rcu_deref(p) (*(p))
#undef ossl_rcu_assign_ptr
#define ossl_rcu_assign_ptr(p, v) (*(p)) = (*(v))
#endif // WINSCP