view 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
line wrap: on
line source

Description:
ptsname() function: Determine name of the slave side of a pseudo-terminal.

Files:
lib/ptsname.c
m4/ptsname.m4

Depends-on:
stdlib
extensions
ptsname_r       [test $HAVE_PTSNAME = 0]

configure.ac:
gl_FUNC_PTSNAME
if test $HAVE_PTSNAME = 0 || test $REPLACE_PTSNAME = 1; then
  AC_LIBOBJ([ptsname])
  gl_PREREQ_PTSNAME
fi
gl_STDLIB_MODULE_INDICATOR([ptsname])

Makefile.am:

Include:
<stdlib.h>

License:
LGPLv2+

Maintainer:
Bruno Haible