[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (6/7)
From: |
Bruno Haible |
Subject: |
Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (6/7) |
Date: |
Fri, 26 Sep 2008 13:38:27 +0200 |
User-agent: |
KMail/1.5.4 |
2008-09-26 Bruno Haible <address@hidden>
* lib/stdio.in.h (fprintf, vfprintf, printf, vprintf, fputc, putc,
putchar, fputs, puts, fwrite): Replace when REPLACE_STDIO_WRITE_FUNCS
and GNULIB_STDIO_H_SIGPIPE are set.
* lib/stdio-write.c: New file.
* m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FPRINTF, GNULIB_PRINTF,
GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
REPLACE_STDIO_WRITE_FUNCS.
(gl_STDIO_H_DEFAULTS): Initialize GNULIB_FPRINTF, GNULIB_PRINTF,
GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
* modules/stdio (Files): Add lib/stdio-write.c.
(Makefile.am): Substitute GNULIB_FPRINTF, GNULIB_PRINTF,
GNULIB_VFPRINTF, GNULIB_VPRINTF, GNULIB_FPUTC, GNULIB_PUTC,
GNULIB_PUTCHAR, GNULIB_FPUTS, GNULIB_PUTS, GNULIB_FWRITE,
GNULIB_STDIO_H_SIGPIPE, REPLACE_STDIO_WRITE_FUNCS.
* m4/fprintf-posix.m4 (gl_REPLACE_FPRINTF): Define
REPLACE_FPRINTF_POSIX.
* m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF): Define
REPLACE_PRINTF_POSIX.
* m4/vfprintf-posix.m4 (gl_REPLACE_VFPRINTF): Define
REPLACE_VFPRINTF_POSIX.
* m4/vprintf-posix.m4 (gl_REPLACE_VPRINTF): Define
REPLACE_VPRINTF_POSIX.
* doc/posix-functions/fprintf.texi: Mention the sigpipe module and the
SIGPIPE issue.
* doc/posix-functions/fputc.texi: Likewise.
* doc/posix-functions/fputs.texi: Likewise.
* doc/posix-functions/fwrite.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/putc.texi: Likewise.
* doc/posix-functions/putchar.texi: Likewise.
* doc/posix-functions/puts.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
============================ lib/stdio-write.c =============================
/* POSIX compatible FILE stream write function.
Copyright (C) 2008 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2008.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <stdio.h>
/* Replace these functions only if module 'sigpipe' is requested. */
#if GNULIB_SIGPIPE
/* On native Windows platforms, SIGPIPE does not exist. When write() is
called on a pipe with no readers, WriteFile() fails with error
GetLastError() = ERROR_NO_DATA, and write() in consequence fails with
error EINVAL. This write() function is at the basis of the function
which flushes the buffer of a FILE stream. */
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# include <errno.h>
# include <signal.h>
# include <io.h>
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \
if (ferror (stream)) \
return (EXPRESSION); \
else \
{ \
RETTYPE ret; \
SetLastError (0); \
ret = (EXPRESSION); \
if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \
{ \
int fd = fileno (stream); \
if (fd >= 0 && GetFileType (_get_osfhandle (fd)) == FILE_TYPE_PIPE) \
{ \
/* Try to raise signal SIGPIPE. */ \
raise (SIGPIPE); \
/* If it is currently blocked or ignored, change errno from \
EINVAL to EPIPE. */ \
errno = EPIPE; \
} \
} \
return ret; \
}
# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
int
printf (const char *format, ...)
{
int retval;
va_list args;
va_start (args, format);
retval = vfprintf (stdout, format, args);
va_end (args);
return retval;
}
# endif
# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
int
fprintf (FILE *stream, const char *format, ...)
{
int retval;
va_list args;
va_start (args, format);
retval = vfprintf (stream, format, args);
va_end (args);
return retval;
}
# endif
# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vprintf.c */
int
vprintf (const char *format, va_list args)
{
return vfprintf (stdout, format, args);
}
# endif
# if !REPLACE_VPRINTF_POSIX /* avoid collision with vfprintf.c */
int
vfprintf (FILE *stream, const char *format, va_list args)
#undef vfprintf
{
CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF)
}
# endif
int
putchar (int c)
{
return fputc (c, stdout);
}
int
fputc (int c, FILE *stream)
#undef fputc
{
CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF)
}
int
fputs (const char *string, FILE *stream)
#undef fputs
{
CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF)
}
int
puts (const char *string)
#undef puts
{
FILE *stream = stdout;
CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF)
}
size_t
fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
#undef fwrite
{
CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n)
}
# endif
#endif
=============================================================================
*** lib/stdio.in.h.orig 2008-09-26 12:52:18.000000000 +0200
--- lib/stdio.in.h 2008-09-26 11:28:08.000000000 +0200
***************
*** 73,78 ****
--- 73,82 ----
extern int fprintf (FILE *fp, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
# endif
+ #elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ &&
@GNULIB_STDIO_H_SIGPIPE@
+ # define fprintf rpl_fprintf
+ extern int fprintf (FILE *fp, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
#elif defined GNULIB_POSIXCHECK
# undef fprintf
# define fprintf \
***************
*** 88,93 ****
--- 92,101 ----
extern int vfprintf (FILE *fp, const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 2, 0)));
# endif
+ #elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ &&
@GNULIB_STDIO_H_SIGPIPE@
+ # define vfprintf rpl_vfprintf
+ extern int vfprintf (FILE *fp, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
#elif defined GNULIB_POSIXCHECK
# undef vfprintf
# define vfprintf(s,f,a) \
***************
*** 104,109 ****
--- 112,122 ----
extern int printf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
# endif
+ #elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ &&
@GNULIB_STDIO_H_SIGPIPE@
+ /* Don't break __attribute__((format(printf,M,N))). */
+ # define printf __printf__
+ extern int printf (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
#elif defined GNULIB_POSIXCHECK
# undef printf
# define printf \
***************
*** 126,131 ****
--- 139,148 ----
extern int vprintf (const char *format, va_list args)
__attribute__ ((__format__ (__printf__, 1, 0)));
# endif
+ #elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ &&
@GNULIB_STDIO_H_SIGPIPE@
+ # define vprintf rpl_vprintf
+ extern int vprintf (const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 1, 0)));
#elif defined GNULIB_POSIXCHECK
# undef vprintf
# define vprintf(f,a) \
***************
*** 354,359 ****
--- 371,412 ----
fflush (f))
#endif
+ #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+ # undef fputc
+ # define fputc rpl_fputc
+ extern int fputc (int c, FILE *stream);
+ #endif
+
+ #if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+ # undef putc
+ # define putc rpl_fputc
+ extern int putc (int c, FILE *stream);
+ #endif
+
+ #if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ &&
@GNULIB_STDIO_H_SIGPIPE@
+ # undef putchar
+ # define putchar rpl_putchar
+ extern int putchar (int c);
+ #endif
+
+ #if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+ # undef fputs
+ # define fputs rpl_fputs
+ extern int fputs (const char *string, FILE *stream);
+ #endif
+
+ #if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+ # undef puts
+ # define puts rpl_puts
+ extern int puts (const char *string);
+ #endif
+
+ #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+ # undef fwrite
+ # define fwrite rpl_fwrite
+ extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
+ #endif
+
#if @GNULIB_GETDELIM@
# if address@hidden@
/* Read input, up to (and including) the next occurrence of DELIMITER, from
*** m4/stdio_h.m4.orig 2008-09-26 12:52:18.000000000 +0200
--- m4/stdio_h.m4 2008-09-26 12:33:28.000000000 +0200
***************
*** 1,4 ****
! # stdio_h.m4 serial 12
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # stdio_h.m4 serial 13
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 8,13 ****
--- 8,35 ----
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([stdio.h])
+ dnl No need to create extra modules for these functions. Everyone who uses
+ dnl <stdio.h> likely needs them.
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+ dnl This ifdef is just an optimization, to avoid performing a configure
+ dnl check whose result is not used. It does not make the test of
+ dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
+ m4_ifdef([gl_SIGNAL_SIGPIPE], [
+ gl_SIGNAL_SIGPIPE
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_STDIO_WRITE_FUNCS=1
+ AC_LIBOBJ([stdio-write])
+ fi
+ ])
])
AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
***************
*** 19,29 ****
--- 41,55 ----
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])
***************
*** 37,46 ****
--- 63,80 ----
GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
+ 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_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR])
+ GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF])
*** modules/stdio.orig 2008-09-26 12:52:18.000000000 +0200
--- modules/stdio 2008-09-26 12:18:29.000000000 +0200
***************
*** 3,8 ****
--- 3,9 ----
Files:
lib/stdio.in.h
+ lib/stdio-write.c
m4/stdio_h.m4
Depends-on:
***************
*** 23,33 ****
--- 24,38 ----
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
-e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
-e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
-e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
-e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
-e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
-e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
-e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
-e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
***************
*** 41,49 ****
--- 46,62 ----
-e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
-e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
-e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
-e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
-e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
-e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+ -e
's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
-e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
-e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
-e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
*** m4/fprintf-posix.m4.orig 2008-09-26 12:52:18.000000000 +0200
--- m4/fprintf-posix.m4 2008-09-26 04:31:27.000000000 +0200
***************
*** 1,4 ****
! # fprintf-posix.m4 serial 11
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # fprintf-posix.m4 serial 12
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 96,101 ****
--- 96,103 ----
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_LIBOBJ([fprintf])
REPLACE_FPRINTF=1
+ AC_DEFINE([REPLACE_FPRINTF_POSIX], 1,
+ [Define if fprintf is overridden by a POSIX compliant gnulib
implementation.])
gl_PREREQ_FPRINTF
])
*** m4/printf-posix-rpl.m4.orig 2008-09-26 12:52:18.000000000 +0200
--- m4/printf-posix-rpl.m4 2008-09-26 04:31:39.000000000 +0200
***************
*** 1,5 ****
! # printf-posix-rpl.m4 serial 1
! dnl Copyright (C) 2007 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.
--- 1,5 ----
! # printf-posix-rpl.m4 serial 2
! dnl Copyright (C) 2007-2008 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.
***************
*** 17,22 ****
--- 17,24 ----
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_LIBOBJ([printf])
REPLACE_PRINTF=1
+ AC_DEFINE([REPLACE_PRINTF_POSIX], 1,
+ [Define if printf is overridden by a POSIX compliant gnulib
implementation.])
gl_PREREQ_PRINTF
])
*** m4/vfprintf-posix.m4.orig 2008-09-26 12:52:18.000000000 +0200
--- m4/vfprintf-posix.m4 2008-09-26 04:31:32.000000000 +0200
***************
*** 1,4 ****
! # vfprintf-posix.m4 serial 11
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # vfprintf-posix.m4 serial 12
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 96,101 ****
--- 96,103 ----
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_LIBOBJ([vfprintf])
REPLACE_VFPRINTF=1
+ AC_DEFINE([REPLACE_VFPRINTF_POSIX], 1,
+ [Define if vfprintf is overridden by a POSIX compliant gnulib
implementation.])
gl_PREREQ_VFPRINTF
])
*** m4/vprintf-posix.m4.orig 2008-09-26 12:52:18.000000000 +0200
--- m4/vprintf-posix.m4 2008-09-26 04:31:46.000000000 +0200
***************
*** 1,5 ****
! # vprintf-posix.m4 serial 1
! dnl Copyright (C) 2007 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.
--- 1,5 ----
! # vprintf-posix.m4 serial 2
! dnl Copyright (C) 2007-2008 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.
***************
*** 17,22 ****
--- 17,24 ----
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_LIBOBJ([vprintf])
REPLACE_VPRINTF=1
+ AC_DEFINE([REPLACE_VPRINTF_POSIX], 1,
+ [Define if vprintf is overridden by a POSIX compliant gnulib
implementation.])
gl_PREREQ_VPRINTF
])
*** doc/posix-functions/fprintf.texi.orig 2008-09-26 12:52:18.000000000
+0200
--- doc/posix-functions/fprintf.texi 2008-09-26 00:36:18.000000000 +0200
***************
*** 4,12 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fprintf.html}
! Gnulib module: fprintf-posix
! Portability problems fixed by Gnulib:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
--- 4,12 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fprintf.html}
! Gnulib module: fprintf-posix or stdio, sigpipe
! Portability problems fixed by Gnulib module @code{fprintf-posix}:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
***************
*** 50,55 ****
--- 50,63 ----
MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0.
@end itemize
+ Portability problems fixed by Gnulib module @code{stdio} or
@code{fprintf-posix}, together with module @code{sigpipe}:
+ @itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
+ @end itemize
+
Portability problems not fixed by Gnulib:
@itemize
@end itemize
*** doc/posix-functions/fputc.texi.orig 2008-09-26 12:52:18.000000000 +0200
--- doc/posix-functions/fputc.texi 2008-09-26 00:36:21.000000000 +0200
***************
*** 4,13 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fputc.html}
! Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
--- 4,17 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fputc.html}
! Gnulib module: stdio, sigpipe
Portability problems fixed by Gnulib:
@itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
@end itemize
Portability problems not fixed by Gnulib:
*** doc/posix-functions/fputs.texi.orig 2008-09-26 12:52:18.000000000 +0200
--- doc/posix-functions/fputs.texi 2008-09-26 00:36:21.000000000 +0200
***************
*** 4,13 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fputs.html}
! Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
--- 4,17 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fputs.html}
! Gnulib module: stdio, sigpipe
Portability problems fixed by Gnulib:
@itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
@end itemize
Portability problems not fixed by Gnulib:
*** doc/posix-functions/fwrite.texi.orig 2008-09-26 12:52:18.000000000
+0200
--- doc/posix-functions/fwrite.texi 2008-09-26 00:36:22.000000000 +0200
***************
*** 4,13 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fwrite.html}
! Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
--- 4,17 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/fwrite.html}
! Gnulib module: stdio, sigpipe
Portability problems fixed by Gnulib:
@itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
@end itemize
Portability problems not fixed by Gnulib:
*** doc/posix-functions/printf.texi.orig 2008-09-26 12:52:18.000000000
+0200
--- doc/posix-functions/printf.texi 2008-09-26 04:38:04.000000000 +0200
***************
*** 4,12 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/printf.html}
! Gnulib module: printf-posix
! Portability problems fixed by Gnulib:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
--- 4,12 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/printf.html}
! Gnulib module: printf-posix or stdio, sigpipe
! Portability problems fixed by Gnulib module @code{printf-posix}:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
***************
*** 50,55 ****
--- 50,63 ----
MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0.
@end itemize
+ Portability problems fixed by Gnulib module @code{stdio} or
@code{printf-posix}, together with module @code{sigpipe}:
+ @itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
+ @end itemize
+
Portability problems not fixed by Gnulib:
@itemize
@end itemize
*** doc/posix-functions/putc.texi.orig 2008-09-26 12:52:18.000000000 +0200
--- doc/posix-functions/putc.texi 2008-09-26 00:36:20.000000000 +0200
***************
*** 4,13 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/putc.html}
! Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
--- 4,17 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/putc.html}
! Gnulib module: stdio, sigpipe
Portability problems fixed by Gnulib:
@itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
@end itemize
Portability problems not fixed by Gnulib:
*** doc/posix-functions/putchar.texi.orig 2008-09-26 12:52:18.000000000
+0200
--- doc/posix-functions/putchar.texi 2008-09-26 00:36:19.000000000 +0200
***************
*** 4,13 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/putchar.html}
! Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
--- 4,17 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/putchar.html}
! Gnulib module: stdio, sigpipe
Portability problems fixed by Gnulib:
@itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
@end itemize
Portability problems not fixed by Gnulib:
*** doc/posix-functions/puts.texi.orig 2008-09-26 12:52:18.000000000 +0200
--- doc/posix-functions/puts.texi 2008-09-26 00:36:19.000000000 +0200
***************
*** 4,13 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/puts.html}
! Gnulib module: ---
Portability problems fixed by Gnulib:
@itemize
@end itemize
Portability problems not fixed by Gnulib:
--- 4,17 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/puts.html}
! Gnulib module: stdio, sigpipe
Portability problems fixed by Gnulib:
@itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
@end itemize
Portability problems not fixed by Gnulib:
*** doc/posix-functions/vfprintf.texi.orig 2008-09-26 12:52:18.000000000
+0200
--- doc/posix-functions/vfprintf.texi 2008-09-26 00:36:17.000000000 +0200
***************
*** 4,12 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/vfprintf.html}
! Gnulib module: vfprintf-posix
! Portability problems fixed by Gnulib:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
--- 4,12 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/vfprintf.html}
! Gnulib module: vfprintf-posix or stdio, sigpipe
! Portability problems fixed by Gnulib module @code{vfprintf-posix}:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
***************
*** 50,55 ****
--- 50,63 ----
MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0.
@end itemize
+ Portability problems fixed by Gnulib module @code{stdio} or
@code{vfprintf-posix}, together with module @code{sigpipe}:
+ @itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
+ @end itemize
+
Portability problems not fixed by Gnulib:
@itemize
@end itemize
*** doc/posix-functions/vprintf.texi.orig 2008-09-26 12:52:18.000000000
+0200
--- doc/posix-functions/vprintf.texi 2008-09-26 04:38:04.000000000 +0200
***************
*** 4,12 ****
POSIX specification: @url{http://www.opengroup.org/susv3xsh/vprintf.html}
! Gnulib module: vprintf-posix
! Portability problems fixed by Gnulib:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
--- 4,12 ----
POSIX specification: @url{http://www.opengroup.org/susv3xsh/vprintf.html}
! Gnulib module: vprintf-posix or stdio, sigpipe
! Portability problems fixed by Gnulib module @code{vprintf-posix}:
@itemize
@item
This function does not support size specifiers as in C99 (@code{hh},
@code{ll},
***************
*** 50,55 ****
--- 50,63 ----
MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0.
@end itemize
+ Portability problems fixed by Gnulib module @code{stdio} or
@code{vprintf-posix}, together with module @code{sigpipe}:
+ @itemize
+ @item
+ When writing to a pipe with no readers, this function fails, instead of
+ obeying the current @code{SIGPIPE} handler, on some platforms:
+ mingw.
+ @end itemize
+
Portability problems not fixed by Gnulib:
@itemize
@end itemize
- Re: [PATCH]: Missing tests-base in gnulib-cache.m4, (continued)
- Re: [PATCH]: Missing tests-base in gnulib-cache.m4, Paolo Bonzini, 2008/09/25
- Re: [PATCH]: Missing tests-base in gnulib-cache.m4, Ralf Wildenhues, 2008/09/25
- Re: [PATCH]: Missing tests-base in gnulib-cache.m4, Paolo Bonzini, 2008/09/25
- Re: [PATCH]: Missing tests-base in gnulib-cache.m4, Simon Josefsson, 2008/09/25
- mingw and SIGPIPE, new modules 'sigpipe' and 'write', Bruno Haible, 2008/09/26
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (1/7), Bruno Haible, 2008/09/26
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (2/7), Bruno Haible, 2008/09/26
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (3/7), Bruno Haible, 2008/09/26
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (4/7), Bruno Haible, 2008/09/26
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (5/7), Bruno Haible, 2008/09/26
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (6/7),
Bruno Haible <=
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write' (7/7), Bruno Haible, 2008/09/26
- Re: mingw and SIGPIPE, new modules 'sigpipe' and 'write', Simon Josefsson, 2008/09/26
- Re: [PATCH]: Missing tests-base in gnulib-cache.m4, Yoann Vandoorselaere, 2008/09/25
Re: [PATCH]: Missing tests-base in gnulib-cache.m4, Bruno Haible, 2008/09/25
Re: [PATCH]: Missing tests-base in gnulib-cache.m4, Bruno Haible, 2008/09/25