Re: Bool values under Mac OS X

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lothar(dot)behrens(at)lollisoft(dot)de
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Bool values under Mac OS X
Date: 2005-04-26 14:24:11
Message-ID: 1708.1114525451@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

lothar(dot)behrens(at)lollisoft(dot)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

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message lothar.behrens 2005-04-26 18:37:51 Re: Bool values under Mac OS X
Previous Message Robert Treat 2005-04-26 13:42:02 Unrecognized C_parameter type in copy_statement_with_parameters