Diff for /embedaddon/libiconv/srcm4/stdio_h.m4 between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 22:57:49 version 1.1.1.2, 2012/05/29 09:29:44
Line 1 Line 1
# stdio_h.m4 serial 16# stdio_h.m4 serial 37
dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation  dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,  dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.  dnl with or without modifications, as long as this notice is preserved.
Line 7  dnl with or without modifications, as long as this not Line 7  dnl with or without modifications, as long as this not
 AC_DEFUN([gl_STDIO_H],  AC_DEFUN([gl_STDIO_H],
 [  [
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])    AC_REQUIRE([gl_STDIO_H_DEFAULTS])
  gl_CHECK_NEXT_HEADERS([stdio.h])  AC_REQUIRE([AC_C_INLINE])
   gl_NEXT_HEADERS([stdio.h])
 
   dnl No need to create extra modules for these functions. Everyone who uses    dnl No need to create extra modules for these functions. Everyone who uses
   dnl <stdio.h> likely needs them.    dnl <stdio.h> likely needs them.
     GNULIB_FSCANF=1
     GNULIB_SCANF=1
     GNULIB_FGETC=1
     GNULIB_GETC=1
     GNULIB_GETCHAR=1
     GNULIB_FGETS=1
     GNULIB_GETS=1
     GNULIB_FREAD=1
     dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
     dnl "expected source file, required through AC_LIBSOURCES, not found". It is
     dnl also an optimization, to avoid performing a configure check whose result
     dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING
     dnl or GNULIB_NONBLOCKING redundant.
     m4_ifdef([gl_NONBLOCKING_IO], [
       gl_NONBLOCKING_IO
       if test $gl_cv_have_nonblocking != yes; then
         REPLACE_STDIO_READ_FUNCS=1
         AC_LIBOBJ([stdio-read])
       fi
     ])
   
     dnl No need to create extra modules for these functions. Everyone who uses
     dnl <stdio.h> likely needs them.
   GNULIB_FPRINTF=1    GNULIB_FPRINTF=1
   GNULIB_PRINTF=1    GNULIB_PRINTF=1
   GNULIB_VFPRINTF=1    GNULIB_VFPRINTF=1
Line 20  AC_DEFUN([gl_STDIO_H], Line 45  AC_DEFUN([gl_STDIO_H],
   GNULIB_FPUTS=1    GNULIB_FPUTS=1
   GNULIB_PUTS=1    GNULIB_PUTS=1
   GNULIB_FWRITE=1    GNULIB_FWRITE=1
  dnl This ifdef is just an optimization, to avoid performing a configure  dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
  dnl check whose result is not used. It does not make the test of  dnl "expected source file, required through AC_LIBSOURCES, not found". It is
  dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.  dnl also an optimization, to avoid performing a configure check whose result
   dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or
   dnl GNULIB_SIGPIPE redundant.
   m4_ifdef([gl_SIGNAL_SIGPIPE], [    m4_ifdef([gl_SIGNAL_SIGPIPE], [
     gl_SIGNAL_SIGPIPE      gl_SIGNAL_SIGPIPE
     if test $gl_cv_header_signal_h_SIGPIPE != yes; then      if test $gl_cv_header_signal_h_SIGPIPE != yes; then
Line 30  AC_DEFUN([gl_STDIO_H], Line 57  AC_DEFUN([gl_STDIO_H],
       AC_LIBOBJ([stdio-write])        AC_LIBOBJ([stdio-write])
     fi      fi
   ])    ])
     dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
     dnl "expected source file, required through AC_LIBSOURCES, not found". It is
     dnl also an optimization, to avoid performing a configure check whose result
     dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING
     dnl or GNULIB_NONBLOCKING redundant.
     m4_ifdef([gl_NONBLOCKING_IO], [
       gl_NONBLOCKING_IO
       if test $gl_cv_have_nonblocking != yes; then
         REPLACE_STDIO_WRITE_FUNCS=1
         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 <stdio.h>
       ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
       snprintf tmpfile vdprintf vsnprintf])
 ])  ])
   
 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],  AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
 [  [
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.    dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])    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],  AC_DEFUN([gl_STDIO_H_DEFAULTS],
 [  [
   GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])  
   GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])  
   GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])  
   GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])  
   GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])  
   GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])  
   GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])  
   GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])  
   GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])  
   GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])  
   GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])  
   GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])  
   GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])    GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])  GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])
  GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])  GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])
  GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])  GNULIB_FGETC=0;                AC_SUBST([GNULIB_FGETC])
  GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])  GNULIB_FGETS=0;                AC_SUBST([GNULIB_FGETS])
   GNULIB_FOPEN=0;                AC_SUBST([GNULIB_FOPEN])    GNULIB_FOPEN=0;                AC_SUBST([GNULIB_FOPEN])
     GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])
     GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])
     GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])
     GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])
     GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])
     GNULIB_FREAD=0;                AC_SUBST([GNULIB_FREAD])
   GNULIB_FREOPEN=0;              AC_SUBST([GNULIB_FREOPEN])    GNULIB_FREOPEN=0;              AC_SUBST([GNULIB_FREOPEN])
     GNULIB_FSCANF=0;               AC_SUBST([GNULIB_FSCANF])
   GNULIB_FSEEK=0;                AC_SUBST([GNULIB_FSEEK])    GNULIB_FSEEK=0;                AC_SUBST([GNULIB_FSEEK])
   GNULIB_FSEEKO=0;               AC_SUBST([GNULIB_FSEEKO])    GNULIB_FSEEKO=0;               AC_SUBST([GNULIB_FSEEKO])
   GNULIB_FTELL=0;                AC_SUBST([GNULIB_FTELL])    GNULIB_FTELL=0;                AC_SUBST([GNULIB_FTELL])
   GNULIB_FTELLO=0;               AC_SUBST([GNULIB_FTELLO])    GNULIB_FTELLO=0;               AC_SUBST([GNULIB_FTELLO])
   GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])  
   GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])  
   GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])  
   GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])  
   GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])  
   GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])  
   GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])  
   GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])  
   GNULIB_FWRITE=0;               AC_SUBST([GNULIB_FWRITE])    GNULIB_FWRITE=0;               AC_SUBST([GNULIB_FWRITE])
     GNULIB_GETC=0;                 AC_SUBST([GNULIB_GETC])
     GNULIB_GETCHAR=0;              AC_SUBST([GNULIB_GETCHAR])
   GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])    GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
   GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])    GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
     GNULIB_GETS=0;                 AC_SUBST([GNULIB_GETS])
     GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
     GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
   GNULIB_PERROR=0;               AC_SUBST([GNULIB_PERROR])    GNULIB_PERROR=0;               AC_SUBST([GNULIB_PERROR])
     GNULIB_POPEN=0;                AC_SUBST([GNULIB_POPEN])
     GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])
     GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])
     GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])
     GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])
     GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])
     GNULIB_REMOVE=0;               AC_SUBST([GNULIB_REMOVE])
     GNULIB_RENAME=0;               AC_SUBST([GNULIB_RENAME])
     GNULIB_RENAMEAT=0;             AC_SUBST([GNULIB_RENAMEAT])
     GNULIB_SCANF=0;                AC_SUBST([GNULIB_SCANF])
     GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])
     GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])
     GNULIB_STDIO_H_NONBLOCKING=0;  AC_SUBST([GNULIB_STDIO_H_NONBLOCKING])
   GNULIB_STDIO_H_SIGPIPE=0;      AC_SUBST([GNULIB_STDIO_H_SIGPIPE])    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_VFSCANF=0;              AC_SUBST([GNULIB_VFSCANF])
     GNULIB_VSCANF=0;               AC_SUBST([GNULIB_VSCANF])
     GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
     GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])
     GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])
     GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])
     GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
     GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
     GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
   dnl Assume proper GNU behavior unless another module says otherwise.    dnl Assume proper GNU behavior unless another module says otherwise.
  REPLACE_STDIO_WRITE_FUNCS=0;   AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])  HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
  REPLACE_FPRINTF=0;             AC_SUBST([REPLACE_FPRINTF])  HAVE_DECL_FSEEKO=1;            AC_SUBST([HAVE_DECL_FSEEKO])
  REPLACE_VFPRINTF=0;            AC_SUBST([REPLACE_VFPRINTF])  HAVE_DECL_FTELLO=1;            AC_SUBST([HAVE_DECL_FTELLO])
  REPLACE_PRINTF=0;              AC_SUBST([REPLACE_PRINTF])  HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM])
  REPLACE_VPRINTF=0;             AC_SUBST([REPLACE_VPRINTF])  HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE])
  REPLACE_SNPRINTF=0;            AC_SUBST([REPLACE_SNPRINTF])  HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
   HAVE_DECL_SNPRINTF=1;          AC_SUBST([HAVE_DECL_SNPRINTF])    HAVE_DECL_SNPRINTF=1;          AC_SUBST([HAVE_DECL_SNPRINTF])
   REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])  
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])    HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
   REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])  
   REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])  
   HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])    HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])  HAVE_FSEEKO=1;                 AC_SUBST([HAVE_FSEEKO])
  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])  HAVE_FTELLO=1;                 AC_SUBST([HAVE_FTELLO])
  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])  HAVE_RENAMEAT=1;               AC_SUBST([HAVE_RENAMEAT])
   HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])    HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])
  REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
  HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
  REPLACE_OBSTACK_PRINTF=0;      AC_SUBST([REPLACE_OBSTACK_PRINTF])  REPLACE_FCLOSE=0;              AC_SUBST([REPLACE_FCLOSE])
   REPLACE_FFLUSH=0;              AC_SUBST([REPLACE_FFLUSH])
   REPLACE_FOPEN=0;               AC_SUBST([REPLACE_FOPEN])    REPLACE_FOPEN=0;               AC_SUBST([REPLACE_FOPEN])
     REPLACE_FPRINTF=0;             AC_SUBST([REPLACE_FPRINTF])
     REPLACE_FPURGE=0;              AC_SUBST([REPLACE_FPURGE])
   REPLACE_FREOPEN=0;             AC_SUBST([REPLACE_FREOPEN])    REPLACE_FREOPEN=0;             AC_SUBST([REPLACE_FREOPEN])
   HAVE_FSEEKO=1;                 AC_SUBST([HAVE_FSEEKO])  
   REPLACE_FSEEKO=0;              AC_SUBST([REPLACE_FSEEKO])  
   REPLACE_FSEEK=0;               AC_SUBST([REPLACE_FSEEK])    REPLACE_FSEEK=0;               AC_SUBST([REPLACE_FSEEK])
  HAVE_FTELLO=1;                 AC_SUBST([HAVE_FTELLO])  REPLACE_FSEEKO=0;              AC_SUBST([REPLACE_FSEEKO])
  REPLACE_FTELLO=0;              AC_SUBST([REPLACE_FTELLO]) 
   REPLACE_FTELL=0;               AC_SUBST([REPLACE_FTELL])    REPLACE_FTELL=0;               AC_SUBST([REPLACE_FTELL])
  REPLACE_FFLUSH=0;              AC_SUBST([REPLACE_FFLUSH])  REPLACE_FTELLO=0;              AC_SUBST([REPLACE_FTELLO])
  REPLACE_FPURGE=0;              AC_SUBST([REPLACE_FPURGE])  REPLACE_GETDELIM=0;            AC_SUBST([REPLACE_GETDELIM])
  HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE]) 
  REPLACE_FCLOSE=0;              AC_SUBST([REPLACE_FCLOSE]) 
  HAVE_DECL_GETDELIM=1;          AC_SUBST([HAVE_DECL_GETDELIM]) 
  HAVE_DECL_GETLINE=1;           AC_SUBST([HAVE_DECL_GETLINE]) 
   REPLACE_GETLINE=0;             AC_SUBST([REPLACE_GETLINE])    REPLACE_GETLINE=0;             AC_SUBST([REPLACE_GETLINE])
     REPLACE_OBSTACK_PRINTF=0;      AC_SUBST([REPLACE_OBSTACK_PRINTF])
   REPLACE_PERROR=0;              AC_SUBST([REPLACE_PERROR])    REPLACE_PERROR=0;              AC_SUBST([REPLACE_PERROR])
])  REPLACE_POPEN=0;               AC_SUBST([REPLACE_POPEN])
  REPLACE_PRINTF=0;              AC_SUBST([REPLACE_PRINTF])
dnl Code shared by fseeko and ftello.  Determine if large files are supported,  REPLACE_REMOVE=0;              AC_SUBST([REPLACE_REMOVE])
dnl but stdin does not start as a large file by default.  REPLACE_RENAME=0;              AC_SUBST([REPLACE_RENAME])
AC_DEFUN([gl_STDIN_LARGE_OFFSET],  REPLACE_RENAMEAT=0;            AC_SUBST([REPLACE_RENAMEAT])
  [  REPLACE_SNPRINTF=0;            AC_SUBST([REPLACE_SNPRINTF])
    AC_CACHE_CHECK([whether stdin defaults to large file offsets],  REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
      [gl_cv_var_stdin_large_offset],  REPLACE_STDIO_READ_FUNCS=0;    AC_SUBST([REPLACE_STDIO_READ_FUNCS])
      [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],  REPLACE_STDIO_WRITE_FUNCS=0;   AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
[[#if defined __SL64 && defined __SCLE /* cygwin */  REPLACE_TMPFILE=0;             AC_SUBST([REPLACE_TMPFILE])
  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making  REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
     it is easier to do a version check than building a runtime test.  */  REPLACE_VFPRINTF=0;            AC_SUBST([REPLACE_VFPRINTF])
# include <cygwin/version.h>  REPLACE_VPRINTF=0;             AC_SUBST([REPLACE_VPRINTF])
# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)  REPLACE_VSNPRINTF=0;           AC_SUBST([REPLACE_VSNPRINTF])
  choke me  REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
# endif 
#endif]])], 
        [gl_cv_var_stdin_large_offset=yes], 
        [gl_cv_var_stdin_large_offset=no])]) 
 ])  ])

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>