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?)
This commit is contained in:
Gregory P. Smith 2015-01-28 16:07:52 -08:00
parent fa73779b0a
commit 702dada2c5
1 changed files with 8 additions and 8 deletions

View File

@ -623,6 +623,13 @@ fail:
#endif /* MS_WINDOWS */ #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) #if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
static int static int
_Py_Dev_Converter(PyObject *obj, void *p) _Py_Dev_Converter(PyObject *obj, void *p)
@ -636,14 +643,7 @@ _Py_Dev_Converter(PyObject *obj, void *p)
return 0; return 0;
return 1; return 1;
} }
#endif /* HAVE_MKNOD && HAVE_MAKEDEV */
#ifdef HAVE_LONG_LONG
# define _PyLong_FromDev PyLong_FromLongLong
#else
# define _PyLong_FromDev PyLong_FromLong
#endif
#endif
#ifdef AT_FDCWD #ifdef AT_FDCWD