Mercurial > gnulib
annotate tests/test-posix_spawn_file_actions_addchdir.c @ 40231:9b3c79fdfe0b
strtod: fix clash with strtold
Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817).
* lib/strtod.c (compute_minus_zero, minus_zero):
Simplify by remving the macro / external variable,
and having just a function. User changed. This avoids
the need for an external variable that might clash.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 11 Mar 2019 16:40:29 -0700 |
parents | 5d9b82ca550a |
children |
rev | line source |
---|---|
39829
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Test posix_spawn_file_actions_addchdir() function. |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
39829
diff
changeset
|
2 Copyright (C) 2018-2019 Free Software Foundation, Inc. |
39829
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 it under the terms of the GNU General Public License as published by |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 the Free Software Foundation; either version 3 of the License, or |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 (at your option) any later version. |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 GNU General Public License for more details. |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 You should have received a copy of the GNU General Public License |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 #include <config.h> |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 #include <spawn.h> |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 #include "signature.h" |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 SIGNATURE_CHECK (posix_spawn_file_actions_addchdir, int, |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 (posix_spawn_file_actions_t *, const char *)); |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 #include <errno.h> |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 #include <fcntl.h> |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 #include <limits.h> |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 #include <unistd.h> |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 #include "macros.h" |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 int |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 main (void) |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 { |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 posix_spawn_file_actions_t actions; |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 ASSERT (posix_spawn_file_actions_init (&actions) == 0); |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 ASSERT (posix_spawn_file_actions_addchdir (&actions, "/") == 0); |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 |
40224
5d9b82ca550a
tests: Free allocated memory.
Bruno Haible <bruno@clisp.org>
parents:
40057
diff
changeset
|
41 posix_spawn_file_actions_destroy (&actions); |
5d9b82ca550a
tests: Free allocated memory.
Bruno Haible <bruno@clisp.org>
parents:
40057
diff
changeset
|
42 |
39829
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 return 0; |
aa6d47aae153
posix_spawn_file_actions_addchdir: Add tests.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 } |