X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fcntl-h.c;h=e30ff19b481627ad13f6bd0e571010382080c4ac;hb=23eecb48e39afd0d267d64d40ba6bf97aa865e13;hp=648701ef4b6da5d91eb6d65bd89581d2ad58b20c;hpb=70a72e0f50411ccc776379a761725d8c8bec58a3;p=gnulib.git diff --git a/tests/test-fcntl-h.c b/tests/test-fcntl-h.c index 648701ef4..e30ff19b4 100644 --- a/tests/test-fcntl-h.c +++ b/tests/test-fcntl-h.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2013 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 @@ -21,9 +21,9 @@ #include /* 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 }; @@ -31,6 +31,11 @@ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; /* Check that the FD_* macros are defined. */ int i = FD_CLOEXEC; +/* Check that the types are all defined. */ +pid_t t1; +off_t t2; +mode_t t3; + int main (void) { @@ -56,7 +61,7 @@ main (void) #if O_SEARCH && O_EXEC != O_SEARCH && O_SEARCH != O_RDONLY case O_SEARCH: #endif - i = O_ACCMODE == (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH); + i = ! (~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)); break; /* Everyone should have these */ @@ -79,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 @@ -91,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