|
22 | 22 | * along with this program; if not, write to the Free Software |
23 | 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA |
24 | 24 | */ |
25 | | -#ifndef _WOLFBOOT_USER_SETTINGS_H_ |
26 | | -#define _WOLFBOOT_USER_SETTINGS_H_ |
| 25 | +#ifndef WOLFBOOT_USER_SETTINGS_H |
| 26 | +#define WOLFBOOT_USER_SETTINGS_H |
| 27 | + |
| 28 | +/* This is the wolfBoot embedded target user settings. |
| 29 | + * |
| 30 | + * See also settings in [WOLFBOOT_ROOT]/tools/keytools |
| 31 | + * |
| 32 | + * When in question, define WOLFBOOT_SHOW_INCLUDE |
| 33 | + */ |
| 34 | + |
| 35 | +#ifdef WOLFBOOT_SHOW_INCLUDE |
| 36 | + #ifdef __GNUC__ /* GCC compiler */ |
| 37 | + #pragma message "===============include/user_settings.h" |
| 38 | + #elif defined(_MSC_VER) /* Microsoft Visual C++ compiler */ |
| 39 | + #pragma message("===============include/user_settings.h") |
| 40 | + #else |
| 41 | + #warning "===============include/user_settings.h" |
| 42 | + #endif |
| 43 | +#endif |
| 44 | + |
| 45 | +//#define DEBUG_SIGNTOOL |
| 46 | +//#define WOLFSSL_USE_ALIGN |
| 47 | + |
| 48 | +#if defined(_MSC_VER) |
| 49 | + /* MSVC and clang-cl both define _MSC_VER */ |
| 50 | + #ifndef WOLFSSL_HAVE_MIN |
| 51 | + #define WOLFSSL_HAVE_MIN |
| 52 | + #endif |
| 53 | + #ifndef WOLFSSL_HAVE_MAX |
| 54 | + #define WOLFSSL_HAVE_MAX |
| 55 | + #endif |
| 56 | + |
| 57 | + /* Really keep Windows headers from redefining min/max */ |
| 58 | + #ifndef NOMINMAX |
| 59 | + #define NOMINMAX 1 |
| 60 | + #endif |
| 61 | +#endif |
27 | 62 |
|
28 | 63 | #ifdef WOLFBOOT_PKCS11_APP |
29 | 64 | # include "test-app/wcs/user_settings.h" |
30 | 65 | #else |
31 | 66 |
|
| 67 | +/* The target.h is a device-specific, typically a generated file. |
| 68 | + * CMake configures from `include/target.h.in` into ${CMAKE_CURRENT_BINARY_DIR} |
| 69 | + * |
| 70 | + * See also the sample in [WOLFBOOT_ROOT]/tools/unit-tests/target.h */ |
32 | 71 | #include <target.h> |
33 | 72 |
|
34 | 73 | /* System */ |
@@ -330,7 +369,9 @@ extern int tolower(int c); |
330 | 369 |
|
331 | 370 | /* SP Math needs to understand long long */ |
332 | 371 | # ifndef ULLONG_MAX |
333 | | -# define ULLONG_MAX 18446744073709551615ULL |
| 372 | +# ifndef _MSC_VER |
| 373 | +# define ULLONG_MAX 18446744073709551615ULL |
| 374 | +# endif |
334 | 375 | # endif |
335 | 376 | #endif |
336 | 377 |
|
@@ -495,7 +536,6 @@ extern int tolower(int c); |
495 | 536 | # define WOLFSSL_HAVE_MAX |
496 | 537 | #endif |
497 | 538 |
|
498 | | - |
499 | 539 | /* Memory model */ |
500 | 540 | #if defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_SP_MATH_ALL) |
501 | 541 | /* Disable VLAs */ |
@@ -586,4 +626,4 @@ extern int tolower(int c); |
586 | 626 | # define WOLFSSL_PEM_TO_DER |
587 | 627 | #endif |
588 | 628 |
|
589 | | -#endif /* !_WOLFBOOT_USER_SETTINGS_H_ */ |
| 629 | +#endif /* !WOLFBOOT_USER_SETTINGS_H */ |
0 commit comments