81 #if defined __cplusplus
82 # define _GL_EXTERN_C extern "C"
84 # define _GL_EXTERN_C extern
94 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
95 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
96 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
97 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
106 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
107 _GL_EXTERN_C rettype func parameters_and_attributes
115 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
116 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
117 #if defined __cplusplus && defined GNULIB_NAMESPACE
118 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
119 namespace GNULIB_NAMESPACE \
121 rettype (*const func) parameters = ::rpl_func; \
123 _GL_EXTERN_C int _gl_cxxalias_dummy
125 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
126 _GL_EXTERN_C int _gl_cxxalias_dummy
134 #if defined __cplusplus && defined GNULIB_NAMESPACE
135 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
136 namespace GNULIB_NAMESPACE \
138 rettype (*const func) parameters = \
139 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
141 _GL_EXTERN_C int _gl_cxxalias_dummy
143 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
144 _GL_EXTERN_C int _gl_cxxalias_dummy
154 #if defined __cplusplus && defined GNULIB_NAMESPACE
161 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
162 namespace GNULIB_NAMESPACE \
164 static rettype (*func) parameters = ::func; \
166 _GL_EXTERN_C int _gl_cxxalias_dummy
168 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
169 _GL_EXTERN_C int _gl_cxxalias_dummy
177 #if defined __cplusplus && defined GNULIB_NAMESPACE
178 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
179 namespace GNULIB_NAMESPACE \
181 static rettype (*func) parameters = \
182 reinterpret_cast<rettype(*)parameters>(::func); \
184 _GL_EXTERN_C int _gl_cxxalias_dummy
186 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
187 _GL_EXTERN_C int _gl_cxxalias_dummy
196 #if defined __cplusplus && defined GNULIB_NAMESPACE
202 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
203 namespace GNULIB_NAMESPACE \
205 static rettype (*func) parameters = \
206 reinterpret_cast<rettype(*)parameters>( \
207 (rettype2(*)parameters2)(::func)); \
209 _GL_EXTERN_C int _gl_cxxalias_dummy
211 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
212 _GL_EXTERN_C int _gl_cxxalias_dummy
219 #if defined __cplusplus && defined GNULIB_NAMESPACE
220 # define _GL_CXXALIASWARN(func) \
221 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
222 # define _GL_CXXALIASWARN_1(func,namespace) \
223 _GL_CXXALIASWARN_2 (func, namespace)
227 # define _GL_CXXALIASWARN_2(func,namespace) \
228 _GL_WARN_ON_USE (func, \
229 "The symbol ::" #func " refers to the system function. " \
230 "Use " #namespace "::" #func " instead.")
231 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
232 # define _GL_CXXALIASWARN_2(func,namespace) \
233 extern __typeof__ (func) func
235 # define _GL_CXXALIASWARN_2(func,namespace) \
236 _GL_EXTERN_C int _gl_cxxalias_dummy
239 # define _GL_CXXALIASWARN(func) \
240 _GL_EXTERN_C int _gl_cxxalias_dummy
246 #if defined __cplusplus && defined GNULIB_NAMESPACE
247 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
248 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
250 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
251 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
255 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
256 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
257 "The symbol ::" #func " refers to the system function. " \
258 "Use " #namespace "::" #func " instead.")
259 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
260 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
261 extern __typeof__ (func) func
263 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
264 _GL_EXTERN_C int _gl_cxxalias_dummy
267 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
268 _GL_EXTERN_C int _gl_cxxalias_dummy