From: Steve Peters <steve@fisharerojo.org> Date: Mon, 2 Jan 2006 09:37:27 +0000 (-0600) Subject: Add probe for snprintf () and vsnprintf () X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f5da3e92a0c530bfe4334764eb75169e997c27f;p=p5sagit%2Fp5-mst-13.2.git Add probe for snprintf () and vsnprintf () Subject: [PATCH] snprintf() and vsnprintf() (was Re: [PATCH] Configure: stdio char (un)signedness) Message-ID: <20060102153727.GA14247@mccoy.peters.homeunix.org> p4raw-id: //depot/perl@26606 --- diff --git a/Configure b/Configure index a299404..ccb7aae 100755 --- a/Configure +++ b/Configure @@ -26,7 +26,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sun Jan 1 11:31:40 CET 2006 [metaconfig 3.0 PL70] +# Generated on Tue Jan 3 16:44:36 CET 2006 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <<EOF @@ -681,6 +681,8 @@ d_sigaction='' d_sigprocmask='' d_sigsetjmp='' usesitecustomize='' +d_snprintf='' +d_vsnprintf='' d_sockatmark='' d_sockatmarkproto='' d_msg_ctrunc='' @@ -16536,6 +16538,14 @@ set d_sigsetjmp eval $setvar $rm -f try.c try +: see if snprintf exists +set snprintf d_snprintf +eval $inlibc + +: see if vsnprintf exists +set vsnprintf d_vsnprintf +eval $inlibc + : see if sockatmark exists set sockatmark d_sockatmark eval $inlibc @@ -21375,6 +21385,7 @@ d_shmget='$d_shmget' d_sigaction='$d_sigaction' d_sigprocmask='$d_sigprocmask' d_sigsetjmp='$d_sigsetjmp' +d_snprintf='$d_snprintf' d_sockatmark='$d_sockatmark' d_sockatmarkproto='$d_sockatmarkproto' d_socket='$d_socket' @@ -21456,6 +21467,7 @@ d_voidsig='$d_voidsig' d_voidtty='$d_voidtty' d_volatile='$d_volatile' d_vprintf='$d_vprintf' +d_vsnprintf='$d_vsnprintf' d_wait4='$d_wait4' d_waitpid='$d_waitpid' d_wcstombs='$d_wcstombs' diff --git a/config_h.SH b/config_h.SH index 2588ec9..232152e 100644 --- a/config_h.SH +++ b/config_h.SH @@ -2321,6 +2321,17 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$usesitecustomize USE_SITECUSTOMIZE /**/ +/* HAS_SNPRINTF: + * This symbol, if defined, indicates that the snprintf () library + * function is available for use. + */ +/* HAS_VSNPRINTF: + * This symbol, if defined, indicates that the vsnprintf () library + * function is available for use. + */ +#$d_snprintf HAS_SNPRINTF /**/ +#$d_vsnprintf HAS_VSNPRINTF /**/ + /* HAS_SOCKET: * This symbol, if defined, indicates that the BSD socket interface is * supported. diff --git a/handy.h b/handy.h index fb11132..6c87f91 100644 --- a/handy.h +++ b/handy.h @@ -175,7 +175,7 @@ typedef U64TYPE U64; #endif /* HMB H.Merijn Brand - a placeholder for preparing Configure patches */ -#if defined(HAS_MALLOC_SIZE) && defined(HAS_MALLOC_GOOD_SIZE) && defined(HAS_CLEARENV) +#if defined(HAS_MALLOC_SIZE) && defined(HAS_SNPRINTF) && defined(HAS_VSNPRINTF) /* Not (yet) used at top level, but mention them for metaconfig */ #endif