summaryrefslogtreecommitdiff
path: root/taint.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-06-16 12:27:35 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-06-16 19:22:06 -0400
commit8b225b9cd8c7e6b254c637331556189572824c91 (patch)
treebb9b17a62d8895ac8d32257aff9cd9c30a8c26b7 /taint.c
parent12d9c1353b50c95a22b82c7d29fc52caed564ed8 (diff)
downloadperl-8b225b9cd8c7e6b254c637331556189572824c91.tar.gz
Use of the Uid_t_sign and casting instead of Uid_t_f.
HP-UX B.11.31/64 gcc 4.7.2 with -DDEBUGGING: taint.c:38:2: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'uid_t' [-Wformat] This removes the sole use of Uid_t_f (and there are none of Gid_t_f) from the core.
Diffstat (limited to 'taint.c')
-rw-r--r--taint.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/taint.c b/taint.c
index 3fc62507ca..f21f5bebb9 100644
--- a/taint.c
+++ b/taint.c
@@ -35,9 +35,15 @@ Perl_taint_proper(pTHX_ const char *f, const char *const s)
const Uid_t uid = PerlProc_getuid();
const Uid_t euid = PerlProc_geteuid();
+#if Uid_t_sign == 1 /* uid_t is unsigned. */
DEBUG_u(PerlIO_printf(Perl_debug_log,
- "%s %d %"Uid_t_f" %"Uid_t_f"\n",
- s, TAINT_get, uid, euid));
+ "%s %d %"UVuf" %"UVuf"\n",
+ s, TAINT_get, (UV)uid, (UV)euid));
+#else /* uid_t is signed (Uid_t_sign == -1), or don't know. */
+ DEBUG_u(PerlIO_printf(Perl_debug_log,
+ "%s %d %"IVdf" %"IVdf"\n",
+ s, TAINT_get, (IV)uid, (IV)euid));
+#endif
}
#endif