branch: elpa/emacsql commit 4e9297233daf885784d8379a387c23e7de13fea7 Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@nullprogram.com>
Don't rely on C99 mode. --- sqlite/Makefile | 2 +- sqlite/emacsql.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sqlite/Makefile b/sqlite/Makefile index 71e67453cf..dae2ecd5a5 100644 --- a/sqlite/Makefile +++ b/sqlite/Makefile @@ -9,7 +9,7 @@ else LDLIBS = -ldl endif -CFLAGS = -O2 --std=c99 -W -Wall -Wextra +CFLAGS = -O2 -W -Wall -Wextra CFLAGS += -DSQLITE_THREADSAFE=0 CFLAGS += -DSQLITE_DEFAULT_FOREIGN_KEYS=1 CFLAGS += -DSQLITE_ENABLE_FTS4 diff --git a/sqlite/emacsql.c b/sqlite/emacsql.c index 3fcc5655b1..a3f4484d7b 100644 --- a/sqlite/emacsql.c +++ b/sqlite/emacsql.c @@ -7,8 +7,8 @@ #define FALSE 0 char* escape(const char *message) { - int count = 0, length_orig = strlen(message); - for (int i = 0; i < length_orig; i++) { + int i, count = 0, length_orig = strlen(message); + for (i = 0; i < length_orig; i++) { if (message[i] == '"') { count++; } @@ -136,7 +136,8 @@ int main(int argc, char **argv) { } else { printf("\n ("); } - for (int i = 0; i < ncolumns; i++) { + int i; + for (i = 0; i < ncolumns; i++) { if (i > 0) { printf(" "); }