From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Compilation issue on Solaris. |
Date: | 2022-07-09 05:27:31 |
Message-ID: | CA+hUKG+2P5BO9nTvdq55WrnBGHKk1R7crkCumXgTxOaz8chGcg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Jul 9, 2022 at 2:02 PM Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> wrote:
> Thanks for looking at that, yes you are right, the attached patch do that now
>
> if test "$PORTNAME" = "solaris"; then
>
> CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
>
> + CPPFLAGS="$CPPFLAGS -D__STDC_WANT_LIB_EXT1__"
>
> fi
Hmm. K.3.3.1 of [1] says you can show or hide all that _s stuff by
defining that macro to 0 or 1 before you include <string.h>, but it's
implementation-defined whether they are exposed by default, and the
template file is one way to deal with that
implementation-definedness... it's not quite in the autoconf spirit
though, it's kinda manual. Another approach would be to define it
unconditionally at the top of explicit_bzero.c before including "c.h",
on all platforms. The man page on my system tells me I should do that
anyway, even though you don't need to on my system.
Why is your Solaris system trying to compile that file in the first
place? A quick check of the Solaris and Illumos build farm animals
and some online man pages tells me they have explicit_bzero().
Ahhh... looks like it came a few years ago in some Solaris 11.4
update[2], and Illumos (which forked around 10) probably added it
independently (why do Solaris man pages not have a history section to
tell us these things?!). I guess you must be running an old version.
OK then.
[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf
[2] https://blogs.oracle.com/solaris/post/expanding-the-library
From | Date | Subject | |
---|---|---|---|
Next Message | Anton A. Melnikov | 2022-07-09 09:32:27 | Re: Possible fails in pg_stat_statements test |
Previous Message | Bruce Momjian | 2022-07-09 03:18:43 | Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT |