]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acspecific.m4 (AC_SYS_LARGEFILE): Don't worry about
authorAkim Demaille <akim@epita.fr>
Tue, 14 Nov 2000 16:01:05 +0000 (16:01 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 14 Nov 2000 16:01:05 +0000 (16:01 +0000)
whether fseeko and ftello are properly declared.
* acfunctions.m4 (AC_FUNC_FSEEKO): New macro, which worries about
fseeko (and presumably ftello).  Do not set _XOPEN_SOURCE; that
causes too many problems in practice.
* acfunctions (fteelo, fseeko): Trigger AC_FUNC_FSEEKO.
* doc/autoconf.texi: Adjust.

ChangeLog
NEWS
acfunctions
acfunctions.m4
acspecific.m4
doc/autoconf.texi
lib/autoconf/functions.m4
lib/autoconf/specific.m4
lib/autoscan/functions
tests/syntax.at

index 8536b9f9050d2d4d7fe067d0ce1c0e3e5286df33..22c72acc3c915ba105420b65d9bfc1509443e672 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-11-14  Paul Eggert  <eggert@twinsun.com>
+
+       * acspecific.m4 (AC_SYS_LARGEFILE): Don't worry about
+       whether fseeko and ftello are properly declared.
+       * acfunctions.m4 (AC_FUNC_FSEEKO): New macro, which worries about
+       fseeko (and presumably ftello).  Do not set _XOPEN_SOURCE; that
+       causes too many problems in practice.
+       * acfunctions (fteelo, fseeko): Trigger AC_FUNC_FSEEKO.
+       * doc/autoconf.texi: Adjust.
+
 2000-11-14  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi (Limitations of Builtins): Comment `true'.
diff --git a/NEWS b/NEWS
index bc3d5b0973c7d47af7bff2e64b41aaec05c6e0f3..807845004bd86b8a5c10d9fd5b57cc79fc8a6497 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -203,7 +203,7 @@ test cases in this new frame work.
 ** Specific Macros
 - AC_FUNC_CHOWN, AC_FUNC_MALLOC, AC_FUNC_STRERROR_R,
   AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, AC_FUNC_STAT, AC_FUNC_LSTAT,
-  AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD.
+  AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD, AC_FUNC_FSEEKO.
   New.
 
 - AC_FUNC_GETGROUPS
index d5d512527d52cfc3926f181cdf668623edb619aa..e801ecb5438209a1c8afa23fa48199bb624f330f 100644 (file)
@@ -7,6 +7,8 @@ chown           AC_FUNC_CHOWN
 error          AC_FUNC_ERROR_AT_LINE
 error_at_line  AC_FUNC_ERROR_AT_LINE
 fnmatch                AC_FUNC_FNMATCH
+fseeko         AC_FUNC_FSEEKO
+ftello         AC_FUNC_FSEEKO
 getgroups      AC_FUNC_GETGROUPS
 getloadavg     AC_FUNC_GETLOADAVG
 getpgrp                AC_FUNC_GETPGRP
index bd4b10872f96329258175e02f8182c35ca3b1525..8e6e00620f6ad9dded62be9a1457ec5dfdd91a52 100644 (file)
@@ -374,6 +374,29 @@ fi
 AU_ALIAS([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH])
 
 
+# AC_FUNC_FSEEKO
+# --------------
+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_TRY_LINK([@%:@include <stdio.h>],
+                            [return fseeko && fseeko (stdin, 0, 0);],
+                            [ac_cv_func_fseeko=yes],
+                            [ac_cv_func_fseeko=no])])
+if test $ac_cv_func_fseeko = yes; then
+  AC_DEFINE(HAVE_FSEEKO, 1,
+    [Define if fseeko (and presumably ftello) exists and is declared.])
+fi
+])# AC_FUNC_FSEEKO
+
+
 # AC_FUNC_GETGROUPS
 # -----------------
 # Try to find `getgroups', and check that it works.
index 894a4724918a20a573fdd89745eb26fadacf3cf0..7b4357418de1fad8fd07d4d9516cf999cb9cabae 100644 (file)
@@ -691,17 +691,9 @@ if test "$enable_largefile" != no; then
   _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.])
-  _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
-    ac_cv_sys_largefile_source,
-    [Define to make ftello visible on some hosts (e.g. HP-UX 10.20).],
-    [@%:@include <stdio.h>], [return !ftello;])
   _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
     ac_cv_sys_large_files,
     [Define for large files, on AIX-style hosts.])
-  _AC_SYS_LARGEFILE_MACRO_VALUE(_XOPEN_SOURCE, 500,
-    ac_cv_sys_xopen_source,
-    [Define to make ftello visible on some hosts (e.g. glibc 2.1.3).],
-    [@%:@include <stdio.h>], [return !ftello;])
 fi
 ])# AC_SYS_LARGEFILE
 
index 2f5f1fce4e2687591b07a67eab5d88970d3365a2..ba161cbc73c411499d0a6f7a7968b8ed8819bc0a 100644 (file)
@@ -3080,6 +3080,13 @@ If the @code{fnmatch} function is available and works (unlike the one on
 SunOS 5.4), define @code{HAVE_FNMATCH}.
 @end defmac
 
+@defmac AC_FUNC_FSEEKO
+@maindex FUNC_FSEEKO
+@cvindex _LARGEFILE_SOURCE
+If the @code{fseeko} function is available, define @code{HAVE_FSEEKO}.
+Define @code{_LARGEFILE_SOURCE} if necessary.
+@end defmac
+
 @defmac AC_FUNC_GETGROUPS
 @maindex FUNC_GETGROUPS
 @ovindex GETGROUPS_LIBS
@@ -4573,17 +4580,14 @@ if the system supports @samp{#!}, @samp{no} if not.
 @defmac AC_SYS_LARGEFILE
 @maindex SYS_LARGEFILE
 @cvindex _FILE_OFFSET_BITS
-@cvindex _LARGEFILE_SOURCE
 @cvindex _LARGE_FILES
-@cvindex _XOPEN_SOURCE
 @ovindex CC
 Arrange for
 @uref{http://www.sas.com/standards/large.file/x_open.20Mar96.html,
 large-file support}.  On some hosts, one must use special compiler
 options to build programs that can access large files.  Append any such
 options to the output variable @code{CC}.  Define
-@code{_FILE_OFFSET_BITS}, @code{_LARGEFILE_SOURCE}, @code{_LARGE_FILES},
-and @code{_XOPEN_SOURCE} if necessary.
+@code{_FILE_OFFSET_BITS} and @code{_LARGE_FILES} if necessary.
 
 The user can disable large-file support by configuring with the
 @option{--disable-largefile} option.
index bd4b10872f96329258175e02f8182c35ca3b1525..8e6e00620f6ad9dded62be9a1457ec5dfdd91a52 100644 (file)
@@ -374,6 +374,29 @@ fi
 AU_ALIAS([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH])
 
 
+# AC_FUNC_FSEEKO
+# --------------
+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_TRY_LINK([@%:@include <stdio.h>],
+                            [return fseeko && fseeko (stdin, 0, 0);],
+                            [ac_cv_func_fseeko=yes],
+                            [ac_cv_func_fseeko=no])])
+if test $ac_cv_func_fseeko = yes; then
+  AC_DEFINE(HAVE_FSEEKO, 1,
+    [Define if fseeko (and presumably ftello) exists and is declared.])
+fi
+])# AC_FUNC_FSEEKO
+
+
 # AC_FUNC_GETGROUPS
 # -----------------
 # Try to find `getgroups', and check that it works.
index 894a4724918a20a573fdd89745eb26fadacf3cf0..7b4357418de1fad8fd07d4d9516cf999cb9cabae 100644 (file)
@@ -691,17 +691,9 @@ if test "$enable_largefile" != no; then
   _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.])
-  _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
-    ac_cv_sys_largefile_source,
-    [Define to make ftello visible on some hosts (e.g. HP-UX 10.20).],
-    [@%:@include <stdio.h>], [return !ftello;])
   _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
     ac_cv_sys_large_files,
     [Define for large files, on AIX-style hosts.])
-  _AC_SYS_LARGEFILE_MACRO_VALUE(_XOPEN_SOURCE, 500,
-    ac_cv_sys_xopen_source,
-    [Define to make ftello visible on some hosts (e.g. glibc 2.1.3).],
-    [@%:@include <stdio.h>], [return !ftello;])
 fi
 ])# AC_SYS_LARGEFILE
 
index d5d512527d52cfc3926f181cdf668623edb619aa..e801ecb5438209a1c8afa23fa48199bb624f330f 100644 (file)
@@ -7,6 +7,8 @@ chown           AC_FUNC_CHOWN
 error          AC_FUNC_ERROR_AT_LINE
 error_at_line  AC_FUNC_ERROR_AT_LINE
 fnmatch                AC_FUNC_FNMATCH
+fseeko         AC_FUNC_FSEEKO
+ftello         AC_FUNC_FSEEKO
 getgroups      AC_FUNC_GETGROUPS
 getloadavg     AC_FUNC_GETLOADAVG
 getpgrp                AC_FUNC_GETPGRP
index 465fcb1acd9470b5d3c746f35fa58d8ae90dcf41..7987c6b1b223760d7c650b6023c0e8b12e0f65a5 100644 (file)
@@ -35,6 +35,7 @@ AT_CHECK_MACRO([AC_FUNC_CHOWN])
 AT_CHECK_MACRO([AC_FUNC_CLOSEDIR_VOID])
 AT_CHECK_MACRO([AC_FUNC_ERROR_AT_LINE])
 AT_CHECK_MACRO([AC_FUNC_FNMATCH])
+AT_CHECK_MACRO([AC_FUNC_FSEEKO])
 AT_CHECK_MACRO([AC_FUNC_GETGROUPS])
 AT_CHECK_MACRO([AC_FUNC_GETLOADAVG])
 AT_CHECK_MACRO([AC_FUNC_GETMNTENT])