bug-gnulib
[Top][All Lists]
Advanced

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

Re: fopen bug on Solaris, HP-UX


From: Bruno Haible
Subject: Re: fopen bug on Solaris, HP-UX
Date: Sun, 28 Sep 2008 14:59:33 +0200
User-agent: KMail/1.5.4

A followup to this override of open() and fopen():


2008-09-28  Bruno Haible  <address@hidden>

        * doc/posix-functions/freopen.texi: Mention the trailing slash problem.

        * lib/stdio.in.h (fopen, freopen): Undefine before redefining. Needed
        with AIX xlc.
        * lib/fcntl.in.h (open): Likewise.
        Reported by Rainer Tammer <address@hidden>.

--- doc/posix-functions/freopen.texi.orig       2008-09-28 14:58:29.000000000 
+0200
+++ doc/posix-functions/freopen.texi    2008-09-28 14:48:51.000000000 +0200
@@ -18,4 +18,9 @@
 @item
 On Windows platforms (excluding Cygwin), this function does not set 
@code{errno}
 upon failure.
address@hidden
+This function does not fail when the file name argument ends in a slash
+and (without the slash) names a nonexistent file or a file that is not a
+directory, on some platforms:
+HP-UX 11.00, Solaris 9, Irix 5.3.
 @end itemize
--- lib/fcntl.in.h.orig 2008-09-28 14:58:29.000000000 +0200
+++ lib/fcntl.in.h      2008-09-28 14:57:47.000000000 +0200
@@ -38,6 +38,7 @@
 #endif
 
 #if (@GNULIB_OPEN@ && @REPLACE_OPEN@) || defined FCHDIR_REPLACEMENT
+# undef open
 # define open rpl_open
 extern int open (const char *filename, int flags, ...);
 #endif
--- lib/stdio.in.h.orig 2008-09-28 14:58:29.000000000 +0200
+++ lib/stdio.in.h      2008-09-28 14:44:48.000000000 +0200
@@ -253,6 +253,7 @@
 
 #if @GNULIB_FOPEN@
 # if @REPLACE_FOPEN@
+#  undef fopen
 #  define fopen rpl_fopen
 extern FILE * fopen (const char *filename, const char *mode);
 # endif
@@ -266,6 +267,7 @@
 
 #if @GNULIB_FREOPEN@
 # if @REPLACE_FREOPEN@
+#  undef freopen
 #  define freopen rpl_freopen
 extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
 # endif





reply via email to

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