Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
Date:                    2005-08-16
Initial Package Version: 1.7
Upstream Status:         Submitted
Origin:                  NAS mailing list - Steve McIntyre
                         (http://nas.codebrilliance.com/nas/nas-ml/msg01148.html)
Description:             Fixes compilation issues using GCC-4

$LastChangedBy: randy $
$Date: 2005-09-09 18:23:21 -0600 (Fri, 09 Sep 2005) $


--- nas-1.7.orig/clients/audio/auconvert/auconvert.c
+++ nas-1.7/clients/audio/auconvert/auconvert.c
@@ -383,7 +383,7 @@
 	    fatalError("Error writing output file");
     }
     else
-	rateConvert(in, out, numBytes, data);
+	rateConvert(in, out, numBytes, (char *)data);
 
     if (SoundCloseFile(out))
 	fatalError("Error closing output file");
--- nas-1.7.orig/clients/audio/auinfo/auinfo.c
+++ nas-1.7/clients/audio/auinfo/auinfo.c
@@ -26,6 +26,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <audio/audiolib.h>
 
--- nas-1.7.orig/clients/audio/aupanel/aupanel.c
+++ nas-1.7/clients/audio/aupanel/aupanel.c
@@ -28,6 +28,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #ifndef SYSV
 #include <audio/Aos.h>		/* for string and other os stuff */
 #endif
--- nas-1.7.orig/clients/audio/auplay/auplay.c
+++ nas-1.7/clients/audio/auplay/auplay.c
@@ -30,7 +30,9 @@
 #include	<unistd.h>
 #include	<fcntl.h>
 #include	<stdio.h>
+#include    <stdlib.h>
 #include	<signal.h>
+#include    <string.h>
 #include	<audio/audiolib.h>
 #include	<audio/soundlib.h>
 
--- nas-1.7.orig/clients/audio/aurecord/aurecord.c
+++ nas-1.7/clients/audio/aurecord/aurecord.c
@@ -28,6 +28,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <signal.h>
 #include <audio/Aos.h>			/* for string and other os stuff */
 #include <audio/Afuncs.h> 		/* for bcopy et. al. */
--- nas-1.7.orig/clients/audio/auwave/auwave.c
+++ nas-1.7/clients/audio/auwave/auwave.c
@@ -28,6 +28,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #ifndef SYSV
 #include <audio/Aos.h> 		/* for string and other os stuff */
 #endif
--- nas-1.7.orig/clients/audio/examples/playFile.c
+++ nas-1.7/clients/audio/examples/playFile.c
@@ -9,6 +9,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
--- nas-1.7.orig/clients/audio/examples/playSimul.c
+++ nas-1.7/clients/audio/examples/playSimul.c
@@ -9,6 +9,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
@@ -48,7 +49,7 @@
 	    {
 		arg++;
 		argc--;
-		volume = atoi(arg);
+		volume = atoi(*arg);
 	    }
 	}
 	else if (AuSoundPlayFromFile(aud, *arg, AuNone,
--- nas-1.7.orig/clients/audio/examples/playFromBckt.c
+++ nas-1.7/clients/audio/examples/playFromBckt.c
@@ -9,6 +9,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
--- nas-1.7.orig/clients/audio/examples/loopBucket.c
+++ nas-1.7/clients/audio/examples/loopBucket.c
@@ -10,6 +10,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
--- nas-1.7.orig/clients/audio/examples/bundle.c
+++ nas-1.7/clients/audio/examples/bundle.c
@@ -17,6 +17,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
--- nas-1.7.orig/clients/audio/examples/recordBucket.c
+++ nas-1.7/clients/audio/examples/recordBucket.c
@@ -11,6 +11,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
--- nas-1.7.orig/clients/audio/examples/plyBcktAsync.c
+++ nas-1.7/clients/audio/examples/plyBcktAsync.c
@@ -7,6 +7,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
--- nas-1.7.orig/clients/audio/util/playbucket.c
+++ nas-1.7/clients/audio/util/playbucket.c
@@ -23,6 +23,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
--- nas-1.7.orig/clients/audio/widgets/Slider.c
+++ nas-1.7/clients/audio/widgets/Slider.c
@@ -31,6 +31,7 @@
 #include <X11/StringDefs.h>
 #include <X11/Xaw/Label.h>
 #include <X11/Xaw/Scrollbar.h>
+#include <stdio.h>
 #include "SliderP.h"
 
 static XtResource resources[] = {
--- nas-1.7.orig/server/dia/auprocess.c
+++ nas-1.7/server/dia/auprocess.c
@@ -25,6 +25,7 @@
 #define _AUPROCESS_C_
 #define OUTPUT_RANGE_CHECK
 
+#include <string.h>
 #include <audio/audio.h>
 #include <audio/Aproto.h>
 #include "au.h"
--- nas-1.7.orig/server/dia/auutil.c
+++ nas-1.7/server/dia/auutil.c
@@ -173,7 +173,7 @@
 AuCreateResourceTypes()
 {
     void            AuFreeComponent();
-    static void     freeFlow();
+    void     freeFlow();
 
     auComponentType = CreateNewResourceType(AuFreeComponent);
     auFlowType = CreateNewResourceType(freeFlow);
--- nas-1.7.orig/server/os/access.c
+++ nas-1.7/server/os/access.c
@@ -583,7 +583,8 @@
 AuthorizedClient(client)
     ClientPtr client;
 {
-    int    		alen, family;
+    int    		family;
+	socklen_t   alen;
 #ifndef AMOEBA
     struct sockaddr	from;
 #else
--- nas-1.7.orig/server/os/connection.c
+++ nas-1.7/server/os/connection.c
@@ -1402,7 +1402,7 @@
 	struct sockaddr_dn dn;
 #endif /* DNETCONN */
     } from;
-    int	fromlen = sizeof (from);
+    socklen_t	fromlen = sizeof (from);
     AuID	 auth_id;
 
     auth_id = CheckAuthorization (proto_n, auth_proto,
@@ -1480,7 +1480,7 @@
 	struct sockaddr_dn dn;
 #endif /* DNETCONN */
     } from;
-    int	fromlen;
+    socklen_t	fromlen;
 #endif /* TCP_NODELAY */
 
     readyconnections = (((long)closure) & WellKnownConnections);
@@ -1504,7 +1504,7 @@
 	readyconnections &= ~(1 << curconn);
 	if ((newconn = accept (curconn,
 			      (struct sockaddr *) NULL, 
-			      (int *)NULL)) < 0) 
+			      (socklen_t *)NULL)) < 0) 
 	    continue;
 	if (newconn > lastfdesc)
 	{
--- nas-1.7.orig/server/os/utils.c
+++ nas-1.7/server/os/utils.c
@@ -51,6 +51,7 @@
 #include <audio/audio.h>
 #include <audio/Aos.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include "nasconf.h"
 #include "misc.h"
 #include "opaque.h"

