Skip to content

Commit

Permalink
Consolidate the USE_WINDOWS_API to a single place.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Oct 22, 2024
1 parent 76aae03 commit b5cc863
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions wolfssl/wolfcrypt/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,16 +429,6 @@ typedef struct w64wrapper {
#define FALL_THROUGH
#endif

/* For platforms where the target OS is not Windows, but compilation is
* done on Windows/Visual Studio, enable a way to disable USE_WINDOWS_API.
* Examples: Micrium, TenAsus INtime, uTasker, FreeRTOS simulator */
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
!defined(FREERTOS_TCP) && !defined(EBSNET) && \
!defined(WOLFSSL_UTASKER) && !defined(INTIME_RTOS) && \
!defined(WOLFSSL_NOT_WINDOWS_API)
#define USE_WINDOWS_API
#endif

#define XSTR_SIZEOF(x) (sizeof(x) - 1) /* -1 to not count the null char */

#define XELEM_CNT(x) (sizeof((x))/sizeof(*(x)))
Expand Down
10 changes: 10 additions & 0 deletions wolfssl/wolfcrypt/wc_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
extern "C" {
#endif

/* For platforms where the target OS is not Windows, but compilation is
* done on Windows/Visual Studio, enable a way to disable USE_WINDOWS_API.
* Examples: Micrium, TenAsus INtime, uTasker, FreeRTOS simulator */
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) && \
!defined(FREERTOS_TCP) && !defined(EBSNET) && \
!defined(WOLFSSL_UTASKER) && !defined(INTIME_RTOS) && \
!defined(WOLFSSL_NOT_WINDOWS_API)
#define USE_WINDOWS_API
#endif

/* Detect if compiler supports C99. "NO_WOLF_C99" can be defined in
* user_settings.h to disable checking for C99 support. */
#if !defined(WOLF_C99) && defined(__STDC_VERSION__) && \
Expand Down

0 comments on commit b5cc863

Please sign in to comment.