summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1991-11-05 06:28:23 +0000
committerLarry Wall <lwall@netlabs.com>1991-11-05 06:28:23 +0000
commit45d8adaa83210dbf286f70ae01d99f534e6c8052 (patch)
treefe8eafd2432c8a10e92f9f6e093936c682c83b63 /perl.h
parent99b89507a1fb507cf2635775ed834be00409c207 (diff)
downloadperl-45d8adaa83210dbf286f70ae01d99f534e6c8052.tar.gz
perl 4.0 patch 15: patch #11, continued
See patch #11.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h72
1 files changed, 69 insertions, 3 deletions
diff --git a/perl.h b/perl.h
index 4ab86d9e8d..09edd0727c 100644
--- a/perl.h
+++ b/perl.h
@@ -1,4 +1,4 @@
-/* $RCSfile: perl.h,v $$Revision: 4.0.1.3 $$Date: 91/06/10 01:25:10 $
+/* $RCSfile: perl.h,v $$Revision: 4.0.1.4 $$Date: 91/11/05 18:06:10 $
*
* Copyright (c) 1991, Larry Wall
*
@@ -6,6 +6,12 @@
* License or the Artistic License, as specified in the README file.
*
* $Log: perl.h,v $
+ * Revision 4.0.1.4 91/11/05 18:06:10 lwall
+ * patch11: various portability fixes
+ * patch11: added support for dbz
+ * patch11: added some support for 64-bit integers
+ * patch11: hex() didn't understand leading 0x
+ *
* Revision 4.0.1.3 91/06/10 01:25:10 lwall
* patch10: certain pattern optimizations were botched
*
@@ -25,6 +31,23 @@
#define VOIDWANT 1
#include "config.h"
+#ifdef MYMALLOC
+# ifdef HIDEMYMALLOC
+# define malloc Mymalloc
+# define realloc Myremalloc
+# define free Myfree
+# endif
+# define safemalloc malloc
+# define saferealloc realloc
+# define safefree free
+#endif
+
+/* work around some libPW problems */
+#define fatal Myfatal
+#ifdef DOINIT
+char Error[1];
+#endif
+
#ifdef MSDOS
/* This stuff now in the MS-DOS config.h file. */
#else /* !MSDOS */
@@ -197,6 +220,23 @@ extern char *sys_errlist[];
#endif
#endif
+#ifdef WANT_DBZ
+#include <dbz.h>
+#define SOME_DBM
+#define dbm_fetch(db,dkey) fetch(dkey)
+#define dbm_delete(db,dkey) fatal("dbz doesn't implement delete")
+#define dbm_store(db,dkey,dcontent,flags) store(dkey,dcontent)
+#define dbm_close(db) dbmclose()
+#define dbm_firstkey(db) (fatal("dbz doesn't implement traversal"),fetch())
+#define nextkey() (fatal("dbz doesn't implement traversal"),fetch())
+#define dbm_nextkey(db) (fatal("dbz doesn't implement traversal"),fetch())
+#ifdef HAS_NDBM
+#undef HAS_NDBM
+#endif
+#ifndef HAS_ODBM
+#define HAS_ODBM
+#endif
+#else
#ifdef HAS_GDBM
#ifdef I_GDBM
#include <gdbm.h>
@@ -234,6 +274,7 @@ extern char *sys_errlist[];
#endif /* HAS_ODBM */
#endif /* HAS_NDBM */
#endif /* HAS_GDBM */
+#endif /* WANT_DBZ */
#ifdef SOME_DBM
EXT char *dbmkey;
EXT int dbmlen;
@@ -303,6 +344,10 @@ EXT int dbmlen;
# endif
#endif
+#if S_ISBLK(060000) == 060000
+ XXX Your sys/stat.h appears to be buggy. Please fix it.
+#endif
+
#ifndef S_ISREG
# define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
#endif
@@ -377,6 +422,26 @@ EXT int dbmlen;
#undef f_next
#endif
+#if defined(cray) || defined(gould)
+# define SLOPPYDIVIDE
+#endif
+
+#if defined(cray) || defined(convex) || BYTEORDER > 0xffff
+# define QUAD
+#endif
+
+#ifdef QUAD
+# ifdef cray
+# define quad int
+# else
+# ifdef convex
+# define quad long long
+# else
+# define quad long
+# endif
+# endif
+#endif
+
typedef unsigned int STRLEN;
typedef struct arg ARG;
@@ -631,7 +696,7 @@ EXT int origargc;
EXT char **origenviron;
extern char **environ;
-EXT line_t subline INIT(0);
+EXT long subline INIT(0);
EXT STR *subname INIT(Nullstr);
EXT int arybase INIT(0);
@@ -676,7 +741,7 @@ EXT STR *DBsignal INIT(Nullstr);
EXT int lastspbase;
EXT int lastsize;
-EXT char *hexdigit INIT("0123456789abcdef0123456789ABCDEF");
+EXT char *hexdigit INIT("0123456789abcdef0123456789ABCDEFx");
EXT char *origfilename;
EXT FILE * VOLATILE rsfp;
EXT char buf[1024];
@@ -753,6 +818,7 @@ STR *interp();
void free_arg();
STIO *stio_new();
void hoistmust();
+void scanconst();
EXT struct stat statbuf;
EXT struct stat statcache;