stdio: simplify by moving gl_STDIN_LARGE_OFFSET to fseeko, ftello
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 28 Feb 2011 23:10:55 +0000 (15:10 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 28 Feb 2011 23:10:55 +0000 (15:10 -0800)
* m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ...
* m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because
* modules/ftello (Files): Add m4/fseeko.m4, for gl_STDIN_LARGE_OFFSET.

ChangeLog
m4/fseeko.m4
m4/stdio_h.m4
modules/ftello

index 3f7bd50..115b6dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       stdio: simplify by moving gl_STDIN_LARGE_OFFSET to fseeko, ftello
+       * m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ...
+       * m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because
+       * modules/ftello (Files): Add m4/fseeko.m4, for gl_STDIN_LARGE_OFFSET.
+
 2011-02-28  Bruno Haible  <bruno@clisp.org>
 
        localcharset: Assume ANSI C behaviour of free().
index 4a67260..76507d1 100644 (file)
@@ -1,4 +1,4 @@
-# fseeko.m4 serial 10
+# fseeko.m4 serial 11
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -53,3 +53,23 @@ AC_DEFUN([gl_REPLACE_FSEEKO],
   dnl If we are also using the fseek module, then fseek needs replacing, too.
   m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
 ])
+
+dnl Code shared by fseeko and ftello.  Determine if large files are supported,
+dnl but stdin does not start as a large file by default.
+AC_DEFUN([gl_STDIN_LARGE_OFFSET],
+  [
+    AC_CACHE_CHECK([whether stdin defaults to large file offsets],
+      [gl_cv_var_stdin_large_offset],
+      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+[[#if defined __SL64 && defined __SCLE /* cygwin */
+  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
+     it is easier to do a version check than building a runtime test.  */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+  choke me
+# endif
+#endif]])],
+        [gl_cv_var_stdin_large_offset=yes],
+        [gl_cv_var_stdin_large_offset=no])])
+])
index b6163d6..2d43759 100644 (file)
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 32
+# stdio_h.m4 serial 33
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -139,23 +139,3 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])
   REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
 ])
-
-dnl Code shared by fseeko and ftello.  Determine if large files are supported,
-dnl but stdin does not start as a large file by default.
-AC_DEFUN([gl_STDIN_LARGE_OFFSET],
-  [
-    AC_CACHE_CHECK([whether stdin defaults to large file offsets],
-      [gl_cv_var_stdin_large_offset],
-      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
-[[#if defined __SL64 && defined __SCLE /* cygwin */
-  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
-     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
-     it is easier to do a version check than building a runtime test.  */
-# include <cygwin/version.h>
-# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
-  choke me
-# endif
-#endif]])],
-        [gl_cv_var_stdin_large_offset=yes],
-        [gl_cv_var_stdin_large_offset=no])])
-])
index 99c7097..0cf160c 100644 (file)
@@ -4,6 +4,7 @@ ftello() function: Retrieve the position of a FILE stream.
 Files:
 lib/ftello.c
 lib/stdio-impl.h
+m4/fseeko.m4
 m4/ftello.m4
 
 Depends-on: