diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-14 09:55:26 +0200 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-21 16:53:08 +0100 |
commit | d1a21e441b960b44c368ad603bfd9208ef8f60fb (patch) | |
tree | f4bda1ee78109ea32223b60b70233f84e41e0a3a /pp_hot.c | |
parent | 4fda7c0cc8689dd812e767bd25a3a7a5bfee7b61 (diff) | |
download | perl-d1a21e441b960b44c368ad603bfd9208ef8f60fb.tar.gz |
pp_hot.c: simplify cpp conditionals
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -1960,12 +1960,11 @@ PP(pp_aassign) setresuid((PL_delaymagic & DM_RUID) ? PL_delaymagic_uid : (Uid_t)-1, (PL_delaymagic & DM_EUID) ? PL_delaymagic_euid : (Uid_t)-1, (Uid_t)-1)); -#else -# ifdef HAS_SETREUID +#elif defined(HAS_SETREUID) PERL_UNUSED_RESULT( setreuid((PL_delaymagic & DM_RUID) ? PL_delaymagic_uid : (Uid_t)-1, (PL_delaymagic & DM_EUID) ? PL_delaymagic_euid : (Uid_t)-1)); -# else +#else # ifdef HAS_SETRUID if ((PL_delaymagic & DM_UID) == DM_RUID) { PERL_UNUSED_RESULT(setruid(PL_delaymagic_uid)); @@ -1983,7 +1982,6 @@ PP(pp_aassign) DIE(aTHX_ "No setreuid available"); PERL_UNUSED_RESULT(PerlProc_setuid(PL_delaymagic_uid)); } -# endif /* HAS_SETREUID */ #endif /* HAS_SETRESUID */ tmp_uid = PerlProc_getuid(); @@ -1996,12 +1994,11 @@ PP(pp_aassign) setresgid((PL_delaymagic & DM_RGID) ? PL_delaymagic_gid : (Gid_t)-1, (PL_delaymagic & DM_EGID) ? PL_delaymagic_egid : (Gid_t)-1, (Gid_t)-1)); -#else -# ifdef HAS_SETREGID +#elif defined(HAS_SETREGID) PERL_UNUSED_RESULT( setregid((PL_delaymagic & DM_RGID) ? PL_delaymagic_gid : (Gid_t)-1, (PL_delaymagic & DM_EGID) ? PL_delaymagic_egid : (Gid_t)-1)); -# else +#else # ifdef HAS_SETRGID if ((PL_delaymagic & DM_GID) == DM_RGID) { PERL_UNUSED_RESULT(setrgid(PL_delaymagic_gid)); @@ -2019,7 +2016,6 @@ PP(pp_aassign) DIE(aTHX_ "No setregid available"); PERL_UNUSED_RESULT(PerlProc_setgid(PL_delaymagic_gid)); } -# endif /* HAS_SETREGID */ #endif /* HAS_SETRESGID */ tmp_gid = PerlProc_getgid(); |