From 45b88048c2b57d682c40169877863be8f96e1736 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 25 Sep 2024 15:59:57 -0600 Subject: [PATCH] make macro unique to wolfSSL --- IDE/NDS/README.md | 2 +- wolfcrypt/src/random.c | 2 +- wolfcrypt/test/test.c | 8 ++++---- wolfssl/ssl.h | 3 ++- wolfssl/test.h | 2 +- wolfssl/wolfcrypt/settings.h | 6 +++--- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/IDE/NDS/README.md b/IDE/NDS/README.md index 88e9dbf41..3a846d587 100644 --- a/IDE/NDS/README.md +++ b/IDE/NDS/README.md @@ -18,7 +18,7 @@ $ ./configure \ LDFLAGS="-L/opt/devkitpro/libnds/lib" \ --prefix=$DEVKITPRO/portlibs/nds \ CFLAGS="-march=armv5te -mtune=arm946e-s \ - --specs=ds_arm9.specs -DARM9 -DNDS \ + --specs=ds_arm9.specs -DARM9 -DWOLFSSL_NDS \ -DWOLFSSL_USER_IO \ -I$DEVKITPRO/libnds/include" \ --enable-fastmath --disable-benchmark \ diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 3cc1c0fa3..278e2d72c 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -3817,7 +3817,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) return ret; } -#elif defined(DOLPHIN_EMULATOR) || defined (NDS) +#elif defined(DOLPHIN_EMULATOR) || defined (WOLFSSL_NDS) int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) { diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 2369c3a7e..df2a14534 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -429,7 +429,7 @@ const byte const_byte_array[] = "A+Gd\0\0\0"; #ifdef DEVKITPRO #include #endif -#ifdef NDS +#ifdef WOLFSSL_NDS #include #include #include @@ -2473,7 +2473,7 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ VIDEO_WaitVSync(); if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync(); #endif -#ifdef NDS +#ifdef WOLFSSL_NDS /* Init Console output */ consoleDemoInit(); @@ -2525,7 +2525,7 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\ while (1); #endif -#ifdef NDS +#ifdef WOLFSSL_NDS /* in Nintendo DS returning from main shuts down the Device without letting you see the Results. */ printf("args.return_code: %d\n", args.return_code); printf("Testing complete. Press Start to exit the Program\n"); @@ -18109,7 +18109,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memory_test(void) #elif defined(_WIN32_WCE) #define CERT_PREFIX "\\windows\\" #define CERT_PATH_SEP "\\" -#elif defined(NDS) +#elif defined(WOLFSSL_NDS) #undef CERT_PREFIX #define CERT_PREFIX "fat:/_nds/" #define CERT_PATH_SEP "/" diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index e7efa1b78..f7cf3aa15 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -3164,7 +3164,8 @@ WOLFSSL_API int wolfSSL_make_eap_keys(WOLFSSL* ssl, void* key, unsigned int len, !defined(WOLFSSL_PICOTCP) && !defined(WOLFSSL_ROWLEY_ARM) && \ !defined(WOLFSSL_EMBOS) && !defined(WOLFSSL_FROSTED) && \ !defined(WOLFSSL_CHIBIOS) && !defined(WOLFSSL_CONTIKI) && \ - !defined(WOLFSSL_ZEPHYR) && !defined(NETOS) && !defined(NDS) + !defined(WOLFSSL_ZEPHYR) && !defined(NETOS) && \ + !defined(WOLFSSL_NDS) #include #endif /* allow writev style writing */ diff --git a/wolfssl/test.h b/wolfssl/test.h index b3974a678..e7ca13cc3 100644 --- a/wolfssl/test.h +++ b/wolfssl/test.h @@ -203,7 +203,7 @@ #include #include #include - #ifndef NDS + #ifndef WOLFSSL_NDS #include #endif #include diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 7792fb765..7a1c4664e 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -262,8 +262,8 @@ /* Uncomment next line if building for Dolphin Emulator */ /* #define DOLPHIN_EMULATOR */ -/* Uncomment next line if building for NDS */ -/* #define NDS */ +/* Uncomment next line if building for WOLFSSL_NDS */ +/* #define WOLFSSL_NDS */ /* Uncomment next line if using MAXQ1065 */ /* #define WOLFSSL_MAXQ1065 */ @@ -474,7 +474,7 @@ #endif -#ifdef NDS +#ifdef WOLFSSL_NDS #include #define SIZEOF_LONG_LONG 8 #define socklen_t int