Compile with -std=c11 along with _POSIX_C_SOURCE=200112L.
With gcc 5.1 released and defaulting to std=gnu11, the code will be compiled according to different standards depending on the compiler version so we should better specify explicitly what standard we are targetting. C11 is now quite mature, it is supported in the just release Debian stable (gcc 4.9) and also in old-stable (gcc 4.7), so there should be no reason to use anything more ancient. We also should have no reason to need any non-standard GNU extension. So using only C11 + POSIX sounds like the best option right now.
This commit is contained in:
parent
76372c5a9c
commit
e35e1e7bab
|
@ -45,7 +45,7 @@ AH_BOTTOM([#endif /* SR_CONFIG_H */])
|
|||
# Enable more compiler warnings via -Wall and -Wextra. Add -fvisibility=hidden
|
||||
# and enforce use of SR_API to explicitly mark all public API functions.
|
||||
COMMON_FLAGS="$CFLAGS -Wall -Wextra -fvisibility=hidden"
|
||||
CFLAGS="$COMMON_FLAGS -Wmissing-prototypes"
|
||||
CFLAGS="$COMMON_FLAGS -std=c11 -D_POSIX_C_SOURCE=200112L -Wmissing-prototypes"
|
||||
CXXFLAGS="-std=c++11 $COMMON_FLAGS"
|
||||
|
||||
# Checks for programs.
|
||||
|
|
Loading…
Reference in New Issue