From: Jarkko Hietaniemi Date: Thu, 21 Jan 1999 10:17:20 +0000 (+0000) Subject: Two-argument eaccess() of SCO. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c955f1177b2e311d54ed3bf28758443cd10a3c9e;p=p5sagit%2Fp5-mst-13.2.git Two-argument eaccess() of SCO. p4raw-id: //depot/cfgperl@2654 --- diff --git a/pp_sys.c b/pp_sys.c index d60c8dc..538fb68 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -187,24 +187,32 @@ static char zero_but_true[ZBTLEN + 1] = "0 but true"; /* F_OK unused: if stat() cannot find it... */ #if !defined(PERL_EFF_ACCESS_R_OK) && defined(HAS_ACCESS) && defined(EFF_ONLY_OK) && !defined(NO_EFF_ONLY_OK) -/* Digital UNIX (when the EFF_ONLY_OK gets fixed), UnixWare */ + /* Digital UNIX (when the EFF_ONLY_OK gets fixed), UnixWare */ # define PERL_EFF_ACCESS_R_OK(p) (access((p), R_OK | EFF_ONLY_OK)) # define PERL_EFF_ACCESS_W_OK(p) (access((p), W_OK | EFF_ONLY_OK)) # define PERL_EFF_ACCESS_X_OK(p) (access((p), X_OK | EFF_ONLY_OK)) #endif #if !defined(PERL_EFF_ACCESS_R_OK) && defined(HAS_EACCESS) -/* HP SecureWare */ # if defined(I_SYS_SECURITY) # include # endif -# define PERL_EFF_ACCESS_R_OK(p) (eaccess((p), R_OK, ACC_SELF)) -# define PERL_EFF_ACCESS_W_OK(p) (eaccess((p), W_OK, ACC_SELF)) -# define PERL_EFF_ACCESS_X_OK(p) (eaccess((p), X_OK, ACC_SELF)) + /* XXX Configure test needed for eaccess */ +# ifdef ACC_SELF + /* HP SecureWare */ +# define PERL_EFF_ACCESS_R_OK(p) (eaccess((p), R_OK, ACC_SELF)) +# define PERL_EFF_ACCESS_W_OK(p) (eaccess((p), W_OK, ACC_SELF)) +# define PERL_EFF_ACCESS_X_OK(p) (eaccess((p), X_OK, ACC_SELF)) +# else + /* SCO */ +# define PERL_EFF_ACCESS_R_OK(p) (eaccess((p), R_OK)) +# define PERL_EFF_ACCESS_W_OK(p) (eaccess((p), W_OK)) +# define PERL_EFF_ACCESS_X_OK(p) (eaccess((p), X_OK)) +# endif #endif #if !defined(PERL_EFF_ACCESS_R_OK) && defined(HAS_ACCESSX) && defined(ACC_SELF) -/* AIX */ + /* AIX */ # define PERL_EFF_ACCESS_R_OK(p) (accessx((p), R_OK, ACC_SELF)) # define PERL_EFF_ACCESS_W_OK(p) (accessx((p), W_OK, ACC_SELF)) # define PERL_EFF_ACCESS_X_OK(p) (accessx((p), X_OK, ACC_SELF))