Re: Compilation issue on Solaris.

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(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 17:47:15
Message-ID: CALtqXTeXZezyEJa163jGcTE1vkNFyexpytTHy+wmv0tmZBtLsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 9, 2022 at 10:28 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:

> 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
>
I am using "SunOS solaris-vagrant 5.11 11.4.0.15.0 i86pc i386 i86pc", I gave
another thought and Tom is right src/template/solaris is a better place to
add that.

--
Ibrar Ahmed

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2022-07-09 18:57:00 Re: Schema variables - new implementation for Postgres 15
Previous Message Bruce Momjian 2022-07-09 16:59:23 Re: doc: Clarify Savepoint Behavior