From e07da412b71852ef32d7e5e19007321e539b5006 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Sat, 13 Jun 2020 15:58:01 +0200 Subject: Use gnu99 standard With recent changes to c99 and -D_POSIX_C_SOURCE=200809L we get the following: openSUSE TW CI sais: ``` Now you can run `make' to build profanity In file included from /usr/include/python2.7/Python.h:8, from src/plugins/python_plugins.c:37: /usr/include/python2.7/pyconfig.h:1226: error: "_POSIX_C_SOURCE" redefined [-Werror] 1226 | #define _POSIX_C_SOURCE 200112L | : note: this is the location of the previous definition In file included from /usr/include/python2.7/Python.h:8, from src/plugins/python_api.c:37: /usr/include/python2.7/pyconfig.h:1226: error: "_POSIX_C_SOURCE" redefined [-Werror] 1226 | #define _POSIX_C_SOURCE 200112L | : note: this is the location of the previous definition cc1: all warnings being treated as errors ``` OpenBSD CI sais: ``` cc1: warnings being treated as errors src/database.c: In function 'log_database_get_previous_chat': src/database.c:226: warning: implicit declaration of function 'asprintf' gmake[1]: *** [Makefile:1924: src/database.o] Error 1 gmake[1]: Leaving directory '/home/build/profanity' gmake: *** [Makefile:1211: all] Error 2 ``` Let us use gnu99. Has been proposed before already and is fine. Regards https://github.com/profanity-im/profanity/issues/1357 Regards https://github.com/profanity-im/profanity/pull/1351 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 648837b0..9aa939ea 100644 --- a/configure.ac +++ b/configure.ac @@ -354,7 +354,7 @@ AC_CHECK_HEADERS([ncursesw/ncurses.h], [], []) AC_CHECK_HEADERS([ncurses.h], [], []) ### Default parameters -AM_CFLAGS="-Wall -Wno-deprecated-declarations -std=c99 -D_POSIX_C_SOURCE=200809L" +AM_CFLAGS="-Wall -Wno-deprecated-declarations -std=gnu99" AS_IF([test "x$PACKAGE_STATUS" = xdevelopment], [AM_CFLAGS="$AM_CFLAGS -Wunused -Werror"]) AS_IF([test "x$PLATFORM" = xosx], -- cgit 1.4.1-2-gfad0