summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-07-17 20:37:36 (GMT)
committerFred Drake <fdrake@acm.org>2001-07-17 20:37:36 (GMT)
commit78b71c2ad3a2b2ba3f883fc9d0e81247b441155c (patch)
treed63d9a38f243aa5c5d29b4e5a87ba80dc16b9737 /Modules/posixmodule.c
parent832181e5dc553b95b3f21d30856114af6f3c3f9d (diff)
downloadcpython-78b71c2ad3a2b2ba3f883fc9d0e81247b441155c.zip
cpython-78b71c2ad3a2b2ba3f883fc9d0e81247b441155c.tar.gz
cpython-78b71c2ad3a2b2ba3f883fc9d0e81247b441155c.tar.bz2
On Windows, tempnam() is spelled with a leading underscore.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index aec8caa..f17b95a 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);