X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-sys_stat.c;h=4a85c9f08b48f08899cf4848981551369b21d641;hb=6184bd1482b08fb6e3076931b73cbf09639509bc;hp=7f7549fdc6d3b9c6d7a6c1a118b4c3cadacbffff;hpb=5ddaa8e0398526642aae84c55a637f2497155dfd;p=gnulib.git diff --git a/tests/test-sys_stat.c b/tests/test-sys_stat.c index 7f7549fdc..4a85c9f08 100644 --- a/tests/test-sys_stat.c +++ b/tests/test-sys_stat.c @@ -1,10 +1,10 @@ /* Test of substitute. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -254,8 +253,36 @@ verify (!S_ISWHT (S_IFLNK)); verify (!S_ISWHT (S_IFSOCK)); #endif +/* POSIX 2008 requires traditional encoding of permission constants. */ +verify (S_IRWXU == 00700); +verify (S_IRUSR == 00400); +verify (S_IWUSR == 00200); +verify (S_IXUSR == 00100); +verify (S_IRWXG == 00070); +verify (S_IRGRP == 00040); +verify (S_IWGRP == 00020); +verify (S_IXGRP == 00010); +verify (S_IRWXO == 00007); +verify (S_IROTH == 00004); +verify (S_IWOTH == 00002); +verify (S_IXOTH == 00001); +verify (S_ISUID == 04000); +verify (S_ISGID == 02000); +verify (S_ISVTX == 01000); + +#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \ + || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \ + || UTIME_NOW == UTIME_OMIT) +invalid UTIME macros +#endif + +/* Check the existence of some types. */ +nlink_t t1; + +struct timespec t2; + int -main () +main (void) { return 0; }