X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstdio_h.m4;h=f5650cdeabc6a2f4dcabfe515c4077c398aa587a;hb=3b905e0ad791b750d0a471c90ecaacf2345a39c3;hp=256efe1cbd9ea9c9160779b1a91f8931d3146f1d;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 256efe1cb..f5650cdea 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,5 +1,5 @@ -# stdio_h.m4 serial 21 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +# stdio_h.m4 serial 31 +dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,6 +7,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDIO_H], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gl_ASM_SYMBOL_PREFIX]) gl_CHECK_NEXT_HEADERS([stdio.h]) dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. @@ -30,13 +32,22 @@ AC_DEFUN([gl_STDIO_H], AC_LIBOBJ([stdio-write]) fi ]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, and which is not + dnl guaranteed by C89. + gl_WARN_ON_USE_PREPARE([[#include + ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat + snprintf tmpfile vdprintf vsnprintf]) ]) AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDIO_H_DEFAULTS], @@ -73,6 +84,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) + GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) @@ -105,6 +117,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) + REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) @@ -116,6 +129,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) + REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])