New submission from Oskar Andersson <[EMAIL PROTECTED]>:

I'm porting, embedding and extending Python in a very limited environment.

This environment does not have utime.h and have not defined the
following function:

int utime(const char *, const struct utimbuf *);

Although the function called utimes, defined in sys/time.h exist.

int utimes(const char *path, const struct timeval times[2]);


In the method, in posixmodule.c:

static PyObject *
posix_utime(PyObject *self, PyObject *args);

usage of these methods are used. If a time is specified in args, a
define determines which of the two methods to use, utime or utimes
depending if these exist or not.

If Py_None is sent instead utime is always used, the solution to solve
this is to use #ifdef with HAVE_UTIMES.

Line number 2835 in
http://svn.python.org/projects/python/trunk/Modules/posixmodule.c

I have not checked if this is solved in future versions.

----------
components: Extension Modules
messages: 70147
nosy: oskar86
severity: normal
status: open
title: posixmodule.c always using res = utime(path, NULL)
type: compile error
versions: Python 2.5

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3425>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to