From: Fred Drake Date: Tue, 17 Jul 2001 20:37:36 +0000 (+0000) Subject: On Windows, tempnam() is spelled with a leading underscore. X-Git-Tag: v2.2a3~1094 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78b71c2ad3a2b2ba3f883fc9d0e81247b441155c;p=thirdparty%2FPython%2Fcpython.git On Windows, tempnam() is spelled with a leading underscore. --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index aec8caaf20be..f17b95af04e8 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -4211,7 +4211,11 @@ posix_tempnam(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx)) return NULL; +#ifdef MS_WIN32 + name = _tempnam(dir, pfx); +#else name = tempnam(dir, pfx); +#endif if (name == NULL) return PyErr_NoMemory(); result = PyString_FromString(name);