File nas-fixes.patch of Package nas
Index: server/os/access.c
===================================================================
--- server/os/access.c.orig
+++ server/os/access.c
@@ -245,9 +245,9 @@ AccessUsingXdmcp(void)
/* SVR4, ISC, linux use this if SIOCGIFCONF fails */
#ifdef USE_FALLBACK_DEFINESELF
static
-FallbackDefineSelf(fd)
+int FallbackDefineSelf(fd)
#else
-DefineSelf(fd)
+int DefineSelf(fd)
#endif
int fd;
{
@@ -300,6 +300,7 @@ int fd;
}
}
#endif /* !TCPCONN && !UNIXCONN */
+ return 0;
}
#endif
@@ -315,7 +316,7 @@ int fd;
/* Define this host for access control. Find all the hosts the OS knows about
* for this fd and add them to the selfhosts list.
*/
-DefineSelf(fd)
+void DefineSelf(fd)
int fd;
{
char buf[2048], *cp, *cplim;
@@ -398,7 +399,7 @@ int fd;
#else /* _MINIX */
/* Define this host for access control.
*/
-DefineSelf(fd)
+void DefineSelf(fd)
int fd;
{
int len;
@@ -435,7 +436,7 @@ int fd;
#endif /* AMOEBA */
-AddLocalHosts()
+void AddLocalHosts()
{
HOST *self;
@@ -444,7 +445,7 @@ AddLocalHosts()
}
/* Reset access control list to initial hosts */
-ResetHosts(display)
+void ResetHosts(display)
char *display;
{
HOST *host;
Index: server/os/auth.c
===================================================================
--- server/os/auth.c.orig
+++ server/os/auth.c
@@ -59,7 +59,7 @@ struct protocol {
extern int MitAddCookie();
extern AuID MitCheckCookie();
-extern int MitResetCookie();
+extern void MitResetCookie();
extern AuID MitToID();
extern int MitFromID(), MitRemoveCookie();
@@ -83,7 +83,7 @@ static char *authorization_file = (char
static int AuthorizationIndex = 0;
static Bool ShouldLoadAuth = TRUE;
-InitAuthorization(file_name)
+void InitAuthorization(file_name)
char *file_name;
{
authorization_file = file_name;
@@ -148,7 +148,7 @@ char *data;
return (AuID) ~ 0L;
}
-ResetAuthorization()
+void ResetAuthorization()
{
int i;
Index: server/os/connection.c
===================================================================
--- server/os/connection.c.orig
+++ server/os/connection.c
@@ -1713,7 +1713,7 @@ ClientPtr client;
}
-AddEnabledDevice(fd)
+void AddEnabledDevice(fd)
int fd;
{
BITSET(EnabledDevices, fd);
@@ -1721,7 +1721,7 @@ int fd;
}
-RemoveEnabledDevice(fd)
+void RemoveEnabledDevice(fd)
int fd;
{
BITCLEAR(EnabledDevices, fd);
@@ -1738,7 +1738,7 @@ int fd;
* This routine is "undone" by ListenToAllClients()
*****************/
-OnlyListenToOneClient(client)
+void OnlyListenToOneClient(client)
ClientPtr client;
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -1768,7 +1768,7 @@ ClientPtr client;
* Undoes OnlyListentToOneClient()
****************/
-ListenToAllClients()
+void ListenToAllClients()
{
if (GrabInProgress) {
ORBITS(AllSockets, AllSockets, SavedAllSockets);
@@ -1780,7 +1780,7 @@ ListenToAllClients()
/* make client impervious to grabs; assume only executing client calls this */
-MakeClientGrabImpervious(client)
+void MakeClientGrabImpervious(client)
ClientPtr client;
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
@@ -1791,7 +1791,7 @@ ClientPtr client;
/* make client pervious to grabs; assume only executing client calls this */
-MakeClientGrabPervious(client)
+void MakeClientGrabPervious(client)
ClientPtr client;
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
Index: server/os/io.c
===================================================================
--- server/os/io.c.orig
+++ server/os/io.c
@@ -370,7 +370,7 @@ int count;
*
**********************/
-ResetCurrentRequest(client)
+void ResetCurrentRequest(client)
ClientPtr client;
{
OsCommPtr oc = (OsCommPtr) client->osPrivate;
Index: server/os/mitauth.c
===================================================================
--- server/os/mitauth.c.orig
+++ server/os/mitauth.c
@@ -91,7 +91,7 @@ char *data;
return (AuID) - 1;
}
-int
+void
MitResetCookie()
{
struct auth *auth, *next;
Index: server/dia/gram.y
===================================================================
--- server/dia/gram.y.orig
+++ server/dia/gram.y
@@ -167,7 +167,7 @@ number : NUMBER
%%
-RemoveDQuote(str)
+void RemoveDQuote(str)
char *str;
{
char *i, *o;
Index: server/dda/voxware/auvoxware.c
===================================================================
--- server/dda/voxware/auvoxware.c.orig
+++ server/dda/voxware/auvoxware.c
@@ -131,6 +131,8 @@ PERFORMANCE OF THIS SOFTWARE.
* [chris]
*/
+#include <unistd.h>
+#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef SVR4
Index: server/dda/voxware/config.c
===================================================================
--- server/dda/voxware/config.c.orig
+++ server/dda/voxware/config.c
@@ -4,6 +4,9 @@
*
*/
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
#include <fcntl.h>
#include "nasconf.h"
#include "config.h"
Index: clients/audio/auwave/auwave.c
===================================================================
--- clients/audio/auwave/auwave.c.orig
+++ clients/audio/auwave/auwave.c
@@ -400,7 +400,7 @@ main(int argc, char **argv)
globals = g;
g->top = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
- &argc, argv, defaultResources, NULL, 0);
+ &argc, argv, defaultResources, NULL, NULL);
XtAppAddActions(appContext, actions, XtNumber(actions));
if (argc == 3)
Index: clients/audio/autool/audiotool.c
===================================================================
--- clients/audio/autool/audiotool.c.orig
+++ clients/audio/autool/audiotool.c
@@ -464,7 +464,7 @@ main(int argc, char **argv)
globals->topLevel = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
&argc, argv, defaultResources,
- NULL, 0);
+ NULL, NULL);
XtVaSetValues(globals->topLevel, XtNinput, True, NULL);
Index: clients/audio/auedit/auedit.c
===================================================================
--- clients/audio/auedit/auedit.c.orig
+++ clients/audio/auedit/auedit.c
@@ -1250,7 +1250,11 @@ int numSamples;
p = g->data + left * g->numTracks;
while (numSamples--)
- *p++ = (*p + *data++) / 2;
+ {
+ *p = (*p + *data) / 2;
+ p++;
+ data++;
+ }
if (newValues)
XtVaSetValues(g->graph, XtNdata, g->data, XtNnumSamples, g->numSamples,
@@ -2494,7 +2498,7 @@ char **argv;
g = globals = &globalData;
r = &g->recordDialog;
g->top = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
- &argc, argv, defaultResources, NULL, 0);
+ &argc, argv, defaultResources, NULL, NULL);
XtAppAddActions(appContext, actions, XtNumber(actions));
while (--argc)
Index: clients/audio/audemo/audemo.c
===================================================================
--- clients/audio/audemo/audemo.c.orig
+++ clients/audio/audemo/audemo.c
@@ -1641,7 +1641,7 @@ main(int argc, char **argv)
globals->topLevel = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
&argc, argv, defaultResources,
- NULL, 0);
+ NULL, NULL);
globals->volume = DEFAULT_VOLUME;
globals->numFiles = 0;
Index: clients/audio/examples/recordBucket.c
===================================================================
--- clients/audio/examples/recordBucket.c.orig
+++ clients/audio/examples/recordBucket.c
@@ -76,4 +76,5 @@ main(int argc, char **argv)
printf("Press return to quit\n");
getchar();
+ return 0;
}
Index: clients/audio/aupanel/aupanel.c
===================================================================
--- clients/audio/aupanel/aupanel.c.orig
+++ clients/audio/aupanel/aupanel.c
@@ -510,7 +510,7 @@ main(int argc, char **argv)
char *initialDeviceName = NULL;
g->top = XtVaAppInitialize(&appContext, APP_CLASS, NULL, ZERO,
- &argc, argv, defaultResources, NULL, 0);
+ &argc, argv, defaultResources, NULL, NULL);
g->queryInterval = DEFAULT_QUERY_INTERVAL;
Index: clients/audio/auphone/auphone.c
===================================================================
--- clients/audio/auphone/auphone.c.orig
+++ clients/audio/auphone/auphone.c
@@ -1151,7 +1151,7 @@ main(int argc, char **argv)
double atof();
g->top = XtVaAppInitialize(&g->appContext, APP_CLASS, NULL, ZERO,
- &argc, argv, defaultResources, NULL, 0);
+ &argc, argv, defaultResources, NULL, NULL);
XtAppAddActions(g->appContext, actions, XtNumber(actions));
g->dpy = XtDisplay(g->top);
Index: clients/audio/auconvert/auconvert.c
===================================================================
--- clients/audio/auconvert/auconvert.c.orig
+++ clients/audio/auconvert/auconvert.c
@@ -121,6 +121,7 @@ convertDataFormat(const char *s)
return dataFormats[i].value;
usage();
+ return -1;
}
static int