Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef GWENHYWFARAPI_H
00029 #define GWENHYWFARAPI_H
00030
00031 #include <gwenhywfar/types.h>
00032
00033 #ifdef GWENHYWFAR_IS_SUBPROJECT
00034 # define GWENHYWFAR_API
00035 # define GWENHYWFAR_EXPORT
00036 # define GWENHYWFAR_NOEXPORT
00037 # define GWEN_UNUSED
00038 #else
00039 # ifdef BUILDING_GWENHYWFAR
00040
00041 # if GWENHYWFAR_SYS_IS_WINDOWS
00042
00043 # ifdef __declspec
00044 # define GWENHYWFAR_API __declspec (dllexport)
00045 # else
00046 # define GWENHYWFAR_API
00047 # endif
00048 # else
00049
00050 # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE
00051 # define GWENHYWFAR_API __attribute__((visibility("default")))
00052 # else
00053 # define GWENHYWFAR_API
00054 # endif
00055 # endif
00056 # else
00057
00058 # if GWENHYWFAR_SYS_IS_WINDOWS
00059
00060 # ifdef __declspec
00061 # define GWENHYWFAR_API __declspec (dllimport)
00062 # else
00063 # define GWENHYWFAR_API
00064 # endif
00065 # else
00066
00067 # define GWENHYWFAR_API
00068 # endif
00069 # endif
00070
00071 # ifdef GCC_WITH_VISIBILITY_ATTRIBUTE
00072 # define GWENHYWFAR_EXPORT __attribute__((visibility("default")))
00073 # define GWENHYWFAR_NOEXPORT __attribute__((visibility("hidden")))
00074 # else
00075 # define GWENHYWFAR_EXPORT
00076 # define GWENHYWFAR_NOEXPORT
00077 # endif
00078
00079 # ifdef __GNUC__
00080 # define GWEN_UNUSED __attribute__((unused))
00081 # else
00082 # define GWEN_UNUSED
00083 # endif
00084 #endif
00085
00086 #if GWENHYWFAR_SYS_IS_WINDOWS
00087 # define GWENHYWFAR_CB __stdcall
00088 #else
00089 # define GWENHYWFAR_CB
00090 #endif
00091
00092 #if GWENHYWFAR_SYS_IS_WINDOWS
00093 # define GWEN_DIR_SEPARATOR '\\'
00094 # define GWEN_DIR_SEPARATOR_S "\\"
00095 # define GWEN_SEARCHPATH_SEPARATOR ';'
00096 # define GWEN_SEARCHPATH_SEPARATOR_S ";"
00097 #else
00098
00100 # define GWEN_DIR_SEPARATOR '/'
00101
00103 # define GWEN_DIR_SEPARATOR_S "/"
00104
00106 # define GWEN_SEARCHPATH_SEPARATOR ':'
00107
00109 # define GWEN_SEARCHPATH_SEPARATOR_S ":"
00110 #endif
00111
00112
00113
00114
00115 #ifndef __GNUC_PREREQ
00116 # if defined __GNUC__ && defined __GNUC_MINOR__
00117 # define __GNUC_PREREQ(maj, min) \
00118 ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
00119 # else
00120 # define __GNUC_PREREQ(maj, min) 0
00121 # endif
00122 #endif
00123
00124
00125
00126
00127 #ifndef __STRING
00128 # define __STRING(x) #x
00129 #endif
00130
00131
00132
00133 #include <string.h>
00134 #include <gwenhywfar/system.h>
00135
00136
00137 #if __GNUC_PREREQ(3, 0)
00138
00139 # define DEPRECATED __attribute__((deprecated))
00140 # define GWEN_LIKELY(cond) __builtin_expect(!!(cond), 1)
00141 # define GWEN_UNLIKELY(cond) __builtin_expect(!!(cond), 0)
00142 #else
00143 # define DEPRECATED
00144 # define GWEN_LIKELY(cond) (!!(cond))
00145 # define GWEN_UNLIKELY(cond) (!!(cond))
00146 #endif
00147
00148
00149 #define GWEN_TIMEOUT_NONE (0)
00150 #define GWEN_TIMEOUT_FOREVER (-1)
00151
00152
00153 #endif
00154
00155