Skip to content
Snippets Groups Projects
Commit b4042860 authored by ram's avatar ram
Browse files

SVR4/solaris changes.

parent 629f48d2
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,10 @@
#include <X11/StringDefs.h>
#include <Xm/Xm.h>
#ifdef SVR4
#define bzero(a,n) memset(a, 0, n)
#endif
#include "global.h"
#include "types.h"
#include "datatrans.h"
......
......@@ -11,12 +11,18 @@
#include <sys/wait.h>
#ifdef SVR4
#define bzero(a,n) memset(a, 0, n)
#endif
#define PORT 8000
#define MAX(x,y) ((x<y)?y:x)
/* Some things (ie. RT) don't define this in errno.h. Go figure. */
#ifndef SVR4
extern int errno;
#endif
extern void serve_client(int socket);
......@@ -145,7 +151,11 @@ main(int argc, char **argv)
fd_set rfds;
int nfound,nfds,i;
int port = PORT;
#ifdef SVR4
int status;
#else
union wait status;
#endif
/* This is so resources can be passed to the servers on the command line */
global_argc = argc;
......@@ -230,6 +240,10 @@ main(int argc, char **argv)
establish_client(inet_socket);
}
/* Prevent zombie children under Mach */
#ifdef SVR4
waitpid(-1, &status, WNOHANG);
#else
wait3(&status,WNOHANG,NULL);
#endif
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment