VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xproto-7.0.18/X11/Xfuncproto.h@ 39561

Last change on this file since 39561 was 32163, checked in by vboxsync, 14 years ago

Additions/x11/x11include: additional headers for building drivers for X.Org Server 1.9

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette