changeset 8718:c541fe12ef9e

Ensure fseeko and ftello are declared on glibc systems.
author Bruno Haible <bruno@clisp.org>
date Thu, 26 Apr 2007 09:33:12 +0000
parents 3afefd650c3a
children 0d671904d407
files ChangeLog m4/fflush.m4 m4/fseeko.m4 modules/fflush modules/fseeko modules/ftello
diffstat 6 files changed, 23 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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
--- a/m4/fflush.m4
+++ b/m4/fflush.m4
@@ -48,9 +48,4 @@
   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
 ])
--- a/m4/fseeko.m4
+++ b/m4/fseeko.m4
@@ -7,18 +7,13 @@
 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
 ])
--- a/modules/fflush
+++ b/modules/fflush
@@ -13,6 +13,9 @@
 stdio
 unistd
 
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
 configure.ac:
 gl_FUNC_FFLUSH
 gl_STDIO_MODULE_INDICATOR([fflush])
--- a/modules/fseeko
+++ b/modules/fseeko
@@ -7,6 +7,9 @@
 Depends-on:
 stdio
 
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
 configure.ac:
 gl_FUNC_FSEEKO
 gl_STDIO_MODULE_INDICATOR([fseeko])
--- a/modules/ftello
+++ b/modules/ftello
@@ -7,6 +7,9 @@
 Depends-on:
 stdio
 
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
 configure.ac:
 gl_FUNC_FTELLO
 gl_STDIO_MODULE_INDICATOR([ftello])