Print this page
Revert "remove unused v from libmvec"
This reverts commit e853d278ee4b7f2a8c2117cc598cfc68b4e3f29b.
fix system-library-math.mf
update libm manifests
14071:dece9aafe99a - fix build problems on sparc
remove unused v from libmvec
fix for patch09 - use __GNU_UNUSED - fix cstyle
fix for patch09 - use __GNU_UNUSED
Revert "remove unused v from libmvec"
This reverts commit e853d278ee4b7f2a8c2117cc598cfc68b4e3f29b.
fix system-library-math.mf
update libm manifests
14071:dece9aafe99a - fix build problems on sparc
remove unused v from libmvec
fix for patch09 - use __GNU_UNUSED - fix cstyle
fix for patch09 - use __GNU_UNUSED
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/ccompile.h
+++ new/usr/src/uts/common/sys/ccompile.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
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 /*
23 23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #ifndef _SYS_CCOMPILE_H
28 28 #define _SYS_CCOMPILE_H
29 29
30 30 /*
31 31 * This file contains definitions designed to enable different compilers
32 32 * to be used harmoniously on Solaris systems.
33 33 */
34 34
35 35 #ifdef __cplusplus
36 36 extern "C" {
37 37 #endif
38 38
39 39 /*
40 40 * Allow for version tests for compiler bugs and features.
41 41 */
42 42 #if defined(__GNUC__)
43 43 #define __GNUC_VERSION \
44 44 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
45 45 #else
46 46 #define __GNUC_VERSION 0
47 47 #endif
48 48
49 49 #if defined(__ATTRIBUTE_IMPLEMENTED) || defined(__GNUC__)
50 50
51 51 /*
52 52 * analogous to lint's PRINTFLIKEn
53 53 */
54 54 #define __sun_attr___PRINTFLIKE__(__n) \
55 55 __attribute__((__format__(printf, __n, (__n)+1)))
56 56 #define __sun_attr___VPRINTFLIKE__(__n) \
57 57 __attribute__((__format__(printf, __n, 0)))
58 58
59 59 /*
60 60 * Handle the kernel printf routines that can take '%b' too
61 61 */
62 62 #if __GNUC_VERSION < 30402
63 63 /*
64 64 * XX64 at least this doesn't work correctly yet with 3.4.1 anyway!
65 65 */
66 66 #define __sun_attr___KPRINTFLIKE__ __sun_attr___PRINTFLIKE__
67 67 #define __sun_attr___KVPRINTFLIKE__ __sun_attr___VPRINTFLIKE__
68 68 #else
69 69 #define __sun_attr___KPRINTFLIKE__(__n) \
70 70 __attribute__((__format__(cmn_err, __n, (__n)+1)))
71 71 #define __sun_attr___KVPRINTFLIKE__(__n) \
72 72 __attribute__((__format__(cmn_err, __n, 0)))
73 73 #endif
74 74
75 75 /*
76 76 * This one's pretty obvious -- the function never returns
77 77 */
78 78 #define __sun_attr___noreturn__ __attribute__((__noreturn__))
79 79
80 80 /*
81 81 * The function is 'extern inline' and expects GNU C89 behaviour, not C99
82 82 * behaviour.
83 83 *
84 84 * Should only be used on 'extern inline' definitions for GCC.
85 85 */
86 86 #if __GNUC_VERSION >= 40200
87 87 #define __sun_attr___gnu_inline__ __attribute__((__gnu_inline__))
88 88 #else
89 89 #define __sun_attr___gnu_inline__
90 90 #endif
91 91
92 92 /*
93 93 * The function has control flow such that it may return multiple times (in
94 94 * the manner of setjmp or vfork)
95 95 */
96 96 #if __GNUC_VERSION >= 40100
97 97 #define __sun_attr___returns_twice__ __attribute__((__returns_twice__))
98 98 #else
99 99 #define __sun_attr___returns_twice__
100 100 #endif
101 101
102 102 /*
103 103 * This is an appropriate label for functions that do not
104 104 * modify their arguments, e.g. strlen()
105 105 */
106 106 #define __sun_attr___pure__ __attribute__((__pure__))
107 107
108 108 /*
109 109 * This is a stronger form of __pure__. Can be used for functions
110 110 * that do not modify their arguments and don't depend on global
111 111 * memory.
112 112 */
113 113 #define __sun_attr___const__ __attribute__((__const__))
114 114
115 115 /*
116 116 * structure packing like #pragma pack(1)
117 117 */
118 118 #define __sun_attr___packed__ __attribute__((__packed__))
119 119
120 120 #define ___sun_attr_inner(__a) __sun_attr_##__a
121 121 #define __sun_attr__(__a) ___sun_attr_inner __a
122 122
123 123 #else /* __ATTRIBUTE_IMPLEMENTED || __GNUC__ */
124 124
125 125 #define __sun_attr__(__a)
126 126
127 127 #endif /* __ATTRIBUTE_IMPLEMENTED || __GNUC__ */
128 128
129 129 /*
130 130 * Shorthand versions for readability
131 131 */
↓ open down ↓ |
131 lines elided |
↑ open up ↑ |
132 132
133 133 #define __PRINTFLIKE(__n) __sun_attr__((__PRINTFLIKE__(__n)))
134 134 #define __VPRINTFLIKE(__n) __sun_attr__((__VPRINTFLIKE__(__n)))
135 135 #define __KPRINTFLIKE(__n) __sun_attr__((__KPRINTFLIKE__(__n)))
136 136 #define __KVPRINTFLIKE(__n) __sun_attr__((__KVPRINTFLIKE__(__n)))
137 137 #define __NORETURN __sun_attr__((__noreturn__))
138 138 #define __GNU_INLINE __inline__ __sun_attr__((__gnu_inline__))
139 139 #define __RETURNS_TWICE __sun_attr__((__returns_twice__))
140 140 #define __CONST __sun_attr__((__const__))
141 141 #define __PURE __sun_attr__((__pure__))
142 +#define __GNU_UNUSED __attribute__((__unused__))
142 143
143 144 #ifdef __cplusplus
144 145 }
145 146 #endif
146 147
147 148 #endif /* _SYS_CCOMPILE_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX