X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4BC5D5334B for ; Tue, 26 Apr 2005 15:37:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78461-07 for ; Tue, 26 Apr 2005 18:37:19 +0000 (GMT) Received: from Mail2.KONTENT.De (mail2.kontent.de [81.88.34.59]) by svr1.postgresql.org (Postfix) with ESMTP id 53647534C4 for ; Tue, 26 Apr 2005 15:37:18 -0300 (ADT) Received: from jedi.behrens.de (p508CC0F6.dip0.t-ipconnect.de [80.140.192.246]) by Mail2.KONTENT.De (Postfix) with ESMTP id 3366738801D for ; Tue, 26 Apr 2005 20:37:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by jedi.behrens.de (Postfix) with ESMTP id 47F0439943 for ; Tue, 26 Apr 2005 20:36:28 +0200 (CEST) Received: from jedi.behrens.de ([127.0.0.1]) by localhost (jedi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31264-07 for ; Tue, 26 Apr 2005 20:36:25 +0200 (CEST) Received: from anakin (anakin.behrens.de [192.168.150.240]) by jedi.behrens.de (Postfix) with ESMTP id 423AEFCE9 for ; Tue, 26 Apr 2005 20:36:24 +0200 (CEST) From: lothar.behrens@lollisoft.de To: pgsql-odbc@postgresql.org Date: Tue, 26 Apr 2005 20:37:51 +0200 MIME-Version: 1.0 Subject: Re: Bool values under Mac OS X Message-ID: <426EA69F.16768.26D21DA@localhost> In-reply-to: <1708.1114525451@sss.pgh.pa.us> References: <426E51B7.30166.1217E8C@localhost> X-mailer: Pegasus Mail for Windows (4.21c, DE v4.21c R1a) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.25 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200504/82 X-Sequence-Number: 5241 Am 26 Apr 2005 um 10:24 hat Tom Lane geschrieben: > lothar.behrens@lollisoft.de writes: > > My conversion is these: > > bool b =3D *(bool*) buffer; > > What's the data type of "buffer"? > void* > 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. I have tried out ByteAsChar and got 0 or 1. Then I have done an int conver= sion instead of bool. Then I got it working. 0 is false and all other values th= readed true. Lothar > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > -- Lothar Behrens www.lollisoft.de Rosmarinstr 3 My public project: 40235 D=FCsseldorf http://sourceforge.net/projects/lbdmf