00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if __GNUC__ >= 3
00025 #pragma GCC system_header
00026 #endif
00027
00028
00029 #if defined _GL_SYS_TIME_H
00030
00031
00032 # if 1
00033 # include_next <sys/time.h>
00034 # endif
00035
00036 #else
00037
00038 # define _GL_SYS_TIME_H
00039
00040 # if 1
00041 # include_next <sys/time.h>
00042 # else
00043 # include <time.h>
00044 # endif
00045
00046
00047 #ifndef _GL_CXXDEFS_H
00048 #define _GL_CXXDEFS_H
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 #if defined __cplusplus
00112 # define _GL_EXTERN_C extern "C"
00113 #else
00114 # define _GL_EXTERN_C extern
00115 #endif
00116
00117
00118
00119
00120
00121
00122
00123
00124 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
00125 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
00126 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
00127 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
00128
00129
00130
00131
00132
00133
00134
00135
00136 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
00137 _GL_EXTERN_C rettype func parameters_and_attributes
00138
00139
00140
00141
00142
00143
00144
00145 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
00146 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
00147 #if defined __cplusplus && defined GNULIB_NAMESPACE
00148 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
00149 namespace GNULIB_NAMESPACE \
00150 { \
00151 rettype (*const func) parameters = ::rpl_func; \
00152 } \
00153 _GL_EXTERN_C int _gl_cxxalias_dummy
00154 #else
00155 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
00156 _GL_EXTERN_C int _gl_cxxalias_dummy
00157 #endif
00158
00159
00160
00161
00162
00163
00164 #if defined __cplusplus && defined GNULIB_NAMESPACE
00165 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
00166 namespace GNULIB_NAMESPACE \
00167 { \
00168 rettype (*const func) parameters = \
00169 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
00170 } \
00171 _GL_EXTERN_C int _gl_cxxalias_dummy
00172 #else
00173 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
00174 _GL_EXTERN_C int _gl_cxxalias_dummy
00175 #endif
00176
00177
00178
00179
00180
00181
00182
00183
00184 #if defined __cplusplus && defined GNULIB_NAMESPACE
00185
00186
00187
00188
00189
00190
00191 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
00192 namespace GNULIB_NAMESPACE \
00193 { \
00194 static rettype (*func) parameters = ::func; \
00195 } \
00196 _GL_EXTERN_C int _gl_cxxalias_dummy
00197 #else
00198 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
00199 _GL_EXTERN_C int _gl_cxxalias_dummy
00200 #endif
00201
00202
00203
00204
00205
00206
00207 #if defined __cplusplus && defined GNULIB_NAMESPACE
00208 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
00209 namespace GNULIB_NAMESPACE \
00210 { \
00211 static rettype (*func) parameters = \
00212 reinterpret_cast<rettype(*)parameters>(::func); \
00213 } \
00214 _GL_EXTERN_C int _gl_cxxalias_dummy
00215 #else
00216 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
00217 _GL_EXTERN_C int _gl_cxxalias_dummy
00218 #endif
00219
00220
00221
00222
00223
00224
00225
00226 #if defined __cplusplus && defined GNULIB_NAMESPACE
00227
00228
00229
00230
00231
00232 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
00233 namespace GNULIB_NAMESPACE \
00234 { \
00235 static rettype (*func) parameters = \
00236 reinterpret_cast<rettype(*)parameters>( \
00237 (rettype2(*)parameters2)(::func)); \
00238 } \
00239 _GL_EXTERN_C int _gl_cxxalias_dummy
00240 #else
00241 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
00242 _GL_EXTERN_C int _gl_cxxalias_dummy
00243 #endif
00244
00245
00246
00247
00248
00249 #if defined __cplusplus && defined GNULIB_NAMESPACE
00250 # define _GL_CXXALIASWARN(func) \
00251 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
00252 # define _GL_CXXALIASWARN_1(func,namespace) \
00253 _GL_CXXALIASWARN_2 (func, namespace)
00254
00255
00256 # if !__OPTIMIZE__
00257 # define _GL_CXXALIASWARN_2(func,namespace) \
00258 _GL_WARN_ON_USE (func, \
00259 "The symbol ::" #func " refers to the system function. " \
00260 "Use " #namespace "::" #func " instead.")
00261 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00262 # define _GL_CXXALIASWARN_2(func,namespace) \
00263 extern __typeof__ (func) func
00264 # else
00265 # define _GL_CXXALIASWARN_2(func,namespace) \
00266 _GL_EXTERN_C int _gl_cxxalias_dummy
00267 # endif
00268 #else
00269 # define _GL_CXXALIASWARN(func) \
00270 _GL_EXTERN_C int _gl_cxxalias_dummy
00271 #endif
00272
00273
00274
00275
00276 #if defined __cplusplus && defined GNULIB_NAMESPACE
00277 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
00278 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
00279 GNULIB_NAMESPACE)
00280 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
00281 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
00282
00283
00284 # if !__OPTIMIZE__
00285 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00286 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
00287 "The symbol ::" #func " refers to the system function. " \
00288 "Use " #namespace "::" #func " instead.")
00289 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00290 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00291 extern __typeof__ (func) func
00292 # else
00293 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
00294 _GL_EXTERN_C int _gl_cxxalias_dummy
00295 # endif
00296 #else
00297 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
00298 _GL_EXTERN_C int _gl_cxxalias_dummy
00299 #endif
00300
00301 #endif
00302
00303
00304
00305
00306
00307 #ifndef _GL_ARG_NONNULL
00308 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
00309 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
00310 # else
00311 # define _GL_ARG_NONNULL(params)
00312 # endif
00313 #endif
00314
00315
00316 #ifndef _GL_WARN_ON_USE
00317
00318 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
00319
00320 # define _GL_WARN_ON_USE(function, message) \
00321 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
00322 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00323
00324 # define _GL_WARN_ON_USE(function, message) \
00325 extern __typeof__ (function) function
00326 # else
00327 # define _GL_WARN_ON_USE(function, message) \
00328 _GL_WARN_EXTERN_C int _gl_warn_on_use
00329 # endif
00330 #endif
00331
00332
00333
00334
00335
00336
00337
00338 #ifndef _GL_WARN_ON_USE_CXX
00339 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
00340 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00341 extern rettype function parameters_and_attributes \
00342 __attribute__ ((__warning__ (msg)))
00343 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
00344
00345 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00346 extern rettype function parameters_and_attributes
00347 # else
00348 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
00349 _GL_WARN_EXTERN_C int _gl_warn_on_use
00350 # endif
00351 #endif
00352
00353
00354
00355 #ifndef _GL_WARN_EXTERN_C
00356 # if defined __cplusplus
00357 # define _GL_WARN_EXTERN_C extern "C"
00358 # else
00359 # define _GL_WARN_EXTERN_C extern
00360 # endif
00361 #endif
00362
00363 # ifdef __cplusplus
00364 extern "C" {
00365 # endif
00366
00367 # if ! 1
00368
00369 # if !GNULIB_defined_struct_timeval
00370 struct timeval
00371 {
00372 time_t tv_sec;
00373 long int tv_usec;
00374 };
00375 # define GNULIB_defined_struct_timeval 1
00376 # endif
00377
00378 # endif
00379
00380 # ifdef __cplusplus
00381 }
00382 # endif
00383
00384 # if 1
00385 # if 0
00386 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00387 # undef gettimeofday
00388 # define gettimeofday rpl_gettimeofday
00389 # endif
00390 _GL_FUNCDECL_RPL (gettimeofday, int,
00391 (struct timeval *restrict, void *restrict)
00392 _GL_ARG_NONNULL ((1)));
00393 _GL_CXXALIAS_RPL (gettimeofday, int,
00394 (struct timeval *restrict, void *restrict));
00395 # else
00396 # if !1
00397 _GL_FUNCDECL_SYS (gettimeofday, int,
00398 (struct timeval *restrict, void *restrict)
00399 _GL_ARG_NONNULL ((1)));
00400 # endif
00401
00402
00403 _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
00404 (struct timeval *restrict, void *restrict));
00405 # endif
00406 _GL_CXXALIASWARN (gettimeofday);
00407 # elif defined GNULIB_POSIXCHECK
00408 # undef gettimeofday
00409 # if HAVE_RAW_DECL_GETTIMEOFDAY
00410 _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
00411 "use gnulib module gettimeofday for portability");
00412 # endif
00413 # endif
00414
00415 #endif