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

Marcel Hofstetter <hofstetter@jomasoft.ch>

From: Marcel Hofstetter <hofstetter@jomasoft.ch>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2023-07-17T18:46:50Z
Lists: pgsql-bugs
Am 17.07.2023 um 18:21 schrieb Marcel Hofstetter:
> Am 17.07.2023 um 18:15 schrieb Tom Lane:
>> PG Bug reporting form <noreply@postgresql.org> writes:
>>> fe-auth.c: In function 'check_expected_areq':
>>> fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this
>>> function)
>>
>> Hmm.  This problem seems straightforward enough to fix, but what I
>> don't understand is why we've not seen it already.  We do have a
>> buildfarm animal running on Solaris 11.4 [1], and it's not unhappy.
>> Are you using any unusual build options or toolchain?
>>
>>             regards, tom lane
>>
>> [1] 
>> https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=margay&br=HEAD
> 
> I'm the owner of margay. No idea why it works there.
> buildfarm tests and building this beta2 is on the same system.
> 
> Using just defaults and --without-icu on buildfarm and beta2 compile.

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

Best regards,
Marcel





Commits

  1. Include <limits.h> in fe-auth.c, to get CHAR_BIT reliably.