Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/utsname.h
+++ new/usr/src/uts/common/sys/utsname.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 23 /* All Rights Reserved */
24 24
25 25
26 26 /*
27 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28 + *
27 29 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
28 30 * Use is subject to license terms.
29 31 */
30 32
31 33 #ifndef _SYS_UTSNAME_H
32 34 #define _SYS_UTSNAME_H
33 35
34 36 #include <sys/feature_tests.h>
35 37
36 38 #ifdef __cplusplus
37 39 extern "C" {
38 40 #endif
39 41
40 42 #define _SYS_NMLN 257 /* 4.0 size of utsname elements */
41 43 /* Must be at least 257 to */
42 44 /* support Internet hostnames. */
43 45
44 46 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
45 47 #ifndef SYS_NMLN
46 48 #define SYS_NMLN _SYS_NMLN
47 49 #endif
48 50 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
49 51
50 52 struct utsname {
51 53 char sysname[_SYS_NMLN];
52 54 char nodename[_SYS_NMLN];
53 55 char release[_SYS_NMLN];
54 56 char version[_SYS_NMLN];
55 57 char machine[_SYS_NMLN];
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
56 58 };
57 59
58 60 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
59 61 extern struct utsname utsname;
60 62 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
61 63
62 64 #if !defined(_KERNEL)
63 65
64 66 #if defined(__i386) && !defined(__amd64)
65 67
66 -#if defined(__STDC__)
67 -
68 68 extern int uname(struct utsname *);
69 69 extern int _uname(struct utsname *);
70 70
71 71 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
72 72 extern int nuname(struct utsname *);
73 73 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
74 74 extern int _nuname(struct utsname *);
75 75
76 -#else /* defined(__STDC__) */
77 -
78 -extern int uname();
79 -extern int _uname();
80 -
81 -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
82 -extern int nuname();
83 -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
84 -extern int _nuname();
85 -
86 -#endif /* defined(__STDC__) */
87 -
88 76 /*
89 77 * On i386 in SVID.2 uname() returns a utsname structure with 8 byte members,
90 78 * and nuname() returns the real struct utsname. In SVID.3 uname and nuname
91 79 * are equivalent. Anyone who includes this header gets the SVID.3 behaviour.
92 80 * The SVID.2 behaviour exists solely for compatibility, and is what is
93 81 * implemented by the libc uname/_uname entrypoints.
94 82 */
95 83 #ifdef __PRAGMA_REDEFINE_EXTNAME
96 84 #pragma redefine_extname uname _nuname
97 85 #pragma redefine_extname _uname _nuname
98 86 #else
99 87 #define uname _nuname
100 88 #define _uname _nuname
101 89 #endif
102 90
103 91 #else /* defined(__i386) */
104 92
105 -#if defined(__STDC__)
106 93 extern int uname(struct utsname *);
107 -#else
108 -extern int uname();
109 -#endif /* (__STDC__) */
110 94
111 95 #endif /* defined(__i386) */
112 96
113 97 #else /* !(_KERNEL) */
114 98 /*
115 99 * Routine to retrieve the nodename as seen in the current process's zone.
116 100 */
117 101 extern char *uts_nodename(void);
118 102 #endif /* !(_KERNEL) */
119 103
120 104 #ifdef __cplusplus
121 105 }
122 106 #endif
123 107
124 108 #endif /* _SYS_UTSNAME_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX