1 | /* Xfuncproto.h. Generated from Xfuncproto.h.in by configure. */
|
---|
2 | /* $Xorg: Xfuncproto.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
|
---|
3 | /*
|
---|
4 | *
|
---|
5 | Copyright 1989, 1991, 1998 The Open Group
|
---|
6 |
|
---|
7 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
8 | documentation for any purpose is hereby granted without fee, provided that
|
---|
9 | the above copyright notice appear in all copies and that both that
|
---|
10 | copyright notice and this permission notice appear in supporting
|
---|
11 | documentation.
|
---|
12 |
|
---|
13 | The above copyright notice and this permission notice shall be included in
|
---|
14 | all copies or substantial portions of the Software.
|
---|
15 |
|
---|
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
22 |
|
---|
23 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
24 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
25 | in this Software without prior written authorization from The Open Group.
|
---|
26 | *
|
---|
27 | */
|
---|
28 | /* $XFree86: xc/include/Xfuncproto.h,v 3.4 2001/12/14 19:53:25 dawes Exp $ */
|
---|
29 |
|
---|
30 | /* Definitions to make function prototypes manageable */
|
---|
31 |
|
---|
32 | #ifndef _XFUNCPROTO_H_
|
---|
33 | #define _XFUNCPROTO_H_
|
---|
34 |
|
---|
35 | #ifndef NeedFunctionPrototypes
|
---|
36 | #define NeedFunctionPrototypes 1
|
---|
37 | #endif /* NeedFunctionPrototypes */
|
---|
38 |
|
---|
39 | #ifndef NeedVarargsPrototypes
|
---|
40 | #define NeedVarargsPrototypes 1
|
---|
41 | #endif /* NeedVarargsPrototypes */
|
---|
42 |
|
---|
43 | #if NeedFunctionPrototypes
|
---|
44 |
|
---|
45 | #ifndef NeedNestedPrototypes
|
---|
46 | #define NeedNestedPrototypes 1
|
---|
47 | #endif /* NeedNestedPrototypes */
|
---|
48 |
|
---|
49 | #ifndef _Xconst
|
---|
50 | #define _Xconst const
|
---|
51 | #endif /* _Xconst */
|
---|
52 |
|
---|
53 | /* Function prototype configuration (see configure for more info) */
|
---|
54 | #ifndef NARROWPROTO
|
---|
55 | #define NARROWPROTO
|
---|
56 | #endif
|
---|
57 | #ifndef FUNCPROTO
|
---|
58 | #define FUNCPROTO 15
|
---|
59 | #endif
|
---|
60 |
|
---|
61 | #ifndef NeedWidePrototypes
|
---|
62 | #ifdef NARROWPROTO
|
---|
63 | #define NeedWidePrototypes 0
|
---|
64 | #else
|
---|
65 | #define NeedWidePrototypes 1 /* default to make interropt. easier */
|
---|
66 | #endif
|
---|
67 | #endif /* NeedWidePrototypes */
|
---|
68 |
|
---|
69 | #endif /* NeedFunctionPrototypes */
|
---|
70 |
|
---|
71 | #ifndef _XFUNCPROTOBEGIN
|
---|
72 | #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
|
---|
73 | #define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
|
---|
74 | #define _XFUNCPROTOEND }
|
---|
75 | #else
|
---|
76 | #define _XFUNCPROTOBEGIN
|
---|
77 | #define _XFUNCPROTOEND
|
---|
78 | #endif
|
---|
79 | #endif /* _XFUNCPROTOBEGIN */
|
---|
80 |
|
---|
81 | #if defined(__GNUC__) && (__GNUC__ >= 4)
|
---|
82 | # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
|
---|
83 | # define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
|
---|
84 | #else
|
---|
85 | # define _X_SENTINEL(x)
|
---|
86 | # define _X_ATTRIBUTE_PRINTF(x,y)
|
---|
87 | #endif /* GNUC >= 4 */
|
---|
88 |
|
---|
89 | #if defined(__GNUC__) && (__GNUC__ >= 4)
|
---|
90 | # define _X_EXPORT __attribute__((visibility("default")))
|
---|
91 | # define _X_HIDDEN __attribute__((visibility("hidden")))
|
---|
92 | # define _X_INTERNAL __attribute__((visibility("internal")))
|
---|
93 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
---|
94 | # define _X_EXPORT __global
|
---|
95 | # define _X_HIDDEN __hidden
|
---|
96 | # define _X_INTERNAL __hidden
|
---|
97 | #else /* not gcc >= 4 and not Sun Studio >= 8 */
|
---|
98 | # define _X_EXPORT
|
---|
99 | # define _X_HIDDEN
|
---|
100 | # define _X_INTERNAL
|
---|
101 | #endif /* GNUC >= 4 */
|
---|
102 |
|
---|
103 | #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
|
---|
104 | # define _X_LIKELY(x) __builtin_expect(!!(x), 1)
|
---|
105 | # define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
---|
106 | # define _X_INLINE inline
|
---|
107 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
---|
108 | # define _X_LIKELY(x) (x)
|
---|
109 | # define _X_UNLIKELY(x) (x)
|
---|
110 | # define _X_INLINE inline
|
---|
111 | #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
|
---|
112 | # define _X_LIKELY(x) (x)
|
---|
113 | # define _X_UNLIKELY(x) (x)
|
---|
114 | # define _X_INLINE
|
---|
115 | #endif
|
---|
116 |
|
---|
117 | #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
|
---|
118 | # define _X_DEPRECATED __attribute__((deprecated))
|
---|
119 | #else /* not gcc >= 3.1 */
|
---|
120 | # define _X_DEPRECATED
|
---|
121 | #endif
|
---|
122 |
|
---|
123 | #endif /* _XFUNCPROTO_H_ */
|
---|