summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-12 17:35:52 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:51:58 +0100
commite791399041815a1a45cea3c7f277c7045b96e51b (patch)
tree93b3b45e57f4dbdc158ba2dc2eda26f24d4a2478 /Configure
parent13d66b05c6163c3514774d3d11da5f3950e97e98 (diff)
downloadperl-e791399041815a1a45cea3c7f277c7045b96e51b.tar.gz
Rely on C89 snprintf()
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure69
1 files changed, 0 insertions, 69 deletions
diff --git a/Configure b/Configure
index 7dba1da880..81b72a92c4 100755
--- a/Configure
+++ b/Configure
@@ -809,8 +809,6 @@ d_signbit=''
d_sigprocmask=''
d_sigsetjmp=''
usesitecustomize=''
-d_snprintf=''
-d_vsnprintf=''
d_sockatmark=''
d_sockatmarkproto=''
d_ip_mreq=''
@@ -18786,71 +18784,6 @@ set d_sigsetjmp
eval $setvar
$rm_try
-: see if snprintf exists
-set snprintf d_snprintf
-eval $inlibc
-
-: see if vsnprintf exists
-set vsnprintf d_vsnprintf
-eval $inlibc
-
-case "$d_snprintf-$d_vsnprintf" in
-"$define-$define")
- $cat <<EOM
-Checking whether your snprintf() and vsnprintf() work okay...
-EOM
- $cat >try.c <<'EOCP'
-/* v?snprintf testing logic courtesy of Russ Allbery.
- * According to C99:
- * - if the buffer is too short it still must be \0-terminated
- * - if the buffer is too short the potentially required length
- * must be returned and not -1
- * - if the buffer is NULL the potentially required length
- * must be returned and not -1 or core dump
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-char buf[2];
-
-int test (char *format, ...)
-{
- va_list args;
- int count;
-
- va_start (args, format);
- count = vsnprintf (buf, sizeof buf, format, args);
- va_end (args);
- return count;
-}
-
-int main ()
-{
- return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
- && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
-}
-EOCP
- set try
- if eval $compile; then
- `$run ./try`
- case "$?" in
- 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;;
- *) cat <<EOM >&4
-Your snprintf() and snprintf() don't seem to be working okay.
-EOM
- d_snprintf="$undef"
- d_vsnprintf="$undef"
- ;;
- esac
- else
- echo "(I can't seem to compile the test program--assuming they don't)"
- d_snprintf="$undef"
- d_vsnprintf="$undef"
- fi
- $rm_try
- ;;
-esac
-
: see if sockatmark exists
set sockatmark d_sockatmark
eval $inlibc
@@ -24812,7 +24745,6 @@ d_sigprocmask='$d_sigprocmask'
d_sigsetjmp='$d_sigsetjmp'
d_sin6_scope_id='$d_sin6_scope_id'
d_sitearch='$d_sitearch'
-d_snprintf='$d_snprintf'
d_sockaddr_in6='$d_sockaddr_in6'
d_sockaddr_sa_len='$d_sockaddr_sa_len'
d_sockatmark='$d_sockatmark'
@@ -24906,7 +24838,6 @@ d_void_closedir='$d_void_closedir'
d_voidsig='$d_voidsig'
d_voidtty='$d_voidtty'
d_vprintf='$d_vprintf'
-d_vsnprintf='$d_vsnprintf'
d_wait4='$d_wait4'
d_waitpid='$d_waitpid'
d_wcscmp='$d_wcscmp'