21 #pragma GCC system_header 27 # include_next <dirent.h> 38 # if !GNULIB_defined_struct_dirent 54 typedef struct gl_directory DIR;
55 # define GNULIB_defined_struct_dirent 1 61 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) 62 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) 64 # define _GL_ATTRIBUTE_PURE 72 #if defined __cplusplus && defined GNULIB_NAMESPACE 73 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { 74 # define _GL_END_NAMESPACE } 76 # define _GL_BEGIN_NAMESPACE 77 # define _GL_END_NAMESPACE 141 #if defined __cplusplus 142 # define _GL_EXTERN_C extern "C" 144 # define _GL_EXTERN_C extern 154 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ 155 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) 156 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ 157 _GL_EXTERN_C rettype rpl_func parameters_and_attributes 166 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ 167 _GL_EXTERN_C rettype func parameters_and_attributes 178 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ 179 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) 180 #if defined __cplusplus && defined GNULIB_NAMESPACE 181 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 182 namespace GNULIB_NAMESPACE \ 184 static const struct _gl_ ## func ## _wrapper \ 186 typedef rettype (*type) parameters; \ 187 inline type rpl () const { return ::rpl_func; } \ 188 inline operator type () const { return rpl (); } \ 191 _GL_EXTERN_C int _gl_cxxalias_dummy 193 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ 194 _GL_EXTERN_C int _gl_cxxalias_dummy 202 #if defined __cplusplus && defined GNULIB_NAMESPACE 203 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 204 namespace GNULIB_NAMESPACE \ 206 static const struct _gl_ ## func ## _wrapper \ 208 typedef rettype (*type) parameters; \ 209 inline type rpl () const \ 210 { return reinterpret_cast<type>(::rpl_func); } \ 211 inline operator type () const { return rpl (); } \ 214 _GL_EXTERN_C int _gl_cxxalias_dummy 216 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ 217 _GL_EXTERN_C int _gl_cxxalias_dummy 230 #if defined __cplusplus && defined GNULIB_NAMESPACE 231 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 232 namespace GNULIB_NAMESPACE \ 234 static const struct _gl_ ## func ## _wrapper \ 236 typedef rettype (*type) parameters; \ 237 inline type rpl () const { return ::func; } \ 238 inline operator type () const { return rpl (); } \ 241 _GL_EXTERN_C int _gl_cxxalias_dummy 243 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ 244 _GL_EXTERN_C int _gl_cxxalias_dummy 252 #if defined __cplusplus && defined GNULIB_NAMESPACE 253 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 254 namespace GNULIB_NAMESPACE \ 256 static const struct _gl_ ## func ## _wrapper \ 258 typedef rettype (*type) parameters; \ 259 inline type rpl () const \ 260 { return reinterpret_cast<type>(::func); } \ 261 inline operator type () const { return rpl (); }\ 264 _GL_EXTERN_C int _gl_cxxalias_dummy 266 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ 267 _GL_EXTERN_C int _gl_cxxalias_dummy 276 #if defined __cplusplus && defined GNULIB_NAMESPACE 282 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 283 namespace GNULIB_NAMESPACE \ 285 static const struct _gl_ ## func ## _wrapper \ 287 typedef rettype (*type) parameters; \ 289 inline type rpl () const \ 290 { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\ 292 inline operator type () const { return rpl (); } \ 295 _GL_EXTERN_C int _gl_cxxalias_dummy 297 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ 298 _GL_EXTERN_C int _gl_cxxalias_dummy 305 #if defined __cplusplus && defined GNULIB_NAMESPACE 306 # define _GL_CXXALIASWARN(func) \ 307 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) 308 # define _GL_CXXALIASWARN_1(func,namespace) \ 309 _GL_CXXALIASWARN_2 (func, namespace) 313 # define _GL_CXXALIASWARN_2(func,namespace) \ 314 _GL_WARN_ON_USE (func, \ 315 "The symbol ::" #func " refers to the system function. " \ 316 "Use " #namespace "::" #func " instead.") 317 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 318 # define _GL_CXXALIASWARN_2(func,namespace) \ 319 extern __typeof__ (func) func 321 # define _GL_CXXALIASWARN_2(func,namespace) \ 322 _GL_EXTERN_C int _gl_cxxalias_dummy 325 # define _GL_CXXALIASWARN(func) \ 326 _GL_EXTERN_C int _gl_cxxalias_dummy 332 #if defined __cplusplus && defined GNULIB_NAMESPACE 333 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 334 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ 336 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ 337 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) 341 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 342 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ 343 "The symbol ::" #func " refers to the system function. " \ 344 "Use " #namespace "::" #func " instead.") 345 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 346 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 347 extern __typeof__ (func) func 349 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ 350 _GL_EXTERN_C int _gl_cxxalias_dummy 353 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ 354 _GL_EXTERN_C int _gl_cxxalias_dummy 363 #ifndef _GL_ARG_NONNULL 364 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 365 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) 367 # define _GL_ARG_NONNULL(params) 372 #ifndef _GL_WARN_ON_USE 374 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 376 # define _GL_WARN_ON_USE(function, message) \ 377 extern __typeof__ (function) function __attribute__ ((__warning__ (message))) 378 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 380 # define _GL_WARN_ON_USE(function, message) \ 381 extern __typeof__ (function) function 383 # define _GL_WARN_ON_USE(function, message) \ 384 _GL_WARN_EXTERN_C int _gl_warn_on_use 394 #ifndef _GL_WARN_ON_USE_CXX 395 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) 396 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 397 extern rettype function parameters_and_attributes \ 398 __attribute__ ((__warning__ (msg))) 399 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING 401 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 402 extern rettype function parameters_and_attributes 404 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ 405 _GL_WARN_EXTERN_C int _gl_warn_on_use 411 #ifndef _GL_WARN_EXTERN_C 412 # if defined __cplusplus 413 # define _GL_WARN_EXTERN_C extern "C" 415 # define _GL_WARN_EXTERN_C extern 424 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 426 # define opendir rpl_opendir 427 # define GNULIB_defined_opendir 1 438 #elif defined GNULIB_POSIXCHECK 440 # if HAVE_RAW_DECL_OPENDIR 442 "use gnulib module opendir for portability");
452 #elif defined GNULIB_POSIXCHECK 454 # if HAVE_RAW_DECL_READDIR 456 "use gnulib module readdir for portability");
466 #elif defined GNULIB_POSIXCHECK 468 # if HAVE_RAW_DECL_REWINDDIR 470 "use gnulib module rewinddir for portability");
476 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 478 # define closedir rpl_closedir 479 # define GNULIB_defined_closedir 1 490 #elif defined GNULIB_POSIXCHECK 492 # if HAVE_RAW_DECL_CLOSEDIR 494 "use gnulib module closedir for portability");
502 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 504 # define dirfd rpl_dirfd 511 _GL_EXTERN_C int _gl_register_dirp_fd (
int fd, DIR *dirp)
516 # if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd 519 static inline int (dirfd) (DIR *dp) {
return dirfd (dp); }
522 # if !(1 || defined dirfd) 528 #elif defined GNULIB_POSIXCHECK 530 # if HAVE_RAW_DECL_DIRFD 532 "use gnulib module dirfd for portability");
543 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 545 # define fdopendir rpl_fdopendir 556 #elif defined GNULIB_POSIXCHECK 558 # if HAVE_RAW_DECL_FDOPENDIR 560 "use gnulib module fdopendir for portability");
571 (
const char *dir,
struct dirent ***namelist,
572 int (*filter) (
const struct dirent *),
573 int (*cmp) (
const struct dirent **,
const struct dirent **))
579 (
const char *dir,
struct dirent ***namelist,
580 int (*filter) (
const struct dirent *),
581 int (*cmp) (
const struct dirent **,
const struct dirent **)));
583 #elif defined GNULIB_POSIXCHECK 585 # if HAVE_RAW_DECL_SCANDIR 587 "use gnulib module scandir for portability");
595 (
const struct dirent **,
const struct dirent **)
602 (
const struct dirent **,
const struct dirent **));
604 #elif defined GNULIB_POSIXCHECK 606 # if HAVE_RAW_DECL_ALPHASORT 608 "use gnulib module alphasort for portability");
#define _GL_CXXALIASWARN(func)
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
#define _GL_ATTRIBUTE_PURE
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
#define _GL_WARN_ON_USE(function, message)
#define _GL_ARG_NONNULL(params)
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)