summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorRobin Barker <rmbarker@cpan.org>2010-08-03 22:50:18 +0100
committerFlorian Ragwitz <rafl@debian.org>2010-08-28 13:08:48 +0200
commit5baa2e4f63f67b815dd697a5b4faca51f3e23b5f (patch)
treebedff8aa7a21903aa15915cdb7b77a295c306612 /pp_sys.c
parent37051f8aba9443841104c0dbb526d2c24a5809c2 (diff)
downloadperl-5baa2e4f63f67b815dd697a5b4faca51f3e23b5f.tar.gz
Silence g++ compatibility warning
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 0f5a3fd737..74c0be2922 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -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)