Bug 9296 – LITTLE_ENDIAN and BIG_ENDIAN are always defined on Linux

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-11T12:49:00Z
Last change time
2015-06-09T05:11:46Z
Assigned to
nobody
Creator
kai

Comments

Comment #0 by kai — 2013-01-11T12:49:09Z
On a Linux system with a recent glibc both LITTLE_ENDIAN and BIG_ENDIAN are always(!) defined. The definition is in include file <endian.h> which is included by many other, including <stdlib.h>. Therefore use of #if LITTLE_ENDIAN in dmd source works only by coincidence.
Comment #1 by yebblies — 2013-11-23T05:36:44Z
There now appear to be no actual uses of LITTLE_ENDIAN or BIG_ENDIAN left in the source.