[postgis-devel] Determining Endianess

strk strk at keybit.net
Mon Feb 9 12:34:17 PST 2004


I'm sorry... this was simpler then I tought:

postgres.h includes c.h
c.h includes pg_config_os.h
pg_config_os.h is a symlink to ..../port/<OS>.h (solaris.h for solaris os)

This means that postgis_inout.c and postgis_geos.c SHOULD NOT have problems
with byte ordering, while pgsql2shp can solve them including postgres.h
(which is the only reason for including it).

Including postgres.h will make pgsql2shp not buildable with no postgres
server headers around ( this holds true for all postgis except loader
and dumper ).

Keeping runtime detection will slightly decrease run speed of dumper
(only initialization is involved).

What's better: including postgres.h or keeping runtime detection ?

comments welcome.

--strk;




More information about the postgis-devel mailing list