@@ -34,23 +34,8 @@ SOVERSION=1.0
3434# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3535AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])
3636
37- # The definition of _GNU_SOURCE potentially causes a change of the value
38- # of _XOPEN_SOURCE. So define it only conditionally.
39- AH_VERBATIM([_XOPEN_SOURCE],
40- [/* Define on UNIX to activate XPG/5 features. */
41- #ifndef _XOPEN_SOURCE
42- # undef _XOPEN_SOURCE
43- #endif])
44-
4537define_xopen_source=yes
4638
47- # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
48- # of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
49- # are not declared. Since this is also needed in some cases for HP-UX,
50- # we define it globally.
51- AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Define to activate Unix95-and-earlier features)
52- AC_DEFINE(_POSIX_C_SOURCE, 199506L, Define to activate features from IEEE Stds 1003.{123}-1995)
53-
5439# Arguments passed to configure.
5540AC_SUBST(CONFIG_ARGS)
5641CONFIG_ARGS="$ac_configure_args"
@@ -135,11 +120,25 @@ case $ac_sys_system/$ac_sys_release in
135120 # even though select is a POSIX function. Reported by J. Ribbens.
136121 OpenBSD/2.* | OpenBSD/3.@<:@012@:>@)
137122 define_xopen_source=no;;
123+ # On FreeBSD 5.0, chroot and setgroups are not declared if _XOPEN_SOURCE
124+ # is define. Reported by M. Recht.
125+ FreeBSD/5.0*)
126+ define_xopen_source=no;;
138127esac
139128
140129if test $define_xopen_source = yes
141130then
142- AC_DEFINE(_XOPEN_SOURCE, 500)
131+ AC_DEFINE(_XOPEN_SOURCE, 600,
132+ Define to the level of X/Open that your system supports)
133+
134+ # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
135+ # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
136+ # several APIs are not declared. Since this is also needed in some
137+ # cases for HP-UX, we define it globally.
138+
139+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Define to activate Unix95-and-earlier features)
140+ AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
141+
143142fi
144143
145144#
0 commit comments