LDFLAGS="$LDFLAGS -framework Carbon"
fi
+gl_GLIBC21
+if test "x$GLIBC21" = "xyes"; then
+ AC_DEFINE([_GNU_SOURCE], 1, [Make all glibc extensions visible])
+fi
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug,
fi
fi
-gl_GLIBC21
AC_ARG_ENABLE(iconv-cache,
[AC_HELP_STRING([--enable-iconv-cache=@<:@yes/no/auto@:>@],
[cache iconv descriptors [default=auto]])],,
# Checks for libcharset
AM_LANGINFO_CODESET
-gl_GLIBC21
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
AC_CHECK_FUNCS(setlocale)
#include "config.h"
#ifdef HAVE_SPLICE
-#define _GNU_SOURCE
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
*/
/* Prologue {{{1 */
-#define _GNU_SOURCE
#include "config.h"
#include <gstdio.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#define _GNU_SOURCE
#include <fcntl.h>
#include <errno.h>
#ifdef HAVE_GRP_H
#else /* !G_OS_WIN32 */
-/* need this for struct ucred on Linux */
-#ifdef __linux__
-#define __USE_GNU
#include <sys/types.h>
-#include <sys/socket.h>
-#undef __USE_GNU
-#endif
-#include <sys/types.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
#if defined(HAVE_ARPA_NAMESER_COMPAT_H) && !defined(GETSHORT)
#include <arpa/nameser_compat.h>
#endif
-
-#ifndef T_SRV
-#define T_SRV 33
-#endif
-
-/* We're supposed to define _GNU_SOURCE to get EAI_NODATA, but that
- * won't actually work since <features.h> has already been included at
- * this point. So we define __USE_GNU instead.
- */
-#define __USE_GNU
#include <netdb.h>
-#undef __USE_GNU
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <resolv.h>
#include <sys/socket.h>
#include <sys/un.h>
+#ifndef T_SRV
+#define T_SRV 33
+#endif
+
#ifndef _PATH_RESCONF
#define _PATH_RESCONF "/etc/resolv.conf"
#endif
*/
/* Prelude {{{1 */
-#define _GNU_SOURCE
#include "config.h"
#include <glib.h>
/* ---------------------------------------------------------------------------------------------------- */
#ifdef __linux__
-
-#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
* <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
*/
-#define _GNU_SOURCE /* for F_DUPFD_CLOEXEC */
-
#include "config.h"
#include <sys/types.h>
#include "config.h"
-#define _GNU_SOURCE
-
/* We want to build the fork-based version, not the threaded version. */
#undef HAVE_PTHREAD
* Author: David Zeuthen <davidz@redhat.com>
*/
+#include "config.h"
+
#include <gio/gio.h>
#include <unistd.h>
#include <string.h>
* system, work around it here (or better, fix the system or tell
* people to use a better one).
*/
-#ifndef _GNU_SOURCE
-#define _G_GNU_SOURCE_TEMPORARILY_DEFINED
-#define _GNU_SOURCE
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/wait.h>
#include <stdlib.h>
#include <fcntl.h>
-#ifdef _G_GNU_SOURCE_TEMPORARILY_DEFINED
-#undef _GNU_SOURCE
-#undef _G_GNU_SOURCE_TEMPORARILY_DEFINED
-#endif
#include <glib.h>
* MT safe
*/
-#ifndef _WIN32
-/* for pipe2; need to define it first to avoid
- * other headers pulling in unistd.h
- */
-/* The meaning of_GNU_SOURCE that is intended here is present only on
- * Linux; avoid the possibility that some misguided header in MinGW
- * looks at it. Ideally we should define _GNU_SOURCE only on platforms
- * where we know what it means and that is what we want here
- * (i.e. Linux with glibc). After all, there might be some other POSIX
- * platform even where _GNU_SOURCE is used for some unrelated change
- * in semantics that isn't wanted. Sigh.
- */
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include "glibconfig.h"
#include "config.h"
-#ifndef _WIN32
-#define _GNU_SOURCE /* For vasprintf */
-#endif
-
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include "config.h"
-#define _GNU_SOURCE
#include <limits.h>
#include <stdlib.h>
#include <string.h>
# define HAVE_COMPLIANT_POSIX_MEMALIGN 1
#endif
-#ifdef HAVE_COMPLIANT_POSIX_MEMALIGN
+#if defined(HAVE_COMPLIANT_POSIX_MEMALIGN) && !defined(_XOPEN_SOURCE)
#define _XOPEN_SOURCE 600 /* posix_memalign() */
#endif
#include <stdlib.h> /* posix_memalign() */
#include "config.h"
-#define _GNU_SOURCE /* For stpcpy */
-
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>