+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
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
])
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
])
stdio
unistd
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
configure.ac:
gl_FUNC_FFLUSH
gl_STDIO_MODULE_INDICATOR([fflush])
Depends-on:
stdio
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
configure.ac:
gl_FUNC_FSEEKO
gl_STDIO_MODULE_INDICATOR([fseeko])
Depends-on:
stdio
+configure.ac-early:
+AC_REQUIRE([AC_FUNC_FSEEKO])
+
configure.ac:
gl_FUNC_FTELLO
gl_STDIO_MODULE_INDICATOR([ftello])