annotate lib/termios.in.h @ 14840:5f709022a256

Allow multiple gnulib generated include files to be combined. * gnulib-tool (func_compute_include_guard_prefix): New function. (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Resolve also ${gl_include_guard_prefix} references. (func_import, func_create_testdir): Invoke func_compute_include_guard_prefix. * lib/arpa_inet.in.h: Use the @GUARD_PREFIX@ placeholder. * lib/ctype.in.h: Likewise. * lib/dirent.in.h: Likewise. * lib/errno.in.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/float.in.h: Likewise. * lib/getopt.in.h: Likewise. * lib/iconv.in.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/math.in.h: Likewise. * lib/netdb.in.h: Likewise. * lib/netinet_in.in.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/sched.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/search.in.h: Likewise. * lib/signal.in.h: Likewise. * lib/spawn.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_uio.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/sysexits.in.h: Likewise. * lib/termios.in.h: Likewise. * lib/time.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/wchar.in.h: Likewise. * lib/wctype.in.h: Likewise. * modules/arpa_inet (Makefile.am): Substitute @GUARD_PREFIX@. * modules/ctype (Makefile.am): Likewise. * modules/dirent (Makefile.am): Likewise. * modules/errno (Makefile.am): Likewise. * modules/fcntl-h (Makefile.am): Likewise. * modules/float (Makefile.am): Likewise. * modules/getopt-posix (Makefile.am): Likewise. * modules/iconv-h (Makefile.am): Likewise. * modules/langinfo (Makefile.am): Likewise. * modules/locale (Makefile.am): Likewise. * modules/math (Makefile.am): Likewise. * modules/netdb (Makefile.am): Likewise. * modules/netinet_in (Makefile.am): Likewise. * modules/poll-h (Makefile.am): Likewise. * modules/pthread (Makefile.am): Likewise. * modules/pty (Makefile.am): Likewise. * modules/sched (Makefile.am): Likewise. * modules/search (Makefile.am): Likewise. * modules/selinux-h (Makefile.am): Likewise. * modules/signal (Makefile.am): Likewise. * modules/spawn (Makefile.am): Likewise. * modules/stdarg (Makefile.am): Likewise. * modules/stddef (Makefile.am): Likewise. * modules/stdint (Makefile.am): Likewise. * modules/stdio (Makefile.am): Likewise. * modules/stdlib (Makefile.am): Likewise. * modules/string (Makefile.am): Likewise. * modules/strings (Makefile.am): Likewise. * modules/sys_file (Makefile.am): Likewise. * modules/sys_ioctl (Makefile.am): Likewise. * modules/sys_select (Makefile.am): Likewise. * modules/sys_socket (Makefile.am): Likewise. * modules/sys_stat (Makefile.am): Likewise. * modules/sys_time (Makefile.am): Likewise. * modules/sys_times (Makefile.am): Likewise. * modules/sys_uio (Makefile.am): Likewise. * modules/sys_utsname (Makefile.am): Likewise. * modules/sys_wait (Makefile.am): Likewise. * modules/sysexits (Makefile.am): Likewise. * modules/termios (Makefile.am): Likewise. * modules/time (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise. * modules/wctype-h (Makefile.am): Likewise. * modules/assert-h (Makefile.am): Replace _GL_VERIFY_H specially.
author Bruno Haible <bruno@clisp.org>
date Sun, 29 May 2011 15:44:42 +0200
parents 5c5416c2942e
children 8250f2777afc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Substitute for and wrapper around <termios.h>.
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 13955
diff changeset
2 Copyright (C) 2010-2011 Free Software Foundation, Inc.
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 2, or (at your option)
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 any later version.
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 along with this program; if not, write to the Free Software Foundation,
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14083
diff changeset
18 #ifndef _@GUARD_PREFIX@_TERMIOS_H
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 #if __GNUC__ >= 3
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 @PRAGMA_SYSTEM_HEADER@
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 #endif
13761
a19ace3ba849 Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents: 13689
diff changeset
23 @PRAGMA_COLUMNS@
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
14083
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
25 /* On HP-UX 11.00, some of the function declarations in <sys/termio.h>,
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
26 included by <termios.h>, are not protected by extern "C". Enforce
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
27 "C" linkage for these functions nevertheless. */
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
28 #if defined __hpux && defined __cplusplus
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
29 # include <sys/types.h>
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
30 # include <sys/ioctl.h>
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
31 extern "C" {
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
32 # include <sys/termio.h>
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
33 }
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
34 #endif
5c5416c2942e tcgetsid: Correct linkage in C++ mode on HP-UX 11.00.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
35
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 /* The include_next requires a split double-inclusion guard. */
13801
634db78ff254 termios: fix compilation on mingw
Eric Blake <eblake@redhat.com>
parents: 13761
diff changeset
37 #if @HAVE_TERMIOS_H@
634db78ff254 termios: fix compilation on mingw
Eric Blake <eblake@redhat.com>
parents: 13761
diff changeset
38 # @INCLUDE_NEXT@ @NEXT_TERMIOS_H@
634db78ff254 termios: fix compilation on mingw
Eric Blake <eblake@redhat.com>
parents: 13761
diff changeset
39 #endif
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14083
diff changeset
41 #ifndef _@GUARD_PREFIX@_TERMIOS_H
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14083
diff changeset
42 #define _@GUARD_PREFIX@_TERMIOS_H
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43
13689
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
44 #if @GNULIB_TCGETSID@
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
45 /* Get pid_t. */
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
46 # include <sys/types.h>
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
47 #endif
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
48
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
49 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
50
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
51 /* The definition of _GL_WARN_ON_USE is copied here. */
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
52
13687
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 /* Declare overridden functions. */
b3e909bb673a New module 'termios'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55
13689
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
56 #if @GNULIB_TCGETSID@
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
57 /* Return the session ID of the controlling terminal of the current process.
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
58 The argument is a descriptor if this controlling terminal.
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
59 Return -1, with errno set, upon failure. errno = ENOSYS means that the
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
60 function is unsupported. */
13955
7f79090fda41 tcgetsid: Add missing declaration on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 13801
diff changeset
61 # if !@HAVE_DECL_TCGETSID@
13689
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
62 _GL_FUNCDECL_SYS (tcgetsid, pid_t, (int fd));
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
63 # endif
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
64 _GL_CXXALIAS_SYS (tcgetsid, pid_t, (int fd));
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
65 _GL_CXXALIASWARN (tcgetsid);
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
66 #elif defined GNULIB_POSIXCHECK
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
67 # undef tcgetsid
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
68 # if HAVE_RAW_DECL_TCGETSID
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
69 _GL_WARN_ON_USE (tcgetsid, "tcgetsid is not portable - "
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
70 "use gnulib module tcgetsid for portability");
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
71 # endif
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
72 #endif
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
73
af3a7152efba New module 'tcgetsid'.
Bruno Haible <bruno@clisp.org>
parents: 13687
diff changeset
74
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14083
diff changeset
75 #endif /* _@GUARD_PREFIX@_TERMIOS_H */
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14083
diff changeset
76 #endif /* _@GUARD_PREFIX@_TERMIOS_H */