[Top][All Lists]
[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: |
Paul Eggert |
Subject: |
Re: _XOPEN_SOURCE=500 breaks at least OSF1 V5.0 [Re: largefiles |
Date: |
Wed, 15 Nov 2000 12:13:56 -0800 (PST) |
> From: Akim Demaille <address@hidden>
> Date: 15 Nov 2000 16:29:02 +0100
> Paul> It should be fixed in glibc 2.2.
>
> I run 2.2.
Then my diagnosis was incorrect. Sorry about that.
I looked into it some more and I think I now see the problem.
AC_FUNC_FSEEKO currently assumes that you don't want fseeko unless you
are compiling for large files. This assumption is incorrect in
general, and your configure.in provides a counterexample.
Here's a patch, relative to my autoconf 2.13 edition of largefile.m4.
This patch assumes the AC_DEFINE / AC_CACHE_CHECK nesting fix that you
recently sent. This patch also fixes a related quoting problem that I
noticed while looking into this problem.
2000-11-15 Paul Eggert <address@hidden>
* m4/largefile.m4 (AC_SYS_LARGEFILE_MACRO_VALUE): Don't use
AC_SYS_LARGEFILE_TEST_INCLUDES; this isn't desirable when
checking for fseeko. Quote the INCLUDES argument properly.
(AC_SYS_LARGEFILE): Pass AC_SYS_LARGEFILE_TEST_INCLUDES to
AC_SYS_LARGEFILE_MACRO_VALUE, since it no longer does this for us.
===================================================================
RCS file: m4/largefile.m4,v
retrieving revision 1.14
retrieving revision 1.15
diff -pu -r1.14 -r1.15
--- m4/largefile.m4 2000/11/15 20:08:30 1.14
+++ m4/largefile.m4 2000/11/15 20:08:53 1.15
@@ -1,4 +1,4 @@
-#serial 14
+#serial 15
dnl By default, many hosts won't let programs access large files;
dnl one must use special compiler options to get large-file access to work.
@@ -19,14 +19,11 @@ dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO
AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
[AC_CACHE_CHECK([for $1 value needed for large files], $3,
[$3=no
- AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES
-$5
- ,
+ AC_TRY_COMPILE([$5],
[$6],
,
[AC_TRY_COMPILE([#define $1 $2]
-AC_SYS_LARGEFILE_TEST_INCLUDES
-$5
+[$5]
,
[$6],
[$3=$2])])])
@@ -58,17 +55,19 @@ AC_DEFUN(AC_SYS_LARGEFILE,
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
ac_cv_sys_file_offset_bits,
- [Number of bits in a file offset, on hosts where this is settable.])
+ [Number of bits in a file offset, on hosts where this is settable.],
+ AC_SYS_LARGEFILE_TEST_INCLUDES)
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
ac_cv_sys_large_files,
- [Define for large files, on AIX-style hosts.])
+ [Define for large files, on AIX-style hosts.]
+ AC_SYS_LARGEFILE_TEST_INCLUDES)
fi
])
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).],
+ [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
[#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.