[postgis-users] Building Postgres under FreeBSD 4.7

Norman Vine nhv at cape.com
Mon Mar 24 10:07:15 PST 2003


Benjamin Thelen 
> 
> I've found entries of LITTLE_ENDIAN and BYTE_ORDER. But I don't know
> what to do with this.
> So I definitely took the wrong make utility, but it still does not
> succeed.
> 
> 
> I found a posting in the mailing list:
> http://postgis.refractions.net/pipermail/postgis-users/2002-March/000817
> .html
> 
> I found that I have to declare the following at the top of postgis.h
> 
> #define                 BIG_ENDIAN              4321
> #define                 LITTLE_ENDIAN   1234
> 
> I did so and got the following messages of gmake below. Why are those
> numbers 4321 and 1234? That seems to be a little strange. What are those
> entries and why are they missing in the default source code?
> Well just one Error left, the guy who wrote this posting was happy just
> to have one error.
> Is the installation of postgis now done? How can I check it?

see
http://www.cs.umass.edu/~verts/cs32/endian.html

The following code will test your machine if the above is not sufficient

HTH

Norman

==== cut here ===
#include <stdio.h>
int main(int argc, char **argv) {
	static const int _EndianTest = 1;
	#define LittleEndian (*((char *) &_EndianTest ) != 0)
	#define BigEndian    (*((char *) &_EndianTest ) == 0)

	if( ulIsLittleEndian )
		printf("LITTLE_ENDIAN\n");
	else
		printf("BIG_ENDIAN\n");
}




More information about the postgis-users mailing list