AW: [postgis-users] Building Postgres under FreeBSD 4.7
Benjamin Thelen
benjamin.thelen at ccgis.de
Mon Mar 24 10:32:45 PST 2003
Hi Norman,
Thanks for your help. To be hones, as Unix newbie I don't know what to
do with this code snippet you gave to me. Could you tell me how I can
use it?
I have the idea to store it into a file and make it executable or
compile it with make?? Sorry, I am neither a c programmer nor a Unix
professional.
Thanks a lot!
Benjamin
-----Ursprüngliche Nachricht-----
Von: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von
Norman Vine
Gesendet: Montag, 24. März 2003 19:07
An: PostGIS Users Discussion
Betreff: RE: [postgis-users] Building Postgres under FreeBSD 4.7
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");
}
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list