Opened 13 years ago
Closed 13 years ago
#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: | master |
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?
Attachments (1)
Change History (6)
by , 13 years ago
Attachment: | postgis-2.0.0SVN-lwgeom_define_endian_macros_solaris-1.patch added |
---|
comment:1 by , 13 years ago
I think we should internally use: ./liblwgeom/liblwgeom_internal.h:extern char getMachineEndian(void);
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I'll work on it, get ready for testing.
comment:4 by , 13 years ago
Cc: | added |
---|
BYTE_ORDER now passes properly, next missing on Solaris is the definition of INFINITY for postgis/gserialized_gist_2d.c - I think that's the last one. Shall we keep this as a general Solaris ticket ?
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
No please, file a new one. Possibly with a patch. Thank you !
First cut at adding endian macros for solaris