[OpenJDK 2D-Dev] _LITTLE_ENDIAN
Kurt Miller
kurt at intricatesoftware.com
Wed Jun 24 23:35:30 UTC 2009
The BSD's also always define _LITTLE_ENDIAN. Typically something
like this:
#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
#define _BYTE_ORDER _LITTLE_ENDIAN
where byte order is checked by comparing _BYTE_ORDER to _LITTLE_ENDIAN
or _BIG_ENDIAN.
Renaming the _LITTLE_ENDIAN var in OpenJDK would help the BSD's port
to sparc64 for example.
Regards,
-Kurt
On Tuesday 23 June 2009 5:46:36 pm Kelly O'Hair wrote:
> 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?
>
> -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
>
More information about the build-dev
mailing list