diff options
Diffstat (limited to 'gl/sched.h')
| -rw-r--r-- | gl/sched.h | 19 |
1 files changed, 5 insertions, 14 deletions
| @@ -47,7 +47,7 @@ | |||
| 47 | 47 | ||
| 48 | /* Get pid_t. | 48 | /* Get pid_t. |
| 49 | This is needed on glibc 2.11 (see | 49 | This is needed on glibc 2.11 (see |
| 50 | glibc bug <https://sourceware.org/PR13198>) | 50 | glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=13198>) |
| 51 | and Mac OS X 10.5. */ | 51 | and Mac OS X 10.5. */ |
| 52 | #include <sys/types.h> | 52 | #include <sys/types.h> |
| 53 | 53 | ||
| @@ -191,16 +191,6 @@ | |||
| 191 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ | 191 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ |
| 192 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters | 192 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters |
| 193 | 193 | ||
| 194 | /* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to | ||
| 195 | parenthesized func otherwise. Parenthesization is needed in C23 if | ||
| 196 | the function is like strchr and so is a qualifier-generic macro | ||
| 197 | that expands to something more complicated. */ | ||
| 198 | #ifdef __cplusplus | ||
| 199 | # define _GL_FUNCDECL_SYS_NAME(func) func | ||
| 200 | #else | ||
| 201 | # define _GL_FUNCDECL_SYS_NAME(func) (func) | ||
| 202 | #endif | ||
| 203 | |||
| 204 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); | 194 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); |
| 205 | declares the system function, named func, with the given prototype, | 195 | declares the system function, named func, with the given prototype, |
| 206 | consisting of return type, parameters, and attributes. | 196 | consisting of return type, parameters, and attributes. |
| @@ -213,7 +203,7 @@ | |||
| 213 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); | 203 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); |
| 214 | */ | 204 | */ |
| 215 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ | 205 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ |
| 216 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters | 206 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters |
| 217 | 207 | ||
| 218 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); | 208 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); |
| 219 | declares a C++ alias called GNULIB_NAMESPACE::func | 209 | declares a C++ alias called GNULIB_NAMESPACE::func |
| @@ -384,7 +374,7 @@ | |||
| 384 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) | 374 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
| 385 | # define _GL_CXXALIASWARN_1(func,namespace) \ | 375 | # define _GL_CXXALIASWARN_1(func,namespace) \ |
| 386 | _GL_CXXALIASWARN_2 (func, namespace) | 376 | _GL_CXXALIASWARN_2 (func, namespace) |
| 387 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | 377 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
| 388 | we enable the warning only when not optimizing. */ | 378 | we enable the warning only when not optimizing. */ |
| 389 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | 379 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
| 390 | # define _GL_CXXALIASWARN_2(func,namespace) \ | 380 | # define _GL_CXXALIASWARN_2(func,namespace) \ |
| @@ -412,7 +402,7 @@ | |||
| 412 | GNULIB_NAMESPACE) | 402 | GNULIB_NAMESPACE) |
| 413 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ | 403 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
| 414 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) | 404 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
| 415 | /* To work around GCC bug <https://gcc.gnu.org/PR43881>, | 405 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
| 416 | we enable the warning only when not optimizing. */ | 406 | we enable the warning only when not optimizing. */ |
| 417 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) | 407 | # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) |
| 418 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ | 408 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
| @@ -621,6 +611,7 @@ _GL_CXXALIAS_SYS (sched_yield, int, (void)); | |||
| 621 | _GL_CXXALIASWARN (sched_yield); | 611 | _GL_CXXALIASWARN (sched_yield); |
| 622 | # endif | 612 | # endif |
| 623 | #elif defined GNULIB_POSIXCHECK | 613 | #elif defined GNULIB_POSIXCHECK |
| 614 | # undef sched_yield | ||
| 624 | # if HAVE_RAW_DECL_SCHED_YIELD | 615 | # if HAVE_RAW_DECL_SCHED_YIELD |
| 625 | _GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - " | 616 | _GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - " |
| 626 | "use gnulib module sched_yield for portability"); | 617 | "use gnulib module sched_yield for portability"); |
