Mercurial > gnulib
annotate lib/unistd-safer.h @ 40140:81f075eaa990
ptsname_r: Work around bug on Android 4.3.
* m4/ptsname_r.m4 (gl_FUNC_PTSNAME_R): Define
HAVE_ESSENTIALLY_WORKING_PTSNAME_R. Test whether the return value is
correct.
* lib/ptsname_r.c (__ptsname_r): If HAVE_ESSENTIALLY_WORKING_PTSNAME_R
is defined, just fix the return value.
* doc/glibc-functions/ptsname_r.texi: Mention the Android bug. Reword:
The behaviour of musl libc is nothing to be "fixed", since it is
compliant with the next POSIX standard.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 26 Jan 2019 15:23:19 +0100 |
parents | b06060465f09 |
children |
rev | line source |
---|---|
5813 | 1 /* Invoke unistd-like functions, but avoid some glitches. |
4397
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
2 |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
3 Copyright (C) 2001, 2003, 2005, 2009-2019 Free Software Foundation, Inc. |
4397
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
4 |
9309
bbbbbf4cd1c5
Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
6133
diff
changeset
|
5 This program is free software: you can redistribute it and/or modify |
4397
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
6 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:
6133
diff
changeset
|
7 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:
6133
diff
changeset
|
8 (at your option) any later version. |
3196 | 9 |
4397
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
13 GNU General Public License for more details. |
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
14 |
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
19190 | 16 along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
4397
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
17 |
12392
2d61b44981dc
unistd-safer: allow preservation of cloexec status via flag
Eric Blake <ebb9@byu.net>
parents:
9309
diff
changeset
|
18 /* Written by Paul Eggert and Eric Blake. */ |
4397
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
19 |
c6450308f123
Assume C89, so PARAMS isn't needed.
Paul Eggert <eggert@cs.ucla.edu>
parents:
3196
diff
changeset
|
20 int dup_safer (int); |
5813 | 21 int fd_safer (int); |
6133 | 22 int pipe_safer (int[2]); |
12392
2d61b44981dc
unistd-safer: allow preservation of cloexec status via flag
Eric Blake <ebb9@byu.net>
parents:
9309
diff
changeset
|
23 |
12432
0759131e0d13
New module 'fd-safer-flag'.
Bruno Haible <bruno@clisp.org>
parents:
12394
diff
changeset
|
24 #if GNULIB_FD_SAFER_FLAG |
12392
2d61b44981dc
unistd-safer: allow preservation of cloexec status via flag
Eric Blake <ebb9@byu.net>
parents:
9309
diff
changeset
|
25 int dup_safer_flag (int, int); |
2d61b44981dc
unistd-safer: allow preservation of cloexec status via flag
Eric Blake <ebb9@byu.net>
parents:
9309
diff
changeset
|
26 int fd_safer_flag (int, int); |
2d61b44981dc
unistd-safer: allow preservation of cloexec status via flag
Eric Blake <ebb9@byu.net>
parents:
9309
diff
changeset
|
27 #endif |
12394 | 28 |
29 #if GNULIB_PIPE2_SAFER | |
30 int pipe2_safer (int[2], int); | |
31 #endif |