about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-06-13 15:58:01 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-06-13 15:58:01 +0200
commite07da412b71852ef32d7e5e19007321e539b5006 (patch)
treeb965f013affaa8513558df60af4ad2159c8331ca
parent914c6752dd4ac3421311817d585cd687cec693e4 (diff)
downloadprofani-tty-e07da412b71852ef32d7e5e19007321e539b5006.tar.gz
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

      |

<command-line>: 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

      |

<command-line>: 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
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
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],