bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module 'fseeko'


From: Bruno Haible
Subject: Re: new module 'fseeko'
Date: Thu, 26 Apr 2007 11:32:36 +0200
User-agent: KMail/1.5.4

Paul Eggert wrote:
> > Btw, what is AC_FUNC_FSEEKO good for?
> 
> It checks for systems like glibc 2.2 where you also have to define
> _LARGEFILE_SOURCE to make fseeko visible.  I don't see where the
> gnulib fseeko module does that; if it doesn't, shouldn't it?

Indeed. Also with glibc 2.3.6 and "gcc -Wall" I get warnings that fseeko is
not declared. This fixes it. Thanks for explaining.

2007-04-26  Bruno Haible  <address@hidden>

        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.

*** modules/fflush      25 Apr 2007 09:14:49 -0000      1.5
--- modules/fflush      26 Apr 2007 09:27:45 -0000
***************
*** 13,18 ****
--- 13,21 ----
  stdio
  unistd
  
+ configure.ac-early:
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ 
  configure.ac:
  gl_FUNC_FFLUSH
  gl_STDIO_MODULE_INDICATOR([fflush])
*** modules/fseeko      25 Apr 2007 07:39:55 -0000      1.1
--- modules/fseeko      26 Apr 2007 09:27:45 -0000
***************
*** 7,12 ****
--- 7,15 ----
  Depends-on:
  stdio
  
+ configure.ac-early:
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ 
  configure.ac:
  gl_FUNC_FSEEKO
  gl_STDIO_MODULE_INDICATOR([fseeko])
*** modules/ftello      25 Apr 2007 07:51:53 -0000      1.1
--- modules/ftello      26 Apr 2007 09:27:45 -0000
***************
*** 7,12 ****
--- 7,15 ----
  Depends-on:
  stdio
  
+ configure.ac-early:
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ 
  configure.ac:
  gl_FUNC_FTELLO
  gl_STDIO_MODULE_INDICATOR([ftello])
*** m4/fflush.m4        25 Apr 2007 09:14:49 -0000      1.4
--- m4/fflush.m4        26 Apr 2007 09:27:45 -0000
***************
*** 48,56 ****
    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
  ])
--- 48,51 ----
*** m4/fseeko.m4        25 Apr 2007 09:14:49 -0000      1.2
--- m4/fseeko.m4        26 Apr 2007 09:27:45 -0000
***************
*** 7,24 ****
  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])
      ])
  ])
--- 7,19 ----
  AC_DEFUN([gl_FUNC_FSEEKO],
  [
    AC_REQUIRE([gl_STDIO_H_DEFAULTS])
    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
  ])





reply via email to

[Prev in Thread] Current Thread [Next in Thread]