Skip to content

Commit

Permalink
Use gnu99 standard
Browse files Browse the repository at this point in the history
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 #1357
Regards #1351
  • Loading branch information
jubalh committed Jun 13, 2020
1 parent 914c675 commit e07da41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit e07da41

Please sign in to comment.