AW: [postgis-users] Building Postgres under FreeBSD 4.7

Benjamin Thelen benjamin.thelen at ccgis.de
Mon Mar 24 11:15:05 PST 2003


Hi Norman,

Well, thanks, I've just learned what to do with the code. As I run BSD
on an Intel machine I would guess it's no surprise that your code tells
"LITLLE_ENDIAN", isn't it? Is this assumption correct?

But what does this mean for postgis_debug.h? Do I have to remove the
BIG_ENDIAN line now and rebuild it with gmake again? The "#define
LITTLE_ENDIAN   1234" entry is correct and has to remain, I assume?

Thanks,
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:29
An: nhv at cape.com; PostGIS Users Discussion
Betreff: RE: [postgis-users] Building Postgres under FreeBSD 4.7



> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
> Norman Vine
> Sent: Monday, March 24, 2003 1:07 PM
> To: PostGIS Users Discussion
> Subject: 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

Lets try that again :-)

=== cut ====

#include <stdio.h>

int main(int argc, char **argv) {
    static const int _EndianTest = 1;
#define IsLittleEndian (*((char *) &_EndianTest ) != 0)
#define IsBigEndian    (*((char *) &_EndianTest ) == 0)

    if( IsLittleEndian )
        printf("LITTLE_ENDIAN\n");
    else if( IsBigEndian )
        printf("BIG_ENDIAN\n");
    else
        printf("Something is wrong\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