Fossil SCM

more cson portability fixes, thanks to Robert Engelhardt and Mistachkin.

stephan 2011-09-16 13:39 UTC json
Commit afd36e987ca1f2841bd2d819e64804c1f1a9f971
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -6427,11 +6427,15 @@
64276427
#include <string.h> /* strlen() */
64286428
#include <stdarg.h>
64296429
#include <time.h>
64306430
#include <locale.h> /* setlocale(), needed for JSON parser. */
64316431
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
64336437
64346438
/* If RNG_FILENAME evaluates to true then we use that file for getting
64356439
random bytes for session IDs. FIXME: we effectively leak a file
64366440
handle if this is enabled.
64376441
*/
64386442
--- 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
--- src/cson_amalgamation.h
+++ src/cson_amalgamation.h
@@ -35,11 +35,11 @@
3535
3636
#if defined(__cplusplus)
3737
extern "C" {
3838
#endif
3939
40
-#if defined(_WIN32)
40
+#if defined(_WIN32) || defined(_WIN64)
4141
# define CSON_ENABLE_UNIX 0
4242
#else
4343
# define CSON_ENABLE_UNIX 1
4444
#endif
4545
4646
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button