This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge the implementations of POSIX::{access,mkfifo} using ALIAS.
[perl5.git] / ext / POSIX / POSIX.xs
index e09454d..7284299 100644 (file)
@@ -1704,9 +1704,15 @@ SysRet
 mkfifo(filename, mode)
        char *          filename
        Mode_t          mode
+    ALIAS:
+       access = 1
     CODE:
-       TAINT_PROPER("mkfifo");
-       RETVAL = mkfifo(filename, mode);
+       if(ix) {
+           RETVAL = access(filename, mode);
+       } else {
+           TAINT_PROPER("mkfifo");
+           RETVAL = mkfifo(filename, mode);
+       }
     OUTPUT:
        RETVAL
 
@@ -1859,11 +1865,6 @@ tzname()
        PUSHs(newSVpvn_flags(tzname[0], strlen(tzname[0]), SVs_TEMP));
        PUSHs(newSVpvn_flags(tzname[1], strlen(tzname[1]), SVs_TEMP));
 
-SysRet
-access(filename, mode)
-       char *          filename
-       Mode_t          mode
-
 char *
 ctermid(s = 0)
        char *          s = 0;