Go to the documentation of this file.
28 #ifndef GWENHYWFARAPI_H
29 #define GWENHYWFARAPI_H
31 #include <gwenhywfar/types.h>
33 #ifdef GWENHYWFAR_IS_SUBPROJECT
34 # define GWENHYWFAR_API
35 # define GWENHYWFAR_EXPORT
36 # define GWENHYWFAR_NOEXPORT
39 # ifdef BUILDING_GWENHYWFAR
41 # if GWENHYWFAR_SYS_IS_WINDOWS
44 # define GWENHYWFAR_API __declspec (dllexport)
46 # define GWENHYWFAR_API
50 # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE
51 # define GWENHYWFAR_API __attribute__((visibility("default")))
53 # define GWENHYWFAR_API
58 # if GWENHYWFAR_SYS_IS_WINDOWS
61 # define GWENHYWFAR_API __declspec (dllimport)
63 # define GWENHYWFAR_API
67 # define GWENHYWFAR_API
71 # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE
72 # define GWENHYWFAR_EXPORT __attribute__((visibility("default")))
73 # define GWENHYWFAR_NOEXPORT __attribute__((visibility("hidden")))
75 # define GWENHYWFAR_EXPORT
76 # define GWENHYWFAR_NOEXPORT
80 # define GWEN_UNUSED __attribute__((unused))
86 #if GWENHYWFAR_SYS_IS_WINDOWS
87 # define GWENHYWFAR_CB __stdcall
89 # define GWENHYWFAR_CB
92 #if GWENHYWFAR_SYS_IS_WINDOWS
93 # define GWEN_DIR_SEPARATOR '\\'
94 # define GWEN_DIR_SEPARATOR_S "\\"
95 # define GWEN_SEARCHPATH_SEPARATOR ';'
96 # define GWEN_SEARCHPATH_SEPARATOR_S ";"
100 # define GWEN_DIR_SEPARATOR '/'
103 # define GWEN_DIR_SEPARATOR_S "/"
106 # define GWEN_SEARCHPATH_SEPARATOR ':'
109 # define GWEN_SEARCHPATH_SEPARATOR_S ":"
115 #ifndef __GNUC_PREREQ
116 # if defined __GNUC__ && defined __GNUC_MINOR__
117 # define __GNUC_PREREQ(maj, min) \
118 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
120 # define __GNUC_PREREQ(maj, min) 0
128 # define __STRING(x) #x
134 #include <gwenhywfar/system.h>
137 #if __GNUC_PREREQ(3, 0)
139 # define DEPRECATED __attribute__((deprecated))
140 # define GWEN_UNUSED __attribute__((unused))
141 # define GWEN_LIKELY(cond) __builtin_expect(!!(cond), 1)
142 # define GWEN_UNLIKELY(cond) __builtin_expect(!!(cond), 0)
146 # define GWEN_LIKELY(cond) (!!(cond))
147 # define GWEN_UNLIKELY(cond) (!!(cond))
151 #define GWEN_TIMEOUT_NONE (0)
152 #define GWEN_TIMEOUT_FOREVER (-1)