In metaconfig.git, the branch master has been updated <http://perl5.git.perl.org/metaconfig.git/commitdiff/31e612465cf12d1ed2229eb99f900a8c282f4910?hp=0b7e7a7b778dc7d1d4b04d8743903e8bb138dd05>
- Log ----------------------------------------------------------------- commit 31e612465cf12d1ed2229eb99f900a8c282f4910 Author: H.Merijn Brand - Tux <[email protected]> Date: Thu Aug 11 18:26:42 2016 +0200 Add probe for gai_strerror ----------------------------------------------------------------------- Summary of changes: U/perl/d_gai_strerror.U | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 U/perl/d_gai_strerror.U diff --git a/U/perl/d_gai_strerror.U b/U/perl/d_gai_strerror.U new file mode 100644 index 0000000..70bcf4e --- /dev/null +++ b/U/perl/d_gai_strerror.U @@ -0,0 +1,54 @@ +?RCS: Copyright (c) 2016-2016, H.Merijn Brand +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 3.0. +?RCS: +?MAKE:d_gai_strerror: Compile cat rm_try run Oldconfig Setvar +?MAKE: -pick add $@ %< +?S:d_gai_strerror: +?S: This variable conditionally defines the HAS_GAI_STRERROR symbol +?S: if the gai_strerror() routine is available and can be used to +?S: translate error codes returned by getaddrinfo() into human +?S: readable strings. +?S:. +?C:HAS_GAI_STRERROR: +?C: This symbol, if defined, indicates that the gai_strerror routine +?C: is available to translate error codes returned by getaddrinfo() +?C: into human readable strings. +?C:. +?H:#$d_gai_strerror HAS_GAI_STRERROR /**/ +?H:. +?F:!try +?LINT: set d_gai_strerror +: look for gai_strerror +echo " " +$cat >try.c <<'EOCP' +#include <sys/types.h> +#include <sys/socket.h> +#include <netdb.h> +int main () +{ + return (gai_strerror (0) ? 0 : 1); + } +EOCP +set try +?X: if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1 ; then +val="$undef" +if eval $compile; then + `$run ./try` + case "$?" in + 0) echo "A working gai_strerror() found." >&4 + val="$define" ;; + *) echo "gai_strerror() found, but it doesn't work" >&4 + ;; + esac +else + echo "gai_strerror() NOT found." >&4 + fi +set d_gai_strerror +eval $setvar +$rm_try + -- perl5 metaconfig repository
