Hi,
Someone would need to make darn sure that ALL uses of the old
name have been changed. I counted 362 references to this variable
in the openjdk7 repositories, I assume a similar number in openjdk6.
The closed jdk sources have an additional 13 references to this
_LITTLE_ENDIAN name Sun would need to change too.
Do you really want to change 362+ lines for this name change?
Surely not. I haven't counted and I blindly assumed we talk about lcms
only here. Sorry. In this case I would revert to #undef _LITTLE_ENDIAN
or -U_LITTLE_ENDIAN on platforms that do crazy stuff. No code changes
needed then...
/Roman
-kto
Roman Kennke wrote:
Hi,
first of all, I think this is a LCMS problem, so we should think about
how to fix this _upstream_, otherwise we end up maintaining a patched
version of lcms *shudder*.
Then I don't think it's a good idea to depend on such 'internal'
defines. One OS defines or not _LITTLE_ENDIAN, others (like VxWorks)
define it either as 0 or 1, depending on the systems, even others
don't care and define __LITTLE_ENDIAN or whatever. IMO, a better way
to solve this is to make LCMS check LCMS_LITTLE_ENDIAN, and define it
somewhere. Configure based builds would figure this out when running
configure. OpenJDK would set this in the files mentioned below,
instead of setting _LITTLE_ENDIAN. AFAICS, this is the only way to
make sure we don't conflict with any internal settings of some OS
include or compiler.
For better or worse, there seems to be
./common/Defs-linux.gmk:CFLAGS_REQUIRED_amd64 +=
-fno-omit-frame-pointer -D_LITTLE_ENDIAN
./common/Defs-linux.gmk:CFLAGS_REQUIRED_i586 +=
-fno-omit-frame-pointer -D_LITTLE_ENDIAN
./common/Defs-linux.gmk:CFLAGS_REQUIRED_ia64 +=
-fno-omit-frame-pointer -D_LITTLE_ENDIAN
./common/Defs-solaris.gmk: # The macro _LITTLE_ENDIAN needs to be
defined the same to avoid the
./common/Defs-solaris.gmk: # Sun C compiler warning message:
warning: macro redefined: _LITTLE_ENDIAN
./common/Defs-solaris.gmk: CPPFLAGS_COMMON += -DcpuIntel
-D_LITTLE_ENDIAN= -D$(LIBARCH)
./common/Defs-windows.gmk:CPPFLAGS_COMMON = -DWIN32 -DIAL
-D_LITTLE_ENDIAN
./netbeans/awt2d/README: D3D_OVERLOADS; UNICODE; _UNICODE; WIN32;
IAL; _LITTLE_ENDIAN; WIN32; _X86_;
/Roman