X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_sys.c;h=85826cca73fff8c892e155473f457df040246b78;hb=8f1f23e8b15dc90b39e5be39711437f27f72b526;hp=35d6f6f31bc262d345acc0c55881df3c275337c7;hpb=2d8e6c8d50eaf50f663a5fd184404c73944226e0;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_sys.c b/pp_sys.c index 35d6f6f..85826cc 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -173,14 +173,6 @@ static int dooneliner _((char *cmd, char *filename)); #endif /* no flock() */ -#ifndef MAXPATHLEN -# ifdef PATH_MAX -# define MAXPATHLEN PATH_MAX -# else -# define MAXPATHLEN 1024 -# endif -#endif - #define ZBTLEN 10 static char zero_but_true[ZBTLEN + 1] = "0 but true"; @@ -195,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)) @@ -869,8 +869,8 @@ PP(pp_sselect) /* If SELECT_MIN_BITS is greater than one we most probably will want * to align the sizes with SELECT_MIN_BITS/8 because for example * in many little-endian (Intel, Alpha) systems (Linux, OS/2, Digital - * UNIX, Solaris, NeXT) the smallest quantum select() operates on - * (sets bit) is 32 bits. */ + * UNIX, Solaris, NeXT, Rhapsody) the smallest quantum select() operates + * on (sets/tests/clears bits) is 32 bits. */ growsize = maxlen + (SELECT_MIN_BITS/8 - (maxlen % (SELECT_MIN_BITS/8))); # else growsize = sizeof(fd_set); @@ -3276,7 +3276,11 @@ PP(pp_telldir) { djSP; dTARGET; #if defined(HAS_TELLDIR) || defined(telldir) -# ifdef NEED_TELLDIR_PROTO /* XXX does _anyone_ need this? --AD 2/20/1998 */ + /* XXX does _anyone_ need this? --AD 2/20/1998 */ + /* XXX netbsd still seemed to. + XXX HAS_TELLDIR_PROTO is new style, NEED_TELLDIR_PROTO is old style. + --JHI 1999-Feb-02 */ +# if !defined(HAS_TELLDIR_PROTO) || defined(NEED_TELLDIR_PROTO) long telldir _((DIR *)); # endif GV *gv = (GV*)POPs;