$NetBSD: patch-ac,v 1.7 2011/05/14 18:45:54 hans Exp $ --- src/include/misc.h.orig 1993-04-25 23:37:48.000000000 +0200 +++ src/include/misc.h @@ -5,6 +5,8 @@ Copyright 1990 Regents of the University #ifndef MISC_H #define MISC_H +#include + #define BSIZE_SP 512 #ifdef HAS_EXIT1 @@ -81,23 +83,12 @@ extern void srandom(); # define srandom srand # endif -extern char *calloc(); -extern char *malloc(); -extern char *realloc(); -extern char *getenv(); -extern int errno; +#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)) extern char *sys_errlist[]; -extern char *getenv(); +#endif extern char *getwd(); -extern int rand(); -extern int srand(); -extern int atoi(); extern int kill(); extern int getpid(); -extern int qsort(); -# ifdef notdef -extern void exit(); -# endif # ifdef HAS_GETCWD extern char *getcwd( ); @@ -109,12 +100,14 @@ extern void clearerr(); # endif /* clearerr */ # endif /* HAS_CLEARERR */ +#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__sun)) # ifndef bzero extern int bzero(); # endif # ifndef bcopy extern void bcopy(); # endif +#endif /* defined(__FreeBSD__) || defined(__NetBSD__) */ # ifndef index # ifdef HAS_INDEX @@ -144,6 +137,7 @@ extern char *strrchr(); extern void perror(); #endif +#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__sun)) #ifdef HAS_TIME_ # ifdef HAS_BSDTIME extern char *timezone(); @@ -151,10 +145,13 @@ extern char *timezone(); extern char *asctime(); extern struct tm *localtime(); #endif +#endif #ifndef HAS_MEMAVL # ifdef HAS_RLIMIT_ +#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__sun)) extern char *sbrk(); +#endif # endif #endif