Some things didn't work right on System V and Pyramids.
# and edit it to reflect your system. Some packages may include samples
# of config.h for certain machines, so you might look for one of those.)
#
-# $Header: Configure,v 1.0.1.1 88/01/21 21:21:47 root Exp $
+# $Header: Configure,v 1.0.1.2 88/01/24 03:51:55 root Exp $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
contains=''
cpp=''
cppminus=''
+d_bcopy=''
d_charsprf=''
d_index=''
+d_statblks=''
d_stdstdio=''
d_strctcpy=''
+d_tminsys=''
d_vfork=''
d_voidsig=''
libc=''
fi
rm -f testcpp.c testcpp.out
+: see if bcopy exists
+echo " "
+if $contains bcopy libc.list >/dev/null 2>&1; then
+ echo 'bcopy() found.'
+ d_bcopy="$define"
+else
+ echo 'bcopy() not found.'
+ d_bcopy="$undef"
+fi
+
: see if sprintf is declared as int or pointer to char
echo " "
if $contains 'char.*sprintf' /usr/include/stdio.h >/dev/null 2>&1 ; then
esac
fi
+: see if stat knows about block sizes
+echo " "
+if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
+ if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
+ echo "Your stat knows about block sizes."
+ d_statblks="$define"
+ else
+ echo "Your stat doesn't know about block sizes."
+ d_statblks="$undef"
+ fi
+else
+ echo "Your stat doesn't know about block sizes."
+ d_statblks="$undef"
+fi
+
: see if stdio is really std
echo " "
if $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
fi
$rm -f try.*
+: see if struct tm is defined in sys/time.h
+echo " "
+if $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then
+ echo "You have struct tm defined in <time.h> rather than <sys/time.h>."
+ d_tminsys="$undef"
+else
+ echo "You have struct tm defined in <sys/time.h> rather than <time.h>."
+ d_tminsys="$define"
+fi
+
: see if there is a vfork
echo " "
if $contains vfork libc.list >/dev/null 2>&1 ; then
contains='$contains'
cpp='$cpp'
cppminus='$cppminus'
+d_bcopy='$d_bcopy'
d_charsprf='$d_charsprf'
d_index='$d_index'
+d_statblks='$d_statblks'
d_stdstdio='$d_stdstdio'
d_strctcpy='$d_strctcpy'
+d_tminsys='$d_tminsys'
d_vfork='$d_vfork'
d_voidsig='$d_voidsig'
libc='$libc'
esac
echo "Extracting Makefile (with variable substitutions)"
cat >Makefile <<!GROK!THIS!
-# $Header: Makefile.SH,v 1.0 87/12/18 16:11:50 root Exp $
+# $Header: Makefile.SH,v 1.0.1.1 88/01/24 03:55:18 root Exp $
#
# $Log: Makefile.SH,v $
-# Revision 1.0 87/12/18 16:11:50 root
-# Initial revision
+# Revision 1.0.1.1 88/01/24 03:55:18 root
+# patch 2: remove extra Log lines.
#
-# Revision 1.0 87/12/18 16:01:07 root
+# Revision 1.0 87/12/18 16:11:50 root
# Initial revision
#
-#
CC = $cc
bin = $bin
-/* $Header: arg.c,v 1.0.1.1 88/01/21 21:27:10 root Exp $
+/* $Header: arg.c,v 1.0.1.2 88/01/24 03:52:34 root Exp $
*
* $Log: arg.c,v $
+ * Revision 1.0.1.2 88/01/24 03:52:34 root
+ * patch 2: added STATBLKS dependencies.
+ *
* Revision 1.0.1.1 88/01/21 21:27:10 root
* Now defines signal return values correctly using VOIDSIG.
*
apush(ary,str_nmake((double)statbuf.st_atime));
apush(ary,str_nmake((double)statbuf.st_mtime));
apush(ary,str_nmake((double)statbuf.st_ctime));
+#ifdef STATBLOCKS
apush(ary,str_nmake((double)statbuf.st_blksize));
apush(ary,str_nmake((double)statbuf.st_blocks));
+#else
+ apush(ary,str_make("");
+ apush(ary,str_make("");
+#endif
}
sarg = (STR**)safemalloc((max+2)*sizeof(STR*));
sarg[0] = Nullstr;
-/* $Header: malloc.c,v 1.0 87/12/18 13:05:35 root Exp $
+/* $Header: malloc.c,v 1.0.1.1 88/01/24 03:53:23 root Exp $
*
* $Log: malloc.c,v $
+ * Revision 1.0.1.1 88/01/24 03:53:23 root
+ * patch 2: made depend on perl.h.
+ *
* Revision 1.0 87/12/18 13:05:35 root
* Initial revision
*
* but bombs when it runs out.
*/
-#include <sys/types.h>
+#include "EXTERN.h"
+#include "handy.h"
+#include "search.h"
+#include "perl.h"
+
+/* I don't much care whether these are defined in sys/types.h--LAW */
+
+#define u_char unsigned char
+#define u_int unsigned int
+#define u_short unsigned short
#define NULL 0
-#define PATCHLEVEL 1
+#define PATCHLEVEL 2
-/* $Header: perl.h,v 1.0.1.1 88/01/21 21:29:23 root Exp $
+/* $Header: perl.h,v 1.0.1.2 88/01/24 03:53:47 root Exp $
*
* $Log: perl.h,v $
+ * Revision 1.0.1.2 88/01/24 03:53:47 root
+ * patch 2: hid str_peek() in #ifdef DEBUGGING.
+ *
* Revision 1.0.1.1 88/01/21 21:29:23 root
* No longer defines STDSTDIO--gets it from config.h now.
*
#include <setjmp.h>
#include <sys/types.h>
#include <sys/stat.h>
+
+#ifdef TMINSYS
+#include <sys/time.h>
+#else
#include <time.h>
+#endif
+
#include <sys/times.h>
typedef struct arg ARG;
#include "array.h"
#include "hash.h"
+#ifdef CHARSPRINTF
+ char *sprintf();
+#else
+ int sprintf();
+#endif
+
/* A string is TRUE if not "" or "0". */
#define True(val) (tmps = (val), (*tmps && !(*tmps == '0' && !tmps[1])))
EXT char *Yes INIT("1");
#define str_true(str) (Str = (str), (Str->str_pok ? True(Str->str_ptr) : (Str->str_nok ? (Str->str_nval != 0.0) : 0 )))
+#ifdef DEBUGGING
#define str_peek(str) (Str = (str), (Str->str_pok ? Str->str_ptr : (Str->str_nok ? (sprintf(buf,"num(%g)",Str->str_nval),buf) : "" )))
+#endif
+
#define str_get(str) (Str = (str), (Str->str_pok ? Str->str_ptr : str_2ptr(Str)))
#define str_gnum(str) (Str = (str), (Str->str_nok ? Str->str_nval : str_2num(Str)))
EXT STR *Str;
long time();
struct tm *gmtime(), *localtime();
-#ifdef CHARSPRINTF
- char *sprintf();
-#else
- int sprintf();
-#endif
-
#ifdef EUNICE
#define UNLINK(f) while (unlink(f) >= 0)
#else
-char rcsid[] = "$Header: perly.c,v 1.0.1.1 88/01/21 21:25:57 root Exp $";
+char rcsid[] = "$Header: perly.c,v 1.0.1.2 88/01/24 00:06:03 root Exp $";
/*
* $Log: perly.c,v $
+ * Revision 1.0.1.2 88/01/24 00:06:03 root
+ * patch 2: s/(abc)/\1/ grandfathering didn't work right.
+ *
* Revision 1.0.1.1 88/01/21 21:25:57 root
* Now uses CPP and CPPMINUS symbols from config.h.
*
*d <<= 3;
*d += *s++ - '0';
}
- else if (!index('`"',term)) { /* oops, a subpattern */
+ else if (!index("`\"",term)) { /* oops, a subpattern */
s--;
goto defchar;
}
-/* $Header: search.c,v 1.0 87/12/18 13:05:59 root Exp $
+/* $Header: search.c,v 1.0.1.1 88/01/24 03:55:05 root Exp $
*
* $Log: search.c,v $
+ * Revision 1.0.1.1 88/01/24 03:55:05 root
+ * patch 2: made depend on perl.h.
+ *
* Revision 1.0 87/12/18 13:05:59 root
* Initial revision
*
/* string search routines */
-#include <stdio.h>
-#include <ctype.h>
-
#include "EXTERN.h"
#include "handy.h"
#include "util.h"
#include "INTERN.h"
#include "search.h"
+#include "EXTERN.h"
+#include "perl.h"
#define VERBOSE
#define FLUSH
#!./perl
-# $Header: TEST,v 1.0 87/12/18 13:11:34 root Exp $
+# $Header: TEST,v 1.0.1.1 88/01/24 03:55:39 root Exp $
# This is written in a peculiar style, since we're trying to avoid
# most of the constructs we'll be testing for.
@ARGV = split(/[ \n]/,`echo base.* comp.* cmd.* io.* op.*`);
}
+open(config,"../config.sh");
+while (<config>) {
+ if (/sharpbang='(.*)'/) {
+ $sharpbang = ($1 eq '#!');
+ last;
+ }
+}
$bad = 0;
while ($test = shift) {
print "$test...";
- open(results,"$test|") || (print "can't run.\n");
+ if ($sharpbang) {
+ open(results,"$test|") || (print "can't run.\n");
+ } else {
+ open(script,"$test") || die "Can't run $test";
+ $_ = <script>;
+ close(script);
+ if (/#!..perl(.*)/) {
+ $switch = $1;
+ } else {
+ $switch = '';
+ }
+ open(results,"./perl$switch $test|") || (print "can't run.\n");
+ }
$ok = 0;
while (<results>) {
if ($verbose) {
#!./perl
-# $Header: op.time,v 1.0 87/12/18 13:14:33 root Exp $
+# $Header: op.time,v 1.0.1.1 88/01/24 03:56:09 root Exp $
print "1..5\n";
($xsec,$foo) = localtime($now);
$localyday = $yday;
-if ($sec != $xsec && $yday && $wday && $year)
+if ($sec != $xsec && $mday && $year)
{print "ok 3\n";}
else
{print "not ok 3\n";}
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($beg);
($xsec,$foo) = localtime($now);
-if ($sec != $xsec && $yday && $wday && $year)
+if ($sec != $xsec && $mday && $year)
{print "ok 4\n";}
else
{print "not ok 4\n";}