summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2007-06-13 10:41:44 -0400
committerH.Merijn Brand <h.m.brand@xs4all.nl>2007-06-13 20:15:28 +0000
commitd0bc9cc8514a55284231a7487bc6aa00d14c5531 (patch)
tree378faebd2feab23bf9980adfcf4661454b629189 /Configure
parent20e87299883f4e62b61326c7478ab6a085f6088f (diff)
downloadperl-d0bc9cc8514a55284231a7487bc6aa00d14c5531.tar.gz
Re: vsprintf
Message-ID: <Pine.LNX.4.64.0706131434120.18715@fractal.phys.lafayette.edu> p4raw-id: //depot/perl@31375
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure69
1 files changed, 53 insertions, 16 deletions
diff --git a/Configure b/Configure
index e87eddb763..9a3e436d8e 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 Wed Jun 13 22:10:15 CEST 2007 [metaconfig 3.0 PL70]
+# Generated on Wed Jun 13 22:14:49 CEST 2007 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
@@ -10804,36 +10804,73 @@ if set vprintf val -f d_vprintf; eval $csym; $val; then
echo 'vprintf() found.' >&4
val="$define"
$cat >try.c <<EOF
-#include <varargs.h>
+#$i_stdarg I_STDARG /* Only one of these can be defined by i_varhrd */
+#$i_varargs I_VARARGS
+
#$i_stdlib I_STDLIB
+#$i_unistd I_UNISTD
+
+#ifdef I_STDARG
+# include <stdarg.h>
+#else /* I_VARARGS */
+# include <varargs.h>
+#endif
+
+#ifdef I_UNISTD
+# include <unistd.h>
+#endif
+
#ifdef I_STDLIB
-#include <stdlib.h>
+# include <stdlib.h>
#endif
-int main() { xxx("foo"); }
+#include <stdio.h> /* vsprintf prototype */
+
+#ifdef I_STDARG
+void xxx(int n, ...)
+{
+ va_list args;
+ char buf[10];
+ va_start(args, n);
+ exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
+}
+int main() { xxx(1, "foo"); }
+
+#else /* I_VARARGS */
xxx(va_alist)
va_dcl
{
- va_list args;
- char buf[10];
-
- va_start(args);
- exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
+ va_list args;
+ char buf[10];
+ va_start(args);
+ exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
}
+int main() { xxx("foo"); }
+
+#endif
+
EOF
set try
- if eval $compile && $run ./try; then
- echo "Your vsprintf() returns (int)." >&4
- val2="$undef"
+ if eval $compile_ok; then
+ if $run ./try; then
+ echo "Your vsprintf() returns (int)." >&4
+ val2="$undef"
+ else
+ echo "Your vsprintf() returns (char*)." >&4
+ val2="$define"
+ fi
else
- echo "Your vsprintf() returns (char*)." >&4
- val2="$define"
+ echo 'I am unable to compile the vsprintf() test program.' >&4
+ # We shouldn't get here. If we do, assume the standard signature,
+ # not the old BSD one.
+ echo 'Guessing that vsprintf() returns (int).' >&4
+ val2="$undef"
fi
else
echo 'vprintf() NOT found.' >&4
- val="$undef"
- val2="$undef"
+ val="$undef"
+ val2="$undef"
fi
$rm_try
set d_vprintf