pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marcel Hofstetter <hofstetter@jomasoft.ch>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)
Date: Mon, 17 Jul 2023 16:42:47 -0400
Message-ID: <4073250.1689626567@sss.pgh.pa.us> (raw)
In-Reply-To: <3bd7eb9f-15f6-e4d6-290b-cea9b890c826@jomasoft.ch>
References: <18026-d5bb69f79cd16203@postgresql.org>
	<4037095.1689610559@sss.pgh.pa.us>
	<b0f6ac2b-7e44-5e46-03b5-10713e9f9409@jomasoft.ch>
	<3bd7eb9f-15f6-e4d6-290b-cea9b890c826@jomasoft.ch>

Marcel Hofstetter <hofstetter@jomasoft.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





view thread (7+ messages)  latest in thread

Message-ID: <4073250.1689626567@sss.pgh.pa.us>
Permalink:  ../4073250.1689626567@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4073250.1689626567@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hofstetter@jomasoft.ch, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)
  In-Reply-To: <4073250.1689626567@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox