Don't build code with _GNU_SOURCE, use _XOPEN_SOURCE=500 instead.
_GNU_SOURCE is only now for xbps_xasprintf() if vasprintf is found, and only for <stdio.h>, it's unset immediately once the header is included.
This commit is contained in:
parent
64cd7cf0a4
commit
be5ff1d934
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2008-2010 Juan Romero Pardines.
|
||||
* Copyright (c) 2008-2011 Juan Romero Pardines.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -27,6 +27,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <assert.h>
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "defs.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2008-2010 Juan Romero Pardines.
|
||||
* Copyright (c) 2008-2011 Juan Romero Pardines.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -27,6 +27,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <libgen.h>
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
5
configure
vendored
5
configure
vendored
@ -184,9 +184,8 @@ fi
|
||||
|
||||
case "$OS" in
|
||||
linux)
|
||||
echo "CPPFLAGS += -D_XOPEN_SOURCE=600 -D_GNU_SOURCE" >>$CONFIG_MK
|
||||
echo "CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" >> $CONFIG_MK
|
||||
echo "CPPFLAGS += -D_LARGE_FILES" >> $CONFIG_MK
|
||||
echo "CPPFLAGS += -D_XOPEN_SOURCE=500" >>$CONFIG_MK
|
||||
echo "CPPFLAGS += -D_FILE_OFFSET_BITS=64" >> $CONFIG_MK
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
|
@ -14,6 +14,7 @@ LIBPROP_OBJS += portableproplib/prop_stack.o portableproplib/prop_string.o
|
||||
LIBPROP_OBJS += portableproplib/prop_array_util.o portableproplib/prop_number.o
|
||||
LIBPROP_OBJS += portableproplib/prop_dictionary_util.o
|
||||
LIBPROP_OBJS += portableproplib/prop_data.o
|
||||
LIBPROP_CPPFLAGS = -D_GNU_SOURCE
|
||||
LIBPROP_CFLAGS = -Wno-old-style-definition -Wno-cast-qual -Wno-unused-parameter
|
||||
|
||||
ifdef USE_EXTERNAL_PROPLIB
|
||||
@ -23,7 +24,7 @@ endif
|
||||
# libfetch
|
||||
LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o
|
||||
LIBFETCH_OBJS += fetch/ftp.o fetch/http.o
|
||||
LIBFETCH_CPPFLAGS = -DFTP_COMBINE_CWDS -DNETBSD -DINET6 -DWITH_SSL
|
||||
LIBFETCH_CPPFLAGS = -D_GNU_SOURCE -DFTP_COMBINE_CWDS -DNETBSD -DINET6 -DWITH_SSL
|
||||
LIBFETCH_CFLAGS = -Wno-error -Wno-unused-macros -Wno-conversion
|
||||
ifdef HAVE_VISIBILITY
|
||||
LIBFETCH_SHLIBCFLAGS = -fvisibility=hidden
|
||||
@ -66,7 +67,8 @@ $(LIBFETCH_OBJS): %.o: %.c $(LIBFETCH_INCS) $(LIBFETCH_GEN)
|
||||
|
||||
$(LIBPROP_OBJS): %.o: %.c
|
||||
@printf " [CC]\t\t$@\n"
|
||||
${SILENT}$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBPROP_CFLAGS) -c $< -o $@
|
||||
${SILENT}$(CC) $(CPPFLAGS) $(LIBPROP_CPPFLAGS) \
|
||||
$(CFLAGS) $(LIBPROP_CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJS): %.o: %.c
|
||||
@printf " [CC]\t\t$@\n"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <xbps_api.h>
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <xbps_api.h>
|
||||
#include "xbps_api_impl.h"
|
||||
|
@ -23,7 +23,13 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_VASPRINTF
|
||||
# define _GNU_SOURCE /* for vasprintf(3) */
|
||||
# include <stdio.h>
|
||||
# undef _GNU_SOURCE
|
||||
#else
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
Loading…
Reference in New Issue
Block a user