summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2015-01-29 00:07:52 (GMT)
committerGregory P. Smith <greg@krypto.org>2015-01-29 00:07:52 (GMT)
commit702dada2c5f0f3e65bef4e086f4967cbe1efbb36 (patch)
tree5734b9e8b424a46869d96c1a0623c076c4408863
parentfa73779b0a54211e99bd1e76511f30352c7055e9 (diff)
downloadcpython-702dada2c5f0f3e65bef4e086f4967cbe1efbb36.zip
cpython-702dada2c5f0f3e65bef4e086f4967cbe1efbb36.tar.gz
cpython-702dada2c5f0f3e65bef4e086f4967cbe1efbb36.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?)
-rw-r--r--Modules/posixmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 03798ca..628dec2 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -623,6 +623,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)
@@ -636,14 +643,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