pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: lothar.behrens@lollisoft.de
Cc: pgsql-odbc@postgresql.org
Subject: Re: Bool values under Mac OS X
Date: Tue, 26 Apr 2005 10:24:11 -0400
Message-ID: <1708.1114525451@sss.pgh.pa.us> (raw)
In-Reply-To: <426E51B7.30166.1217E8C@localhost>
References: <426E51B7.30166.1217E8C@localhost>

lothar.behrens@lollisoft.de writes:
> My conversion is these:
> bool b = *(bool*) buffer;

What's the data type of "buffer"?

On Intel hardware the above will fetch the low-order byte of "buffer",
but on PPC (and other big-endian) hardware, it will fetch the high-order
byte.  I suspect strongly that your problem has nothing to do with OS X
versus Windows and everything to do with being careless about endianness
issues.

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <1708.1114525451@sss.pgh.pa.us>
Permalink:  ../1708.1114525451@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1708.1114525451@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, lothar.behrens@lollisoft.de
  Subject: Re: Bool values under Mac OS X
  In-Reply-To: <1708.1114525451@sss.pgh.pa.us>
  References: <426E51B7.30166.1217E8C@localhost> <1708.1114525451@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox