On Sat, Jul 9, 2022 at 10:28 AM Thomas Munro <thomas.mu...@gmail.com> wrote:
> On Sat, Jul 9, 2022 at 2:02 PM Ibrar Ahmed <ibrar.ah...@gmail.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