Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marcel Hofstetter <hofstetter(at)jomasoft(dot)ch>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)
Date: 2023-07-17 20:42:47
Message-ID: 4073250.1689626567@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Marcel Hofstetter <hofstetter(at)jomasoft(dot)ch> writes:
> I found it fails after
> ./configure --prefix /usr/local/16-pgsql --without-icu
> but compiles with
> ./configure --prefix /usr/local/16-pgsql --without-icu --with-openssl

Ah. Further digging shows that:

* On Linux, macOS, and NetBSD (probably all *BSD), <limits.h> is
included by <sys/param.h>, which fe-auth.c includes. So that explains
why we didn't see a problem most places, regardless of compile options.
AFAICT <sys/param.h> is not specified by POSIX, so it's unsurprising
if Solaris has a different idea of what it should expose.

* The openssl headers #include <limits.h> from ossl_typ.h, which is
pulled in indirectly from most other openssl headers. So that's why
margay didn't complain.

So I'm now satisfied that the problem is explained, and I'll go
put in the needful #include. Thanks for the report!

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Walker Philips 2023-07-17 21:41:09 Bug with aggregate Window Functions when using Order By. Elements dropped if order by provided
Previous Message Tom Lane 2023-07-17 18:55:50 Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)