>>>> "GE" == Gunnar Evermann
<ge204(a)eng.cam.ac.uk> writes:
GE> Martin Buchholz <martin(a)xemacs.org> writes:
> ChangeLog:
>
> Define _POSIX_C_SOURCE, _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED,
> but only on tested Operating systems - Linux && SunOS >= 5.5.
GE> this breaks my build on SunOS 5.5.1 (installation below):
GE> ge204@marple$ make getloadavg.o
GE> cc -c -g -Demacs -I. -DHAVE_CONFIG_H -I/home/tigger3/ge204/local-sol/include
-I/usr/local/include -I/usr/dt/include -I/usr/openwin/include
/home/tigger3/ge204/src/XEmacs/xemacs/src/getloadavg.c
GE> "/usr/include/sys/klwp.h", line 93: syntax error before or at:
k_siginfo_t
GE> "/usr/include/sys/klwp.h", line 93: cannot recover from previous errors
GE> cc: acomp failed for /home/tigger3/ge204/src/XEmacs/xemacs/src/getloadavg.c
GE> make: *** [getloadavg.o] Error 2
Oh, well. Unfortunately, vendor header files tend to be a mess, and
it takes a few years for them to get properly fixed. I'm now sorry I
started down this path. Nevertheless, the idea of moving all feature
macro definitions into configure.in is sound.
Please test this patch (don't forget to autoconf):
Index: configure.in
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/configure.in,v
retrieving revision 1.111.2.79
diff -u -w -r1.111.2.79 configure.in
--- configure.in 2000/02/13 06:43:50 1.111.2.79
+++ configure.in 2000/02/14 23:30:29
@@ -1665,23 +1665,23 @@
dnl Well. then why not fix fucking pop?
test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
-dnl We'd like to use extensions on Solaris.
-test "$opsys" = "sol2" && AC_DEFINE(__EXTENSIONS__)
-
-dnl We'd like to use functions from the latest Posix/Unix98 standards.
+dnl We'd like to use vendor extensions, where available.
+dnl We'd like to use functions from the latest Unix98 standards.
dnl See
http://www.opengroup.org/onlinepubs/007908799/xsh/compilation.html
-PRINT_VAR(os_release)
-use_unix98_feature_macros=no
case "$opsys" in
+ sol2)
+ AC_DEFINE(__EXTENSIONS__)
dnl Solaris 2 before 2.5 had some bugs with feature test macro interaction.
- sol2) test "$os_release" -ge 55 && use_unix98_feature_macros=yes ;;
- linux) use_unix98_feature_macros=yes ;;
-esac
-if test "$use_unix98_feature_macros" = "yes"; then
+ if test "$os_release" -ge 55; then
+ AC_DEFINE(_XOPEN_SOURCE,500)
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+ fi ;;
+ linux)
AC_DEFINE(_POSIX_C_SOURCE,199506L)
AC_DEFINE(_XOPEN_SOURCE,500)
AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
-fi
+ ;;
+esac
dnl Identify compilers to enable compiler-specific hacks.
dnl Add support for other compilers HERE!