autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _XOPEN_SOURCE=500 breaks at least OSF1 V5.0 [Re: largefiles


From: Akim Demaille
Subject: Re: _XOPEN_SOURCE=500 breaks at least OSF1 V5.0 [Re: largefiles
Date: 14 Nov 2000 16:33:22 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

+AC_DEFUN(AC_FUNC_FSEEKO,
+  [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
+     ac_cv_sys_largefile_source,
+     [Define to make fseeko visible on some hosts (e.g. HP-UX 10.20).],
+     [#include <stdio.h>], [return !fseeko;])
+   # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+   # in glibc 2.1.3, but that breaks too many other things.
+   # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+
+   AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
+     [ac_cv_func_fseeko=no
+      AC_TRY_LINK([#include <stdio.h>],
+        [return fseeko && fseeko (stdin, 0, 0);],
+       [ac_cv_func_fseeko=yes])
+      if test $ac_cv_func_fseeko != no; then
+        AC_DEFINE(HAVE_FSEEKO, 1,
+          [Define if fseeko (and presumably ftello) exists and is declared.])
+      fi])])

FYI this macro has one big problem: the AC_DEFINE is inside the
AC_CACHE.  The version I'm checking in is fixed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]