summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2015-01-29 00:08:07 (GMT)
committerGregory P. Smith <greg@krypto.org>2015-01-29 00:08:07 (GMT)
commitbd4976bbd3c8cdfba974c1a66970a1f956c08f53 (patch)
treee7b87460f500fbf119fe29d17a83cc83ce68d4d3 /Modules
parentbea0a2843952629ac665f2353c0977eabad6fdc1 (diff)
parent702dada2c5f0f3e65bef4e086f4967cbe1efbb36 (diff)
downloadcpython-bd4976bbd3c8cdfba974c1a66970a1f956c08f53.zip
cpython-bd4976bbd3c8cdfba974c1a66970a1f956c08f53.tar.gz
cpython-bd4976bbd3c8cdfba974c1a66970a1f956c08f53.tar.bz2
Always #define _PyLong_FromDev as we always need it to compile rather than
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true. This "oops" issue reported by John E. Malmberg on core-mentorship. (what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 502e933..94df06c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -617,6 +617,13 @@ fail:
#endif /* MS_WINDOWS */
+#ifdef HAVE_LONG_LONG
+# define _PyLong_FromDev PyLong_FromLongLong
+#else
+# define _PyLong_FromDev PyLong_FromLong
+#endif
+
+
#if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
static int
_Py_Dev_Converter(PyObject *obj, void *p)
@@ -630,14 +637,7 @@ _Py_Dev_Converter(PyObject *obj, void *p)
return 0;
return 1;
}
-
-#ifdef HAVE_LONG_LONG
-# define _PyLong_FromDev PyLong_FromLongLong
-#else
-# define _PyLong_FromDev PyLong_FromLong
-#endif
-
-#endif
+#endif /* HAVE_MKNOD && HAVE_MAKEDEV */
#ifdef AT_FDCWD