Skip to content

Commit

Permalink
Add known macros.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Feb 4, 2025
1 parent 81c8f63 commit f59bdcd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
5 changes: 4 additions & 1 deletion .wolfssl_known_macro_extras
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ __INTEGRITY
__INTEL_COMPILER
__KEIL__
__KEY_DATA_H__
__LINUX__
__LP64
__LP64__
__MACH__
Expand All @@ -906,7 +907,9 @@ __MINGW32__
__MINGW64_VERSION_MAJOR
__MINGW64__
__MWERKS__
__NT__
__OpenBSD__
__OS2__
__PIE__
__POWERPC__
__PPC__
Expand Down Expand Up @@ -980,4 +983,4 @@ noinline
ssize_t
sun
versal
wc_Tls13_HKDF_Expand_Label
wc_Tls13_HKDF_Expand_Label
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2778,11 +2778,11 @@ if(WOLFSSL_INSTALL)
else()
set(LIBM)
endif()
endif()

configure_file(support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
configure_file(support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()

include(CMakePackageConfigHelpers)
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in
Expand Down
2 changes: 1 addition & 1 deletion src/ssl_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#ifdef WOLFSSL_SYS_CA_CERTS

#ifdef _WIN32
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#include <wincrypt.h>

Expand Down
2 changes: 1 addition & 1 deletion wolfcrypt/benchmark/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -14463,7 +14463,7 @@ void bench_sphincsKeySign(byte level, byte optim)
#if defined(_WIN32) && !defined(INTIME_RTOS)

#define WIN32_LEAN_AND_MEAN
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>

double current_time(int reset)
Expand Down
3 changes: 2 additions & 1 deletion wolfcrypt/src/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This library contains implementation for the random number generator.
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#include <wincrypt.h>
#elif defined(HAVE_WNR)
Expand Down Expand Up @@ -929,6 +929,7 @@ static THREAD_RETURN_NOJOIN WOLFSSL_THREAD_NO_JOIN
fprintf(stderr, "EXITING ENTROPY COUNTER THREAD\n");
#endif

/* Exit from thread. */
RETURN_FROM_THREAD_NOJOIN(0);
}

Expand Down
4 changes: 2 additions & 2 deletions wolfssl/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
#ifdef __WATCOMC__
#if defined(__OS2__)
#elif defined(__NT__)
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#elif defined(__LINUX__)
#ifndef SINGLE_THREADED
Expand All @@ -166,7 +166,7 @@
#ifdef WOLFSSL_GAME_BUILD
#include "system/xtl.h"
#else
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#endif
#elif defined(THREADX)
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@ static WC_INLINE unsigned int my_psk_client_cs_cb(WOLFSSL* ssl,
#elif defined(USE_WINDOWS_API)

#define WIN32_LEAN_AND_MEAN
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>

static WC_INLINE double current_time(int reset)
Expand Down
8 changes: 4 additions & 4 deletions wolfssl/wolfcrypt/wc_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
#if defined(__WATCOMC__)
#if !defined(SINGLE_THREADED)
#if defined(USE_WINDOWS_API)
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#include <process.h>
#elif defined(__OS2__)
Expand All @@ -141,7 +141,7 @@
#endif
#else
#if defined(USE_WINDOWS_API)
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#elif defined(__OS2__)
#include <os2.h>
Expand All @@ -160,7 +160,7 @@
#define WIN32_LEAN_AND_MEAN
#endif
#if !defined(WOLFSSL_SGX) && !defined(WOLFSSL_NOT_WINDOWS_API)
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#ifndef WOLFSSL_USER_IO
#include <ws2tcpip.h> /* required for InetPton */
Expand Down Expand Up @@ -1205,7 +1205,7 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
#define XGMTIME(c, t) gmtime((c))

#elif defined(_WIN32_WCE)
#define _WINSOCKAPI_
#define _WINSOCKAPI_ /* Force winsock (workaround for WinCE) */
#include <windows.h>
#include <stdlib.h> /* For file system */

Expand Down

0 comments on commit f59bdcd

Please sign in to comment.