- dTHR; /* just for taint */
- char *ug;
-
-#if Uid_t_SIGN == -1
- DEBUG_u(PerlIO_printf(Perl_debug_log,
- "%s %d %"IVdf" %"IVdf"\n", s, PL_tainted, (IV)PL_uid, (IV)PL_euid));
-#else
- DEBUG_u(PerlIO_printf(Perl_debug_log,
- "%s %d %"UVuf" %"UVuf"\n", s, PL_tainted, (UV)PL_uid, (UV)PL_euid));
+#if defined(HAS_SETEUID) && defined(DEBUGGING)
+ dVAR;
+
+ PERL_ARGS_ASSERT_TAINT_PROPER;
+
+# if Uid_t_size == 1
+ {
+ const UV uid = PerlProc_getuid();
+ const UV euid = PerlProc_geteuid();
+
+ DEBUG_u(PerlIO_printf(Perl_debug_log,
+ "%s %d %"UVuf" %"UVuf"\n",
+ s, PL_tainted, uid, euid));
+ }
+# else
+ {
+ const IV uid = PerlProc_getuid();
+ const IV euid = PerlProc_geteuid();
+
+ DEBUG_u(PerlIO_printf(Perl_debug_log,
+ "%s %d %"IVdf" %"IVdf"\n",
+ s, PL_tainted, uid, euid));
+ }
+# endif