summaryrefslogtreecommitdiff
path: root/libpkgconf/libpkgconf/buildfile
diff options
context:
space:
mode:
Diffstat (limited to 'libpkgconf/libpkgconf/buildfile')
-rw-r--r--libpkgconf/libpkgconf/buildfile26
1 files changed, 11 insertions, 15 deletions
diff --git a/libpkgconf/libpkgconf/buildfile b/libpkgconf/libpkgconf/buildfile
index c29bc53..a9b6e9c 100644
--- a/libpkgconf/libpkgconf/buildfile
+++ b/libpkgconf/libpkgconf/buildfile
@@ -95,25 +95,21 @@ elif $clang_msvc
#
if! $windows
{
- # Upstream package compiles the source files with -std=gnu99 option to allow
- # some GNU deviations from the ISO C99 standard. We will compile with
- # -std=c9x option (is implied by c.std=99 in root.build) and define
- # _GNU_SOURCE for the source files that require such deviations. This macro
- # also re-enables definitions of POSIX macros (specifically PATH_MAX) that
- # are disabled by -std=c9x.
+ # The upstream package compiles the source files with -std=gnu99 option to
+ # allow some GNU deviations from the ISO C99 standard. We will compile with
+ # the -std=c99 option (via c.std=99 in root.build) and define
+ # _POSIX_C_SOURCE=200809L for all as well as _GNU_SOURCE for some source
+ # files (those that require GNU extension). These macros also re-enable
+ # definitions of POSIX macros (specifically PATH_MAX) that are disabled by
+ # -std=c99.
#
# Note that on FreeBSD and MacOS -D_POSIX_C_SOURCE disables declarations of
- # strndup(), strlcpy() and alike, that are not POSIX. Not very consistent
- # given that they are also not C99. Luckily, -std=c9x doesn't disable
- # PATH_MAX on these OSes, so we just don't define the macro for them.
- #
- # @@ It all becomes a bit hairy. Should we just undefine the corresponding
- # HAVE_* macros in config.h, so the custom function implementations are
- # picked up? Alternatively, can we stop specifying the C standard and
- # defining _POSIX_C_SOURCE macro altogether?
+ # strlcpy() and alike which are not POSIX. Not very consistent given that
+ # they are also not C99. Luckily, -std=c99 doesn't disable PATH_MAX on these
+ # platforms, so we just don't define this macro for them.
#
if! ($bsd || $macos)
- c.poptions += -D_POSIX_C_SOURCE=200112L
+ c.poptions += -D_POSIX_C_SOURCE=200809L
obj{client fragment path personality pkg queue tuple}: \
c.poptions += -D_GNU_SOURCE