diff options
Diffstat (limited to 'Include/pyport.h')
-rw-r--r-- | Include/pyport.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Include/pyport.h b/Include/pyport.h index e4e3601d7b..17d9f6d4c8 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -392,9 +392,6 @@ typedef size_t Py_uhash_t; #endif #ifdef HAVE_SYS_STAT_H -#if defined(PYOS_OS2) && defined(PYCC_GCC) -#include <sys/types.h> -#endif #include <sys/stat.h> #elif defined(HAVE_STAT_H) #include <stat.h> @@ -881,4 +878,18 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *); #endif #endif +/* + * Convenient macros to deal with endianness of the platform. WORDS_BIGENDIAN is + * detected by configure and defined in pyconfig.h. The code in pyconfig.h + * also takes care of Apple's universal builds. + */ + +#ifdef WORDS_BIGENDIAN +#define PY_BIG_ENDIAN 1 +#define PY_LITTLE_ENDIAN 0 +#else +#define PY_BIG_ENDIAN 0 +#define PY_LITTLE_ENDIAN 1 +#endif + #endif /* Py_PYPORT_H */ |