On Sat, Jul 9, 2022 at 2:02 PM Ibrar Ahmed <ibrar.ahmad@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