1 /* $Xorg: Xfuncproto.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $ */
4 Copyright 1989, 1991, 1998 The Open Group
6 Permission to use, copy, modify, distribute, and sell this software and its
7 documentation for any purpose is hereby granted without fee, provided that
8 the above copyright notice appear in all copies and that both that
9 copyright notice and this permission notice appear in supporting
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the name of The Open Group shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from The Open Group.
27 /* $XFree86: xc/include/Xfuncproto.h,v 3.4 2001/12/14 19:53:25 dawes Exp $ */
29 /* Definitions to make function prototypes manageable */
31 #ifndef _XFUNCPROTO_H_
32 #define _XFUNCPROTO_H_
34 #ifndef NeedFunctionPrototypes
35 #define NeedFunctionPrototypes 1
36 #endif /* NeedFunctionPrototypes */
38 #ifndef NeedVarargsPrototypes
39 #define NeedVarargsPrototypes 1
40 #endif /* NeedVarargsPrototypes */
42 #if NeedFunctionPrototypes
44 #ifndef NeedNestedPrototypes
45 #define NeedNestedPrototypes 1
46 #endif /* NeedNestedPrototypes */
52 #ifndef NeedWidePrototypes
54 #define NeedWidePrototypes 0
56 #define NeedWidePrototypes 1 /* default to make interropt. easier */
58 #endif /* NeedWidePrototypes */
60 #endif /* NeedFunctionPrototypes */
62 #ifndef _XFUNCPROTOBEGIN
63 #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
64 #define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
65 #define _XFUNCPROTOEND }
67 #define _XFUNCPROTOBEGIN
68 #define _XFUNCPROTOEND
70 #endif /* _XFUNCPROTOBEGIN */
72 #if defined(__GNUC__) && (__GNUC__ >= 4)
73 # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
74 # define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
76 # define _X_SENTINEL(x)
77 # define _X_ATTRIBUTE_PRINTF(x,y)
78 #endif /* GNUC >= 4 */
80 #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
81 # define _X_EXPORT __attribute__((visibility("default")))
82 # define _X_HIDDEN __attribute__((visibility("hidden")))
83 # define _X_INTERNAL __attribute__((visibility("internal")))
84 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
85 # define _X_EXPORT __global
86 # define _X_HIDDEN __hidden
87 # define _X_INTERNAL __hidden
88 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
94 #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
95 # define _X_DEPRECATED __attribute__((deprecated))
96 #else /* not gcc >= 3.1 */
97 # define _X_DEPRECATED
100 #endif /* _XFUNCPROTO_H_ */