diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2020-02-04 15:24:54 +0000 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2020-02-04 15:24:54 +0000 |
commit | 34d254cefc451e5ab438acf22a51d7b557c05a0e (patch) | |
tree | f756fa43fc0c9530bb1f24ad291550542e0adf89 /pp_sys.c | |
parent | 2b689a479128e6b86e3d180f70dcf1b447caf0e6 (diff) | |
download | perl-34d254cefc451e5ab438acf22a51d7b557c05a0e.tar.gz |
pp_(get|set)priority: remove ancient glibc C++ workaround
Glibc has enum typedefs for some arguments that are defined as `int`
by the X/Open standard. This is fine in C, but until glibc
2.3 (released in 2002) this was also done for C++, which is not
allowed.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -4619,19 +4619,13 @@ PP(pp_setpgrp) #endif } -#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || (__GLIBC__ > 2)) -# define PRIORITY_WHICH_T(which) (__priority_which_t)which -#else -# define PRIORITY_WHICH_T(which) which -#endif - PP(pp_getpriority) { #ifdef HAS_GETPRIORITY dSP; dTARGET; const int who = POPi; const int which = TOPi; - SETi( getpriority(PRIORITY_WHICH_T(which), who) ); + SETi( getpriority(which, who) ); RETURN; #else DIE(aTHX_ PL_no_func, "getpriority"); @@ -4646,15 +4640,13 @@ PP(pp_setpriority) const int who = POPi; const int which = TOPi; TAINT_PROPER("setpriority"); - SETi( setpriority(PRIORITY_WHICH_T(which), who, niceval) >= 0 ); + SETi( setpriority(which, who, niceval) >= 0 ); RETURN; #else DIE(aTHX_ PL_no_func, "setpriority"); #endif } -#undef PRIORITY_WHICH_T - /* Time calls. */ PP(pp_time) |