Go to the documentation of this file. 5 #if defined __cplusplus && defined GNULIB_NAMESPACE 6 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 7 # define _GL_END_NAMESPACE } 9 # define _GL_BEGIN_NAMESPACE 10 # define _GL_END_NAMESPACE 74 #if defined __cplusplus 75 # define _GL_EXTERN_C extern "C" 77 # define _GL_EXTERN_C extern 87 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 88 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 89 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 90 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 99 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 100 _GL_EXTERN_C rettype func parameters_and_attributes 111 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 112 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 113 #if defined __cplusplus && defined GNULIB_NAMESPACE 114 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 115 namespace GNULIB_NAMESPACE \ 117 static const struct _gl_ ## func ## _wrapper \ 119 typedef rettype (*type) parameters; \ 120 inline type rpl () const { return ::rpl_func; } \ 121 inline operator type () const { return rpl (); } \ 124 _GL_EXTERN_C int _gl_cxxalias_dummy 126 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 127 _GL_EXTERN_C int _gl_cxxalias_dummy 135 #if defined __cplusplus && defined GNULIB_NAMESPACE 136 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 137 namespace GNULIB_NAMESPACE \ 139 static const struct _gl_ ## func ## _wrapper \ 141 typedef rettype (*type) parameters; \ 142 inline type rpl () const \ 143 { return reinterpret_cast<type>(::rpl_func); } \ 144 inline operator type () const { return rpl (); } \ 147 _GL_EXTERN_C int _gl_cxxalias_dummy 149 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 150 _GL_EXTERN_C int _gl_cxxalias_dummy 163 #if defined __cplusplus && defined GNULIB_NAMESPACE 164 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 165 namespace GNULIB_NAMESPACE \ 167 static const struct _gl_ ## func ## _wrapper \ 169 typedef rettype (*type) parameters; \ 170 inline type rpl () const { return ::func; } \ 171 inline operator type () const { return rpl (); } \ 174 _GL_EXTERN_C int _gl_cxxalias_dummy 176 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 177 _GL_EXTERN_C int _gl_cxxalias_dummy 185 #if defined __cplusplus && defined GNULIB_NAMESPACE 186 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 187 namespace GNULIB_NAMESPACE \ 189 static const struct _gl_ ## func ## _wrapper \ 191 typedef rettype (*type) parameters; \ 192 inline type rpl () const \ 193 { return reinterpret_cast<type>(::func); } \ 194 inline operator type () const { return rpl (); }\ 197 _GL_EXTERN_C int _gl_cxxalias_dummy 199 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 200 _GL_EXTERN_C int _gl_cxxalias_dummy 209 #if defined __cplusplus && defined GNULIB_NAMESPACE 215 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 216 namespace GNULIB_NAMESPACE \ 218 static const struct _gl_ ## func ## _wrapper \ 220 typedef rettype (*type) parameters; \ 222 inline type rpl () const \ 223 { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\ 225 inline operator type () const { return rpl (); } \ 228 _GL_EXTERN_C int _gl_cxxalias_dummy 230 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 231 _GL_EXTERN_C int _gl_cxxalias_dummy 238 #if defined __cplusplus && defined GNULIB_NAMESPACE 239 # define _GL_CXXALIASWARN(func) \ 240 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 241 # define _GL_CXXALIASWARN_1(func,namespace) \ 242 _GL_CXXALIASWARN_2 (func, namespace) 246 # define _GL_CXXALIASWARN_2(func,namespace) \ 247 _GL_WARN_ON_USE (func, \ 248 "The symbol ::" #func " refers to the system function. " \ 249 "Use " #namespace "::" #func " instead.") 250 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 251 # define _GL_CXXALIASWARN_2(func,namespace) \ 252 extern __typeof__ (func) func 254 # define _GL_CXXALIASWARN_2(func,namespace) \ 255 _GL_EXTERN_C int _gl_cxxalias_dummy 258 # define _GL_CXXALIASWARN(func) \ 259 _GL_EXTERN_C int _gl_cxxalias_dummy 265 #if defined __cplusplus && defined GNULIB_NAMESPACE 266 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 267 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 269 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 270 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 274 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 275 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 276 "The symbol ::" #func " refers to the system function. " \ 277 "Use " #namespace "::" #func " instead.") 278 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 279 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 280 extern __typeof__ (func) func 282 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 283 _GL_EXTERN_C int _gl_cxxalias_dummy 286 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 287 _GL_EXTERN_C int _gl_cxxalias_dummy