Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdFlv-002joq-V2 for pgsql-odbc@arkaria.postgresql.org; Mon, 04 Sep 2023 20:02:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qdFlu-00E1QZ-Fq for pgsql-odbc@arkaria.postgresql.org; Mon, 04 Sep 2023 20:02:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdFlu-00E1QD-6M for pgsql-odbc@lists.postgresql.org; Mon, 04 Sep 2023 20:02:05 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qdFll-0033Hp-St for pgsql-odbc@postgresql.org; Mon, 04 Sep 2023 20:02:05 +0000 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id 94BD02031A for ; Mon, 4 Sep 2023 16:01:55 -0400 (EDT) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-522dd6b6438so2245559a12.0 for ; Mon, 04 Sep 2023 13:01:55 -0700 (PDT) X-Gm-Message-State: AOJu0Yye+seuTXbM9q8RQSrpRodnZibtcqAojnObyAsIprLMhl9S3UYL qPFISKFcNVDkLmbYa+nGMtGRAgYAOvaF8lZ8fKM= X-Google-Smtp-Source: AGHT+IEdtqv2dwcT3Joevd6TrA963ulVABwcFlpVA/Kv7c4IJ0M7jZfHmNisf4bzQBgY/aBHEKHAjSVq9iwaWjNjWIk= X-Received: by 2002:a05:6402:391:b0:523:33eb:1103 with SMTP id o17-20020a056402039100b0052333eb1103mr8654359edv.14.1693857714377; Mon, 04 Sep 2023 13:01:54 -0700 (PDT) MIME-Version: 1.0 References: <5D27E7EF-BBA7-4A44-8FA5-17BAEFED6EB4@enterprisedb.com> In-Reply-To: From: Dave Cramer Date: Mon, 4 Sep 2023 16:01:35 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Psqlodbc build fails on linux To: Moazzum Ali Cc: Michael Paquier , pgsql-odbc@postgresql.org Content-Type: multipart/mixed; boundary="0000000000005de4a606048dfb42" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005de4a606048dfb42 Content-Type: multipart/alternative; boundary="0000000000005de4a406048dfb40" --0000000000005de4a406048dfb40 Content-Type: text/plain; charset="UTF-8" Please see attached patch to use autoconf to detect and use stdbool.h I have to admit to having no idea if this is correct or if the style is correct, much was copied from postgresql. I have tested it on ubuntu, and it compiles. Dave Cramer www.postgres.rocks On Mon, 4 Sept 2023 at 13:56, Moazzum Ali wrote: > Thanks Dave and Michael. > > On Mon, Sep 4, 2023, 10:54 PM Dave Cramer > wrote: > >> Seems like the better solution is to use Michael's suggestion as that is >> what PG does. >> >> Dave Cramer >> www.postgres.rocks >> >> >> On Mon, 4 Sept 2023 at 12:28, Moazzum Ali >> wrote: >> >>> Dave, >>> >>> Is it something that can be fixed on PG or psqlodbc side or you would >>> also suggest what Michael suggested? I have tried that environment rule >>> though and it works. >>> >>> Thanks, >>> Moazzum >>> >>> On Mon, Sep 4, 2023, 9:07 PM Dave Cramer >>> wrote: >>> >>>> >>>> >>>> On Mon, 4 Sept 2023 at 10:23, Dave Cramer >>>> wrote: >>>> >>>>> >>>>> >>>>> On Sun, 3 Sept 2023 at 19:46, Michael Paquier >>>>> wrote: >>>>> >>>>>> On Thu, Aug 31, 2023 at 06:28:06AM +0500, Moazzum Ali wrote: >>>>>> > One way to fix the error is to include the following line before >>>>>> > #include "pqexpbuffer.h" in connection.h and statement.h >>>>>> > #include >>>>>> >>>>>> Wouldn't it be better to enforce an environment rule in psqlodbc.h >>>>>> instead? PostgreSQL enforces PG_USE_STDBOOL already on Windows, and >>>>>> I am pretty sure that it would be OK to do the same in other *nix >>>>>> places where anybody cares about ODBC. >>>>>> >>>>> >>>>> I'm guessing this is a debian thing as I just built this successfully >>>>> on a redhat (ish) system >>>>> >>>> >>>> It pays to read all of the above before trying to replicate. I was >>>> building against 15, not 16 >>>> I see the failure now >>>> >>>>> >>>>> Dave >>>>> >>>> --0000000000005de4a406048dfb40 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Please see attached patch to use autoconf to detect and us= e stdbool.h=C2=A0

I have to admit to having no idea if t= his is correct or if the style is correct, much was copied from postgresql.=

I have tested it on ubuntu, and it compiles.=C2= =A0

Dave Cramer
ww= w.postgres.rocks


On Mon, 4 Sept 2023 at 13= :56, Moazzum Ali <moazzu= m.ali@enterprisedb.com> wrote:
Thanks=C2=A0Dave and Michael.
=
On Mon= , Sep 4, 2023, 10:54 PM Dave Cramer <davecramer@postgres.rocks> wrote= :
Seems like the better solution is to use Michael's suggestion as tha= t is what=C2=A0PG does.

Dave Cramer
www.postgres.rocks


On Mon, 4 Sept 2023 at 12:28, Moazzum Ali &l= t;moazzum.ali@enterprisedb.com> wrote:
Dave,

Is it something that can be fixed on PG or psql= odbc side or you would also suggest what Michael suggested? I have tried th= at environment rule though and it works.

<= div dir=3D"auto">Thanks,
Moazzum
On Mon, = Sep 4, 2023, 9:07 PM Dave Cramer <davecramer@postgres.rocks> wrote:
=


On Mon, 4 Sept 2023 at 10:23, Dave Cramer <davecram= er@postgres.rocks> wrote:


On Sun, 3 Sept 2023 at 1= 9:46, Michael Paquier <michael@paquier.xyz> wrote:
On Thu, Aug 31, 20= 23 at 06:28:06AM +0500, Moazzum Ali wrote:
> One way to fix the error is to include the following line before
> #include "pqexpbuffer.h" in connection.h and statement.h
> #include <stdbool.h>

Wouldn't it be better to enforce an environment rule in psqlodbc.h
instead?=C2=A0 PostgreSQL enforces PG_USE_STDBOOL already on Windows, and I am pretty sure that it would be OK to do the same in other *nix
places where anybody cares about ODBC.

= I'm guessing this is a debian thing as I just built this successfully o= n a redhat (ish) system=C2=A0

=
It pays to read all of the above before trying to replicate. I was bui= lding against 15, not 16
I see the failure now=C2=A0

Dave
--0000000000005de4a406048dfb40-- --0000000000005de4a606048dfb42 Content-Type: application/octet-stream; name="0001-Use-autoconf-to-check-for-stdbool.h.patch" Content-Disposition: attachment; filename="0001-Use-autoconf-to-check-for-stdbool.h.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lm5b4lly0 RnJvbSAxM2RhNmQyODhlOTRhMjMzMWYyZWZkZTJiZDg1MDIwMmVlOTI4NmMwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBVYnVudHUgPHVidW50dUBpcC0xNzItMzAtNS0xMzAuZWMyLmlu dGVybmFsPgpEYXRlOiBNb24sIDQgU2VwIDIwMjMgMTk6NTc6NDEgKzAwMDAKU3ViamVjdDogW1BB VENIXSBVc2UgYXV0b2NvbmYgdG8gY2hlY2sgZm9yIHN0ZGJvb2wuaCBDb21taXR0ZXI6IERhdmUg Q3JhbWVyCiA8ZGF2ZWNyYW1lckBnbWFpbC5jb20+CgotLS0KIGNvbmZpZ3VyZS5hYyB8IDE0ICsr KysrKysrKysrKysrCiBwc3Fsb2RiYy5oICAgfCAyMiArKysrKysrKysrKysrKysrKysrKysrCiAy IGZpbGVzIGNoYW5nZWQsIDM2IGluc2VydGlvbnMoKykKCmRpZmYgLS1naXQgYS9jb25maWd1cmUu YWMgYi9jb25maWd1cmUuYWMKaW5kZXggNmZkOTFjYy4uYzIwZmZjNCAxMDA2NDQKLS0tIGEvY29u ZmlndXJlLmFjCisrKyBiL2NvbmZpZ3VyZS5hYwpAQCAtMjIsNiArMjIsMTkgQEAgQUNfQ0hFQ0tf U0laRU9GKHZvaWQgKikKIEFDX0NIRUNLX1RZUEVTKFtsb25nIGxvbm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