summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorDominic Dunlop <domo@computer.org>2000-11-20 19:55:29 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-21 18:54:41 +0000
commit2cc61e15d3dcd28f355bee01f2fb06b42ba7309f (patch)
tree4d0343022362710db62a1bb35c8b420cb55fc3ad /Configure
parentf2b2c1a7ed42395a69ab0bb3b739cdbd8d214137 (diff)
downloadperl-2cc61e15d3dcd28f355bee01f2fb06b42ba7309f.tar.gz
Re: Not OK: perl5.7.0 +DEVEL7706 +Duseperlio on AIX4.[23]
Message-Id: <p04320403b63b2c750dce@[192.168.1.4]> va_copy() and the need of it. See <http://wwwold.dkuug.dk/JTC1/SC22/WG14/www/docs/n907.ps>. p4raw-id: //depot/perl@7793
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure257
1 files changed, 158 insertions, 99 deletions
diff --git a/Configure b/Configure
index 5ea281a108..f4709a2026 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Thu Nov 16 16:33:41 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Tue Nov 21 20:33:35 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >/tmp/c1$$ <<EOF
@@ -780,6 +780,7 @@ d_eofnblk=''
eagain=''
o_nonblock=''
rd_nodata=''
+need_va_copy=''
netdb_hlen_type=''
netdb_host_type=''
netdb_name_type=''
@@ -13461,6 +13462,161 @@ rp="What is the type used for file modes for system calls (e.g. fchmod())?"
set mode_t modetype int stdio.h sys/types.h
eval $typedef_ask
+: see if stdarg is available
+echo " "
+if $test `./findhdr stdarg.h`; then
+ echo "<stdarg.h> found." >&4
+ valstd="$define"
+else
+ echo "<stdarg.h> NOT found." >&4
+ valstd="$undef"
+fi
+
+: see if varags is available
+echo " "
+if $test `./findhdr varargs.h`; then
+ echo "<varargs.h> found." >&4
+else
+ echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
+fi
+
+: set up the varargs testing programs
+$cat > varargs.c <<EOP
+#ifdef I_STDARG
+#include <stdarg.h>
+#endif
+#ifdef I_VARARGS
+#include <varargs.h>
+#endif
+
+#ifdef I_STDARG
+int f(char *p, ...)
+#else
+int f(va_alist)
+va_dcl
+#endif
+{
+ va_list ap;
+#ifndef I_STDARG
+ char *p;
+#endif
+#ifdef I_STDARG
+ va_start(ap,p);
+#else
+ va_start(ap);
+ p = va_arg(ap, char *);
+#endif
+ va_end(ap);
+}
+EOP
+$cat > varargs <<EOP
+$startsh
+if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
+ echo "true"
+else
+ echo "false"
+fi
+$rm -f varargs$_o
+EOP
+chmod +x varargs
+
+: now check which varargs header should be included
+echo " "
+i_varhdr=''
+case "$valstd" in
+"$define")
+ if `./varargs I_STDARG`; then
+ val='stdarg.h'
+ elif `./varargs I_VARARGS`; then
+ val='varargs.h'
+ fi
+ ;;
+*)
+ if `./varargs I_VARARGS`; then
+ val='varargs.h'
+ fi
+ ;;
+esac
+case "$val" in
+'')
+echo "I could not find the definition for va_dcl... You have problems..." >&4
+ val="$undef"; set i_stdarg; eval $setvar
+ val="$undef"; set i_varargs; eval $setvar
+ ;;
+*)
+ set i_varhdr
+ eval $setvar
+ case "$i_varhdr" in
+ stdarg.h)
+ val="$define"; set i_stdarg; eval $setvar
+ val="$undef"; set i_varargs; eval $setvar
+ ;;
+ varargs.h)
+ val="$undef"; set i_stdarg; eval $setvar
+ val="$define"; set i_varargs; eval $setvar
+ ;;
+ esac
+ echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
+esac
+$rm -f varargs*
+
+: see if we need va_copy
+echo " "
+case "$i_stdarg" in
+"$define")
+ $cat >try.c <<EOCP
+#include <stdarg.h>
+#include <stdio.h>
+
+int
+ivfprintf(FILE *f, const char *fmt, va_list *valp)
+{
+ return vfprintf(f, fmt, *valp);
+}
+
+int
+myvfprintf(FILE *f, const char *fmt, va_list val)
+{
+ return ivfprintf(f, fmt, &val);
+}
+
+int
+myprintf(char *fmt, ...)
+{
+ va_list val;
+ va_start(val, fmt);
+ return myvfprintf(stdout, fmt, val);
+}
+
+int
+main(int ac, char **av)
+{
+ myprintf("%s%cs all right, then\n", "that", '\'');
+ exit(0);
+}
+EOCP
+ set try
+ if eval $compile_ok && ./try >/dev/null; then
+ case "`./try`" in
+ "that's all right, then")
+ okay=yes
+ ;;
+ esac
+ fi
+ case "$okay" in
+ yes) echo "It seems that you don't need va_copy()." >&4
+ need_va_copy="$undef"
+ ;;
+ *) echo "It seems that va_copy() or similar will be needed." >&4
+ need_va_copy="$define"
+ ;;
+ esac
+ $rm -f try.* core core.* *.core *.core.*
+ ;;
+*) echo "You don't have <stdarg.h>, not checking for va_copy()." >&4
+ ;;
+esac
+
: define a fucntion to check prototypes
$cat > protochk <<EOSH
$startsh
@@ -14896,104 +15052,6 @@ val=$val3; set i_termios; eval $setvar
set shadow.h i_shadow
eval $inhdr
-: see if stdarg is available
-echo " "
-if $test `./findhdr stdarg.h`; then
- echo "<stdarg.h> found." >&4
- valstd="$define"
-else
- echo "<stdarg.h> NOT found." >&4
- valstd="$undef"
-fi
-
-: see if varags is available
-echo " "
-if $test `./findhdr varargs.h`; then
- echo "<varargs.h> found." >&4
-else
- echo "<varargs.h> NOT found, but that's ok (I hope)." >&4
-fi
-
-: set up the varargs testing programs
-$cat > varargs.c <<EOP
-#ifdef I_STDARG
-#include <stdarg.h>
-#endif
-#ifdef I_VARARGS
-#include <varargs.h>
-#endif
-
-#ifdef I_STDARG
-int f(char *p, ...)
-#else
-int f(va_alist)
-va_dcl
-#endif
-{
- va_list ap;
-#ifndef I_STDARG
- char *p;
-#endif
-#ifdef I_STDARG
- va_start(ap,p);
-#else
- va_start(ap);
- p = va_arg(ap, char *);
-#endif
- va_end(ap);
-}
-EOP
-$cat > varargs <<EOP
-$startsh
-if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
- echo "true"
-else
- echo "false"
-fi
-$rm -f varargs$_o
-EOP
-chmod +x varargs
-
-: now check which varargs header should be included
-echo " "
-i_varhdr=''
-case "$valstd" in
-"$define")
- if `./varargs I_STDARG`; then
- val='stdarg.h'
- elif `./varargs I_VARARGS`; then
- val='varargs.h'
- fi
- ;;
-*)
- if `./varargs I_VARARGS`; then
- val='varargs.h'
- fi
- ;;
-esac
-case "$val" in
-'')
-echo "I could not find the definition for va_dcl... You have problems..." >&4
- val="$undef"; set i_stdarg; eval $setvar
- val="$undef"; set i_varargs; eval $setvar
- ;;
-*)
- set i_varhdr
- eval $setvar
- case "$i_varhdr" in
- stdarg.h)
- val="$define"; set i_stdarg; eval $setvar
- val="$undef"; set i_varargs; eval $setvar
- ;;
- varargs.h)
- val="$undef"; set i_stdarg; eval $setvar
- val="$define"; set i_varargs; eval $setvar
- ;;
- esac
- echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;;
-esac
-$rm -f varargs*
-
: see if stddef is available
set stddef.h i_stddef
eval $inhdr
@@ -16047,6 +16105,7 @@ mydomain='$mydomain'
myhostname='$myhostname'
myuname='$myuname'
n='$n'
+need_va_copy='$need_va_copy'
netdb_hlen_type='$netdb_hlen_type'
netdb_host_type='$netdb_host_type'
netdb_name_type='$netdb_name_type'