Roman Kennke Roman.Kennke at Sun.COM
Tue Jun 23 21:27:57 UTC 2009


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 
> ./common/Defs-windows.gmk:CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
> ./netbeans/awt2d/README:    D3D_OVERLOADS; UNICODE; _UNICODE; WIN32; 


More information about the 2d-dev mailing list