configure: Define _GNU_SOURCE in config.h.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-10-11 11:22:53 +02:00
parent f5b32121b1
commit ea2c743668
7 changed files with 13 additions and 14 deletions

9
configure vendored
View File

@ -9111,6 +9111,9 @@ fi
;;
linux-android*)
$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
DLLFLAGS="$DLLFLAGS -fPIC"
LDDLLFLAGS="-fPIC"
LDEXECFLAGS="-Wl,-pie"
@ -9290,6 +9293,9 @@ fi
;;
*)
$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
case $host_cpu in
*i[3456789]86*)
DLLFLAGS="$DLLFLAGS -fno-PIC"
@ -18424,7 +18430,6 @@ if ${wine_cv_have_sched_setaffinity+:} false; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _GNU_SOURCE
#include <sched.h>
int
main ()
@ -19029,7 +19034,6 @@ fi
ac_fn_c_check_member "$LINENO" "struct in6_pktinfo" "ipi6_addr" "ac_cv_member_struct_in6_pktinfo_ipi6_addr" "#ifdef HAVE_NETINET_IN_H
#define _GNU_SOURCE
#include <netinet/in.h>
#endif
"
@ -19198,7 +19202,6 @@ if ${ac_cv_have_isfinite+:} false; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _GNU_SOURCE
#include <math.h>
int
main ()

View File

@ -861,6 +861,7 @@ case $host_os in
;;
linux-android*)
AC_DEFINE(_GNU_SOURCE,1,[Define to 1 to enable GNU extensions on Linux])
DLLFLAGS="$DLLFLAGS -fPIC"
LDDLLFLAGS="-fPIC"
LDEXECFLAGS="-Wl,-pie"
@ -884,6 +885,7 @@ case $host_os in
;;
*)
AC_DEFINE(_GNU_SOURCE,1,[Define to 1 to enable GNU extensions on Linux])
case $host_cpu in
*i[[3456789]]86*)
DLLFLAGS="$DLLFLAGS -fno-PIC"
@ -2217,8 +2219,7 @@ WINE_NOTICE_WITH(ldap,[test "x$LDAP_LIBS" = "x"],
AC_CACHE_CHECK([for sched_setaffinity],wine_cv_have_sched_setaffinity,
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#define _GNU_SOURCE
#include <sched.h>]], [[sched_setaffinity(0, 0, 0);]])],[wine_cv_have_sched_setaffinity=yes],[wine_cv_have_sched_setaffinity=no]))
[[#include <sched.h>]], [[sched_setaffinity(0, 0, 0);]])],[wine_cv_have_sched_setaffinity=yes],[wine_cv_have_sched_setaffinity=no]))
if test "$wine_cv_have_sched_setaffinity" = "yes"
then
AC_DEFINE(HAVE_SCHED_SETAFFINITY, 1, [Define to 1 if you have the `sched_setaffinity' function.])
@ -2438,7 +2439,6 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,,
dnl Check for struct in6_pktinfo
AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr],,,
[#ifdef HAVE_NETINET_IN_H
#define _GNU_SOURCE
#include <netinet/in.h>
#endif])
@ -2524,8 +2524,7 @@ dnl Check for isfinite
ac_save_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_CACHE_CHECK([for isfinite], ac_cv_have_isfinite,
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
#include <math.h>]], [[float f = 0.0; return isfinite(f)]])],[ac_cv_have_isfinite="yes"],[ac_cv_have_isfinite="no"]))
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], [[float f = 0.0; return isfinite(f)]])],[ac_cv_have_isfinite="yes"],[ac_cv_have_isfinite="no"]))
if test "$ac_cv_have_isfinite" = "yes"
then
AC_DEFINE(HAVE_ISFINITE, 1, [Define to 1 if you have the `isfinite' function.])

View File

@ -23,7 +23,6 @@
#endif
#include "config.h"
#define _GNU_SOURCE /* for struct in6_pktinfo */
#include <errno.h>
#include <sys/types.h>
#include <unistd.h>

View File

@ -22,7 +22,6 @@
#include "config.h"
#include <stdarg.h>
#define _GNU_SOURCE
#include <stdio.h>
#include <math.h>

View File

@ -1105,6 +1105,9 @@
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define to 1 to enable GNU extensions on Linux */
#undef _GNU_SOURCE
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES

View File

@ -29,9 +29,6 @@
# error You must include port.h before all other headers
#endif
#ifndef _GNU_SOURCE
# define _GNU_SOURCE /* for pread/pwrite, isfinite */
#endif
#include <fcntl.h>
#include <math.h>
#include <sys/types.h>

View File

@ -20,7 +20,6 @@
#include "config.h"
#define _GNU_SOURCE /* sched_affinity */
#include <assert.h>
#include <errno.h>
#include <fcntl.h>