From: Rafael Garcia-Suarez Date: Tue, 16 Mar 2004 21:55:10 +0000 (+0000) Subject: Add a lchown() call to the POSIX module. [perl #27547] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d7021f5240e725846173a1d0dc9d1773dcd2c3b;p=p5sagit%2Fp5-mst-13.2.git Add a lchown() call to the POSIX module. [perl #27547] p4raw-id: //depot/perl@22513 --- diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index 08a6f74..78d733a 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -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 diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 0919905..d56c379 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -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