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

2008-09-28  Bruno Haible  <[EMAIL PROTECTED]>

        * 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 <[EMAIL PROTECTED]>.

--- 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.
[EMAIL PROTECTED]
+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