aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/Imakefile10
-rw-r--r--nx-X11/programs/Xserver/Xext/security.c20
-rw-r--r--nx-X11/programs/Xserver/Xext/shm.c5
-rw-r--r--nx-X11/programs/Xserver/Xext/sync.c2
-rw-r--r--nx-X11/programs/Xserver/Xext/xvmc.c5
-rw-r--r--nx-X11/programs/Xserver/dix/devices.c6
-rw-r--r--nx-X11/programs/Xserver/dix/events.c8
-rw-r--r--nx-X11/programs/Xserver/fb/fb.h3
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Imakefile7
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.c5
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/os2Stub.c410
-rw-r--r--nx-X11/programs/Xserver/include/os.h2
-rw-r--r--nx-X11/programs/Xserver/include/servermd.h35
-rw-r--r--nx-X11/programs/Xserver/mi/miarc.c2
-rw-r--r--nx-X11/programs/Xserver/mi/micoord.h2
-rw-r--r--nx-X11/programs/Xserver/mi/miinitext.c4
-rw-r--r--nx-X11/programs/Xserver/os/WaitFor.c3
-rw-r--r--nx-X11/programs/Xserver/os/access.c59
-rw-r--r--nx-X11/programs/Xserver/os/connection.c63
-rw-r--r--nx-X11/programs/Xserver/os/io.c10
-rw-r--r--nx-X11/programs/Xserver/os/log.c3
-rw-r--r--nx-X11/programs/Xserver/os/oscolor.c11
-rw-r--r--nx-X11/programs/Xserver/os/osdep.h9
-rw-r--r--nx-X11/programs/Xserver/os/osinit.c6
-rw-r--r--nx-X11/programs/Xserver/os/rpcauth.c5
-rw-r--r--nx-X11/programs/Xserver/os/utils.c72
-rw-r--r--nx-X11/programs/Xserver/os/xdmcp.c9
-rw-r--r--nx-X11/programs/Xserver/render/picture.h3
-rw-r--r--nx-X11/programs/Xserver/xkb/Imakefile6
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxBeep.c29
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxConfig.c3
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxLoad.c38
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbAccessX.c9
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbInit.c12
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbUtils.c4
36 files changed, 37 insertions, 849 deletions
diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile
index 8efbcf14a..fe70d007a 100644
--- a/nx-X11/programs/Xserver/Imakefile
+++ b/nx-X11/programs/Xserver/Imakefile
@@ -160,7 +160,7 @@ INSTPGMFLAGS =
#if HasPam && HasPamMisc
PAMLIBS = PamLibraries PamMiscLibraries
#endif
-#if !(SystemV4 || defined(SGIArchitecture) || UseRgbTxt)
+#if !(SystemV4 || UseRgbTxt)
DBMLIBS = DBMLibrary
#endif
SYSLIBS = $(ZLIB) MathLibrary $(DBMLIBS) $(USB) \
@@ -248,9 +248,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXmiexpose.o \
hw/nxagent/NXresource.o \
hw/nxagent/NXdamage.o
-#elif !defined(LynxOSArchitecture) && \
- !defined(Win32Architecture) && \
- !defined(QNX4Architecture)
+#elif !defined(Win32Architecture)
NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXwindow.o \
hw/nxagent/NXevents.o \
@@ -516,14 +514,14 @@ ServerTarget(NXWin,$(NXWINDIRS),$(NXWINOBJS), \
MIEXTDIRS = $(SHADOWDIR) $(LAYERDIR) $(ROOTLESSDIR) $(MIDAMAGEDIR)
IPLANDIRS = $(IPLAN2P2DIR) $(IPLAN2P4DIR) $(IPLAN2P8DIR)
-DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) $(LYNXDDXDIR) \
+DDXDIRS = $(DECWSDDXDIR) $(SUNDDXDIR) \
$(HPDDXDIR) $(XFREE86DDXDIR) \
$(NXAGENTDDXDIR) $(NXWINDDXDIR)
SUBDIRS = $(STDDIRS) \
$(IPLANDIRS) $(ILBMDIR) \
$(DDXDIRS) $(FBSUBDIR) $(KDRIVEDIRS) $(MIEXTDIRS)
-#if defined(ServerToInstall) && !defined(OS2Architecture)
+#if defined(ServerToInstall)
install::
-(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) ServerToInstall X)
#endif
diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c
index 6883db5f8..3a638460e 100644
--- a/nx-X11/programs/Xserver/Xext/security.c
+++ b/nx-X11/programs/Xserver/Xext/security.c
@@ -1481,11 +1481,7 @@ SecurityFreePropertyAccessList(void)
}
} /* SecurityFreePropertyAccessList */
-#ifndef __UNIXOS2__
#define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') )
-#else
-#define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') )
-#endif
static char *
SecuritySkipWhitespace(
@@ -1774,8 +1770,6 @@ SecurityLoadPropertyAccessList(void)
#endif
-#ifndef __UNIXOS2__
-
#ifdef NXAGENT_SERVER
f = Fopen(_NXGetPolicyFilePath(SecurityPolicyFile), "r");
@@ -1786,20 +1780,6 @@ SecurityLoadPropertyAccessList(void)
#endif
-#else
-
-#ifdef NXAGENT_SERVER
-
- f = Fopen((char*)__XOS2RedirRoot( _NXGetPolicyFilePath(SecurityPolicyFile)), "r");
-
-#else
-
- f = Fopen((char*)__XOS2RedirRoot(SecurityPolicyFile), "r");
-
-#endif
-
-#endif
-
if (!f)
{
#ifdef NXAGENT_SERVER
diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c
index c70f52b6a..dc8bbf97b 100644
--- a/nx-X11/programs/Xserver/Xext/shm.c
+++ b/nx-X11/programs/Xserver/Xext/shm.c
@@ -34,13 +34,8 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <sys/types.h>
-#ifndef Lynx
#include <sys/ipc.h>
#include <sys/shm.h>
-#else
-#include <ipc.h>
-#include <shm.h>
-#endif
#include <unistd.h>
#include <sys/stat.h>
#include <nx-X11/X.h>
diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c
index 4f24d5b54..e1580b3a3 100644
--- a/nx-X11/programs/Xserver/Xext/sync.c
+++ b/nx-X11/programs/Xserver/Xext/sync.c
@@ -71,7 +71,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "protocol-versions.h"
#include <stdio.h>
-#if !defined(WIN32) && !defined(Lynx)
+#if !defined(WIN32)
#include <sys/time.h>
#endif
diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c
index 710101d07..0a43baa22 100644
--- a/nx-X11/programs/Xserver/Xext/xvmc.c
+++ b/nx-X11/programs/Xserver/Xext/xvmc.c
@@ -22,14 +22,9 @@
#include "xvmcext.h"
#ifdef HAS_XVMCSHM
-#ifndef Lynx
#include <sys/ipc.h>
#include <sys/types.h>
#include <sys/shm.h>
-#else
-#include <ipc.h>
-#include <shm.h>
-#endif /* Lynx */
#endif /* HAS_XVMCSHM */
diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c
index 69cdc82e1..ad1788277 100644
--- a/nx-X11/programs/Xserver/dix/devices.c
+++ b/nx-X11/programs/Xserver/dix/devices.c
@@ -662,13 +662,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
if (!feedc)
return FALSE;
feedc->CtrlProc = controlProc;
-#ifdef sgi
- feedc->ctrl.num = 1;
- feedc->ctrl.den = 1;
- feedc->ctrl.threshold = 1;
-#else
feedc->ctrl = defaultPointerControl;
-#endif
feedc->ctrl.id = 0;
if ( (feedc->next = dev->ptrfeed) )
feedc->ctrl.id = dev->ptrfeed->ctrl.id + 1;
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index 166d2e85e..abbde67d5 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -2986,12 +2986,7 @@ EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask ma
if (wClient (pWin) == client)
{
check = pWin->eventMask;
-#ifdef SGIMISC
- pWin->eventMask =
- (mask & ~SGIMiscSpecialDestroyMask) | (pWin->eventMask & SGIMiscSpecialDestroyMask);
-#else
pWin->eventMask = mask;
-#endif
}
else
{
@@ -3000,9 +2995,6 @@ EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask ma
if (SameClient(others, client))
{
check = others->mask;
-#ifdef SGIMISC
- mask = (mask & ~SGIMiscSpecialDestroyMask) | (others->mask & SGIMiscSpecialDestroyMask);
-#endif
if (mask == 0)
{
FreeResource(others->resource, RT_NONE);
diff --git a/nx-X11/programs/Xserver/fb/fb.h b/nx-X11/programs/Xserver/fb/fb.h
index 7c33562b4..58aa8561b 100644
--- a/nx-X11/programs/Xserver/fb/fb.h
+++ b/nx-X11/programs/Xserver/fb/fb.h
@@ -104,8 +104,7 @@ typedef unsigned __int64 FbBits;
defined(__sparc64__) || defined(_LP64) || \
defined(__s390x__) || \
defined(amd64) || defined (__amd64__) || \
- defined (__powerpc64__) || \
- (defined(sgi) && (_MIPS_SZLONG == 64))
+ defined (__powerpc64__)
typedef unsigned long FbBits;
# else
typedef unsigned long long FbBits;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 4dbb003f2..46e01c737 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -587,12 +587,6 @@ int ddxProcessArgument(int argc, char *argv[], int i)
if(++i < argc)
{
- #ifdef sgi
-
- userdefinedfontpath = 1;
-
- #endif
-
#ifdef TEST
fprintf(stderr, "ddxProcessArgument: User defined font path [%s].\n", argv[i]);
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
index 7dbcce896..f849c3e5a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile
+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
@@ -6,11 +6,6 @@ NULL =
SUBDIRS = compext \
$(NULL)
-#ifdef OS2Architecture
-SRCS1 = os2Stub.c
-OBJS1 = os2Stub.o
-#endif
-
SRCS = \
NXwindow.c \
NXevents.c \
@@ -71,7 +66,6 @@ SRCS = \
stubs.c \
xpstubs.c \
miinitext.c \
- $(SRCS1) \
$(NULL)
OBJS = \
@@ -134,7 +128,6 @@ OBJS = \
stubs.o \
xpstubs.o \
miinitext.o \
- $(OBJS1) \
$(NULL)
VFBINCLUDES = \
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index c492378a0..218766e06 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -536,11 +536,6 @@ void OsVendorEndRedirectErrorFFunction()
nxagentEndRedirectToClientsLog();
}
-/* this is just to get the server to link on AIX */
-#ifdef AIXV3
-int SelectWaitTime = 10000; /* usec */
-#endif
-
ServerGrabInfoRec nxagentGrabServerInfo;
static void nxagentGrabServerCallback(CallbackListPtr *callbacks, void *data,
diff --git a/nx-X11/programs/Xserver/hw/nxagent/os2Stub.c b/nx-X11/programs/Xserver/hw/nxagent/os2Stub.c
deleted file mode 100644
index 226140dc5..000000000
--- a/nx-X11/programs/Xserver/hw/nxagent/os2Stub.c
+++ /dev/null
@@ -1,410 +0,0 @@
-/**************************************************************************/
-/* */
-/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */
-/* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */
-/* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/
-/* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */
-/* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */
-/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */
-/* */
-/* NXAGENT, NX protocol compression and NX extensions to this software */
-/* are copyright of the aforementioned persons and companies. */
-/* */
-/* Redistribution and use of the present software is allowed according */
-/* to terms specified in the file LICENSE which comes in the source */
-/* distribution. */
-/* */
-/* All rights reserved. */
-/* */
-/* NOTE: This software has received contributions from various other */
-/* contributors, only the core maintainers and supporters are listed as */
-/* copyright holders. Please contact us, if you feel you should be listed */
-/* as copyright holder, as well. */
-/* */
-/**************************************************************************/
-
-/*
- * (c) Copyright 1996 by Sebastien Marineau
- * <marineau@genie.uottawa.ca>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * HOLGER VEIT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Sebastien Marineau shall not be
- * used in advertising or otherwise to promote the sale, use or other dealings
- * in this Software without prior written authorization from Sebastien Marineau.
- *
- */
-
-/* This below implements select() for calls in nxagent. It has been */
-/* somewhat optimized for improved performance, but assumes a few */
-/* things so it cannot be used as a general select. */
-
-#define I_NEED_OS2_H
-#include "Xpoll.h"
-#include <stdio.h>
-#include <sys/select.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#define INCL_DOSSEMAPHORES
-#define INCL_DOSNPIPES
-#define INCL_DOSMISC
-#define INCL_DOSMODULEMGR
-#undef BOOL
-#undef BYTE
-#include <os2.h>
-
-HEV hPipeSem;
-HMODULE hmod_so32dll;
-static int (*os2_tcp_select)(int*,int,int,int,long);
-ULONG os2_get_sys_millis();
-extern int _files[];
-
-#define MAX_TCP 256
-/* These lifted from sys/emx.h. Change if that changes there! */
-#define F_SOCKET 0x10000000
-#define F_PIPE 0x20000000
-
-struct select_data
-{
- fd_set read_copy;
- fd_set write_copy;
- BOOL have_read;
- BOOL have_write;
- int tcp_select_mask[MAX_TCP];
- int tcp_emx_handles[MAX_TCP];
- int tcp_select_copy[MAX_TCP];
- int socket_nread;
- int socket_nwrite;
- int socket_ntotal;
- int pipe_ntotal;
- int pipe_have_write;
- int max_fds;
-};
-
-int os2PseudoSelect(int nfds, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout)
-{
-static BOOL FirstTime=TRUE;
-static haveTCPIP=TRUE;
-ULONG timeout_ms;
-ULONG postCount, start_millis,now_millis;
-char faildata[16];
-struct select_data sd;
-BOOL any_ready;
-int np,ns, i,ready_handles,n;
-APIRET rc;
-
-sd.have_read=FALSE; sd.have_write=FALSE;
-sd.socket_nread=0; sd.socket_nwrite=0; sd.socket_ntotal=0;
-sd.max_fds=31; ready_handles=0; any_ready=FALSE;
-sd.pipe_ntotal=0; sd.pipe_have_write=FALSE;
-
-if(FirstTime){
- /* First load the so32dll.dll module and get a pointer to the SELECT function */
-
- if((rc=DosLoadModule(faildata,sizeof(faildata),"SO32DLL",&hmod_so32dll))!=0){
- fprintf(stderr, "Could not load module so32dll.dll, rc = %d. Error note %s\n",rc,faildata);
- haveTCPIP=FALSE;
- }
- if((rc = DosQueryProcAddr(hmod_so32dll, 0, "SELECT", (PPFN)&os2_tcp_select))!=0){
- fprintf(stderr, "Could not query address of SELECT, rc = %d.\n",rc);
- haveTCPIP=FALSE;
- }
- /* Call these a first time to set the semaphore */
- /* rc = DosCreateEventSem(NULL, &hPipeSem, DC_SEM_SHARED, FALSE);
- if(rc) {
- fprintf(stderr, "Could not create event semaphore, rc=%d\n",rc);
- return(-1);
- }
- rc = DosResetEventSem(hPipeSem, &postCount); */ /* Done in xtrans code for servers*/
-
-fprintf(stderr, "Client select() done first-time stuff, sem handle %d.\n",hPipeSem);
-
- FirstTime = FALSE;
-}
-
-/* Set up the time delay structs */
-
- if(timeout!=NULL) {
- timeout_ms=timeout->tv_sec*1000+timeout->tv_usec/1000;
- }
- else { timeout_ms=1000000; } /* This should be large enough... */
- if(timeout_ms>0) start_millis=os2_get_sys_millis();
-
-/* Copy the masks */
- {FD_ZERO(&sd.read_copy);}
- {FD_ZERO(&sd.write_copy);}
- if(readfds!=NULL){ XFD_COPYSET(readfds,&sd.read_copy); sd.have_read=TRUE;}
- if(writefds!=NULL) {XFD_COPYSET(writefds,&sd.write_copy);sd.have_write=TRUE;}
-
-/* And zero the original masks */
- if(sd.have_read){ FD_ZERO(readfds);}
- if(sd.have_write) {FD_ZERO(writefds);}
- if(exceptfds != NULL) {FD_ZERO(exceptfds);}
-
-/* Now we parse the fd_sets passed to select and separate pipe/sockets */
- n = os2_parse_select(&sd,nfds);
- if(n == -1) {
- errno = EBADF;
- return (-1);
- }
-
-/* Now we have three cases: either we have sockets, pipes, or both */
-/* We handle all three cases differently to optimize things */
-
-/* Case 1: only pipes! */
- if((sd.pipe_ntotal >0) && (!sd.socket_ntotal)){
- np = os2_check_pipes(&sd,readfds,writefds);
- if(np > 0){
- return (np);
- }
- else if (np == -1) { return(-1); }
- while(!any_ready){
- rc = DosWaitEventSem(hPipeSem, timeout_ms);
- /* if(rc) fprintf(stderr,"Sem-wait timeout, rc = %d\n",rc); */
- if(rc == 640) {
- return(0);
- }
- if((rc != 0) && (rc != 95)) {errno= EBADF; return(-1);}
- np = os2_check_pipes(&sd,readfds,writefds);
- if (np > 0){
- return(np);
- }
- else if (np < 0){ return(-1); }
- }
- }
-
-/* Case 2: only sockets. Just let the os/2 tcp select do the work */
- if((sd.socket_ntotal > 0) && (!sd.pipe_ntotal)){
- ns = os2_check_sockets(&sd, readfds, writefds, timeout_ms);
- return (ns);
- }
-
-/* Case 3: combination of both */
- if((sd.socket_ntotal > 0) && (sd.pipe_ntotal)){
- np = os2_check_pipes(&sd,readfds,writefds);
- if(np > 0){
- any_ready=TRUE;
- ready_handles += np;
- }
- else if (np == -1) { return(-1); }
-
- ns = os2_check_sockets(&sd,readfds,writefds, 0);
- if(ns>0){
- ready_handles+=ns;
- any_ready = TRUE;
- }
- else if (ns == -1) {return(-1);}
-
- while (!any_ready && timeout_ms){
-
- rc = DosWaitEventSem(hPipeSem, 10L);
- if(rc == 0){
- np = os2_check_pipes(&sd,readfds,writefds);
- if(np > 0){
- ready_handles+=np;
- any_ready = TRUE;
- }
- else if (np == -1) {
- return(-1); }
- }
-
- ns = os2_check_sockets(&sd,readfds,writefds,exceptfds, 0);
- if(ns>0){
- ready_handles+=ns;
- any_ready = TRUE;
- }
- else if (ns == -1) {return(-1);}
-
- if (i%8 == 0) {
- now_millis = os2_get_sys_millis();
- if((now_millis-start_millis) > timeout_ms) timeout_ms = 0;
- }
- i++;
- }
- }
-
-return(ready_handles);
-}
-
-
-ULONG os2_get_sys_millis()
-{
- APIRET rc;
- ULONG milli;
-
- rc = DosQuerySysInfo(14, 14, &milli, sizeof(milli));
- if(rc) {
- fprintf(stderr,"Bad return code querying the millisecond counter! rc=%d\n",rc);
- return(0);
- }
- return(milli);
-}
-
-int os2_parse_select(sd,nfds)
-struct select_data *sd;
-int nfds;
-{
- int i;
- APIRET rc;
-/* First we determine up to which descriptor we need to check. */
-/* No need to check up to 256 if we don't have to (and usually we dont...)*/
-/* Note: stuff here is hardcoded for fd_sets which are int[8] as in EMX! */
-
- if(nfds > sd->max_fds){
- for(i=0;i<((FD_SETSIZE+31)/32);i++){
- if(sd->read_copy.fds_bits[i] ||
- sd->write_copy.fds_bits[i])
- sd->max_fds=(i*32) +32;
- }
- }
- else { sd->max_fds = nfds; }
-/* Check if result is greater than specified in select() call */
- if(sd->max_fds > nfds) sd->max_fds = nfds;
-
- if (sd->have_read)
- {
- for (i = 0; i < sd->max_fds; ++i) {
- if (FD_ISSET (i, &sd->read_copy)){
- if(_files[i] & F_SOCKET)
- {
- sd->tcp_select_mask[sd->socket_ntotal]=_getsockhandle(i);
- sd->tcp_emx_handles[sd->socket_ntotal]=i;
- sd->socket_ntotal++; sd->socket_nread++;
- }
- else if (_files[i] & F_PIPE)
- {
- sd -> pipe_ntotal++;
- /* rc = DosSetNPipeSem((HPIPE)i, (HSEM) hPipeSem, i);
- if(rc) { fprintf(stderr,"Error SETNPIPE rc = %d\n",rc); return -1;} */
- }
- }
- }
- }
-
- if (sd->have_write)
- {
- for (i = 0; i < sd->max_fds; ++i) {
- if (FD_ISSET (i, &sd->write_copy)){
- if(_files[i] & F_SOCKET)
- {
- sd->tcp_select_mask[sd->socket_ntotal]=_getsockhandle(i);
- sd->tcp_emx_handles[sd->socket_ntotal]=i;
- sd->socket_ntotal++; sd->socket_nwrite++;
- }
- else if (_files[i] & F_PIPE)
- {
- sd -> pipe_ntotal++;
- /* rc = DosSetNPipeSem((HPIPE)i, (HSEM) hPipeSem, i);
- if(rc) { fprintf(stderr,"Error SETNPIPE rc = %d\n",rc); return -1;} */
- sd -> pipe_have_write=TRUE;
- }
- }
- }
- }
-
-
-return(sd->socket_ntotal);
-}
-
-
-int os2_check_sockets(sd,readfds,writefds)
-struct select_data *sd;
-fd_set *readfds,*writefds;
-{
- int e,i;
- int j,n;
- memcpy(sd->tcp_select_copy,sd->tcp_select_mask,
- sd->socket_ntotal*sizeof(int));
-
- e = os2_tcp_select(sd->tcp_select_copy,sd->socket_nread,
- sd->socket_nwrite, 0, 0);
-
- if(e == 0) return(e);
-/* We have something ready? */
- if(e>0){
- j = 0; n = 0;
- for (i = 0; i < sd->socket_nread; ++i, ++j)
- if (sd->tcp_select_copy[j] != -1)
- {
- FD_SET (sd->tcp_emx_handles[j], readfds);
- n ++;
- }
- for (i = 0; i < sd->socket_nwrite; ++i, ++j)
- if (sd->tcp_select_copy[j] != -1)
- {
- FD_SET (sd->tcp_emx_handles[j], writefds);
- n ++;
- }
- errno = 0;
-
- return n;
- }
- if(e<0){
- /*Error -- TODO. EBADF is a good choice for now. */
- fprintf(stderr,"Error in server select! e=%d\n",e);
- errno = EBADF;
- return (-1);
- }
- }
-
-/* Check to see if anything is ready on pipes */
-
-int os2_check_pipes(sd,readfds,writefds)
-struct select_data *sd;
-fd_set *readfds,*writefds;
-{
-int i,e;
-ULONG ulPostCount;
-PIPESEMSTATE pipeSemState[128];
-APIRET rc;
- e = 0;
- rc = DosResetEventSem(hPipeSem,&ulPostCount);
- rc = DosQueryNPipeSemState((HSEM) hPipeSem, (PPIPESEMSTATE)&pipeSemState,
- sizeof(pipeSemState));
- if(rc) fprintf(stderr,"SELECT: rc from QueryNPipeSem: %d\n",rc);
- i=0;
- while (pipeSemState[i].fStatus != 0) {
- /*fprintf(stderr,"SELECT: sem entry, stat=%d, flag=%d, key=%d,avail=%d\n",
- pipeSemState[i].fStatus,pipeSemState[i].fFlag,pipeSemState[i].usKey,
- pipeSemState[i].usAvail); */
- if((pipeSemState[i].fStatus == 1) &&
- (FD_ISSET(pipeSemState[i].usKey,&sd->read_copy))){
- FD_SET(pipeSemState[i].usKey,readfds);
- e++;
- }
- else if((pipeSemState[i].fStatus == 2) &&
- (FD_ISSET(pipeSemState[i].usKey,&sd->write_copy))){
- FD_SET(pipeSemState[i].usKey,writefds);
- e++;
- }
- else if( (pipeSemState[i].fStatus == 3) &&
- ( (FD_ISSET(pipeSemState[i].usKey,&sd->read_copy)) ||
- (FD_ISSET(pipeSemState[i].usKey,&sd->write_copy)) )){
- errno = EBADF;
- /* fprintf(stderr,"Pipe has closed down, fd=%d\n",pipeSemState[i].usKey); */
- return (-1);
- }
- i++;
- } /* endwhile */
- /*fprintf(stderr,"Done listing pipe sem entries, total %d entries, total ready entries %d\n" i,e);*/
-errno = 0;
-return(e);
-}
-
diff --git a/nx-X11/programs/Xserver/include/os.h b/nx-X11/programs/Xserver/include/os.h
index 268513bfd..881abfccb 100644
--- a/nx-X11/programs/Xserver/include/os.h
+++ b/nx-X11/programs/Xserver/include/os.h
@@ -263,7 +263,7 @@ void OsBlockSignals (void);
void OsReleaseSignals (void);
-#if !defined(WIN32) && !defined(__UNIXOS2__)
+#if !defined(WIN32)
extern int System(char *);
extern void * Popen(char *, char *);
extern int Pclose(void *);
diff --git a/nx-X11/programs/Xserver/include/servermd.h b/nx-X11/programs/Xserver/include/servermd.h
index 27b5a8fb9..04cd97bb8 100644
--- a/nx-X11/programs/Xserver/include/servermd.h
+++ b/nx-X11/programs/Xserver/include/servermd.h
@@ -114,25 +114,12 @@ SOFTWARE.
#endif /* __aarch64__ */
-#if defined (hpux) || defined __hppa__
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4 /* to make fb work */
-
-#endif /* hpux || __hppa__ */
-
#if defined(__powerpc__) || defined(__ppc__)
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
#define GLYPHPADBYTES 4
-/* XXX Should this be for Lynx only? */
-#ifdef Lynx
-#define BITMAP_SCANLINE_UNIT 8
-#endif
-
#endif /* PowerPC */
#if defined(__sh__)
@@ -172,15 +159,6 @@ SOFTWARE.
#endif /* sun && !(i386 && SVR4) */
-
-#if defined(AIXV3)
-
-#define IMAGE_BYTE_ORDER MSBFirst /* Values for the RISC/6000 */
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-
-#endif /* AIXV3 */
-
#if defined(ibm032) || defined (ibm)
#ifdef i386
@@ -214,7 +192,7 @@ SOFTWARE.
#endif /* macII */
-#if (defined(mips) || defined(__mips)) && !defined(sgi)
+#if (defined(mips) || defined(__mips))
#if defined(MIPSEL) || defined(__MIPSEL__)
# define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
@@ -327,9 +305,6 @@ SOFTWARE.
#if (defined(SVR4) && defined(i386)) || \
defined(__alpha__) || defined(__alpha) || \
defined(__i386__) || defined(__i386) || \
- defined(__UNIXOS2__) || \
- defined(__OS2ELF__) || \
- defined(__QNX__) || \
defined(__s390x__) || defined(__s390__)
#ifndef IMAGE_BYTE_ORDER
@@ -369,14 +344,6 @@ SOFTWARE.
#endif /* linux/m68k */
-#ifdef sgi
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#define GLYPHPADBYTES 4
-
-#endif
-
/* linux on the Compaq Itsy */
#if defined(linux) && defined(__arm__)
#define IMAGE_BYTE_ORDER LSBFirst
diff --git a/nx-X11/programs/Xserver/mi/miarc.c b/nx-X11/programs/Xserver/mi/miarc.c
index c812673eb..ee493bc2c 100644
--- a/nx-X11/programs/Xserver/mi/miarc.c
+++ b/nx-X11/programs/Xserver/mi/miarc.c
@@ -51,7 +51,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#if defined(_XOPEN_SOURCE) || defined(__QNXNTO__) \
+#if defined(_XOPEN_SOURCE) \
|| (defined(sun) && defined(__SVR4))
#include <math.h>
#else
diff --git a/nx-X11/programs/Xserver/mi/micoord.h b/nx-X11/programs/Xserver/mi/micoord.h
index b3d725b73..3e45cfede 100644
--- a/nx-X11/programs/Xserver/mi/micoord.h
+++ b/nx-X11/programs/Xserver/mi/micoord.h
@@ -43,7 +43,7 @@
* forcing as to use div instead of shift. Let's be explicit.
*/
-#if defined(mips) || defined(sgi) || \
+#if defined(mips) || \
defined(sparc) || defined(__sparc64__) || \
defined(__alpha) || defined(__alpha__) || \
defined(__i386__) || defined(i386) || \
diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c
index fc64937d7..6f6d67841 100644
--- a/nx-X11/programs/Xserver/mi/miinitext.c
+++ b/nx-X11/programs/Xserver/mi/miinitext.c
@@ -66,10 +66,6 @@ SOFTWARE.
#include "extension.h"
#include "micmap.h"
-#if defined(QNX4) /* sleaze for Watcom on QNX4 ... */
-#undef GLXEXT
-#endif
-
extern Bool noTestExtensions;
#ifdef BIGREQS
diff --git a/nx-X11/programs/Xserver/os/WaitFor.c b/nx-X11/programs/Xserver/os/WaitFor.c
index 2858637fa..899b1de0b 100644
--- a/nx-X11/programs/Xserver/os/WaitFor.c
+++ b/nx-X11/programs/Xserver/os/WaitFor.c
@@ -91,9 +91,6 @@ SOFTWARE.
#include <nx-X11/X.h>
#include "misc.h"
-#ifdef __UNIXOS2__
-#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t)
-#endif
#include "osdep.h"
#include <nx-X11/Xpoll.h>
#include "dixstruct.h"
diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c
index 5735fd556..d3a18efbe 100644
--- a/nx-X11/programs/Xserver/os/access.c
+++ b/nx-X11/programs/Xserver/os/access.c
@@ -76,11 +76,7 @@ SOFTWARE.
#include <errno.h>
#include <sys/types.h>
#ifndef WIN32
-#ifndef Lynx
#include <sys/socket.h>
-#else
-#include <socket.h>
-#endif
#include <sys/ioctl.h>
#include <ctype.h>
@@ -95,26 +91,6 @@ SOFTWARE.
# endif
#endif
-#if defined(DGUX)
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <ctype.h>
-#include <sys/utsname.h>
-#include <sys/stream.h>
-#include <sys/stropts.h>
-#include <sys/param.h>
-#include <sys/sockio.h>
-#endif
-
-
-#if defined(hpux) || defined(QNX4)
-# include <sys/utsname.h>
-# ifdef HAS_IFREQ
-# include <net/if.h>
-# endif
-#else
#if defined(SVR4) || (defined(SYSV) && defined(i386)) || defined(__GNU__)
# include <sys/utsname.h>
#endif
@@ -131,7 +107,6 @@ SOFTWARE.
#else /*!__GNU__*/
# include <net/if.h>
#endif /*__GNU__ */
-#endif /* hpux */
#ifdef SVR4
#include <sys/sockio.h>
@@ -173,11 +148,7 @@ SOFTWARE.
#endif /* WIN32 */
#ifndef PATH_MAX
-#ifndef Lynx
#include <sys/param.h>
-#else
-#include <param.h>
-#endif
#ifndef PATH_MAX
#ifdef MAXPATHLEN
#define PATH_MAX MAXPATHLEN
@@ -315,7 +286,7 @@ AccessUsingXdmcp (void)
}
-#if ((defined(SVR4) && !defined(DGUX) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && !defined(__sgi) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
+#if ((defined(SVR4) && !defined(SCO325) && !defined(sun) && !defined(NCR)) || defined(ISC)) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF)
/* Deal with different SIOCGIFCONF ioctl semantics on these OSs */
@@ -364,9 +335,9 @@ ifioctl (int fd, int cmd, char *arg)
#endif
return(ret);
}
-#else /* Case DGUX, sun, SCO325 NCR and others */
+#else /* Case sun, SCO325 NCR and others */
#define ifioctl ioctl
-#endif /* ((SVR4 && !DGUX !sun !SCO325 !NCR) || ISC) && SIOCGIFCONF */
+#endif /* ((SVR4 && !sun !SCO325 !NCR) || ISC) && SIOCGIFCONF */
/*
* DefineSelf (fd):
@@ -521,7 +492,7 @@ DefineSelf (int fd)
#else /* WINTCP */
-#if !defined(SIOCGIFCONF) || (defined (hpux) && ! defined (HAS_IFREQ)) || defined(QNX4)
+#if !defined(SIOCGIFCONF)
void
DefineSelf (int fd)
{
@@ -564,19 +535,11 @@ DefineSelf (int fd)
* uname() lets me access to the whole string (it smashes release, you
* see), whereas gethostname() kindly truncates it for me.
*/
-#ifndef QNX4
#ifndef WIN32
uname(&name);
#else
gethostname(name.nodename, sizeof(name.nodename));
#endif
-#else
- /* QNX4's uname returns node number in name.nodename, not the hostname
- have to overwrite it */
- char hname[1024];
- gethostname(hname, 1024);
- name.nodename = hname;
-#endif
hp = _XGethostbyname(name.nodename, hparams);
if (hp != NULL)
@@ -685,14 +648,9 @@ DefineLocalHost:
p->ifr_addr.sa_len - sizeof (p->ifr_addr) : 0))
#define ifraddr_size(a) (a.sa_len)
#else
-#ifdef QNX4
-#define ifr_size(p) (p->ifr_addr.sa_len + IFNAMSIZ)
-#define ifraddr_size(a) (a.sa_len)
-#else
#define ifr_size(p) (sizeof (ifr_type))
#define ifraddr_size(a) (sizeof (a))
#endif
-#endif
#if defined(DEF_SELF_DEBUG) || (defined(IPv6) && defined(AF_INET6))
#include <arpa/inet.h>
@@ -1055,7 +1013,7 @@ DefineSelf (int fd)
}
}
}
-#endif /* hpux && !HAS_IFREQ */
+#endif /* !SIOCGIFCONF */
#endif /* WINTCP */
#ifdef XDMCP
@@ -1139,9 +1097,6 @@ ResetHosts (char *display)
if (fnamelen > sizeof(fname))
FatalError("Display name `%s' is too long\n", display);
sprintf(fname, ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX, display);
-#ifdef __UNIXOS2__
- strcpy(fname, (char*)__XOS2RedirRoot(fname));
-#endif /* __UNIXOS2__ */
if ((fd = fopen (fname, "r")) != 0)
{
@@ -1152,10 +1107,6 @@ ResetHosts (char *display)
continue;
if ((ptr = strchr(ohostname, '\n')) != 0)
*ptr = 0;
-#ifdef __UNIXOS2__
- if ((ptr = strchr(ohostname, '\r')) != 0)
- *ptr = 0;
-#endif
hostlen = strlen(ohostname) + 1;
for (i = 0; i < hostlen; i++)
lhostname[i] = tolower(ohostname[i]);
diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c
index 9681ced38..458daab54 100644
--- a/nx-X11/programs/Xserver/os/connection.c
+++ b/nx-X11/programs/Xserver/os/connection.c
@@ -80,42 +80,14 @@ SOFTWARE.
#include <stdlib.h>
#ifndef WIN32
-#if defined(Lynx)
-#include <socket.h>
-#else
-#include <sys/socket.h>
-#endif
-
-#ifdef hpux
-#include <sys/utsname.h>
-#include <sys/ioctl.h>
-#endif
-
-#if defined(DGUX)
-#include <sys/ioctl.h>
-#include <sys/utsname.h>
#include <sys/socket.h>
-#include <sys/uio.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <sys/param.h>
-#include <unistd.h>
-#endif
-
-
-#ifdef AIXV3
-#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)
# include <netinet/in.h>
# include <arpa/inet.h>
-# if !defined(hpux)
+
+/* FIXME: correct indentation levels after ancient platform support clean-up */
+
# ifdef apollo
# ifndef NO_TCP_H
# include <netinet/tcp.h>
@@ -124,21 +96,12 @@ 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"
#include "osdep.h"
@@ -173,9 +136,6 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
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;
@@ -314,8 +274,6 @@ InitConnectionLimits(void)
#ifndef __CYGWIN__
-#ifndef __UNIXOS2__
-
#if !defined(XNO_SYSCONF) && defined(_SC_OPEN_MAX)
lastfdesc = sysconf(_SC_OPEN_MAX) - 1;
#endif
@@ -330,10 +288,6 @@ InitConnectionLimits(void)
lastfdesc = _NFILE - 1;
#endif
-#else /* __UNIXOS2__ */
- lastfdesc = _nfiles - 1;
-#endif
-
#endif /* __CYGWIN__ */
/* This is the fallback */
@@ -449,15 +403,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);
diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c
index d184a981c..3771d40fb 100644
--- a/nx-X11/programs/Xserver/os/io.c
+++ b/nx-X11/programs/Xserver/os/io.c
@@ -70,12 +70,8 @@ SOFTWARE.
#include <nx-X11/Xtrans/Xtrans.h>
#include <nx-X11/Xmd.h>
#include <errno.h>
-#if !defined(__UNIXOS2__) && !defined(WIN32)
-#ifndef Lynx
+#if !defined(WIN32)
#include <sys/uio.h>
-#else
-#include <uio.h>
-#endif
#endif
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
@@ -92,7 +88,6 @@ CallbackListPtr FlushCallback;
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
*/
-#ifndef __UNIXOS2__
#ifndef WIN32
#if defined(EAGAIN) && defined(EWOULDBLOCK)
#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK)
@@ -106,9 +101,6 @@ CallbackListPtr FlushCallback;
#else /* WIN32 The socket errorcodes differ from the normal errors*/
#define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK)
#endif
-#else /* __UNIXOS2__ Writing to full pipes may return ENOSPC */
-#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK || err == ENOSPC)
-#endif
Bool CriticalOutputPending;
int timesThisConnection = 0;
diff --git a/nx-X11/programs/Xserver/os/log.c b/nx-X11/programs/Xserver/os/log.c
index e964896d7..d82f545a0 100644
--- a/nx-X11/programs/Xserver/os/log.c
+++ b/nx-X11/programs/Xserver/os/log.c
@@ -214,9 +214,6 @@ LogInit(const char *fname, const char *backup)
sprintf(suffix, backup, display);
sprintf(oldLog, "%s%s", logFileName, suffix);
free(suffix);
-#ifdef __UNIXOS2__
- remove(oldLog);
-#endif
if (rename(logFileName, oldLog) == -1) {
FatalError("Cannot move old log file (\"%s\" to \"%s\"\n",
logFileName, oldLog);
diff --git a/nx-X11/programs/Xserver/os/oscolor.c b/nx-X11/programs/Xserver/os/oscolor.c
index 32f8a4b23..88b243d65 100644
--- a/nx-X11/programs/Xserver/os/oscolor.c
+++ b/nx-X11/programs/Xserver/os/oscolor.c
@@ -397,7 +397,6 @@ OsInitColors(void)
if (!was_here)
{
-#ifndef __UNIXOS2__
#ifdef NX_TRANS_SOCKET
/*
* Add the trailing '.txt' if a
@@ -418,12 +417,6 @@ OsInitColors(void)
strcpy(path, rgbPath);
strcat(path, ".txt");
#endif
-#else
- char *tmp = (char*)__XOS2RedirRoot(rgbPath);
- path = (char*)ALLOCATE_LOCAL(strlen(tmp) +5);
- strcpy(path, tmp);
- strcat(path, ".txt");
-#endif
if (!(rgb = fopen(path, "r")))
{
#ifdef NX_TRANS_SOCKET
@@ -438,11 +431,7 @@ OsInitColors(void)
while(fgets(line, sizeof(line), rgb))
{
lineno++;
-#ifndef __UNIXOS2__
if (sscanf(line,"%d %d %d %[^\n]\n", &red, &green, &blue, name) == 4)
-#else
- if (sscanf(line,"%d %d %d %[^\n\r]\n", &red, &green, &blue, name) == 4)
-#endif
{
if (red >= 0 && red <= 0xff &&
green >= 0 && green <= 0xff &&
diff --git a/nx-X11/programs/Xserver/os/osdep.h b/nx-X11/programs/Xserver/os/osdep.h
index 9ad267a36..f0e8b707b 100644
--- a/nx-X11/programs/Xserver/os/osdep.h
+++ b/nx-X11/programs/Xserver/os/osdep.h
@@ -61,7 +61,6 @@ SOFTWARE.
#include <X11/Xdmcp.h>
-#ifndef sgi /* SGI defines OPEN_MAX in a useless way */
#ifndef X_NOT_POSIX
#ifdef _POSIX_SOURCE
#include <limits.h>
@@ -77,11 +76,7 @@ SOFTWARE.
#undef _POSIX_
#endif
#endif /* X_NOT_POSIX */
-#endif
-#ifdef __QNX__
-#define NOFILES_MAX 256
-#endif
#ifndef OPEN_MAX
#ifdef SVR4
#define OPEN_MAX 256
@@ -91,7 +86,7 @@ SOFTWARE.
#if defined(NOFILE) && !defined(NOFILES_MAX)
#define OPEN_MAX NOFILE
#else
-#if !defined(__UNIXOS2__) && !defined(WIN32)
+#if !defined(WIN32)
#define OPEN_MAX NOFILES_MAX
#else
#define OPEN_MAX 256
@@ -117,7 +112,7 @@ SOFTWARE.
/* MAXSELECT is the number of fds that select() can handle */
#define MAXSELECT (sizeof(fd_set) * NBBY)
-#if !defined(hpux) && !defined(SVR4) && !defined(SYSV)
+#if !defined(SVR4) && !defined(SYSV)
#define HAS_GETDTABLESIZE
#endif
diff --git a/nx-X11/programs/Xserver/os/osinit.c b/nx-X11/programs/Xserver/os/osinit.c
index 5f097f89a..7aa961a56 100644
--- a/nx-X11/programs/Xserver/os/osinit.c
+++ b/nx-X11/programs/Xserver/os/osinit.c
@@ -67,11 +67,11 @@ SOFTWARE.
#endif
#endif
-#if defined(Lynx) || defined(__SCO__)
+#if defined(__SCO__)
#include <sys/wait.h>
#endif
-#if !defined(SYSV) && !defined(WIN32) && !defined(Lynx) && !defined(QNX4)
+#if !defined(SYSV) && !defined(WIN32)
#include <sys/resource.h>
#endif
@@ -133,7 +133,7 @@ OsInit(void)
dup2 (fileno (err), 2);
fclose (err);
}
-#if defined(SYSV) || defined(SVR4) || defined(__UNIXOS2__) || defined(WIN32) || defined(__CYGWIN__)
+#if defined(SYSV) || defined(SVR4) || defined(WIN32) || defined(__CYGWIN__)
{
static char buf[BUFSIZ];
setvbuf (stderr, buf, _IOLBF, BUFSIZ);
diff --git a/nx-X11/programs/Xserver/os/rpcauth.c b/nx-X11/programs/Xserver/os/rpcauth.c
index 2a6874f4a..678bedf6c 100644
--- a/nx-X11/programs/Xserver/os/rpcauth.c
+++ b/nx-X11/programs/Xserver/os/rpcauth.c
@@ -51,11 +51,6 @@ from The Open Group.
extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
#endif
-#if defined(DGUX)
-#include <time.h>
-#include <rpc/auth_des.h>
-#endif /* DGUX */
-
#ifdef ultrix
#include <time.h>
#include <rpc/auth_des.h>
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index 9584dadd3..5f7542a2d 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -113,7 +113,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#ifndef WIN32
#include <sys/wait.h>
#endif
-#if !defined(SYSV) && !defined(WIN32) && !defined(Lynx) && !defined(QNX4)
+#if !defined(SYSV) && !defined(WIN32)
#include <sys/resource.h>
#endif
#include <time.h>
@@ -124,11 +124,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <grp.h>
#include <pwd.h>
-#if defined(DGUX)
-#include <sys/resource.h>
-#include <netdb.h>
-#endif
-
#include <stdlib.h> /* for malloc() */
#if defined(TCPCONN)
@@ -264,11 +259,6 @@ int auditTrailLevel = 1;
Bool Must_have_memory = FALSE;
-#ifdef AIXV3
-int SyncOn = 0;
-extern int SelectWaitTime;
-#endif
-
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
#endif
@@ -279,10 +269,6 @@ long Memory_fail = 0;
#include <stdlib.h> /* for random() */
#endif
-#ifdef sgi
-int userdefinedfontpath = 0;
-#endif /* sgi */
-
char *dev_tty_from_init = NULL; /* since we need to parse it anyway */
extern char dispatchExceptionAtReset;
@@ -318,28 +304,13 @@ OsSignal(sig, handler)
* server at a time. This keeps the servers from stomping on each other
* if the user forgets to give them different display numbers.
*/
-#ifndef __UNIXOS2__
#define LOCK_DIR "/tmp"
-#endif
#define LOCK_TMP_PREFIX "/.tX"
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
-#if defined(DGUX)
-#include <limits.h>
-#include <sys/param.h>
-#endif
-
-#ifdef __UNIXOS2__
-#define link rename
-#endif
-
#ifndef PATH_MAX
-#ifndef Lynx
#include <sys/param.h>
-#else
-#include <param.h>
-#endif
#ifndef PATH_MAX
#ifdef MAXPATHLEN
#define PATH_MAX MAXPATHLEN
@@ -372,14 +343,7 @@ LockServer(void)
/*
* Path names
*/
-#ifndef __UNIXOS2__
tmppath = LOCK_DIR;
-#else
- /* OS/2 uses TMP directory, must also prepare for 8.3 names */
- tmppath = getenv("TMP");
- if (!tmppath)
- FatalError("No TMP dir found\n");
-#endif
sprintf(port, "%d", atoi(display));
len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) :
@@ -422,13 +386,11 @@ LockServer(void)
if (write(lfd, pid_str, 11) != 11)
FatalError("Could not write pid to lock file in %s\n", tmp);
-#ifndef __UNIXOS2__
#ifndef USE_CHMOD
(void) fchmod(lfd, 0444);
#else
(void) chmod(tmp, 0444);
#endif
-#endif
(void) close(lfd);
/*
@@ -507,9 +469,6 @@ UnlockServer(void)
if (!StillLocking){
-#ifdef __UNIXOS2__
- (void) chmod(LockFile,S_IREAD|S_IWRITE);
-#endif /* __UNIXOS2__ */
(void) unlink(LockFile);
}
}
@@ -593,7 +552,6 @@ AdjustWaitForDelay (void * waitTime, unsigned long newdelay)
void UseMsg(void)
{
-#if !defined(AIXrt) && !defined(AIX386)
ErrorF("use: X [:<display>] [option]\n");
ErrorF("-a # mouse acceleration (pixels)\n");
ErrorF("-ac disable access control restrictions\n");
@@ -686,7 +644,6 @@ void UseMsg(void)
#ifdef XDMCP
XdmcpUseMsg();
#endif
-#endif /* !AIXrt && ! AIX386 */
#ifdef XKB
XkbUseMsg();
#endif
@@ -870,9 +827,6 @@ ProcessCommandLine(int argc, char *argv[])
{
if(++i < argc)
{
-#ifdef sgi
- userdefinedfontpath = 1;
-#endif /* sgi */
defaultFontPath = argv[i];
}
else
@@ -928,7 +882,7 @@ ProcessCommandLine(int argc, char *argv[])
#ifdef SERVER_LOCK
else if ( strcmp ( argv[i], "-nolock") == 0)
{
-#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__)
+#if !defined(WIN32) && !defined(__CYGWIN__)
if (getuid() != 0)
ErrorF("Warning: the -nolock option can only be used by root\n");
else
@@ -1084,19 +1038,6 @@ ProcessCommandLine(int argc, char *argv[])
i = skip - 1;
}
#endif
-#ifdef AIXV3
- else if ( strcmp( argv[i], "-timeout") == 0)
- {
- if(++i < argc)
- SelectWaitTime = atoi(argv[i]);
- else
- UseMsg();
- }
- else if ( strcmp( argv[i], "-sync") == 0)
- {
- SyncOn++;
- }
-#endif
#ifdef SMART_SCHEDULE
else if ( strcmp( argv[i], "-dumbSched") == 0)
{
@@ -1260,7 +1201,7 @@ ExpandCommandLine(int *pargc, char ***pargv)
{
int i;
-#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__)
+#if !defined(WIN32) && !defined(__CYGWIN__)
if (getuid() != geteuid())
return;
#endif
@@ -1609,7 +1550,7 @@ OsReleaseSignals (void)
#endif
}
-#if !defined(WIN32) && !defined(__UNIXOS2__)
+#if !defined(WIN32)
/*
* "safer" versions of system(3), popen(3) and pclose(3) which give up
* all privs before running a command.
@@ -1964,7 +1905,7 @@ Fclose(void * iop)
#endif
}
-#endif /* !WIN32 && !__UNIXOS2__ */
+#endif /* !WIN32 */
/*
@@ -2059,9 +2000,6 @@ CheckUserParameters(int argc, char **argv, char **envp)
enum BadCode bad = NotBad;
int i = 0, j;
char *a, *e = NULL;
-#if defined(__QNX__) && !defined(__QNXNTO__)
- char cmd_name[64];
-#endif
#if CHECK_EUID
if (geteuid() == 0 && getuid() != geteuid())
diff --git a/nx-X11/programs/Xserver/os/xdmcp.c b/nx-X11/programs/Xserver/os/xdmcp.c
index 5daf1cbbf..83e234b43 100644
--- a/nx-X11/programs/Xserver/os/xdmcp.c
+++ b/nx-X11/programs/Xserver/os/xdmcp.c
@@ -28,12 +28,8 @@
#include <nx-X11/Xos.h>
#if !defined(WIN32)
-#ifndef Lynx
#include <sys/param.h>
#include <sys/socket.h>
-#else
-#include <socket.h>
-#endif
#include <netinet/in.h>
#include <netdb.h>
#endif
@@ -49,11 +45,6 @@
#include "dixstruct.h"
#include "opaque.h"
-#if defined(DGUX)
-#include <net/net_ioctl.h>
-#include <sys/ioctl.h>
-#endif
-
#ifndef NX_TRANS_SOCKET
diff --git a/nx-X11/programs/Xserver/render/picture.h b/nx-X11/programs/Xserver/render/picture.h
index b09d9aac2..6f3f2d832 100644
--- a/nx-X11/programs/Xserver/render/picture.h
+++ b/nx-X11/programs/Xserver/render/picture.h
@@ -173,8 +173,7 @@ typedef __int64 xFixed_32_32;
defined(ia64) || defined(__ia64__) || \
defined(__sparc64__) || \
defined(__s390x__) || \
- defined(amd64) || defined (__amd64__) || \
- (defined(sgi) && (_MIPS_SZLONG == 64))
+ defined(amd64) || defined (__amd64__)
typedef long xFixed_32_32;
# else
# if defined(__GNUC__) && \
diff --git a/nx-X11/programs/Xserver/xkb/Imakefile b/nx-X11/programs/Xserver/xkb/Imakefile
index 07d715301..89e042212 100644
--- a/nx-X11/programs/Xserver/xkb/Imakefile
+++ b/nx-X11/programs/Xserver/xkb/Imakefile
@@ -1,10 +1,6 @@
#define SGIHyperOpt
#include <Server.tmpl>
-#ifdef SGIArchitecture
-EXTRA_ALLOC_DEFINES = -DFORCE_ALLOCA
-#endif
-
#if BuildXInputExt
XKBXI_SRCS = xkbPrOtherEv.c
XKBXI_OBJS = xkbPrOtherEv.o
@@ -48,7 +44,7 @@ XF86INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC)
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
-DEFINES = $(EXTRA_ALLOC_DEFINES) $(XKB_DDXDEFS) $(NX_DEFINES)
+DEFINES = $(XKB_DDXDEFS) $(NX_DEFINES)
XKB_DEFINES = -DXKB_BASE_DIRECTORY=\"$(LIBDIR)/xkb\" $(XKB_DISABLE)
NormalLibraryObjectRule()
diff --git a/nx-X11/programs/Xserver/xkb/ddxBeep.c b/nx-X11/programs/Xserver/xkb/ddxBeep.c
index e4427ba26..fa4af7456 100644
--- a/nx-X11/programs/Xserver/xkb/ddxBeep.c
+++ b/nx-X11/programs/Xserver/xkb/ddxBeep.c
@@ -38,12 +38,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkbsrv.h>
#include <nx-X11/extensions/XI.h>
-#if (defined(__osf__) && defined(__alpha))
-#include <sys/sysinfo.h>
-#include <alpha/hal_sysinfo.h>
-#include <alpha/prom.h>
-#endif
-
/*#define FALLING_TONE 1*/
/*#define RISING_TONE 1*/
#define FALLING_TONE 10
@@ -115,32 +109,9 @@ _XkbDDXBeepInitAtoms(void)
stickyLock= MAKE_ATOM(STICKY_LOCK);
stickyUnlock= MAKE_ATOM(STICKY_UNLOCK);
bounceReject= MAKE_ATOM(BOUNCE_REJECT);
-#if (defined(__osf__) && defined(__alpha))
- /* [[[ WDW - Some bells do not allow for pitch changes.
- * Maybe this could become part of the keymap? ]]]
- */
- {
- char keyboard[8];
-
- /* Find the class of keyboard being used.
- */
- keyboard[0] = '\0';
- if (-1 == getsysinfo(GSI_KEYBOARD,
- keyboard, sizeof(keyboard),
- 0, NULL))
- keyboard[0] = '\0';
-
- if ((strcmp(keyboard,"LK201") == 0) ||
- (strcmp(keyboard,"LK401") == 0) ||
- (strcmp(keyboard,"LK421") == 0) ||
- (strcmp(keyboard,"LK443") == 0))
- doesPitch = 0;
- }
-#else
#if defined(sun)
doesPitch = 0;
#endif
-#endif
return;
}
diff --git a/nx-X11/programs/Xserver/xkb/ddxConfig.c b/nx-X11/programs/Xserver/xkb/ddxConfig.c
index 1ecabd108..2fd5e7610 100644
--- a/nx-X11/programs/Xserver/xkb/ddxConfig.c
+++ b/nx-X11/programs/Xserver/xkb/ddxConfig.c
@@ -128,9 +128,6 @@ XkbConfigRtrnPtr rtrn;
sprintf(buf,"X%s-config%s%s",display,(dName[0]?".":""),dName);
}
#endif
-#ifdef __UNIXOS2__
- strcpy(buf,(char*)__XOS2RedirRoot(buf));
-#endif
#ifdef DEBUG
ErrorF("Looking for keyboard configuration in %s...",buf);
#endif
diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c
index 53bae44df..4934d266c 100644
--- a/nx-X11/programs/Xserver/xkb/ddxLoad.c
+++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c
@@ -53,7 +53,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/extensions/XI.h>
#include "xkb.h"
-#if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(AIXV3) || defined(__osf__) || defined(__GNU__)
+#if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
#include <paths.h>
#endif
@@ -82,7 +82,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
#define POST_ERROR_MSG2 "\"End of messages from xkbcomp\""
-#if defined(__UNIXOS2__) || defined(WIN32)
+#if defined(WIN32)
#define PATHSEPARATOR "\\"
#else
#define PATHSEPARATOR "/"
@@ -558,8 +558,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
#endif
-#ifndef __UNIXOS2__
-
#ifdef NXAGENT_SERVER
char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory);
char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory);
@@ -568,23 +566,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
char *xkbbindir = XkbBinDirectory;
#endif
-#else
- /* relocate the basedir and replace the slashes with backslashes */
-#ifdef NXAGENT_SERVER
- char *xkbbasedir = (char*)__XOS2RedirRoot(_NXGetXkbBasePath(XkbBaseDirectory));
- char *xkbbindir = (char*)__XOS2RedirRoot(_NXGetXkbCompPath(XkbBinDirectory));
-#else
- char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory);
- char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory);
-#endif
- int i;
-
- for (i=0; i<strlen(xkbbasedir); i++)
- if (xkbbasedir[i]=='/') xkbbasedir[i]='\\';
- for (i=0; i<strlen(xkbbindir); i++)
- if (xkbbindir[i]=='/') xkbbindir[i]='\\';
-#endif
-
cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"",
xkbbindir,
((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)),
@@ -675,7 +656,6 @@ char tmpname[PATH_MAX];
for xkbcomp. xkbcomp does not read from stdin. */
char *xkmfile = tmpname;
#endif
-#ifndef __UNIXOS2__
#ifdef NXAGENT_SERVER
char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory);
char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory);
@@ -683,20 +663,6 @@ char tmpname[PATH_MAX];
char *xkbbasedir = XkbBaseDirectory;
char *xkbbindir = XkbBinDirectory;
#endif
-#else
- int i;
-#ifdef NXAGENT_SERVER
- char *xkbbasedir = (char*)__XOS2RedirRoot(_NXGetXkbBasePath(XkbBaseDirectory));
- char *xkbbindir = (char*)__XOS2RedirRoot(_NXGetXkbCompPath(XkbBinDirectory));
-#else
- char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory);
- char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory);
-#endif
- for (i=0; i<strlen(xkbbasedir); i++)
- if (xkbbasedir[i]=='/') xkbbasedir[i]='\\';
- for (i=0; i<strlen(xkbbindir); i++)
- if (xkbbindir[i]=='/') xkbbindir[i]='\\';
-#endif
buf = Xprintf(
"\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"",
diff --git a/nx-X11/programs/Xserver/xkb/xkbAccessX.c b/nx-X11/programs/Xserver/xkb/xkbAccessX.c
index 307673db7..4069ac209 100644
--- a/nx-X11/programs/Xserver/xkb/xkbAccessX.c
+++ b/nx-X11/programs/Xserver/xkb/xkbAccessX.c
@@ -30,15 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <stdio.h>
#include <math.h>
-#ifdef __QNX__
-#include <limits.h>
-#endif
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
#include <nx-X11/keysym.h>
#include "inputstr.h"
#include <xkbsrv.h>
-#if !defined(WIN32) && !defined(Lynx)
+#if !defined(WIN32)
#include <sys/time.h>
#endif
@@ -360,9 +357,7 @@ XkbControlsPtr ctrls;
if (keybd->kbdfeed->ctrl.autoRepeat &&
((xkbi->slowKey != xkbi->mouseKey) || (!xkbi->mouseKeysAccel)) &&
(ctrls->enabled_ctrls&XkbRepeatKeysMask)) {
-#ifndef AIXV3
if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,xkbi->slowKey))
-#endif
{
xkbi->repeatKey = xkbi->slowKey;
xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer,
@@ -529,9 +524,7 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key);
if ((keybd->kbdfeed->ctrl.autoRepeat) &&
((ctrls->enabled_ctrls&(XkbSlowKeysMask|XkbRepeatKeysMask))==
XkbRepeatKeysMask)) {
-#ifndef AIXV3
if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key))
-#endif
{
#ifdef DEBUG
if (xkbDebugFlags&0x10)
diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c
index 1d8283ffe..1f4bc34b4 100644
--- a/nx-X11/programs/Xserver/xkb/xkbInit.c
+++ b/nx-X11/programs/Xserver/xkb/xkbInit.c
@@ -54,14 +54,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1)
-#ifdef sgi
-#define LED_CAPS 5
-#define LED_NUM 6
-#define LED_SCROLL 7
-#define PHYS_LEDS 0x7f
-#define LED_COMPOSE 8
-#else
-#if defined(ultrix) || defined(__osf__) || defined(__alpha) || defined(__alpha__)
+#if defined(ultrix) || defined(__alpha) || defined(__alpha__)
#define LED_COMPOSE 2
#define LED_CAPS 3
#define LED_SCROLL 4
@@ -81,7 +74,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define PHYS_LEDS 0x07
#endif
#endif
-#endif
#define MAX_TOC 16
typedef struct _SrvXkmInfo {
@@ -914,7 +906,7 @@ XkbProcessArguments(int argc,char *argv[],int i)
}
else if (strncmp(argv[i], "-xkbdir", 7) == 0) {
if(++i < argc) {
-#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__)
+#if !defined(WIN32) && !defined(__CYGWIN__)
if (getuid() != geteuid()) {
LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n");
return -1;
diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c
index b6a845c18..f4b7db3c6 100644
--- a/nx-X11/programs/Xserver/xkb/xkbUtils.c
+++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c
@@ -51,12 +51,8 @@ int XkbDisableLockActions = 0;
/***====================================================================***/
#ifndef RETURN_SHOULD_REPEAT
-#if (defined(__osf__) && defined(__alpha))
-#define RETURN_SHOULD_REPEAT 1
-#else
#define RETURN_SHOULD_REPEAT 0
#endif
-#endif
/***====================================================================***/