1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-18 23:42:00 +03:00

Tweak patch that overrides open() and fopen().

This commit is contained in:
Bruno Haible
2008-09-28 14:59:52 +02:00
parent 0c6e0bc20e
commit 4fd7cdb11e
4 changed files with 17 additions and 0 deletions

View File

@@ -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.

View File

@@ -18,4 +18,9 @@ Portability problems not fixed by Gnulib:
@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

View File

@@ -38,6 +38,7 @@ extern "C" {
#endif
#if (@GNULIB_OPEN@ && @REPLACE_OPEN@) || defined FCHDIR_REPLACEMENT
# undef open
# define open rpl_open
extern int open (const char *filename, int flags, ...);
#endif

View File

@@ -253,6 +253,7 @@ extern int vsprintf (char *str, const char *format, va_list args)
#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 @@ extern FILE * fopen (const char *filename, const char *mode);
#if @GNULIB_FREOPEN@
# if @REPLACE_FREOPEN@
# undef freopen
# define freopen rpl_freopen
extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
# endif