-
Notifications
You must be signed in to change notification settings - Fork 10
Updates to generate windows library #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,7 +141,7 @@ endif() | |
| # its dynamic libs have been installed in ./${LIB} when using the libs | ||
| # see for binaries dynamically linked to OpenSSL the output of ${LDD} <binary> | ||
| if(CMAKE_SYSTEM_NAME MATCHES "Windows") | ||
| set(USERS "^(\w:)?\\Users\\") | ||
| set(USERS "^([a-zA-Z]:)?\\\\Users\\\\") | ||
| set(LIB "bin") | ||
| else() | ||
| set(USERS "^/(home|Users)/") | ||
|
|
@@ -208,13 +208,22 @@ endif() | |
|
|
||
| add_compile_definitions(DEBUG_UNUSED) | ||
| add_compile_definitions(PEDANTIC) | ||
| add_compile_options(-pedantic) # -Werror is enabled only for development and CI, using Makefile_v1 without NDEBUG | ||
| add_compile_options( | ||
| -Wall -Woverflow -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wswitch | ||
| -Wsign-compare -Wformat -Wtype-limits -Wundef -Wconversion -Wunused-parameter) | ||
| add_compile_options(-Wno-c99-extensions -Wno-language-extension-token -Wno-declaration-after-statement -Wno-expansion-to-defined) | ||
| if(NOT DEFINED GENCMP_NO_SECUTILS) | ||
| add_compile_options(-Wno-sign-conversion -Wno-shorten-64-to-32 -Wno-shadow) | ||
|
|
||
| if(MSVC) | ||
| # MSVC compiler flags | ||
| add_compile_options(/W4) # High warning level | ||
| add_compile_options(/wd4996) # Disable deprecated function warnings | ||
| add_compile_definitions(_CRT_SECURE_NO_WARNINGS) | ||
| else() | ||
| # GCC/Clang compiler flags | ||
| add_compile_options(-pedantic) # -Werror is enabled only for development and CI, using Makefile_v1 without NDEBUG | ||
| add_compile_options( | ||
| -Wall -Woverflow -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wswitch | ||
| -Wsign-compare -Wformat -Wtype-limits -Wundef -Wconversion -Wunused-parameter) | ||
| add_compile_options(-Wno-c99-extensions -Wno-language-extension-token -Wno-declaration-after-statement -Wno-expansion-to-defined) | ||
| if(NOT DEFINED GENCMP_NO_SECUTILS) | ||
| add_compile_options(-Wno-sign-conversion -Wno-shorten-64-to-32 -Wno-shadow) | ||
| endif() | ||
|
Comment on lines
+224
to
+226
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I presume that you build using |
||
| endif() | ||
| # TODO maybe clean up code and re-enable property | ||
| # set_property(TARGET ${LIBGENCMP_NAME} PROPERTY C_STANDARD 90) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -38,15 +38,32 @@ void UTIL_cleanse_free(OPTIONAL char *str) | |||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| /* log.c: */ | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| #include <syslog.h> | ||||||||||||||||||||||||||||||||||||
| #ifdef _WIN32 | ||||||||||||||||||||||||||||||||||||
| /* Windows doesn't have syslog, so we'll use Windows Event Log or just disable syslog */ | ||||||||||||||||||||||||||||||||||||
| #define LOG_EMERG 0 | ||||||||||||||||||||||||||||||||||||
| #define LOG_ALERT 1 | ||||||||||||||||||||||||||||||||||||
| #define LOG_CRIT 2 | ||||||||||||||||||||||||||||||||||||
| #define LOG_ERR 3 | ||||||||||||||||||||||||||||||||||||
| #define LOG_WARNING 4 | ||||||||||||||||||||||||||||||||||||
| #define LOG_NOTICE 5 | ||||||||||||||||||||||||||||||||||||
| #define LOG_INFO 6 | ||||||||||||||||||||||||||||||||||||
| #define LOG_DEBUG 7 | ||||||||||||||||||||||||||||||||||||
| static void syslog(int priority, const char *format, ...) { | ||||||||||||||||||||||||||||||||||||
| /* Stub implementation for Windows - could be enhanced to use Windows Event Log */ | ||||||||||||||||||||||||||||||||||||
| (void)priority; | ||||||||||||||||||||||||||||||||||||
| (void)format; | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| #else | ||||||||||||||||||||||||||||||||||||
| #include <syslog.h> | ||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| static const char *const GENCMP_NAME = "genCMPClient"; | ||||||||||||||||||||||||||||||||||||
| static const size_t loc_len = 256; | ||||||||||||||||||||||||||||||||||||
| #define loc_len 256 | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| /*!< these variables are shared between threads */ | ||||||||||||||||||||||||||||||||||||
| static LOG_cb_t LOG_fn = 0; | ||||||||||||||||||||||||||||||||||||
| static const char *app_name = GENCMP_NAME; | ||||||||||||||||||||||||||||||||||||
| static severity verbosity = LOG_WARNING; | ||||||||||||||||||||||||||||||||||||
| static const char *app_name = "genCMPClient"; | ||||||||||||||||||||||||||||||||||||
| static severity verbosity = 4; /* LOG_WARNING equivalent */ | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
60
to
+66
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As you wrote, these changes because the M$ C compiler cannot make full use of constants within macros,
Suggested change
|
||||||||||||||||||||||||||||||||||||
| BIO *bio_err = 0; | ||||||||||||||||||||||||||||||||||||
| BIO *bio_trace = 0; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be interested to know what happens without this option - which function(s) would be flagged as deprecated?