Mercurial > hg > octave-shane > gnulib-hg
annotate tests/test-open.c @ 17530:8981b79e1271
error: make the module depend on vfprintf-posix
* modules/error (Depends-on): Add vfprintf-posix, since error
calls vfprintf unconditionally, via error_tail.
author | Jim Meyering <meyering@fb.com> |
---|---|
date | Sat, 12 Oct 2013 19:28:40 -0700 |
parents | e542fd46ad6f |
children | 344018b6e5d7 |
rev | line source |
---|---|
9300 | 1 /* Test of opening a file descriptor. |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16201
diff
changeset
|
2 Copyright (C) 2007-2013 Free Software Foundation, Inc. |
9300 | 3 |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
9300
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
9300 | 5 it under the terms of the GNU General Public License as published by |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
9300
diff
changeset
|
6 the Free Software Foundation; either version 3 of the License, or |
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
9300
diff
changeset
|
7 (at your option) any later version. |
9300 | 8 |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
9300
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
9300 | 16 |
17 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */ | |
18 | |
19 #include <config.h> | |
20 | |
21 #include <fcntl.h> | |
22 | |
12489 | 23 #include "signature.h" |
24 SIGNATURE_CHECK (open, int, (char const *, int, ...)); | |
25 | |
12259 | 26 #include <errno.h> |
27 #include <stdbool.h> | |
28 #include <stdio.h> | |
29 #include <unistd.h> | |
30 | |
12496
a48d3d749ca5
Refactor common macros used in tests.
Bruno Haible <bruno@clisp.org>
parents:
12489
diff
changeset
|
31 #include "macros.h" |
12259 | 32 |
12105
edba99785b75
test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents:
11862
diff
changeset
|
33 #define BASE "test-open.t" |
edba99785b75
test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents:
11862
diff
changeset
|
34 |
11862
1cbf6c0e3f4d
test-fcntl-safer: split from test-open
Eric Blake <ebb9@byu.net>
parents:
11849
diff
changeset
|
35 #include "test-open.h" |
12105
edba99785b75
test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents:
11862
diff
changeset
|
36 |
edba99785b75
test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents:
11862
diff
changeset
|
37 int |
12197
e45d9bb2233e
tests: avoid several compiler warnings
Eric Blake <ebb9@byu.net>
parents:
12105
diff
changeset
|
38 main (void) |
12105
edba99785b75
test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents:
11862
diff
changeset
|
39 { |
12259 | 40 return test_open (open, true); |
12105
edba99785b75
test-open: on GNU/Hurd, /dev/null is a directory
Eric Blake <ebb9@byu.net>
parents:
11862
diff
changeset
|
41 } |