1 /* Substitute for and wrapper around <termios.h>.
2 Copyright (C) 2010-2011 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 #ifndef _@GUARD_PREFIX@_TERMIOS_H
21 @PRAGMA_SYSTEM_HEADER@
25 /* On HP-UX 11.00, some of the function declarations in <sys/termio.h>,
26 included by <termios.h>, are not protected by extern "C". Enforce
27 "C" linkage for these functions nevertheless. */
28 #if defined __hpux && defined __cplusplus
29 # include <sys/types.h>
30 # include <sys/ioctl.h>
32 # include <sys/termio.h>
36 /* The include_next requires a split double-inclusion guard. */
38 # @INCLUDE_NEXT@ @NEXT_TERMIOS_H@
41 #ifndef _@GUARD_PREFIX@_TERMIOS_H
42 #define _@GUARD_PREFIX@_TERMIOS_H
46 # include <sys/types.h>
49 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
51 /* The definition of _GL_WARN_ON_USE is copied here. */
54 /* Declare overridden functions. */
57 /* Return the session ID of the controlling terminal of the current process.
58 The argument is a descriptor if this controlling terminal.
59 Return -1, with errno set, upon failure. errno = ENOSYS means that the
60 function is unsupported. */
61 # if !@HAVE_DECL_TCGETSID@
62 _GL_FUNCDECL_SYS (tcgetsid, pid_t, (int fd));
64 _GL_CXXALIAS_SYS (tcgetsid, pid_t, (int fd));
65 _GL_CXXALIASWARN (tcgetsid);
66 #elif defined GNULIB_POSIXCHECK
68 # if HAVE_RAW_DECL_TCGETSID
69 _GL_WARN_ON_USE (tcgetsid, "tcgetsid is not portable - "
70 "use gnulib module tcgetsid for portability");
75 #endif /* _@GUARD_PREFIX@_TERMIOS_H */
76 #endif /* _@GUARD_PREFIX@_TERMIOS_H */