$NetBSD: patch-aa,v 1.3 1998/08/07 10:36:04 agc Exp $ --- ./clients/audio/audial/audial.c.orig Sun May 17 19:29:08 1998 +++ ./clients/audio/audial/audial.c Sun May 17 19:31:30 1998 @@ -133,6 +133,7 @@ signal(SIGALRM, SIG_DFL); } +#if (!defined(__FreeBSD__) || (__FreeBSD__ < 3)) && !defined(__NetBSD__) static void usleep(usecs) unsigned int usecs; @@ -149,6 +150,7 @@ setitimer(ITIMER_REAL, &ntval, &otval); pause(); } +#endif /* !__FreeBSD__ && !__NetBSD__ */ #endif /* SYSV else not */ #endif /* VMS else not */ --- ./clients/audio/auedit/Graph.c.orig Sun May 17 17:22:27 1998 +++ ./clients/audio/auedit/Graph.c Sun May 17 19:40:41 1998 @@ -28,7 +28,12 @@ */ #ifndef WIN32 +#if defined(__FreeBSD__) || defined(__NetBSD__) +#include +#define MAXSHORT SHRT_MAX +#else /* !__FreeBSD__ && !__NetBSD__ */ #include +#endif /* __FreeBSD__ || __NetBSD__ */ #else /* WIN32 */ #define MAXSHORT 0x7fff #endif /* WIN32 */ --- ./config/NetAudio.tmpl.orig Sun May 17 15:49:55 1998 +++ ./config/NetAudio.tmpl Sun May 17 18:29:27 1998 @@ -193,12 +193,14 @@ #define AuInstallManPageLong(file,destdir,dest) @@\ install.man:: file.man @@\ + @if [ ! -f file.man.orig ]; then \ @@\ + cp file.man file.man.orig; \ @@\ + fi @@\ @(rel=`cat $(TOP)/RELEASE | \ @@\ sed 's/Network Audio System Release //'`; \ @@\ sed -f $(TOP)/config/mungeman \ @@\ - -e "s/_RELEASE_/$$rel/" < file.man > tmp.man) @@\ - InstallManPageLong(tmp,destdir,dest) @@\ - @$(RM) tmp.man + -e "s/_RELEASE_/$$rel/" < file.man.orig > file.man) @@\ + InstallManPageLong(file,destdir,dest) #define SingleAudioProgram(program) @@\ InstallProgram(program,$(BINDIR)) @@\ --- ./include/audio/Imakefile.orig Sun May 17 17:03:45 1998 +++ ./include/audio/Imakefile Sun May 17 20:33:52 1998 @@ -24,7 +24,11 @@ #include "../../config/NetAudio.tmpl" -INSTALLFLAGS = $(INSTINCFLAGS) +#if HasBsdMake +INSTALLFLAGS += $(INSTINCFLAGS) +#else +INSTALLFLAGS = $(INSTALLFLAGS) $(INSTINCFLAGS) +#endif HEADERS = Afuncproto.h Afuncs.h Amd.h Aos.h Aosdefs.h Aproto.h audio.h FILES = $(HEADERS) @@ -37,7 +41,7 @@ MakeDir($(BUILDINCDIR:/=\)) #endif /* WIN32 */ -BuildIncludes($(HEADERS),audio,..) +BuildIncludes($(HEADERS),audio,.) #if ProjectX < 5 /* X11R4 doesn't make dir explicitly */ #ifndef MakeDir --- ./lib/audio/Alibint.c.orig Sun May 17 15:02:27 1998 +++ ./lib/audio/Alibint.c Sun May 17 17:10:44 1998 @@ -1324,11 +1324,12 @@ static char *_SysErrorMsg (n) int n; { -#if !defined(__FreeBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) extern char *sys_errlist[]; #endif extern int sys_nerr; - char *s = ((n >= 0 && n < sys_nerr) ? sys_errlist[n] : "unknown error"); + char *s; + s = ((n >= 0 && n < sys_nerr) ? (char *) sys_errlist[n] : "unknown error"); return (s ? s : "no such error"); } --- ./lib/audio/ConnSvr.c.orig Sun May 17 15:03:00 1998 +++ ./lib/audio/ConnSvr.c Sun May 17 15:03:32 1998 @@ -54,9 +54,9 @@ #define FIOSNBIO FIONBIO #endif /* WIN32 */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__NetBSD__) #include -#endif /* __FreeBSD__ */ +#endif /* __FreeBSD__ || __NetBSD__ */ #include #include