annotate lib/sys_utsname.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 da5595160b9f
children 0377e22dd6c8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Substitute for <sys/utsname.h>.
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 13761
diff changeset
2 Copyright (C) 2009-2011 Free Software Foundation, Inc.
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 2, or (at your option)
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 any later version.
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 along with this program; if not, write to the Free Software Foundation,
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
79c5d61fe46d New module 'sys_utsname'.
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: 14274
diff changeset
18 #ifndef _@GUARD_PREFIX@_SYS_UTSNAME_H
13094
2ed0fc659db8 Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents: 13055
diff changeset
19
12533
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
20 #if __GNUC__ >= 3
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
21 @PRAGMA_SYSTEM_HEADER@
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
22 #endif
13761
a19ace3ba849 Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents: 13094
diff changeset
23 @PRAGMA_COLUMNS@
12533
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
24
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
25 #if @HAVE_SYS_UTSNAME_H@
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
26 # @INCLUDE_NEXT@ @NEXT_SYS_UTSNAME_H@
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
27 #endif
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
28
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14274
diff changeset
29 #define _@GUARD_PREFIX@_SYS_UTSNAME_H
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
12766
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
31 /* The definition of _GL_ARG_NONNULL is copied here. */
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
12766
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
33 /* The definition of _GL_WARN_ON_USE is copied here. */
12422
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 11766
diff changeset
34
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 #ifdef __cplusplus
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 extern "C" {
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 #endif
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39
12533
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
40 #if !@HAVE_STRUCT_UTSNAME@
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 /* Length of the entries in 'struct utsname' is 256. */
12533
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
42 # define _UTSNAME_LENGTH 256
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43
12533
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
44 # ifndef _UTSNAME_NODENAME_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
45 # define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
46 # endif
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
47 # ifndef _UTSNAME_SYSNAME_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
48 # define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
49 # endif
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
50 # ifndef _UTSNAME_RELEASE_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
51 # define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
52 # endif
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
53 # ifndef _UTSNAME_VERSION_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
54 # define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
55 # endif
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
56 # ifndef _UTSNAME_MACHINE_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
57 # define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
58 # endif
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59
14274
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
60 # if !GNULIB_defined_struct_utsname
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 /* Structure describing the system and machine. */
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 struct utsname
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 {
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 /* Name of this node on the network. */
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 char nodename[_UTSNAME_NODENAME_LENGTH];
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 /* Name of the implementation of the operating system. */
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 char sysname[_UTSNAME_SYSNAME_LENGTH];
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 /* Current release level of this implementation. */
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 char release[_UTSNAME_RELEASE_LENGTH];
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 /* Current version level of this release. */
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 char version[_UTSNAME_VERSION_LENGTH];
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 /* Name of the hardware type the system is running on. */
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 char machine[_UTSNAME_MACHINE_LENGTH];
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 };
14274
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
77 # define GNULIB_defined_struct_utsname 1
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
78 # endif
da5595160b9f Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
79
12533
57ab00b8ee20 sys_times, sys_utsname: use include_next
Eric Blake <ebb9@byu.net>
parents: 12422
diff changeset
80 #endif /* !@HAVE_STRUCT_UTSNAME@ */
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 #if @GNULIB_UNAME@
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 # if !@HAVE_UNAME@
12422
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 11766
diff changeset
85 extern int uname (struct utsname *buf) _GL_ARG_NONNULL ((1));
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 # endif
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 #elif defined GNULIB_POSIXCHECK
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 # undef uname
12766
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
89 # if HAVE_RAW_DECL_UNAME
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
90 _GL_WARN_ON_USE (uname, "uname is unportable - "
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
91 "use gnulib module uname for portability");
2c14f1e449e5 warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents: 12559
diff changeset
92 # endif
11766
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 #endif
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 #ifdef __cplusplus
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 }
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 #endif
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99
79c5d61fe46d New module 'sys_utsname'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100
14840
5f709022a256 Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents: 14274
diff changeset
101 #endif /* _@GUARD_PREFIX@_SYS_UTSNAME_H */