Ensure fseeko and ftello are declared on glibc systems.
authorBruno Haible <bruno@clisp.org>
Thu, 26 Apr 2007 09:33:12 +0000 (09:33 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 26 Apr 2007 09:33:12 +0000 (09:33 +0000)
ChangeLog
m4/fflush.m4
m4/fseeko.m4
modules/fflush
modules/fseeko
modules/ftello

index ad0547e..b3ef599 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2007-04-26  Bruno Haible  <bruno@clisp.org>
 
+       Ensure fseeko, ftello are declared on glibc systems.
+       * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
+       * modules/fseeko (configure.ac-early): Likewise.
+       * modules/ftello (configure.ac-early): Likewise.
+       * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
+       AC_FUNC_FSEEKO for this.
+       * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
+       (gl_CHECK_FSEEKO): Remove macro.
+
+2007-04-26  Bruno Haible  <bruno@clisp.org>
+
        * tests/test-fflush.c (main): Also check the ftell result after
        fflush and fseek/fseeko.
        * lib/fflush.c (rpl_fflush): For BSD implementations, update the
index fca7769..2399fe0 100755 (executable)
@@ -48,9 +48,4 @@ AC_DEFUN([gl_REPLACE_FFLUSH],
   AC_LIBOBJ([fseeko])
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   REPLACE_FFLUSH=1
-  gl_CHECK_FSEEKO
-  if test $gl_cv_func_fseeko = yes; then
-    AC_DEFINE([HAVE_FSEEKO], 1,
-      [Define to 1 if you have the fseeko() function or macro.])
-  fi
 ])
index fd3f019..86d42f4 100644 (file)
@@ -7,18 +7,13 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_FSEEKO],
 [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
-  gl_CHECK_FSEEKO
-  if test $gl_cv_func_fseeko = no; then
-    HAVE_FSEEKO=0
-  fi
-])
-
-AC_DEFUN([gl_CHECK_FSEEKO],
-[
   AC_REQUIRE([AC_PROG_CC])
   AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
     [
       AC_TRY_LINK([#include <stdio.h>], [fseeko (stdin, 0, 0);],
         [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
     ])
+  if test $gl_cv_func_fseeko = no; then
+    HAVE_FSEEKO=0
+  fi
 ])
index 62a2d59..8cfc046 100755 (executable)
@@ -13,6 +13,9 @@ ftello
 stdio
 unistd
 
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
 configure.ac:
 gl_FUNC_FFLUSH
 gl_STDIO_MODULE_INDICATOR([fflush])
index ed72f14..e8c10f2 100644 (file)
@@ -7,6 +7,9 @@ m4/fseeko.m4
 Depends-on:
 stdio
 
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
 configure.ac:
 gl_FUNC_FSEEKO
 gl_STDIO_MODULE_INDICATOR([fseeko])
index 0994f10..daac684 100644 (file)
@@ -7,6 +7,9 @@ m4/ftello.m4
 Depends-on:
 stdio
 
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
 configure.ac:
 gl_FUNC_FTELLO
 gl_STDIO_MODULE_INDICATOR([ftello])