summaryrefslogtreecommitdiffstats
path: root/Include/pyport.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/pyport.h')
-rw-r--r--Include/pyport.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index 284e6da..baa04fe 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -865,4 +865,18 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
#endif
#endif
+/*
+ * Convenient macros to deal with endianess of the platform. WORDS_BIGENDIAN is
+ * detected by configure and defined in pyconfig.h. The code in pyconfig.h
+ * also 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 */