From 5905a848a7f063cbc45bec7ea53f2121a3d6b91b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 26 Apr 2007 09:33:12 +0000 Subject: [PATCH] Ensure fseeko and ftello are declared on glibc systems. --- ChangeLog | 11 +++++++++++ m4/fflush.m4 | 5 ----- m4/fseeko.m4 | 11 +++-------- modules/fflush | 3 +++ modules/fseeko | 3 +++ modules/ftello | 3 +++ 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad0547e18..b3ef5990b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2007-04-26 Bruno Haible + 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 + * 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 diff --git a/m4/fflush.m4 b/m4/fflush.m4 index fca7769be..2399fe03d 100755 --- a/m4/fflush.m4 +++ b/m4/fflush.m4 @@ -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 ]) diff --git a/m4/fseeko.m4 b/m4/fseeko.m4 index fd3f019f7..86d42f40c 100644 --- a/m4/fseeko.m4 +++ b/m4/fseeko.m4 @@ -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 ], [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 ]) diff --git a/modules/fflush b/modules/fflush index 62a2d5970..8cfc04661 100755 --- a/modules/fflush +++ b/modules/fflush @@ -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]) diff --git a/modules/fseeko b/modules/fseeko index ed72f14cc..e8c10f2d5 100644 --- a/modules/fseeko +++ b/modules/fseeko @@ -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]) diff --git a/modules/ftello b/modules/ftello index 0994f10d7..daac68405 100644 --- a/modules/ftello +++ b/modules/ftello @@ -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]) -- 2.11.0