diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-10-15 09:31:07 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-10-15 09:31:52 -0700 |
commit | a4abf7a49b68df18db471e0af03903e8e3bb916f (patch) | |
tree | 5653239c6f2c4bd50a2c978da95b1d8d4cb39527 /tests | |
parent | 290d23ac868ab45c255654966b2d8fde99e3fa80 (diff) | |
download | gnulib-a4abf7a49b68df18db471e0af03903e8e3bb916f.tar.gz |
fcntl-h: support GNU flags like O_IGNORE_CTTY
* doc/posix-headers/fcntl.texi (fcntl.h): Support O_IGNORE_CTTY,
O_NOLINK, and O_NOTRANS. These flags are nonzero on GNU/Hurd
systems. Discovered when using fcntl-h with GNU Emacs, which uses
O_IGNORE_CTTY. Fix misspelling of F_SETLKW.
* lib/fcntl.in.h (O_IGNORE_CTTY, O_NOLINK, O_NOTRANS):
Define to 0 if not already defined.
* tests/test-fcntl-h.c: Test these new flags.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-fcntl-h.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/test-fcntl-h.c b/tests/test-fcntl-h.c index 00c5468dff..9515f828e3 100644 --- a/tests/test-fcntl-h.c +++ b/tests/test-fcntl-h.c @@ -21,9 +21,9 @@ #include <fcntl.h> /* 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_TTY_INIT - | O_BINARY | O_TEXT; +int o = (O_DIRECT | O_DIRECTORY | O_DSYNC | O_IGNORE_CTTY | O_NDELAY | O_NOATIME + | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS + | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT); /* Check that the various SEEK_* macros are defined. */ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; @@ -84,6 +84,9 @@ main (void) #if O_DSYNC case O_DSYNC: #endif +#if O_IGNORE_CTTY + case O_IGNORE_CTTY: +#endif #if O_NOATIME case O_NOATIME: #endif @@ -96,9 +99,15 @@ main (void) #if O_NOFOLLOW case O_NOFOLLOW: #endif +#if O_NOLINK + case O_NOLINK: +#endif #if O_NOLINKS case O_NOLINKS: #endif +#if O_NOTRANS + case O_NOTRANS: +#endif #if O_RSYNC && O_RSYNC != O_DSYNC case O_RSYNC: #endif |