Ticket #1172 (closed defect: fixed)
Solaris requires endian macros in liblwgeom for lwin_wkb and lwout_wkb
| Reported by: | rroliver | Owned by: | strk |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | liblwgeom | Version: | trunk |
| Keywords: | Solaris endian | Cc: | martin |
Description
Endian macros BIG_ENDIAN, LITTLE_ENDIAN and BYTE_ORDER are not provided by solaris.
By default _BIG_ENDIAN or _LITTLE_ENDIAN will be defined depending on the given target system
Find attached a patch which a) Moves inclusion of <sys/param.h> (for mingw etc. see #473) into
liblwgeom_internal.h from lwin_wkb.c and lwout_wkb.c
b) defines LITTLE_ENDIAN and BIG_ENDIAN if still undefined c) If BYTE_ORDER undefined, defines it appropriately on solaris (though does
not catch for other OSes if BYTE_ORDER undefined...)
Not sure which other OSes do not define the above.
Also not sure if this should really go into a separate header (lw_endian.h ?) that is included by liblwgeom_internal.h
Thoughts?

