Mercurial > hg > octave-shane > gnulib-hg
comparison modules/ptsname @ 17121:4e2101c3d42c
ptsname: reject invalid file descriptors
POSIX left errno undefined on ptsname() failure, although there
has at least been an effort to specify reasonable values to use:
http://www.austingroupbugs.net/view.php?id=503
However, our tests for ptsname and ptsname_r already require errno
to be set to useful values (as in glibc), so it is worth replacing
ptsname on FreeBSD 8.2 in order to get better QoI and pass the test.
* m4/ptsname.m4 (gl_FUNC_PTSNAME): Probe for FreeBSD bug.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Add new witness.
* modules/stdlib (Makefile.am): Replace witness.
* lib/stdlib.in.h (ptsname): Allow for replacement.
* modules/ptsname (configure.ac): Trigger replacement.
* doc/posix-functions/ptsname.texi (ptsname): Document this.
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Tue, 02 Oct 2012 12:22:19 -0600 |
parents | c4b6df81c7b3 |
children |
comparison
equal
deleted
inserted
replaced
17120:ac32fde6df85 | 17121:4e2101c3d42c |
---|---|
10 extensions | 10 extensions |
11 ptsname_r [test $HAVE_PTSNAME = 0] | 11 ptsname_r [test $HAVE_PTSNAME = 0] |
12 | 12 |
13 configure.ac: | 13 configure.ac: |
14 gl_FUNC_PTSNAME | 14 gl_FUNC_PTSNAME |
15 if test $HAVE_PTSNAME = 0; then | 15 if test $HAVE_PTSNAME = 0 || test $REPLACE_PTSNAME = 1; then |
16 AC_LIBOBJ([ptsname]) | 16 AC_LIBOBJ([ptsname]) |
17 gl_PREREQ_PTSNAME | 17 gl_PREREQ_PTSNAME |
18 fi | 18 fi |
19 gl_STDLIB_MODULE_INDICATOR([ptsname]) | 19 gl_STDLIB_MODULE_INDICATOR([ptsname]) |
20 | 20 |