Index: Modules/posixmodule.c =================================================================== --- Modules/posixmodule.c (révision 67679) +++ Modules/posixmodule.c (copie de travail) @@ -759,8 +759,8 @@ __int64 st_ino; unsigned short st_mode; int st_nlink; - int st_uid; - int st_gid; + unsigned int st_uid; + unsigned int st_gid; int st_rdev; __int64 st_size; int st_atime; @@ -1289,8 +1289,8 @@ PyStructSequence_SET_ITEM(v, 2, PyInt_FromLong((long)st->st_dev)); #endif PyStructSequence_SET_ITEM(v, 3, PyInt_FromLong((long)st->st_nlink)); - PyStructSequence_SET_ITEM(v, 4, PyInt_FromLong((long)st->st_uid)); - PyStructSequence_SET_ITEM(v, 5, PyInt_FromLong((long)st->st_gid)); + PyStructSequence_SET_ITEM(v, 4, PyLong_FromUnsignedLong((unsigned long)st->st_uid)); + PyStructSequence_SET_ITEM(v, 5, PyLong_FromUnsignedLong((unsigned long)st->st_gid)); #ifdef HAVE_LARGEFILE_SUPPORT PyStructSequence_SET_ITEM(v, 6, PyLong_FromLongLong((PY_LONG_LONG)st->st_size)); @@ -1876,9 +1876,9 @@ posix_chown(PyObject *self, PyObject *args) { char *path = NULL; - long uid, gid; + unsigned int uid, gid; int res; - if (!PyArg_ParseTuple(args, "etll:chown", + if (!PyArg_ParseTuple(args, "etII:chown", Py_FileSystemDefaultEncoding, &path, &uid, &gid)) return NULL; @@ -1902,9 +1902,10 @@ static PyObject * posix_fchown(PyObject *self, PyObject *args) { - int fd, uid, gid; + int fd; + unsigned int uid, gid; int res; - if (!PyArg_ParseTuple(args, "iii:chown", &fd, &uid, &gid)) + if (!PyArg_ParseTuple(args, "iII:chown", &fd, &uid, &gid)) return NULL; Py_BEGIN_ALLOW_THREADS res = fchown(fd, (uid_t) uid, (gid_t) gid); @@ -1925,9 +1926,9 @@ posix_lchown(PyObject *self, PyObject *args) { char *path = NULL; - int uid, gid; + unsigned int uid, gid; int res; - if (!PyArg_ParseTuple(args, "etii:lchown", + if (!PyArg_ParseTuple(args, "etII:lchown", Py_FileSystemDefaultEncoding, &path, &uid, &gid)) return NULL;