Fossil SCM
Move macro definition to config.h which is included everywhere to fix build failure reported on mailing list with "configure --json --with-tcl --with-th1-docs".
Commit
36e7558a11598f3e27751272415c938e70312121
Parent
000f2193b0965a9…
2 files changed
+7
-5
+7
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -227,6 +227,13 @@ | ||
| 227 | 227 | # define NORETURN __attribute__((__noreturn__)) |
| 228 | 228 | #else |
| 229 | 229 | # define NORETURN |
| 230 | 230 | #endif |
| 231 | 231 | |
| 232 | +/* | |
| 233 | +** Number of elements in an array | |
| 234 | +*/ | |
| 235 | +#ifndef fossil_sizeof | |
| 236 | +# define count(X) (sizeof(X)/sizeof(X[0])) | |
| 237 | +#endif | |
| 238 | + | |
| 232 | 239 | #endif /* _RC_COMPILE_ */ |
| 233 | 240 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -227,6 +227,13 @@ | |
| 227 | # define NORETURN __attribute__((__noreturn__)) |
| 228 | #else |
| 229 | # define NORETURN |
| 230 | #endif |
| 231 | |
| 232 | #endif /* _RC_COMPILE_ */ |
| 233 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -227,6 +227,13 @@ | |
| 227 | # define NORETURN __attribute__((__noreturn__)) |
| 228 | #else |
| 229 | # define NORETURN |
| 230 | #endif |
| 231 | |
| 232 | /* |
| 233 | ** Number of elements in an array |
| 234 | */ |
| 235 | #ifndef fossil_sizeof |
| 236 | # define count(X) (sizeof(X)/sizeof(X[0])) |
| 237 | #endif |
| 238 | |
| 239 | #endif /* _RC_COMPILE_ */ |
| 240 |
-5
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -49,15 +49,10 @@ | ||
| 49 | 49 | #ifdef FOSSIL_ENABLE_JSON |
| 50 | 50 | # include "cson_amalgamation.h" /* JSON API. */ |
| 51 | 51 | # include "json_detail.h" |
| 52 | 52 | #endif |
| 53 | 53 | |
| 54 | -/* | |
| 55 | -** Number of elements in an array | |
| 56 | -*/ | |
| 57 | -#define count(X) (sizeof(X)/sizeof(X[0])) | |
| 58 | - | |
| 59 | 54 | /* |
| 60 | 55 | ** Size of a UUID in characters |
| 61 | 56 | */ |
| 62 | 57 | #define UUID_SIZE 40 |
| 63 | 58 | |
| 64 | 59 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -49,15 +49,10 @@ | |
| 49 | #ifdef FOSSIL_ENABLE_JSON |
| 50 | # include "cson_amalgamation.h" /* JSON API. */ |
| 51 | # include "json_detail.h" |
| 52 | #endif |
| 53 | |
| 54 | /* |
| 55 | ** Number of elements in an array |
| 56 | */ |
| 57 | #define count(X) (sizeof(X)/sizeof(X[0])) |
| 58 | |
| 59 | /* |
| 60 | ** Size of a UUID in characters |
| 61 | */ |
| 62 | #define UUID_SIZE 40 |
| 63 | |
| 64 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -49,15 +49,10 @@ | |
| 49 | #ifdef FOSSIL_ENABLE_JSON |
| 50 | # include "cson_amalgamation.h" /* JSON API. */ |
| 51 | # include "json_detail.h" |
| 52 | #endif |
| 53 | |
| 54 | /* |
| 55 | ** Size of a UUID in characters |
| 56 | */ |
| 57 | #define UUID_SIZE 40 |
| 58 | |
| 59 |