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