diff options
Diffstat (limited to 'x2p')
-rw-r--r-- | x2p/a2p.h | 33 | ||||
-rw-r--r-- | x2p/a2py.c | 1 | ||||
-rw-r--r-- | x2p/walk.c | 1 |
3 files changed, 33 insertions, 2 deletions
@@ -11,6 +11,10 @@ #define VOIDUSED 1 #include "../config.h" +#if defined(__STDC__) || defined(vax11c) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus) +# define STANDARD_C 1 +#endif + /* Use all the "standard" definitions? */ #if defined(STANDARD_C) && defined(I_STDLIB) # include <stdlib.h> @@ -47,6 +51,35 @@ #define strrchr rindex #endif + +#ifdef I_TIME +# include <time.h> +#endif + +#ifdef I_SYS_TIME +# ifdef I_SYS_TIME_KERNEL +# define KERNEL +# endif +# include <sys/time.h> +# ifdef I_SYS_TIME_KERNEL +# undef KERNEL +# endif +#endif + +#ifndef MSDOS +# if defined(HAS_TIMES) && defined(I_SYS_TIMES) +# include <sys/times.h> +# endif +#endif + +#ifndef STANDARD_C +/* All of these are in stdlib.h or time.h for ANSI C */ +Time_t time(); +struct tm *gmtime(), *localtime(); +char *strchr(), *strrchr(); +char *strcpy(), *strcat(); +#endif /* ! STANDARD_C */ + #include "handy.h" #define Nullop 0 diff --git a/x2p/a2py.c b/x2p/a2py.c index f404c1a8fb..c08b06a723 100644 --- a/x2p/a2py.c +++ b/x2p/a2py.c @@ -12,7 +12,6 @@ #include "../patchlevel.h" #endif #include "util.h" -char *strchr(); char *filename; char *myname; diff --git a/x2p/walk.c b/x2p/walk.c index fb738756ba..0d651988fb 100644 --- a/x2p/walk.c +++ b/x2p/walk.c @@ -56,7 +56,6 @@ int minprec; /* minimum precedence without parens */ int numeric = FALSE; STR *fstr; int prec = P_MAX; /* assume no parens needed */ - char *strchr(); if (!node) { *numericptr = 0; |