diff options
author | Robin Barker <rmbarker@cpan.org> | 2010-08-03 22:50:18 +0100 |
---|---|---|
committer | Florian Ragwitz <rafl@debian.org> | 2010-08-28 13:08:48 +0200 |
commit | 5baa2e4f63f67b815dd697a5b4faca51f3e23b5f (patch) | |
tree | bedff8aa7a21903aa15915cdb7b77a295c306612 /pp_sys.c | |
parent | 37051f8aba9443841104c0dbb526d2c24a5809c2 (diff) | |
download | perl-5baa2e4f63f67b815dd697a5b4faca51f3e23b5f.tar.gz |
Silence g++ compatibility warning
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -4453,13 +4453,19 @@ PP(pp_setpgrp) #endif } +#ifdef __GLIBC__ +# define PRIORITY_WHICH_T(which) (__priority_which_t)which +#else +# define PRIORITY_WHICH_T(which) which +#endif + PP(pp_getpriority) { #ifdef HAS_GETPRIORITY dVAR; dSP; dTARGET; const int who = POPi; const int which = TOPi; - SETi( getpriority(which, who) ); + SETi( getpriority(PRIORITY_WHICH_T(which), who) ); RETURN; #else DIE(aTHX_ PL_no_func, "getpriority()"); @@ -4474,13 +4480,15 @@ PP(pp_setpriority) const int who = POPi; const int which = TOPi; TAINT_PROPER("setpriority"); - SETi( setpriority(which, who, niceval) >= 0 ); + SETi( setpriority(PRIORITY_WHICH_T(which), who, niceval) >= 0 ); RETURN; #else DIE(aTHX_ PL_no_func, "setpriority()"); #endif } +#undef PRIORITY_WHICH_T + /* Time calls. */ PP(pp_time) |