annotate tests/test-fcntl-h.c @ 14476:7e83803507fe

New module 'unictype/category-longname'. * lib/unictype.in.h (uc_general_category_long_name): New declaration. * lib/unictype/categ_longname.c: New file. * modules/unictype/category-longname: New file. * modules/unictype/category-all (Depends-on): Add it.
author Bruno Haible <bruno@clisp.org>
date Fri, 25 Mar 2011 23:14:10 +0100
parents 97fc9a21a8fb
children 0b3f0c54fbc8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11876
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
1 /* Test of <fcntl.h> substitute.
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 12559
diff changeset
2 Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
11876
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
3
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
4 This program is free software: you can redistribute it and/or modify
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
7 (at your option) any later version.
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
8
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
12 GNU General Public License for more details.
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
13
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
16
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
17 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
18
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
19 #include <config.h>
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
20
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
21 #include <fcntl.h>
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
22
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
23 /* Check that the various O_* macros are defined. */
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
24 int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 12197
diff changeset
25 | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 12197
diff changeset
26 | O_BINARY | O_TEXT;
11876
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
27
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
28 /* Check that the various SEEK_* macros are defined. */
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
29 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
30
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
31 /* Check that the FD_* macros are defined. */
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
32 int fd = FD_CLOEXEC;
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
33
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
34 int
12197
e45d9bb2233e tests: avoid several compiler warnings
Eric Blake <ebb9@byu.net>
parents: 11877
diff changeset
35 main (void)
11876
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
36 {
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
37 return 0;
cc0527e5d2f4 fcntl-h: rename from fcntl, in preparation for fcntl(2)
Eric Blake <ebb9@byu.net>
parents:
diff changeset
38 }