summaryrefslogtreecommitdiff
path: root/audio/nas/patches/patch-aa
blob: 34d72f7191dec945c8a5fe9fa9881424d0823749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
$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 <limits.h>
+#define MAXSHORT	SHRT_MAX
+#else  /* !__FreeBSD__ && !__NetBSD__ */
 #include <values.h>
+#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 <sys/param.h>
-#endif /* __FreeBSD__ */
+#endif /* __FreeBSD__ || __NetBSD__ */
 #include <ctype.h>
 #include <audio/Alibint.h>
 #include <audio/Aos.h>
--- ./lib/audio/Imakefile.orig	Sun May 17 17:01:15 1998
+++ ./lib/audio/Imakefile	Sun May 17 20:33:19 1998
@@ -65,11 +65,20 @@
     COMPAT_OBJS = AuGetBest.o
 #endif /* ProjectX < 5 */
 
+#if HasBSD44Sockets
+    SOCK_DEFINES = -DBSD44SOCKETS
+#endif
+
      EDB_DEFINES = -DERRORDB=\"$(LIBDIR)/AuErrorDB\"
 
         DEFINES = $(MALLOC_DEFINES) $(SYSV_DEFINES)
-   CONN_DEFINES = ConnectionFlags
-   INSTALLFLAGS = $(INSTINCFLAGS)
+   CONN_DEFINES = ConnectionFlags $(SOCK_DEFINES)
+
+#if HasBsdMake
+   INSTALLFLAGS += $(INSTINCFLAGS)
+#else
+   INSTALLFLAGS = $(INSTINCFLAGS)
+#endif
 
 HEADERS = Alibint.h Alibnet.h Xtutil.h audiolib.h audioutil.h snd.h wave.h    \
           voc.h aiff.h sound.h soundlib.h fileutil.h 8svx.h Astreams.h
@@ -120,7 +129,7 @@
 
 #endif
 
-BuildIncludes($(HEADERS),audio,..)
+BuildIncludes($(HEADERS),audio,.)
 InstallMultiple($(HEADERS),$(INCDIR))
 #if ProjectX >= 5
 InstallNonExecFile(AuErrorDB,$(LIBDIR))
--- ./lib/audio/Astreams.c.orig	Sun May 17 19:34:53 1998
+++ ./lib/audio/Astreams.c	Sun May 17 19:36:13 1998
@@ -51,8 +51,11 @@
 #include <errno.h>
 #include <sys/stropts.h>
 
+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+/* needed for some platforms which do not define this in <errno.h> */
 extern int errno;
 extern char *sys_errlist[];
+#endif 
 
 /* stolen from <X11/Xproto.h> */
 typedef struct {
--- ./lib/audio/ErrHndlr.c.orig	Sun May 17 19:04:41 1998
+++ ./lib/audio/ErrHndlr.c	Sun May 17 19:04:45 1998
@@ -59,9 +59,9 @@
     AuIOErrorHandler oldhandler = aud->funcs.ioerror_handler;
 
     if (!oldhandler)
-	oldhandler = (AuErrorHandler) _AuDefaultIOError;
+	oldhandler = (AuIOErrorHandler) _AuDefaultIOError;
 
     aud->funcs.ioerror_handler = handler ? handler :
-	(AuErrorHandler) _AuDefaultIOError;
+	(AuIOErrorHandler) _AuDefaultIOError;
     return oldhandler;
 }
--- ./server/dda/voxware/auvoxware.c.orig	Sun May 17 15:08:50 1998
+++ ./server/dda/voxware/auvoxware.c	Sun May 17 15:18:55 1998
@@ -164,6 +164,9 @@
 #ifdef __FreeBSD__
 #include <machine/soundcard.h>
 #include <machine/pcaudioio.h>
+#elif defined(__NetBSD__)
+#include <sys/ioctl.h>
+#include <soundcard.h>
 #else
 #include <sys/soundcard.h>
 #endif
--- ./server/dia/au.h.orig	Sun May 17 20:36:35 1998
+++ ./server/dia/au.h	Sun May 17 15:05:42 1998
@@ -33,7 +33,7 @@
 #include "../dda/sgi/ausgi.h"
 #endif						/* sgi */
 
-#if defined(__FreeBSD__) || defined(linux) || (defined(SVR4) && defined(SYSV386))
+#if defined(__FreeBSD__) || defined(linux) || (defined(SVR4) && defined(SYSV386)) || defined(__NetBSD__)
 #include "../dda/voxware/auvoxware.h"
 #endif
 
--- ./server/os/connection.c.orig	Sun May 17 15:04:27 1998
+++ ./server/os/connection.c	Sun May 17 15:04:51 1998
@@ -1032,7 +1032,7 @@
 
     for (i=0; i<MAXSOCKS; i++) ConnectionTranslation[i] = 0;
 #ifndef X_NOT_POSIX
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
     lastfdesc = getdtablesize() - 1;
 #else
     lastfdesc = sysconf(_SC_OPEN_MAX) - 1;
--- ./server/Imakefile.orig	Sun May 17 15:07:12 1998
+++ ./server/Imakefile	Sun May 17 15:38:11 1998
@@ -52,6 +52,8 @@
 #else
         SYSLIBS = /usr/ucblib/libucb.a
 #endif
+#elif defined(NetBSDArchitecture)
+        SYSLIBS = -lossaudio
 #else
         SYSLIBS =
 #endif
@@ -87,7 +89,7 @@
 #endif
 
 
-#if defined(i386SVR4Architecture) || defined(__FreeBSD__) || defined(FreeBSDArchitecture) || defined(LinuxArchitecture) || defined(i386BsdArchitecture)
+#if defined(i386SVR4Architecture) || defined(__FreeBSD__) || defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || defined(LinuxArchitecture) || defined(i386BsdArchitecture)
 #define CanBuildAuServer	YES
 ALL1 = auvoxware
 #define BuildVoxServer