Add a lchown() call to the POSIX module. [perl #27547]
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 16 Mar 2004 21:55:10 +0000 (21:55 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 16 Mar 2004 21:55:10 +0000 (21:55 +0000)
p4raw-id: //depot/perl@22513

ext/POSIX/POSIX.pm
ext/POSIX/POSIX.xs

index 08a6f74..78d733a 100644 (file)
@@ -2,7 +2,7 @@ package POSIX;
 
 our(@ISA, %EXPORT_TAGS, @EXPORT_OK, $AUTOLOAD) = ();
 
-our $VERSION = "1.07";
+our $VERSION = "1.08";
 
 use AutoLoader;
 
@@ -921,6 +921,7 @@ for (values %EXPORT_TAGS) {
                gmtime
                isatty
                kill
+               lchown
                link
                localtime
                log
index 0919905..d56c379 100644 (file)
@@ -1875,3 +1875,18 @@ getcwd()
        XSprePUSH; PUSHTARG;
       }
 
+SysRet
+lchown(uid, gid, path)
+       Uid_t           uid
+       Gid_t           gid
+       char *          path
+    CODE:
+#ifdef HAS_LCHOWN
+       /* yes, the order of arguments is different,
+        * but consistent with CORE::chown() */
+       RETVAL = lchown(path, uid, gid);
+#else
+       RETVAL = not_here("lchown");
+#endif
+    OUTPUT:
+       RETVAL