diff options
author | Andrew Burt <isis!aburt> | 1988-01-23 14:57:57 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1988-01-23 14:57:57 +0000 |
commit | 135863df38bea8d721a115b5d13e08b816104784 (patch) | |
tree | d5947cc711fcade4b0dd8528ee65a70a5d5d189d /perl.h | |
parent | 36ce8bec6e5bbc05c8d60ee17f105fc8b751cada (diff) | |
download | perl-135863df38bea8d721a115b5d13e08b816104784.tar.gz |
perl 1.0 patch 2: Various portability fixes.
Some things didn't work right on System V and Pyramids.
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -1,6 +1,9 @@ -/* $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. * @@ -24,7 +27,13 @@ #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; @@ -46,6 +55,12 @@ typedef struct htbl HASH; #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"); @@ -53,7 +68,10 @@ EXT char *No INIT(""); #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; @@ -185,12 +203,6 @@ double atof(); long time(); struct tm *gmtime(), *localtime(); -#ifdef CHARSPRINTF - char *sprintf(); -#else - int sprintf(); -#endif - #ifdef EUNICE #define UNLINK(f) while (unlink(f) >= 0) #else |