1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Work around compilers that do not understand flexible arrays, in the

recovery extension and in the fuzzcheck test module.

FossilOrigin-Name: f101c46cf83e532fd33034abccba496bf395ef10c161af003211614d6581d5eb
This commit is contained in:
drh
2025-03-15 19:00:46 +00:00
parent 7bd72d4abf
commit b7b060401e
4 changed files with 25 additions and 10 deletions

View File

@ -88,6 +88,11 @@
#include "sqlite3recover.h"
#define ISSPACE(X) isspace((unsigned char)(X))
#define ISDIGIT(X) isdigit((unsigned char)(X))
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
# define FLEXARRAY
#else
# define FLEXARRAY 1
#endif
#ifdef __unix__
@ -129,7 +134,7 @@ struct Blob {
int id; /* Id of this Blob */
int seq; /* Sequence number */
int sz; /* Size of this Blob in bytes */
unsigned char a[]; /* Blob content. Extra space allocated as needed. */
unsigned char a[FLEXARRAY]; /* Blob content. Allocated as needed. */
};
/* Size in bytes of a Blob object sufficient to store N byte of content */