Mercurial > hg > octave-lojdl > gnulib-hg
changeset 10528:97cab1215a7c
Tweak patch that overrides open() and fopen().
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 28 Sep 2008 14:59:52 +0200 |
parents | 3867738777dc |
children | e39ca1ce24a6 |
files | ChangeLog doc/posix-functions/freopen.texi lib/fcntl.in.h lib/stdio.in.h |
diffstat | 4 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-28 Bruno Haible <bruno@clisp.org> + + * 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 <tammer@tammer.net>. + 2008-09-28 Bruno Haible <bruno@clisp.org> * modules/posix_spawnp-tests: New file.
--- a/doc/posix-functions/freopen.texi +++ b/doc/posix-functions/freopen.texi @@ -18,4 +18,9 @@ @item On Windows platforms (excluding Cygwin), this function does not set @code{errno} upon failure. +@item +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
--- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -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
--- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -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