-#ifdef __STDC__
-# define P(s) s
+#if defined(__STDC__) || defined(_WINDOWS)
#else
# define P(s) ()
#endif
int dup P((int ));
int dup2 P((int , int ));
int execve P((char *, char * [], char * []));
+#ifndef __GNUC__
int _exit P((int ));
+#endif
int fchmod P((int , int ));
int fchown P((int , int , int ));
int fcntl P((int , int , int ));
int sethostid P((long ));
int sethostname P((char *, int ));
int setpgrp P((int , int ));
-int setquota P((char *, char *));
+int setquota P((const char *, const char *));
int setregid P((int , int ));
int setreuid P((int , int ));
int shutdown P((int , int ));
+void srandom P((int ));
int swapon P((char *));
int sync P((void ));
int umask P((int ));
int write P((int , const char *, int ));
int abs P((int ));
int alarm P((unsigned ));
-double atof P((char *));
+double atof P((const char *));
int atoi P((char *));
long atol P((char *));
int bcmp P((char *, char *, int ));
int bcopy P((const char *, char *, int ));
int bzero P((char *, int ));
-char *calloc P((unsigned , unsigned ));
+void *calloc P((unsigned long, unsigned long));
void closelog P((void ));
int creat P((char *, int ));
char *crypt P((char *, char *));
int endservent P((void ));
int endttyent P((void ));
int endusershell P((void ));
-int execl P((char *, char *));
+int execl P((char *, char *, ...));
int execle P((char *, char *));
-int execlp P((char *, char *));
+int execlp P((char *, char *, ...));
int execv P((char *, char * []));
int execvp P((char *, char * []));
int exect P((char *, char * [], char * []));
+#ifndef __GNUC__
int exit P((int ));
+#endif
char *fcvt P((double , int , int *, int *));
int ffs P((int ));
+#ifdef __GNUC__
+void free P((void *));
+#else
int free P((char *));
+#endif
double frexp P((double , int *));
char *gcvt P((double , int , char *));
struct disktab *getdiskbyname P((char *));
struct fstab *getfstype P((char *));
struct group *getgrent P((void ));
struct group *getgrgid P((int ));
-struct group *getgrnam P((char *));
+struct group *getgrnam P((const char *));
char *getlogin P((void ));
int getopt P((int , char **, char *));
char *getpass P((char *));
int getpw P((int , char *));
struct passwd *getpwent P((void ));
struct passwd *getpwuid P((int ));
-struct passwd *getpwnam P((char *));
-struct ttyent *getttynam P((char *));
+struct passwd *getpwnam P((const char *));
+struct ttyent *getttynam P((const char *));
char *getusershell P((void ));
char *getwd P((char *));
u_long htonl P((u_long ));
int isatty P((int ));
double ldexp P((double , int ));
int longjmperror P((void ));
+#if defined(__STDC__) || defined(_WINDOWS)
+void *malloc P((size_t ));
+#else
char *malloc P((unsigned ));
+#endif
char *memccpy P((char *, char *, int , int ));
char *memchr P((char *, int , int ));
+#ifndef __GNUC__
int memcmp P((char *, char *, int ));
-char *memcpy P((char *, char *, int ));
+char *memcpy P((char *, const char *, int ));
char *memset P((char *, int , int ));
+#endif
char *mktemp P((char *));
int mkstemp P((char *));
double modf P((double , double *));
u_short ntohs P((unsigned int ));
void openlog P((const char *, int , int ));
int pause P((void ));
-int psignal P((unsigned , char *));
+int perror P((const char * ));
+int psignal P((unsigned , const char *));
int qsort P((char *, int , int , int (* )()));
int rand P((void ));
long random P((void ));
int rcmd P((char **, u_short , char *, char *, char *, int *));
char *re_comp P((char *));
int re_exec P((char *));
+#ifdef __GNUC__
+void *realloc P((void *, size_t ));
+#else
char *realloc P((char *, unsigned ));
+#endif
int rexec P((char **, u_short , char *, char *, char *, int *));
int rresvport P((int *));
int ruserok P((char *, int , char *, char *));
int setnetent P((int ));
int setprotoent P((int ));
int setpwent P((void ));
-int setpwfile P((char *));
+int setpwfile P((const char *));
int setrgid P((gid_t ));
int setruid P((uid_t ));
int setservent P((int ));
int siginterrupt P((int , int ));
int sleep P((unsigned ));
int srand P((int ));
-int strlen P((const char *));
-char *strncat P((char *, const char *, int ));
-int strncmp P((const char *, const char *, int ));
-char *strncpy P((char *, const char *, int ));
int swab P((char *, char *, int ));
void syslog P((int , const char *, ...));
int system P((char *));
int utime P((char *, time_t *));
char *valloc P((unsigned ));
int vlimit P((int , int ));
+#ifndef __GNUC__
void abort P((void));
+#endif
#endif /* VAX */
#endif
int kill P((int , int ));
int link P((char * , char * ));
-long lseek P((int , long , int ));
+off_t lseek P((int , long , int ));
#ifdef SYSTEM_FIVE
int madvise P((char * , int , int ));
int mmap P((char * , int , int , int , int , off_t ));
#ifndef SYSTEM_FIVE
void encrypt P((char * ));
#endif
-char *ctime P((long * ));
-struct tm *localtime P((long * ));
-struct tm *gmtime P((long * ));
#ifndef SYSTEM_FIVE
char *timezone P((int , int ));
#endif
char *ecvt P((double , int , int * , int * ));
char *fcvt P((double , int , int * , int * ));
char *gcvt P((double , int , char * ));
-int execl P((char * , char * ));
+int execl P((char * , char *, ...));
int execle P((char * , char * ));
int execv P((char * , char **));
int exect P((char *, char **, char ** ));
#ifndef SYSTEM_FIVE
struct group *getgrent P((void ));
struct group *getgrgid P((int ));
-struct group *getgrnam P((char * ));
+struct group *getgrnam P((const char * ));
int endgrent P((void ));
int setgrent P((void ));
#endif
#ifndef SYSTEM_FIVE
struct passwd *getpwent P((void ));
struct passwd *getpwuid P((int ));
-struct passwd *getpwnam P((char * ));
+struct passwd *getpwnam P((const char * ));
int endpwent P((void ));
int setpwent P((void ));
#endif
void setservent P((int ));
void endservent P((void ));
struct ttyent *getttyent P((void ));
-struct ttyent *getttynam P((char * ));
-void setttyent P((void ));
-void endttyent P((void ));
-unsigned long inet_network P((char * ));
+struct ttyent *getttynam P((const char * ));
+unsigned long inet_network P((const char * ));
int initgroups P((char * , int ));
+#if defined(__STDC__) || defined(_WINDOWS)
+void *malloc P((unsigned ));
+#else
char *malloc P((unsigned ));
+#endif
char *calloc P((unsigned , unsigned ));
char *realloc P((char * , unsigned ));
void free P((char * ));
unsigned sleep P((unsigned ));
int strcmp P((const char * , const char * ));
char *strcpy P((char * , const char * ));
+#ifndef hpux
int strlen P((const char * ));
+#endif
char *strncat P((char * , const char * , int ));
int strncmp P((const char * , const char * , int ));
char *strncpy P((char * , const char * , int ));
int setpriority P((int , int , int ));
int getsockname P((int , char * , int * ));
int getsockopt P((int , int , int , char * , int * ));
-int setsockopt P((int , int , int , char * , int ));
+int setsockopt P((int , int , int , const char * , int ));
int killpg P((int , int ));
int listen P((int , int ));
int quota P((int , int , int , caddr_t ));
char *setstate P((char * ));
char *re_comp P((char * ));
int re_exec P((char * ));
-void openlog P((const char * , int ));
-void syslog P((int , char *, ... ));
+void openlog P((const char * , int, int )); /* our local version... */
+void syslog P((int , const char *, ... ));
void closelog P((void ));
-long time P((long * ));
char *valloc P((unsigned ));
int vlimit P((int , int ));
#endif
-int execlp P((char * , char * ));
+int execlp P((char * , char *, ... ));
int execvp P((char * , char * []));
int plock P((int ));
char *shmat P((int , char * , int ));
int shmdt P((char * ));
-int stime P((long * ));
void sys3b P((int , int , int ));
long ulimit P((int , long ));
long a64l P((char * ));
char *memccpy P((char * , char * , int , int ));
char *memchr P((char * , int , int ));
int memcmp P((char * , char * , int ));
-char *memcpy P((char * , char * , int ));
+char *memcpy P((char * , const char * , int ));
char *memset P((char * , int , int ));
int gsignal P((int ));
double strtod P((char * , char ** ));
char *tfind P((char * , char ** , int (* )(char *, char *)));
char *tdelete P((char * , char ** , int (* )(char *, char *)));
void twalk P((char * , void (* )(char *, int, int)));
-int vprintf P((char * , ... ));
-int vsprintf P((char * , const char * , ... ));
int syscall P((int , int , int , int ));
long tell P((int ));
void endgrent P((void ));
struct passwd *getpwent P((void ));
struct passwd *getpwuid P((int ));
-struct passwd *getpwnam P((char * ));
+struct passwd *getpwnam P((const char * ));
void setpwent P((void ));
void endpwent P((void ));
void qsort P((char * , unsigned , unsigned , int (* )()));
#endif
#endif /* MIPS/Ultrix */
+
+#ifdef ibm032
+#ifndef memcpy
+extern void *memcpy P((void *, const void *, unsigned int));
+#endif
+#ifndef memset
+extern void *memset P((void *, int, unsigned int));
+#endif
+extern int bcmp P((void *, void *, unsigned int));
+extern void *calloc P((unsigned int, unsigned int));
+extern void *malloc P((unsigned int));
+extern void *realloc P((void *, unsigned int));
+extern void free P((void *));
+#ifndef abort
+extern void abort P((void));
+#endif
+extern char *getenv P((const char *));
+
+extern double atof P((const char *));
+extern int atoi P((const char *));
+
+#ifndef abs
+extern int abs(int);
+#if 0 /* used to be __HIGHC__; that interferes with jfc's c89 stdlib.h */
+#define abs(x) _abs(x)
+#endif
+#endif
+
+#endif /* ibm032 */
+
+/* Declarations valid for all machines. */
+#if !defined(abs) && defined(__GNUC__)
+#define abs(x) __builtin_abs(x)
+#endif
+
#undef P