Fossil SCM
more cson portability fixes, thanks to Robert Engelhardt and Mistachkin.
Commit
afd36e987ca1f2841bd2d819e64804c1f1a9f971
Parent
ea8d28acf3b33fb…
2 files changed
+5
-1
+1
-1
+5
-1
| --- src/cson_amalgamation.c | ||
| +++ src/cson_amalgamation.c | ||
| @@ -6427,11 +6427,15 @@ | ||
| 6427 | 6427 | #include <string.h> /* strlen() */ |
| 6428 | 6428 | #include <stdarg.h> |
| 6429 | 6429 | #include <time.h> |
| 6430 | 6430 | #include <locale.h> /* setlocale(), needed for JSON parser. */ |
| 6431 | 6431 | |
| 6432 | -#define CSON_CGI_USE_SIGNALS 1 | |
| 6432 | +#if CSON_ENABLE_UNIX | |
| 6433 | +# define CSON_CGI_USE_SIGNALS 1 | |
| 6434 | +#else | |
| 6435 | +# define CSON_CGI_USE_SIGNALS 0 | |
| 6436 | +#endif | |
| 6433 | 6437 | |
| 6434 | 6438 | /* If RNG_FILENAME evaluates to true then we use that file for getting |
| 6435 | 6439 | random bytes for session IDs. FIXME: we effectively leak a file |
| 6436 | 6440 | handle if this is enabled. |
| 6437 | 6441 | */ |
| 6438 | 6442 |
| --- src/cson_amalgamation.c | |
| +++ src/cson_amalgamation.c | |
| @@ -6427,11 +6427,15 @@ | |
| 6427 | #include <string.h> /* strlen() */ |
| 6428 | #include <stdarg.h> |
| 6429 | #include <time.h> |
| 6430 | #include <locale.h> /* setlocale(), needed for JSON parser. */ |
| 6431 | |
| 6432 | #define CSON_CGI_USE_SIGNALS 1 |
| 6433 | |
| 6434 | /* If RNG_FILENAME evaluates to true then we use that file for getting |
| 6435 | random bytes for session IDs. FIXME: we effectively leak a file |
| 6436 | handle if this is enabled. |
| 6437 | */ |
| 6438 |
| --- src/cson_amalgamation.c | |
| +++ src/cson_amalgamation.c | |
| @@ -6427,11 +6427,15 @@ | |
| 6427 | #include <string.h> /* strlen() */ |
| 6428 | #include <stdarg.h> |
| 6429 | #include <time.h> |
| 6430 | #include <locale.h> /* setlocale(), needed for JSON parser. */ |
| 6431 | |
| 6432 | #if CSON_ENABLE_UNIX |
| 6433 | # define CSON_CGI_USE_SIGNALS 1 |
| 6434 | #else |
| 6435 | # define CSON_CGI_USE_SIGNALS 0 |
| 6436 | #endif |
| 6437 | |
| 6438 | /* If RNG_FILENAME evaluates to true then we use that file for getting |
| 6439 | random bytes for session IDs. FIXME: we effectively leak a file |
| 6440 | handle if this is enabled. |
| 6441 | */ |
| 6442 |
+1
-1
| --- src/cson_amalgamation.h | ||
| +++ src/cson_amalgamation.h | ||
| @@ -35,11 +35,11 @@ | ||
| 35 | 35 | |
| 36 | 36 | #if defined(__cplusplus) |
| 37 | 37 | extern "C" { |
| 38 | 38 | #endif |
| 39 | 39 | |
| 40 | -#if defined(_WIN32) | |
| 40 | +#if defined(_WIN32) || defined(_WIN64) | |
| 41 | 41 | # define CSON_ENABLE_UNIX 0 |
| 42 | 42 | #else |
| 43 | 43 | # define CSON_ENABLE_UNIX 1 |
| 44 | 44 | #endif |
| 45 | 45 | |
| 46 | 46 |
| --- src/cson_amalgamation.h | |
| +++ src/cson_amalgamation.h | |
| @@ -35,11 +35,11 @@ | |
| 35 | |
| 36 | #if defined(__cplusplus) |
| 37 | extern "C" { |
| 38 | #endif |
| 39 | |
| 40 | #if defined(_WIN32) |
| 41 | # define CSON_ENABLE_UNIX 0 |
| 42 | #else |
| 43 | # define CSON_ENABLE_UNIX 1 |
| 44 | #endif |
| 45 | |
| 46 |
| --- src/cson_amalgamation.h | |
| +++ src/cson_amalgamation.h | |
| @@ -35,11 +35,11 @@ | |
| 35 | |
| 36 | #if defined(__cplusplus) |
| 37 | extern "C" { |
| 38 | #endif |
| 39 | |
| 40 | #if defined(_WIN32) || defined(_WIN64) |
| 41 | # define CSON_ENABLE_UNIX 0 |
| 42 | #else |
| 43 | # define CSON_ENABLE_UNIX 1 |
| 44 | #endif |
| 45 | |
| 46 |