Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
7f98ab03
Commit
7f98ab03
authored
Oct 08, 2016
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Xfuncproto.h
parent
e2e45b2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
4 deletions
+65
-4
Xfuncproto.h
nx-X11/include/Xfuncproto.h
+65
-4
No files found.
nx-X11/include/Xfuncproto.h
View file @
7f98ab03
...
...
@@ -67,15 +67,15 @@ in this Software without prior written authorization from The Open Group.
#endif
#endif
/* _XFUNCPROTOBEGIN */
/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && (__GNUC__ >= 4)
# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
#else
# define _X_SENTINEL(x)
# define _X_ATTRIBUTE_PRINTF(x,y)
#endif
/* GNUC >= 4 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define _X_EXPORT __attribute__((visibility("default")))
# define _X_HIDDEN __attribute__((visibility("hidden")))
# define _X_INTERNAL __attribute__((visibility("internal")))
...
...
@@ -83,18 +83,52 @@ in this Software without prior written authorization from The Open Group.
# define _X_EXPORT __global
# define _X_HIDDEN __hidden
# define _X_INTERNAL __hidden
#else
/* not gcc >=
3.3
and not Sun Studio >= 8 */
#else
/* not gcc >=
4
and not Sun Studio >= 8 */
# define _X_EXPORT
# define _X_HIDDEN
# define _X_INTERNAL
#endif
/* GNUC >= 4 */
/* Branch prediction hints for individual conditionals */
/* requires xproto >= 7.0.9 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0)
#else
/* not gcc >= 3.3 */
# define _X_LIKELY(x) (x)
# define _X_UNLIKELY(x) (x)
#endif
/* Bulk branch prediction hints via marking error path functions as "cold" */
/* requires xproto >= 7.0.25 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)
/* 4.3+ */
# define _X_COLD __attribute__((__cold__))
#else
# define _X_COLD
/* nothing */
#endif
/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
# define _X_DEPRECATED __attribute__((deprecated))
#else
/* not gcc >= 3.1 */
# define _X_DEPRECATED
#endif
/* requires xproto >= 7.0.17 */
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \
|| (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define _X_NORETURN __attribute((noreturn))
#else
# define _X_NORETURN
#endif
/* GNUC */
/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
#else
/* not gcc >= 2.3 */
# define _X_ATTRIBUTE_PRINTF(x,y)
#endif
/* requires xproto >= 7.0.22 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)
#define _X_UNUSED __attribute__((__unused__))
...
...
@@ -102,4 +136,31 @@ in this Software without prior written authorization from The Open Group.
#define _X_UNUSED
/* */
#endif
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
/* requires xproto >= 7.0.9
(introduced in 7.0.8 but didn't support all compilers until 7.0.9) */
#if defined(inline)
/* assume autoconf set it correctly */
|| \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L))
/* C99 */
|| \
(defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
# define _X_INLINE inline
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* gcc w/C89+extensions */
# define _X_INLINE __inline__
#else
# define _X_INLINE
#endif
/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */
/* requires xproto >= 7.0.21 */
#ifndef _X_RESTRICT_KYWD
# if defined(restrict)
/* assume autoconf set it correctly */
|| \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)
/* C99 */
\
&& !defined(__cplusplus))
/* Workaround g++ issue on Solaris */
# define _X_RESTRICT_KYWD restrict
# elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* gcc w/C89+extensions */
# define _X_RESTRICT_KYWD __restrict__
# else
# define _X_RESTRICT_KYWD
# endif
#endif
#endif
/* _XFUNCPROTO_H_ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment