diff options
Diffstat (limited to 'os/connection.c')
-rw-r--r-- | os/connection.c | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/os/connection.c b/os/connection.c index cb3443c5b..d975f87d2 100644 --- a/os/connection.c +++ b/os/connection.c @@ -107,11 +107,6 @@ SOFTWARE. #include <sys/ioctl.h> #endif -#ifdef __UNIXOS2__ -#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) -extern __const__ int _nfiles; -#endif - #if defined(TCPCONN) || defined(STREAMSCONN) # include <netinet/in.h> # include <arpa/inet.h> @@ -124,21 +119,17 @@ extern __const__ int _nfiles; # ifdef CSRG_BASED # include <sys/param.h> # endif -# ifndef __UNIXOS2__ -# include <netinet/tcp.h> -# endif +# include <netinet/tcp.h> # endif # endif # include <arpa/inet.h> #endif -#if !defined(__UNIXOS2__) #ifndef Lynx #include <sys/uio.h> #else #include <uio.h> #endif -#endif #endif /* WIN32 */ #include "misc.h" /* for typedef of pointer */ #include "osdep.h" @@ -171,8 +162,10 @@ extern __const__ int _nfiles; #ifdef XSERVER_DTRACE # include <sys/types.h> typedef const char *string; +# ifndef HAS_GETPEERUCRED +# define zoneid_t int +# endif # include "../dix/Xserver-dtrace.h" -# include <ucred.h> #endif static int lastfdesc; /* maximum file descriptor */ @@ -192,9 +185,6 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ Bool PartialNetwork; /* continue even if unable to bind all addrs */ static Pid_t ParentProcess; -#ifdef __UNIXOS2__ -Pid_t GetPPID(Pid_t pid); -#endif static Bool debug_conns = FALSE; @@ -327,8 +317,6 @@ InitConnectionLimits(void) #ifndef __CYGWIN__ -#ifndef __UNIXOS2__ - #if !defined(XNO_SYSCONF) && defined(_SC_OPEN_MAX) lastfdesc = sysconf(_SC_OPEN_MAX) - 1; #endif @@ -343,10 +331,6 @@ InitConnectionLimits(void) lastfdesc = _NFILE - 1; #endif -#else /* __UNIXOS2__ */ - lastfdesc = _nfiles - 1; -#endif - #endif /* __CYGWIN__ */ /* This is the fallback */ @@ -462,15 +446,6 @@ CreateWellKnownSockets(void) RunFromSmartParent = TRUE; OsSignal(SIGUSR1, handler); ParentProcess = getppid (); -#ifdef __UNIXOS2__ - /* - * fg030505: under OS/2, xinit is not the parent process but - * the "grant parent" process of the server because execvpe() - * presents us an additional process number; - * GetPPID(pid) is part of libemxfix - */ - ParentProcess = GetPPID (ParentProcess); -#endif /* __UNIXOS2__ */ if (RunFromSmartParent) { if (ParentProcess > 1) { kill (ParentProcess, SIGUSR1); @@ -563,6 +538,8 @@ AuthAudit (ClientPtr client, Bool letin, char client_uid_string[64]; #ifdef HAS_GETPEERUCRED ucred_t *peercred = NULL; +#endif +#if defined(HAS_GETPEERUCRED) || defined(XSERVER_DTRACE) pid_t client_pid = -1; zoneid_t client_zid = -1; #endif @@ -573,7 +550,7 @@ AuthAudit (ClientPtr client, Bool letin, switch (saddr->sa_family) { case AF_UNSPEC: -#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) +#if defined(UNIXCONN) || defined(LOCALCONN) case AF_UNIX: #endif strcpy(out, "local host"); |