summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-01-21 10:17:20 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-01-21 10:17:20 +0000
commitc955f1177b2e311d54ed3bf28758443cd10a3c9e (patch)
tree9ae4b2d34c0cc67674ea5d80dc0099073fd6a63e /pp_sys.c
parent2bb3463c228e06f0db40ef7798e304ae7a7502ba (diff)
downloadperl-c955f1177b2e311d54ed3bf28758443cd10a3c9e.tar.gz
Two-argument eaccess() of SCO.
p4raw-id: //depot/cfgperl@2654
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/pp_sys.c b/pp_sys.c
index d60c8dc7e8..538fb684db 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 <sys/security.h>
# 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))