*** posixmodule.c.orig Mon Feb 21 11:30:36 1994
--- posixmodule.c Mon Feb 21 11:34:43 1994
***************
*** 48,53 ****
--- 48,54 ----
extern int chdir PROTO((const char *));
extern int rmdir PROTO((const char *));
extern int chmod PROTO((const char *, mode_t));
+ extern int chown PROTO((const char *, uid_t, gid_t));
extern char *getcwd PROTO((char *, int));
extern char *strerror PROTO((int));
extern int link PROTO((const char *, const char *));
***************
*** 208,213 ****
--- 209,233 ----
}
static object *
+ posix_strintint(args, func)
+ object *args;
+ int (*func) FPROTO((const char *, int, int));
+ {
+ char *path;
+ int i,i2;
+ int res;
+ if (!getargs(args, "(sii)", &path, &i, &i2))
+ return NULL;
+ BGN_SAVE
+ res = (*func)(path, i, i2);
+ END_SAVE
+ if (res < 0)
+ return posix_error();
+ INCREF(None);
+ return None;
+ }
+
+ static object *
posix_do_stat(self, args, statfunc)
object *self;
object *args;
***************
*** 256,261 ****
--- 276,289 ----
}
static object *
+ posix_chown(self, args)
+ object *self;
+ object *args;
+ {
+ return posix_strintint(args, chown);
+ }
+
+ static object *
posix_getcwd(self, args)
object *self;
object *args;
***************
*** 1175,1180 ****
--- 1203,1209 ----
static struct methodlist posix_methods[] = {
{"chdir", posix_chdir},
{"chmod", posix_chmod},
+ {"chown", posix_chown},
{"getcwd", posix_getcwd},
{"link", posix_link},
{"listdir", posix_listdir},
--Lance Ellinghouse lance@markv.com UNIX Systems Support support@markv.com Mark V Systems Limited Voice: +1 818 995 7671 FAX: +1 818 995 4267