New submission from Christian Heimes: I propose the addition of three new macros in pyport.h
#define PY_LITTLE_ENDIAN 1234 #define PY_BIG_ENDIAN 4321 #define PY_BYTE_ORDER <either little or big endian> that are either set by a configure test or implemented like brg_endian.h. pyconfig.h has WORDS_BIGENDIAN which just checks for __BIG_ENDIAN__. The sysmodule has its own C code that checks the first byte of a long to detect the endianess. http://hg.python.org/cpython/file/dd5e98ddcd39/Modules/_sha3/keccak/brg_endian.h I'd like to remove Keccak's brg_endian.h (#16113 SHA-3 module) for something more official and useful to other code. I had to re-add the file because the tests were failing on a big endian Solaris (Sparc) machine. ---------- components: Build messages: 172381 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Add PY_BYTE_ORDER macro to get endianess of platform type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16166> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com