Mercurial > hg > octave-shane > gnulib-hg
changeset 14915:64c288a5020b
ftello: Provide a non-inline replacement of ftell().
* lib/stdio.in.h (ftell): Don't provide if module 'ftell' is not used.
* m4/ftell.m4 (gl_FUNC_FTELL): Replace ftell also if the system does
not have ftello() (such as on mingw).
* modules/ftello (Depends-on): Add ftell.
* modules/ftell (License): Change to LGPLv2+.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 13 Jun 2011 17:33:59 +0200 |
parents | ef09e997c426 |
children | d9e175d5d217 |
files | ChangeLog lib/stdio.in.h m4/ftell.m4 modules/ftell modules/ftello |
diffstat | 5 files changed, 14 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-06-13 Bruno Haible <bruno@clisp.org> + + ftello: Provide a non-inline replacement of ftell(). + * lib/stdio.in.h (ftell): Don't provide if module 'ftell' is not used. + * m4/ftell.m4 (gl_FUNC_FTELL): Replace ftell also if the system does + not have ftello() (such as on mingw). + * modules/ftello (Depends-on): Add ftell. + * modules/ftell (License): Change to LGPLv2+. + 2011-05-07 Bruno Haible <bruno@clisp.org> ftell: Move AC_LIBOBJ invocations to module description.
--- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -539,25 +539,6 @@ _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); # endif _GL_CXXALIASWARN (ftello); -# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@ - /* Provide an ftell function that is consistent with ftello. */ - /* In order to avoid that ftell gets defined as a macro here, the - developer can request the 'ftell' module. */ -# if !GNULIB_defined_ftell_function -# undef ftell -# define ftell rpl_ftell -static inline long _GL_ARG_NONNULL ((1)) -rpl_ftell (FILE *f) -{ -# if @REPLACE_FTELLO@ - return rpl_ftello (f); -# else - return ftello (f); -# endif -} -# define GNULIB_defined_ftell_function 1 -# endif -# endif #elif defined GNULIB_POSIXCHECK # define _GL_FTELL_WARN /* Category 1, above. */ # undef ftell
--- a/m4/ftell.m4 +++ b/m4/ftell.m4 @@ -1,4 +1,4 @@ -# ftell.m4 serial 2 +# ftell.m4 serial 3 dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,7 @@ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_FTELLO]) dnl When ftello needs fixes, ftell needs them too. - if test $REPLACE_FTELLO != 0; then + if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then REPLACE_FTELL=1 fi ])