[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: |
Akim Demaille |
Subject: |
Re: _XOPEN_SOURCE=500 breaks at least OSF1 V5.0 [Re: largefiles |
Date: |
16 Nov 2000 09:38:48 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
>>>>> "Paul" == Paul Eggert <address@hidden> writes:
Paul> Then my diagnosis was incorrect. Sorry about that.
No problem!
Paul> I looked into it some more and I think I now see the problem.
Thanks! Below is the patch I applied to CVS Autoconf, since our
sources are somewhat diverging. But first, the new results on the
same machine (victory :).
/tmp % cat configure.in
AC_INIT
AC_FUNC_FSEEKO
/tmp % ace
/tmp % ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking whether we are using the GNU C compiler... yes
checking for object suffix... o
checking for executable suffix...
checking whether gcc accepts -g... yes
checking for _LARGEFILE_SOURCE value needed for large files... 1
checking for fseeko... yes
/tmp % cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by 2.49b, executed with
> ./configure
on nostromo:
uname -m = i686
uname -r = 2.2.17
uname -s = Linux
uname -v = #1 Sat Sep 9 12:42:22 EST 2000
/usr/bin/uname -p =
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch = i686
/usr/bin/oslevel =
/usr/convex/getsysinfo =
configure:863: checking for gcc
configure:885: result: gcc
configure:1106: checking whether the C compiler works
configure:1121: gcc -o conftest conftest.c >&5
configure:1125: ./conftest
configure:1137: result: yes
configure:1148: checking whether we are cross compiling
configure:1150: result: no
configure:1153: checking whether we are using the GNU C compiler
configure:1174: gcc -c conftest.c >&5
configure:1185: result: yes
configure:1188: checking for object suffix
configure:1205: gcc -c conftest.c >&5
configure:1218: result: o
configure:1224: checking for executable suffix
configure:1245: gcc -o conftest conftest.c >&5
configure:1264: result:
configure:1273: checking whether gcc accepts -g
configure:1291: gcc -c -g conftest.c >&5
configure:1300: result: yes
configure:1323: checking for _LARGEFILE_SOURCE value needed for large files
configure:1343: gcc -c -g -O2 conftest.c >&5
configure: In function `main':
configure:1336: `fseeko' undeclared (first use in this function)
configure:1336: (Each undeclared identifier is reported only once
configure:1336: for each function it appears in.)
configure: failed program was:
#line 1331 "configure"
#include "confdefs.h"
#include <stdio.h>
int
main ()
{
return !fseeko;
;
return 0;
}
configure:1364: gcc -c -g -O2 conftest.c >&5
configure:1374: result: 1
configure:1388: checking for fseeko
configure:1406: gcc -o conftest -g -O2 conftest.c >&5
configure:1415: result: yes
configure: exit 0
----------------------------------------------------------------------
Index: acfunctions.m4
===================================================================
RCS file: /cvs/autoconf/acfunctions.m4,v
retrieving revision 1.19
diff -u -u -r1.19 acfunctions.m4
--- acfunctions.m4 2000/11/14 16:01:05 1.19
+++ acfunctions.m4 2000/11/16 08:45:58
@@ -379,7 +379,7 @@
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).],
address@hidden:@include <stdio.h>], [return !fseeko;])
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
Index: acspecific.m4
===================================================================
RCS file: /cvs/autoconf/acspecific.m4,v
retrieving revision 1.313
diff -u -u -r1.313 acspecific.m4
--- acspecific.m4 2000/11/14 16:01:05 1.313
+++ acspecific.m4 2000/11/16 08:45:59
@@ -623,14 +623,12 @@
with arguments. Remove this warning when you adjust your code.])])
-# _AC_SYS_LARGEFILE_SOURCE(PROLOGUE, BODY)
-# ----------------------------------------
-m4_define([_AC_SYS_LARGEFILE_SOURCE],
-[AC_LANG_PROGRAM(
-[$1
address@hidden:@include <sys/types.h>
-int a[[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1]];],
-[$2])])
+# _AC_SYS_LARGEFILE_TEST_INCLUDES
+# -------------------------------
+m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
address@hidden:@include <sys/types.h>
+int a[[(off_t) 9223372036854775807 == 9223372036854775807 ? 1 : -1]];[]dnl
+])
# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
@@ -642,9 +640,9 @@
[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
[while :; do
$3=no
- AC_COMPILE_IFELSE([_AC_SYS_LARGEFILE_SOURCE([$5], [$6])],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$5], [$6])],
[break])
- AC_COMPILE_IFELSE([_AC_SYS_LARGEFILE_SOURCE(address@hidden:@define $1 $2
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(address@hidden:@define $1 $2
$5], [$6])],
[$3=$2; break])
break
@@ -690,10 +688,12 @@
_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_SYS_LARGEFILE