Path: blob/main/system/include/X11/Xfuncproto.h
6162 views
/* Xfuncproto.h. Generated from Xfuncproto.h.in by configure. */1/*2*3Copyright 1989, 1991, 1998 The Open Group45Permission to use, copy, modify, distribute, and sell this software and its6documentation for any purpose is hereby granted without fee, provided that7the above copyright notice appear in all copies and that both that8copyright notice and this permission notice appear in supporting9documentation.1011The above copyright notice and this permission notice shall be included in12all copies or substantial portions of the Software.1314THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.2021Except as contained in this notice, the name of The Open Group shall not be22used in advertising or otherwise to promote the sale, use or other dealings23in this Software without prior written authorization from The Open Group.24*25*/2627/* Definitions to make function prototypes manageable */2829#ifndef _XFUNCPROTO_H_30#define _XFUNCPROTO_H_3132#ifndef NeedFunctionPrototypes33#define NeedFunctionPrototypes 134#endif /* NeedFunctionPrototypes */3536#ifndef NeedVarargsPrototypes37#define NeedVarargsPrototypes 138#endif /* NeedVarargsPrototypes */3940#if NeedFunctionPrototypes4142#ifndef NeedNestedPrototypes43#define NeedNestedPrototypes 144#endif /* NeedNestedPrototypes */4546#ifndef _Xconst47#define _Xconst const48#endif /* _Xconst */4950/* Function prototype configuration (see configure for more info) */51#ifndef NARROWPROTO52#define NARROWPROTO /**/53#endif54#ifndef FUNCPROTO55#define FUNCPROTO 1556#endif5758#ifndef NeedWidePrototypes59#ifdef NARROWPROTO60#define NeedWidePrototypes 061#else62#define NeedWidePrototypes 1 /* default to make interropt. easier */63#endif64#endif /* NeedWidePrototypes */6566#endif /* NeedFunctionPrototypes */6768#ifndef _XFUNCPROTOBEGIN69#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#else73#define _XFUNCPROTOBEGIN74#define _XFUNCPROTOEND75#endif76#endif /* _XFUNCPROTOBEGIN */7778#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#else82# define _X_SENTINEL(x)83# define _X_ATTRIBUTE_PRINTF(x,y)84#endif /* GNUC >= 4 */8586#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 __global92# define _X_HIDDEN __hidden93# define _X_INTERNAL __hidden94#else /* not gcc >= 4 and not Sun Studio >= 8 */95# define _X_EXPORT96# define _X_HIDDEN97# define _X_INTERNAL98#endif /* GNUC >= 4 */99100#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 inline104#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)105# define _X_LIKELY(x) (x)106# define _X_UNLIKELY(x) (x)107# define _X_INLINE inline108#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_INLINE112#endif113114#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)115# define _X_DEPRECATED __attribute__((deprecated))116#else /* not gcc >= 3.1 */117# define _X_DEPRECATED118#endif119120#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)121# define _X_NORETURN __attribute((noreturn))122#else123# define _X_NORETURN124#endif /* GNUC */125126#endif /* _XFUNCPROTO_H_ */127128129