Hash :
975bf7fd
Author :
Date :
2010-12-20T00:47:57
tcgetsid: Add missing declaration on OSF/1 5.1. * lib/termios.in.h (tcgetsid): Test HAVE_DECL_TCGETSID instead of HAVE_TCGETSID. * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Test whether tcgetsid is declared. Don't set HAVE_TCGETSID. * m4/termios_h.m4 (gl_TERMIOS_H_DEFAULTS): Initialize HAVE_DECL_TCGETSID, not HAVE_TCGETSID. * modules/termios (Makefile.am): Substitute HAVE_DECL_TCGETSID, not HAVE_TCGETSID. * doc/posix-functions/tcgetsid.texi: Mention the OSF/1 5.1 problem.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
/* Substitute for and wrapper around <termios.h>.
Copyright (C) 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GL_TERMIOS_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_TERMIOS_H@
# @INCLUDE_NEXT@ @NEXT_TERMIOS_H@
#endif
#ifndef _GL_TERMIOS_H
#define _GL_TERMIOS_H
#if @GNULIB_TCGETSID@
/* Get pid_t. */
# include <sys/types.h>
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Declare overridden functions. */
#if @GNULIB_TCGETSID@
/* Return the session ID of the controlling terminal of the current process.
The argument is a descriptor if this controlling terminal.
Return -1, with errno set, upon failure. errno = ENOSYS means that the
function is unsupported. */
# if !@HAVE_DECL_TCGETSID@
_GL_FUNCDECL_SYS (tcgetsid, pid_t, (int fd));
# endif
_GL_CXXALIAS_SYS (tcgetsid, pid_t, (int fd));
_GL_CXXALIASWARN (tcgetsid);
#elif defined GNULIB_POSIXCHECK
# undef tcgetsid
# if HAVE_RAW_DECL_TCGETSID
_GL_WARN_ON_USE (tcgetsid, "tcgetsid is not portable - "
"use gnulib module tcgetsid for portability");
# endif
#endif
#endif /* _GL_TERMIOS_H */
#endif /* _GL_TERMIOS_H */