diff options
author | Eric Blake <ebb9@byu.net> | 2009-08-22 21:24:37 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-08-22 21:24:37 -0600 |
commit | 7d8f602d6f6c1ac2633c23140c93aaca098c6a2a (patch) | |
tree | 2e4df36ecabca453cc3acd971c5907bd5bac969a | |
parent | 1786a4159d6a904f76ba4148b04a75a75072c297 (diff) | |
download | gnulib-7d8f602d6f6c1ac2633c23140c93aaca098c6a2a.tar.gz |
fcntl-h: add O_TTY_INIT support
* lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro.
* tests/test-fcntl-h.c (o): Test it.
* doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/posix-headers/fcntl.texi | 6 | ||||
-rw-r--r-- | lib/fcntl.in.h | 6 | ||||
-rw-r--r-- | tests/test-fcntl-h.c | 2 |
4 files changed, 14 insertions, 5 deletions
@@ -1,5 +1,10 @@ 2009-08-23 Eric Blake <ebb9@byu.net> + fcntl-h: add O_TTY_INIT support + * lib/fcntl.in.h (O_TTY_INIT): Support another POSIX macro. + * tests/test-fcntl-h.c (o): Test it. + * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation. + fcntl-h: rename from fcntl, in preparation for fcntl(2) * modules/fcntl: Move <fcntl.h> header replacement... * modules/fcntl-h: ...to new name, so as not to collide with diff --git a/doc/posix-headers/fcntl.texi b/doc/posix-headers/fcntl.texi index f2d5fb25a1..6e770a32b0 100644 --- a/doc/posix-headers/fcntl.texi +++ b/doc/posix-headers/fcntl.texi @@ -9,8 +9,8 @@ Portability problems fixed by Gnulib: @itemize @item @samp{O_NOCTTY}, @samp{O_DSYNC}, @samp{O_NONBLOCK}, @samp{O_RSYNC}, -@samp{O_SYNC}, @samp{O_DIRECTORY}, and @samp{O_NOFOLLOW} are not -defined on some platforms. +@samp{O_SYNC}, @samp{O_DIRECTORY}, @samp{O_NOFOLLOW}, and +@samp{O_TTY_INIT} are not defined on some platforms. @item @samp{O_BINARY}, @samp{O_TEXT} (not specified by POSIX, but essential for @@ -37,7 +37,7 @@ Portability problems not fixed by Gnulib: replacement is not atomic on these platforms. @item -@samp{O_TTY_INIT}, @samp{O_SEARCH}, and @samp{O_EXEC} are not defined +@samp{O_SEARCH} and @samp{O_EXEC} are not defined on some platforms. @item diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index a688fb4bbf..8b92521440 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -1,6 +1,6 @@ /* Like <fcntl.h>, but with non-working flags defined to 0. - Copyright (C) 2006-2008 Free Software Foundation, Inc. + Copyright (C) 2006-2009 Free Software Foundation, Inc. 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 @@ -130,6 +130,10 @@ extern void _gl_register_fd (int fd, const char *filename); # define O_SYNC 0 #endif +#ifndef O_TTY_INIT +# define O_TTY_INIT 0 +#endif + /* For systems that distinguish between text and binary I/O. O_BINARY is usually declared in fcntl.h */ #if !defined O_BINARY && defined _O_BINARY diff --git a/tests/test-fcntl-h.c b/tests/test-fcntl-h.c index 127f49767d..649c44ad4b 100644 --- a/tests/test-fcntl-h.c +++ b/tests/test-fcntl-h.c @@ -22,7 +22,7 @@ /* Check that the various O_* macros are defined. */ int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK - | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC + | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT; /* Check that the various SEEK_* macros are defined. */ |