summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-06-28 18:59:05 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-06-28 18:59:05 -0400
commitf7f3fe7fe7233a2ffc43106c48f44cbbd82b7c19 (patch)
tree84ca56dbddf11442a1acfeeee6ac69afd0701f9e
parent8a06ff9ffa4816d192e58e43e7fe569b97b4dd7c (diff)
Remove the remnants of OS/2 support.
This has never worked in any modular server release, and as far as I know was never tested in 6.7 through 6.9.
-rw-r--r--Xext/security.c8
-rw-r--r--hw/xfree86/common/modeline2c.pl3
-rw-r--r--hw/xfree86/common/xf86Config.c13
-rw-r--r--hw/xfree86/common/xf86Configure.c10
-rw-r--r--hw/xfree86/common/xf86Debug.c4
-rw-r--r--hw/xfree86/common/xf86DefModes.c5
-rw-r--r--hw/xfree86/common/xf86Events.c18
-rw-r--r--hw/xfree86/common/xf86Init.c16
-rw-r--r--hw/xfree86/common/xf86MiscExt.c4
-rw-r--r--hw/xfree86/common/xf86Module.h5
-rw-r--r--hw/xfree86/common/xf86PM.c4
-rw-r--r--hw/xfree86/common/xisb.c4
-rw-r--r--hw/xfree86/loader/loadmod.c5
-rw-r--r--hw/xfree86/loader/os.c2
-rw-r--r--hw/xfree86/loader/xf86sym.c12
-rw-r--r--hw/xfree86/os-support/README.OS-lib1
-rw-r--r--hw/xfree86/os-support/misc/Delay.c4
-rw-r--r--hw/xfree86/os-support/shared/agp_noop.c3
-rw-r--r--hw/xfree86/os-support/shared/libc_wrapper.c34
-rw-r--r--hw/xfree86/os-support/shared/sigiostubs.c3
-rw-r--r--hw/xfree86/os-support/shared/stdPci.c3
-rw-r--r--hw/xfree86/os-support/shared/stdResource.c6
-rw-r--r--hw/xfree86/os-support/shared/vidmem.c3
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h38
-rw-r--r--hw/xfree86/os-support/xf86_ansic.h18
-rw-r--r--hw/xfree86/parser/Files.c18
-rw-r--r--hw/xfree86/parser/scan.c22
-rw-r--r--hw/xfree86/parser/write.c3
-rw-r--r--hw/xfree86/utils/xorgcfg/config.h27
-rw-r--r--hw/xfree86/utils/xorgcfg/mouse-cfg.c3
-rw-r--r--hw/xfree86/utils/xorgcfg/stubs.c4
-rw-r--r--hw/xfree86/utils/xorgcfg/text-mode.c17
-rw-r--r--hw/xfree86/utils/xorgconfig/cards.c20
-rw-r--r--hw/xfree86/utils/xorgconfig/xorgconfig.c87
-rw-r--r--hw/xnest/Makefile.am3
-rw-r--r--hw/xnest/os2Stub.c387
-rw-r--r--hw/xprint/attributes.c1
-rw-r--r--include/os.h2
-rw-r--r--include/servermd.h2
-rw-r--r--os/WaitFor.c3
-rw-r--r--os/access.c9
-rw-r--r--os/connection.c31
-rw-r--r--os/io.c6
-rw-r--r--os/log.c3
-rw-r--r--os/oscolor.c11
-rw-r--r--os/osdep.h2
-rw-r--r--os/osinit.c2
-rw-r--r--os/utils.c26
-rw-r--r--xkb/ddxLoad.c24
-rw-r--r--xkb/xkbInit.c2
50 files changed, 31 insertions, 910 deletions
diff --git a/Xext/security.c b/Xext/security.c
index c17a438b4..ba057defd 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -1285,11 +1285,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(
@@ -1567,11 +1563,7 @@ SecurityLoadPropertyAccessList(void)
if (!SecurityPolicyFile)
return;
-#ifndef __UNIXOS2__
f = fopen(SecurityPolicyFile, "r");
-#else
- f = fopen((char*)__XOS2RedirRoot(SecurityPolicyFile), "r");
-#endif
if (!f)
{
ErrorF("error opening security policy file %s\n",
diff --git a/hw/xfree86/common/modeline2c.pl b/hw/xfree86/common/modeline2c.pl
index cc6c6925e..88e380de4 100644
--- a/hw/xfree86/common/modeline2c.pl
+++ b/hw/xfree86/common/modeline2c.pl
@@ -71,9 +71,6 @@ printf("/* \$$proj\$ */
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
#include \"xf86.h\"
#include \"xf86Config.h\"
#include \"xf86Priv.h\"
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index bf2272090..4bd93b89f 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -53,10 +53,6 @@
#include <grp.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
-
#include "xf86.h"
#include "xf86Parser.h"
#include "xf86tokens.h"
@@ -181,15 +177,8 @@ xf86ValidateFontPath(char *path)
while (next != NULL) {
path_elem = xf86GetPathElem(&next);
if (*path_elem == '/') {
-#ifndef __UNIXOS2__
dir_elem = xnfcalloc(1, strlen(path_elem) + 1);
if ((p1 = strchr(path_elem, ':')) != 0)
-#else
- /* OS/2 must prepend X11ROOT */
- path_elem = (char*)__XOS2RedirRoot(path_elem);
- dir_elem = xnfcalloc(1, strlen(path_elem) + 1);
- if (p1 = strchr(path_elem+2, ':'))
-#endif
dirlen = p1 - path_elem;
else
dirlen = strlen(path_elem);
@@ -213,9 +202,7 @@ xf86ValidateFontPath(char *path)
if (flag == 0)
if (!S_ISREG(stat_buf.st_mode))
flag = -1;
-#ifndef __UNIXOS2__
xfree(p1);
-#endif
if (flag != 0) {
xf86Msg(X_WARNING,
"`fonts.dir' not found (or not valid) in \"%s\".\n",
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 7b04bd6bd..abe986e22 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -70,10 +70,7 @@ _X_EXPORT xf86MonPtr ConfiguredMonitor;
Bool xf86DoConfigurePass1 = TRUE;
static Bool foundMouse = FALSE;
-#if defined(__UNIXOS2__)
-#define DFLT_MOUSE_DEV "mouse$"
-#define DFLT_MOUSE_PROTO "OS2Mouse"
-#elif defined(__SCO__)
+#if defined(__SCO__)
static char *DFLT_MOUSE_PROTO = "OSMouse";
#elif defined(__UNIXWARE__)
static char *DFLT_MOUSE_PROTO = "OSMouse";
@@ -872,9 +869,6 @@ DoConfigure()
if (!(home = getenv("HOME")))
home = "/";
{
-#ifdef __UNIXOS2__
-#define PATH_MAX 2048
-#endif
#if !defined(PATH_MAX)
#define PATH_MAX 1024
#endif
@@ -1010,13 +1004,11 @@ DoConfigure()
ErrorF("\n"__XSERVERNAME__" is not able to detect your mouse.\n"
"Edit the file and correct the Device.\n");
} else {
-#ifndef __UNIXOS2__ /* OS/2 definitely has a mouse */
ErrorF("\n"__XSERVERNAME__" detected your mouse at device %s.\n"
"Please check your config if the mouse is still not\n"
"operational, as by default "__XSERVERNAME__
" tries to autodetect\n"
"the protocol.\n",DFLT_MOUSE_DEV);
-#endif
}
#endif /* !__SCO__ */
diff --git a/hw/xfree86/common/xf86Debug.c b/hw/xfree86/common/xf86Debug.c
index cb579343a..781c0e585 100644
--- a/hw/xfree86/common/xf86Debug.c
+++ b/hw/xfree86/common/xf86Debug.c
@@ -30,10 +30,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
-
#include <sys/time.h>
#include <unistd.h>
#include <X11/X.h>
diff --git a/hw/xfree86/common/xf86DefModes.c b/hw/xfree86/common/xf86DefModes.c
index a39d0a212..bdb64fe8e 100644
--- a/hw/xfree86/common/xf86DefModes.c
+++ b/hw/xfree86/common/xf86DefModes.c
@@ -1,5 +1,3 @@
-/* $XFree86$ */
-
/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at
* modeline2c.pl */
@@ -13,9 +11,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
#include "xf86.h"
#include "xf86Config.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index daf53deda..bbb5855ad 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -53,10 +53,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
-
#include <X11/X.h>
#include <X11/Xpoll.h>
#include <X11/Xproto.h>
@@ -320,7 +316,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
CloseDownClient(server);
}
break;
-#if !defined(__SOL8__) && !defined(__UNIXOS2__) && !defined(sgi) && \
+#if !defined(__SOL8__) && !defined(sgi) && \
(!defined(sun) || defined(i386)) && defined(VT_ACTIVATE)
case ACTION_SWITCHSCREEN:
if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) {
@@ -440,7 +436,7 @@ xf86CommonSpecialKey(int key, Bool down, int modifiers)
void
xf86Wakeup(pointer blockData, int err, pointer pReadmask)
{
-#if !defined(__UNIXOS2__) && !defined(__QNX__)
+#if !defined(__QNX__)
fd_set* LastSelectMask = (fd_set*)pReadmask;
fd_set devicesWithInput;
InputInfoPtr pInfo;
@@ -467,7 +463,7 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
}
}
}
-#else /* __UNIXOS2__ and __QNX__ */
+#else /* __QNX__ */
InputInfoPtr pInfo;
@@ -487,7 +483,7 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
pInfo = pInfo->next;
}
-#endif /* __UNIXOS2__ and __QNX__ */
+#endif /* __QNX__ */
if (err >= 0) { /* we don't want the handlers called if select() */
IHPtr ih; /* returned with an error condition, do we? */
@@ -874,7 +870,6 @@ xf86VTSwitch()
if (xf86Screens[i]->EnableDisableFBAccess)
(*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE);
}
-#if !defined(__UNIXOS2__)
/*
* Keep the order: Disable Device > LeaveVT
@@ -886,7 +881,6 @@ xf86VTSwitch()
DisableDevice(pInfo->dev);
pInfo = pInfo->next;
}
-#endif /* !__UNIXOS2__ */
xf86EnterServerState(SETUP);
for (i = 0; i < xf86NumScreens; i++)
xf86Screens[i]->LeaveVT(i, 0);
@@ -920,7 +914,6 @@ xf86VTSwitch()
}
SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
-#if !defined(__UNIXOS2__)
pInfo = xf86InputDevs;
while (pInfo) {
if (pInfo->dev) {
@@ -931,7 +924,6 @@ xf86VTSwitch()
}
/* XXX HACK */
xf86ReleaseKeys(inputInfo.keyboard);
-#endif /* !__UNIXOS2__ */
for (ih = InputHandlers; ih; ih = ih->next)
xf86EnableInputHandler(ih);
@@ -986,7 +978,6 @@ xf86VTSwitch()
/* Turn screen saver off when switching back */
SaveScreens(SCREEN_SAVER_FORCER,ScreenSaverReset);
-#if !defined(__UNIXOS2__)
pInfo = xf86InputDevs;
while (pInfo) {
if (pInfo->dev) {
@@ -997,7 +988,6 @@ xf86VTSwitch()
}
/* XXX HACK */
xf86ReleaseKeys(inputInfo.keyboard);
-#endif /* !__UNIXOS2__ */
for (ih = InputHandlers; ih; ih = ih->next)
xf86EnableInputHandler(ih);
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index f3670c478..8f3b23a73 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1,4 +1,3 @@
-
/*
* Loosely based on code bearing the following copyright:
*
@@ -39,15 +38,12 @@
#include <errno.h>
#undef HAS_UTSNAME
-#if !defined(WIN32) && !defined(__UNIXOS2__)
+#if !defined(WIN32)
#define HAS_UTSNAME 1
#include <sys/utsname.h>
#endif
#define NEED_EVENTS
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
#include <X11/X.h>
#include <X11/Xmd.h>
#include <X11/Xproto.h>
@@ -105,10 +101,6 @@ static void xf86PrintDefaultModulePath(void);
static void xf86PrintDefaultLibraryPath(void);
static void xf86RunVtInit(void);
-#ifdef __UNIXOS2__
-extern void os2ServerVideoAccess();
-#endif
-
#ifdef XF86PM
void (*xf86OSPMClose)(void) = NULL;
#endif
@@ -267,10 +259,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
Bool pix24Fail = FALSE;
Bool autoconfig = FALSE;
-#ifdef __UNIXOS2__
- os2ServerVideoAccess(); /* See if we have access to the screen before doing anything */
-#endif
-
xf86Initialising = TRUE;
/* Do this early? */
@@ -1065,9 +1053,7 @@ OsVendorInit()
#ifdef O_NONBLOCK
if (!beenHere) {
-#if !defined(__EMX__)
if (geteuid() == 0 && getuid() != geteuid())
-#endif
{
int status;
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
index 652428489..655304e8b 100644
--- a/hw/xfree86/common/xf86MiscExt.c
+++ b/hw/xfree86/common/xf86MiscExt.c
@@ -34,10 +34,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
-
#include <X11/X.h>
#include "os.h"
#include "xf86.h"
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index cdf3d1bea..4f9c0cae1 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -1,4 +1,3 @@
-
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
*
@@ -93,11 +92,7 @@ typedef enum {
#define MODINFOSTRING2 0x10dc023a
#ifndef MODULEVENDORSTRING
-#ifndef __OS2ELF__
#define MODULEVENDORSTRING "X.Org Foundation"
-#else
-#define MODULEVENDORSTRING "X.Org Foundation - OS2"
-#endif
#endif
/* Error return codes for errmaj. New codes must only be added at the end. */
diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c
index ac8896879..a6bcc3421 100644
--- a/hw/xfree86/common/xf86PM.c
+++ b/hw/xfree86/common/xf86PM.c
@@ -74,13 +74,11 @@ suspend (pmEvent event, Bool undo)
if (xf86Screens[i]->EnableDisableFBAccess)
(*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE);
}
-#if !defined(__EMX__)
pInfo = xf86InputDevs;
while (pInfo) {
DisableDevice(pInfo->dev);
pInfo = pInfo->next;
}
-#endif
xf86EnterServerState(SETUP);
for (i = 0; i < xf86NumScreens; i++) {
xf86EnableAccess(xf86Screens[i]);
@@ -119,13 +117,11 @@ resume(pmEvent event, Bool undo)
(*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE);
}
SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
-#if !defined(__EMX__)
pInfo = xf86InputDevs;
while (pInfo) {
EnableDevice(pInfo->dev);
pInfo = pInfo->next;
}
-#endif
xf86inSuspend = FALSE;
}
diff --git a/hw/xfree86/common/xisb.c b/hw/xfree86/common/xisb.c
index 88506f659..d021ec15b 100644
--- a/hw/xfree86/common/xisb.c
+++ b/hw/xfree86/common/xisb.c
@@ -39,10 +39,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
-
#include <misc.h>
#include <xf86.h>
#include <xf86Version.h>
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index ea559aaa5..1b5c717fd 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -118,12 +118,7 @@ static char **defaultPathList = NULL;
static Bool
PathIsAbsolute(const char *path)
{
-#ifdef __UNIXOS2__
- return (*path == '/' || (strlen(path) > 2 && isalpha(elem[0]) &&
- elem[1] == ':' && elem[2] == '/'));
-#else
return (*path == '/');
-#endif
}
/*
diff --git a/hw/xfree86/loader/os.c b/hw/xfree86/loader/os.c
index 83fd24787..fdddce898 100644
--- a/hw/xfree86/loader/os.c
+++ b/hw/xfree86/loader/os.c
@@ -62,8 +62,6 @@
#define OSNAME "svr5"
#elif defined(SVR4)
#define OSNAME "svr4"
-#elif defined(__UNIXOS2__)
-#define OSNAME "os2"
#else
#define OSNAME "unknown"
#endif
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index b4ae42f74..aae362960 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -150,9 +150,7 @@ extern void _Qp_uitoq(unsigned int *, unsigned int);
#endif
#if defined(__GNUC__)
-#ifndef __UNIXOS2__
extern long __div64(long, long);
-#endif
extern long __divdf3(long, long);
extern long __divdi3(long, long);
extern long __divsf3(long, long);
@@ -160,9 +158,7 @@ extern long __divsi3(long, long);
extern long __moddi3(long, long);
extern long __modsi3(long, long);
-#ifndef __UNIXOS2__
extern long __mul64(long, long);
-#endif
extern long __muldf3(long, long);
extern long __muldi3(long, long);
extern long __mulsf3(long, long);
@@ -172,18 +168,14 @@ extern long __udivsi3(long, long);
extern long __umoddi3(long, long);
extern long __umodsi3(long, long);
-#ifndef __UNIXOS2__
#pragma weak __div64
-#endif
#pragma weak __divdf3
#pragma weak __divdi3
#pragma weak __divsf3
#pragma weak __divsi3
#pragma weak __moddi3
#pragma weak __modsi3
-#ifndef __UNIXOS2__
#pragma weak __mul64
-#endif
#pragma weak __muldf3
#pragma weak __muldi3
#pragma weak __mulsf3
@@ -1066,7 +1058,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
# endif
#endif
#if defined(__GNUC__)
-#if !defined(__UNIXOS2__) && !defined(Lynx)
+#if !defined(Lynx)
SYMFUNC(__div64)
#endif
#if !defined(Lynx) /* FIXME: test on others than x86 and !3.1.0a/x86 */
@@ -1081,7 +1073,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
#if !defined(Lynx)
SYMFUNC(__modsi3)
#endif
-#if !defined(__UNIXOS2__) && !defined(Lynx)
+#if !defined(Lynx)
SYMFUNC(__mul64)
#endif
#if !defined(Lynx)
diff --git a/hw/xfree86/os-support/README.OS-lib b/hw/xfree86/os-support/README.OS-lib
index 27af6b3f2..e410906f9 100644
--- a/hw/xfree86/os-support/README.OS-lib
+++ b/hw/xfree86/os-support/README.OS-lib
@@ -38,7 +38,6 @@ have been made in implementation.
systems.
bsdi/ OS support for the BSD/386 operating system.
linux/ OS support for the Linux operating system.
- os2/ OS support for OS/2 2.11 and OS/2 Warp
sco/ OS support for the SCO SVR3.x operating system.
solx86/ OS support for the Solaris x86 operating system.
sysv/ OS support for all SVR4.0 and SVR4.2, and for
diff --git a/hw/xfree86/os-support/misc/Delay.c b/hw/xfree86/os-support/misc/Delay.c
index b56595377..e3e93faa4 100644
--- a/hw/xfree86/os-support/misc/Delay.c
+++ b/hw/xfree86/os-support/misc/Delay.c
@@ -1,11 +1,7 @@
-
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
#include <X11/X.h>
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/os-support/shared/agp_noop.c b/hw/xfree86/os-support/shared/agp_noop.c
index 0a7844894..5774bc231 100644
--- a/hw/xfree86/os-support/shared/agp_noop.c
+++ b/hw/xfree86/os-support/shared/agp_noop.c
@@ -34,9 +34,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-# define I_NEED_OS2_H
-#endif
#include <X11/X.h>
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/os-support/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c
index a459d5d70..959424110 100644
--- a/hw/xfree86/os-support/shared/libc_wrapper.c
+++ b/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -30,9 +30,6 @@
#undef __STRICT_ANSI__
#endif
#include <X11/X.h>
-#ifdef __UNIXOS2__
-#define I_NEED_OS2_H
-#endif
#include <X11/Xmd.h>
#include <X11/Xos.h>
#include <sys/types.h>
@@ -56,10 +53,6 @@
#include <errno.h>
#include <stdio.h>
#include <sys/ioctl.h>
-#ifdef __UNIXOS2__
-#define NO_MMAP
-#include <sys/param.h>
-#endif
#ifdef HAS_SVR3_MMAPDRV
#define NO_MMAP
#ifdef SELF_CONTAINED_WRAPPER
@@ -123,9 +116,6 @@ void xf86WrapperInit(void);
#endif
typedef struct dirent DIRENTRY;
-#ifdef __UNIXOS2__
-#define _POSIX_SOURCE
-#endif
#ifdef ISC202
#include <sys/types.h>
#define WIFEXITED(a) ((a & 0x00ff) == 0) /* LSB will be 0 */
@@ -917,9 +907,7 @@ xf86strerror(int n)
mapnum (ENOTDIR);
mapnum (EPIPE);
mapnum (EROFS);
-#ifndef __UNIXOS2__
mapnum (ETXTBSY); /* not POSIX 1 */
-#endif
mapnum (ENOTTY);
#ifdef ENOSYS
mapnum (ENOSYS);
@@ -1243,7 +1231,6 @@ xf86bsearch(const void *key, const void *base, xf86size_t nmemb,
_X_EXPORT int
xf86execl(const char *pathname, const char *arg, ...)
{
-#ifndef __UNIXOS2__
int i;
pid_t pid;
int exit_status;
@@ -1327,9 +1314,6 @@ xf86execl(const char *pathname, const char *arg, ...)
pathname);
return(1);
}
-#else
- return(1);
-#endif /* __UNIXOS2__ Disable this crazy business for now */
}
_X_EXPORT void
@@ -1435,9 +1419,7 @@ xfToOsChmodMode(xf86mode_t xfmode)
if (xfmode & XF86_S_ISUID) mode |= S_ISUID;
if (xfmode & XF86_S_ISGID) mode |= S_ISGID;
-#ifndef __UNIXOS2__
if (xfmode & XF86_S_ISVTX) mode |= S_ISVTX;
-#endif
if (xfmode & XF86_S_IRUSR) mode |= S_IRUSR;
if (xfmode & XF86_S_IWUSR) mode |= S_IWUSR;
if (xfmode & XF86_S_IXUSR) mode |= S_IXUSR;
@@ -1464,11 +1446,7 @@ xf86chmod(const char *path, xf86mode_t xfmode)
_X_EXPORT int
xf86chown(const char *path, xf86uid_t owner, xf86gid_t group)
{
-#ifndef __UNIXOS2__
int rc = chown(path, owner, group);
-#else
- int rc = 0;
-#endif
xf86errno = xf86GetErrno();
return rc;
}
@@ -1498,9 +1476,7 @@ xfToOsMknodMode(xf86mode_t xfmode)
if (xfmode & XF86_S_IFREG) mode |= S_IFREG;
if (xfmode & XF86_S_IFCHR) mode |= S_IFCHR;
-#ifndef __UNIXOS2__
if (xfmode & XF86_S_IFBLK) mode |= S_IFBLK;
-#endif
if (xfmode & XF86_S_IFIFO) mode |= S_IFIFO;
return mode;
@@ -1509,11 +1485,7 @@ xfToOsMknodMode(xf86mode_t xfmode)
_X_EXPORT int xf86mknod(const char *pathname, xf86mode_t xfmode, xf86dev_t dev)
{
mode_t mode = xfToOsMknodMode(xfmode);
-#ifndef __UNIXOS2__
int rc = mknod(pathname, mode, dev);
-#else
- int rc = 0;
-#endif
xf86errno = xf86GetErrno();
return rc;
}
@@ -1611,12 +1583,8 @@ _X_EXPORT int
xf86finite(double x)
{
#ifndef QNX4
-#ifndef __UNIXOS2__
return(finite(x));
#else
- return(isfinite(x));
-#endif /* __UNIXOS2__ */
-#else
/* XXX Replace this with something that really works. */
return 1;
#endif
@@ -1907,9 +1875,7 @@ xf86GetErrno ()
mapnum (ENOTDIR);
mapnum (EPIPE);
mapnum (EROFS);
-#ifndef __UNIXOS2__
mapnum (ETXTBSY); /* not POSIX 1 */
-#endif
mapnum (ENOTTY);
#ifdef ENOSYS
mapnum (ENOSYS);
diff --git a/hw/xfree86/os-support/shared/sigiostubs.c b/hw/xfree86/os-support/shared/sigiostubs.c
index 1a196cb30..7113968c6 100644
--- a/hw/xfree86/os-support/shared/sigiostubs.c
+++ b/hw/xfree86/os-support/shared/sigiostubs.c
@@ -29,9 +29,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-# define I_NEED_OS2_H
-#endif
# include <X11/X.h>
# include "xf86.h"
# include "xf86Priv.h"
diff --git a/hw/xfree86/os-support/shared/stdPci.c b/hw/xfree86/os-support/shared/stdPci.c
index e55ac77be..6777c6a1f 100644
--- a/hw/xfree86/os-support/shared/stdPci.c
+++ b/hw/xfree86/os-support/shared/stdPci.c
@@ -29,9 +29,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-# define I_NEED_OS2_H
-#endif
#include <X11/X.h>
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/os-support/shared/stdResource.c b/hw/xfree86/os-support/shared/stdResource.c
index ad4685605..555f80526 100644
--- a/hw/xfree86/os-support/shared/stdResource.c
+++ b/hw/xfree86/os-support/shared/stdResource.c
@@ -31,9 +31,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-# define I_NEED_OS2_H
-#endif
#include <X11/X.h>
#include "xf86.h"
#include "xf86Priv.h"
@@ -43,9 +40,6 @@
#include "xf86_OSlib.h"
#include "xf86Resources.h"
-#ifdef __UNIXOS2__
-# undef ADDRESS
-#endif
/* Avoid Imakefile changes */
#include "bus/Pci.h"
diff --git a/hw/xfree86/os-support/shared/vidmem.c b/hw/xfree86/os-support/shared/vidmem.c
index 4d775eb52..0b4411604 100644
--- a/hw/xfree86/os-support/shared/vidmem.c
+++ b/hw/xfree86/os-support/shared/vidmem.c
@@ -30,9 +30,6 @@
#include <xorg-config.h>
#endif
-#ifdef __UNIXOS2__
-# define I_NEED_OS2_H
-#endif
#include <X11/X.h>
#include "input.h"
#include "scrnintstr.h"
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 27f766d9c..216e2eceb 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -548,44 +548,6 @@ extern int errno;
/* __FreeBSD_kernel__ || __NetBSD__ || __OpenBSD__ || __bsdi__ */
/**************************************************************************/
-/* OS/2 */
-/**************************************************************************/
-/* currently OS/2 with a modified EMX/GCC compiler only */
-#if defined(__UNIXOS2__)
-# include <signal.h>
-# include <errno.h>
-# include <sys/stat.h>
-
-/* I would have liked to have this included here always, but
- * it causes clashes for BYTE and BOOL with Xmd.h, which is too dangerous.
- * So I'll include it in place where I know it does no harm.
- */
-#if defined(I_NEED_OS2_H)
-# undef BOOL
-# undef BYTE
-# include <os2.h>
-#endif
-
- /* keyboard types */
-# define KB_84 1
-# define KB_101 2
-/* could detect more keyboards */
-# define KB_OTHER 3
-
- /* LEDs */
-# define LED_CAP 0x40
-# define LED_NUM 0x20
-# define LED_SCR 0x10
-
- /* mouse driver */
-# define OSMOUSE_ONLY
-# define MOUSE_PROTOCOL_IN_KERNEL
-
-extern char* __XOS2RedirRoot(char*);
-
-#endif
-
-/**************************************************************************/
/* QNX4 */
/**************************************************************************/
/* This is the QNX code for Watcom 10.6 and QNX 4.x */
diff --git a/hw/xfree86/os-support/xf86_ansic.h b/hw/xfree86/os-support/xf86_ansic.h
index c1d62ed9f..0afd96744 100644
--- a/hw/xfree86/os-support/xf86_ansic.h
+++ b/hw/xfree86/os-support/xf86_ansic.h
@@ -25,23 +25,7 @@
#ifndef _XF86_ANSIC_H
#define _XF86_ANSIC_H
-/* Handle <stdarg.h> */
-
-#ifndef __OS2ELF__
-# include <stdarg.h>
-#else /* __OS2ELF__ */
- /* EMX/gcc_elf under OS/2 does not have native header files */
-# if !defined (_VA_LIST)
-# define _VA_LIST
- typedef char *va_list;
-# endif
-# define _VA_ROUND(t) ((sizeof (t) + 3) & -4)
-# if !defined (va_start)
-# define va_start(ap,v) ap = (va_list)&v + ((sizeof (v) + 3) & -4)
-# define va_end(ap) (ap = 0, (void)0)
-# define va_arg(ap,t) (ap += _VA_ROUND (t), *(t *)(ap - _VA_ROUND (t)))
-# endif
-#endif /* __OS2ELF__ */
+#include <stdarg.h>
/*
* The first set of definitions are required both for modules and
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index d304737dd..8cec2a91a 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -1,5 +1,4 @@
/*
- *
* Copyright (c) 1997 Metro Link Incorporated
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -77,17 +76,6 @@ static xf86ConfigSymTabRec FilesTab[] =
{-1, ""},
};
-static char *
-prependRoot (char *pathname)
-{
-#ifndef __EMX__
- return pathname;
-#else
- /* XXXX caveat: multiple path components in line */
- return (char *) __XOS2RedirRoot (pathname);
-#endif
-}
-
#define CLEANUP xf86freeFiles
XF86ConfFilesPtr
@@ -110,7 +98,7 @@ xf86parseFilesSection (void)
if (xf86getSubToken (&(ptr->file_comment)) != STRING)
Error (QUOTE_MSG, "FontPath");
j = FALSE;
- str = prependRoot (val.str);
+ str = val.str;
if (ptr->file_fontpath == NULL)
{
ptr->file_fontpath = xf86confmalloc (1);
@@ -143,7 +131,7 @@ xf86parseFilesSection (void)
if (xf86getSubToken (&(ptr->file_comment)) != STRING)
Error (QUOTE_MSG, "ModulePath");
l = FALSE;
- str = prependRoot (val.str);
+ str = val.str;
if (ptr->file_modulepath == NULL)
{
ptr->file_modulepath = xf86confmalloc (1);
@@ -170,7 +158,7 @@ xf86parseFilesSection (void)
if (xf86getSubToken (&(ptr->file_comment)) != STRING)
Error (QUOTE_MSG, "InputDevices");
l = FALSE;
- str = prependRoot (val.str);
+ str = val.str;
if (ptr->file_inputdevs == NULL)
{
ptr->file_inputdevs = xf86confmalloc (1);
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 68e7ec650..75a562bc1 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -106,10 +106,6 @@ static int pushToken = LOCK_TOKEN;
static int eol_seen = 0; /* private state to handle comments */
LexRec val;
-#ifdef __UNIXOS2__
-extern char *__XOS2RedirRoot(char *path);
-#endif
-
/*
* xf86strToUL --
*
@@ -523,10 +519,6 @@ xf86pathIsAbsolute(const char *path)
{
if (path && path[0] == '/')
return 1;
-#ifdef __UNIXOS2__
- if (path && (path[0] == '\\' || (path[1] == ':')))
- return 1;
-#endif
return 0;
}
@@ -571,7 +563,6 @@ xf86pathIsSafe(const char *path)
* %P projroot
* %M major version number
* %% %
- * %& UNIXOS2 only: prepend X11ROOT env var
*/
#ifndef XCONFIGFILE
@@ -625,9 +616,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
static const char *env = NULL, *home = NULL;
static char *hostname = NULL;
static char majorvers[3] = "";
-#ifdef __UNIXOS2__
- static char *x11root = NULL;
-#endif
if (!template)
return NULL;
@@ -744,16 +732,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot,
result[l++] = '%';
CHECK_LENGTH;
break;
-#ifdef __UNIXOS2__
- case '&':
- if (!x11root)
- x11root = getenv("X11ROOT");
- if (x11root)
- APPEND_STR(x11root);
- else
- BAIL_OUT;
- break;
-#endif
default:
fprintf(stderr, "invalid escape %%%c found in path template\n",
template[i]);
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index 3924001f7..6589fdc72 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -1,5 +1,4 @@
/*
- *
* Copyright (c) 1997 Metro Link Incorporated
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -81,7 +80,7 @@ extern int sys_nerr;
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
#define HAS_SAVED_IDS_AND_SETEUID
#endif
-#if defined(__UNIXOS2__) || defined(WIN32)
+#if defined(WIN32)
#define HAS_NO_UIDS
#endif
diff --git a/hw/xfree86/utils/xorgcfg/config.h b/hw/xfree86/utils/xorgcfg/config.h
index 62187b0d4..b5baba465 100644
--- a/hw/xfree86/utils/xorgcfg/config.h
+++ b/hw/xfree86/utils/xorgcfg/config.h
@@ -49,12 +49,6 @@
#include <stdarg.h>
-#ifdef __UNIXOS2__
-#define strcasecmp stricmp
-#define setenv putenv
-#define PATH_MAX 260
-#endif
-
/* Get PATH_MAX */
#ifndef PATH_MAX
# if defined(_POSIX_SOURCE)
@@ -103,7 +97,6 @@
#define CONFIG_ACCESSX 3
extern int config_mode;
-#ifndef __UNIXOS2__
#define CONFPATH "%A," "%R," \
"/etc/X11/%R," "%P/etc/X11/%R," \
"%E," "%F," \
@@ -120,26 +113,6 @@ extern int config_mode;
"%P/etc/X11/%X," \
"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
"%P/lib/X11/%X"
-#else
-#define CONFPATH "%&"XF86CONFIGDIR"/%R," "%&"XF86CONFIGDIR"/%X," \
- "%A," "%R," \
- "/etc/X11/%R," "%P/etc/X11/%R," \
- "%E," "%F," \
- "/etc/X11/%F," "%P/etc/X11/%F," \
- "%D/%X," \
- "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
- "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
- "%P/etc/X11/%X," \
- "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
- "%P/lib/X11/%X"
-#define USER_CONFPATH "%&"XF86CONFIGDIR"/%X," "%&"XF86CONFIGDIR"/%X," \
- "/etc/X11/%S," "%P/etc/X11/%S," \
- "/etc/X11/%G," "%P/etc/X11/%G," \
- "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
- "%P/etc/X11/%X," \
- "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
- "%P/lib/X11/%X"
-#endif
/*
* Types
diff --git a/hw/xfree86/utils/xorgcfg/mouse-cfg.c b/hw/xfree86/utils/xorgcfg/mouse-cfg.c
index 5bae6d326..24aec6ae4 100644
--- a/hw/xfree86/utils/xorgcfg/mouse-cfg.c
+++ b/hw/xfree86/utils/xorgcfg/mouse-cfg.c
@@ -54,9 +54,6 @@ static struct MouseProtocol {
char *name;
int type;
} protocols[] = {
-#ifdef __UNIXOS2__
- {"OS2Mouse", MTYPE_AUTOMOUSE},
-#endif
#ifdef __SCO__
{"OsMouse", MTYPE_AUTOMOUSE},
#endif
diff --git a/hw/xfree86/utils/xorgcfg/stubs.c b/hw/xfree86/utils/xorgcfg/stubs.c
index 47b2c2d5a..fdc840a7e 100644
--- a/hw/xfree86/utils/xorgcfg/stubs.c
+++ b/hw/xfree86/utils/xorgcfg/stubs.c
@@ -36,10 +36,6 @@
* Implementation
*/
-#ifdef __UNIXOS2__
-static char dummy;
-#endif
-
#if !defined(USE_MODULES)
/* these are defined in libdummy.a */
int
diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c
index 8800c29d7..0b6e65482 100644
--- a/hw/xfree86/utils/xorgcfg/text-mode.c
+++ b/hw/xfree86/utils/xorgcfg/text-mode.c
@@ -53,11 +53,7 @@
#endif
#ifndef XKB_RULES_DIR
-#ifndef __UNIXOS2__
#define XKB_RULES_DIR PROJECT_ROOT "/share/X11/xkb/rules"
-#else
-#define XKB_RULES_DIR XF86CONFIGDIR "/xkb/rules"
-#endif
#endif
#define CONTROL_A 1
@@ -212,11 +208,7 @@ TextMode(void)
"The "__XCONFIGFILE__" file usually resides in /etc. A "
"sample "__XCONFIGFILE__" file is supplied with "
#else
-#ifndef __UNIXOS2__
"The "__XCONFIGFILE__" file usually resides in " PROJECT_ROOT "/etc/X11 "
-#else
- "The "__XCONFIGFILE__" file usually resides in "XF86CONFIGDIR" "
-#endif
"or /etc/X11. A sample "__XCONFIGFILE__" file is supplied with "
#endif
__XSERVERNAME__"; it is configured for a standard VGA card and "
@@ -306,11 +298,7 @@ WriteXF86Config(void)
refresh();
xf86config = DialogInput("Write "__XCONFIGFILE__, "Write configuration to file:",
10, 60, XF86Config_path ? XF86Config_path :
-#ifndef __UNIXOS2__
"/etc/X11/"__XCONFIGFILE__, " Ok ", " Cancel ", 0);
-#else
- XF86CONFIGDIR"/"__XCONFIGFILE__, " Ok ", " Cancel ", 0);
-#endif
if (xf86config == NULL)
return (-1);
@@ -355,9 +343,6 @@ WriteXF86Config(void)
}
static char *protocols[] = {
-#ifdef __UNIXOS2__
- "OS2Mouse",
-#endif
#ifdef __SCO__
"OsMouse",
#endif
@@ -549,8 +534,6 @@ MouseConfig(void)
str = "/dev/wsmouse";
#elif defined(__FreeBSD__) || defined(__DragonFly__)
str = "/dev/sysmouse";
-#elif defined(__UNIXOS2__)
- str = "mouse$";
#elif defined(__linux__)
str = "/dev/input/mice";
#else
diff --git a/hw/xfree86/utils/xorgconfig/cards.c b/hw/xfree86/utils/xorgconfig/cards.c
index f903d7f9c..8116f0a03 100644
--- a/hw/xfree86/utils/xorgconfig/cards.c
+++ b/hw/xfree86/utils/xorgconfig/cards.c
@@ -1,10 +1,3 @@
-/* $XConsortium: cards.c /main/9 1996/10/19 18:15:32 kaleb $ */
-
-
-
-
-
-
/*
* Functions to manipulate card database.
*/
@@ -66,15 +59,6 @@ getnextline(FILE *f, char *l)
{
if (fgets(l, 128, f) == NULL)
return -1;
-#ifdef __UNIXOS2__
- {
- char *p = strchr(l,'\r');
- if (p) {
- *p = '\n';
- *(p+1) = '\0';
- }
- }
-#endif
return 0;
}
@@ -119,11 +103,7 @@ int parse_database() {
int i, lineno;
char filename[128];
-#ifndef __UNIXOS2__
strcpy(filename, CARD_DATABASE_FILE);
-#else
- strcpy(filename, (char*)__XOS2RedirRoot(CARD_DATABASE_FILE));
-#endif
f = fopen(filename, "r");
if (f == NULL)
return -1;
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index 3e60fdabb..56897899c 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -1,4 +1,3 @@
-
/*
* This is a configuration program that will create a base XF86Config
* file based on menu choices. Its main feature is that clueless users
@@ -107,13 +106,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-/* hv: fix a few EMX problems, will disappear with real UnixOS/2 */
-#ifdef __UNIXOS2__
-#define sync() /*nothing*/
-static int getuid() { return 0; }
-#endif
-
-
#include <X11/Xlib.h>
#include <X11/extensions/XKBstr.h>
#include <X11/extensions/XKBrules.h>
@@ -172,11 +164,7 @@ static int getuid() { return 0; }
#endif
#define MODULEPATH TREEROOT "/lib/modules"
-#ifndef __UNIXOS2__
#define XSERVERNAME_FOR_PROBE "X"
-#else
-#define XSERVERNAME_FOR_PROBE PROJECTROOT"/bin/"__XSERVERNAME__
-#endif
#ifndef XCONFIGFILE
#define XCONFIGFILE "xorg.conf"
@@ -378,10 +366,6 @@ getstring(char *s)
/*
* Mouse configuration.
- *
- * (hv) OS/2 (__UNIXOS2__) only has an OS supported mouse, so user has no options
- * the server will enable a third button automatically if there is one
- * We also do the same for QNX4, since we use the OS mouse drivers.
*/
int M_OSMOUSE, M_WSMOUSE, M_AUTO,
@@ -398,7 +382,7 @@ struct {
int *ident;
char *desc;
} mouse_info[] = {
-#if defined(__UNIXOS2__) || defined(QNX4)
+#if defined(QNX4)
#define DEF_PROTO_STRING "OSMOUSE"
{"OSMOUSE", &M_OSMOUSE,
"OSMOUSE"
@@ -498,7 +482,6 @@ struct {
# define DEF_MOUSEDEV "/dev/mouse";
#endif
-#ifndef __UNIXOS2__
static char *mouseintro_text =
"First specify a mouse protocol type. Choose one from the following list:\n"
"\n";
@@ -549,12 +532,10 @@ static char *mousemancomment_text =
"You have selected a Logitech MouseMan type mouse. You might want to enable\n"
"ChordMiddle which could cause the third button to work.\n";
-#endif /* !__UNIXOS2__ */
-
static void
mouse_configuration(void) {
-#if !defined(__UNIXOS2__) && !defined(QNX4)
+#if !defined(QNX4)
int i, j;
char s[80];
char *def_mousedev = DEF_MOUSEDEV;
@@ -670,18 +651,14 @@ mouse_configuration(void) {
}
printf("\n");
-#else /* __UNIXOS2__ */
+#else
/* set some reasonable defaults for OS/2 */
config_mousetype = M_OSMOUSE;
config_chordmiddle = 0;
config_cleardtrrts = 0;
config_emulate3buttons = 0;
-#if !defined(QNX4)
- config_pointerdevice = "OS2MOUSE";
-#else
config_pointerdevice = "QNXMOUSE";
#endif
-#endif /* __UNIXOS2__ */
}
@@ -1351,36 +1328,9 @@ static char *modestring[NU_MODESTRINGS] = {
#endif
};
-#ifdef __EMX__
-/* yet another instance of this code, sigh! */
-char *
-__XOS2RedirRoot(char *path, char sep)
-{
- static char pn[300];
- char *root;
- int i,l;
- if ((isalpha(path[0]) && path[1]==':') || path[0] != '/')
- return path;
-
- root = getenv("X11ROOT");
- if (!root) root = "";
- sprintf(pn,"%s%s",root,path);
- if (sep=='\\') {
- l = strlen(pn);
- for (i=0; i<l; i++)
- if (pn[i]=='/') pn[i]='\\';
- }
- return pn;
-}
-#endif
-
-/* (hv) to avoid the UNIXISM to try to open a dir to check for existance */
static int exists_dir(char *name) {
struct stat sbuf;
-#ifdef __EMX__
- name = __XOS2RedirRoot(name,'/');
-#endif
/* is it there ? */
if (stat(name,&sbuf) == -1)
return 0;
@@ -1691,22 +1641,10 @@ skipramdacselection:
sprintf(d3name, "%s%s", temp_dir, DUMBCONFIG3);
printf("Running X -probeonly -pn -xf86config %s.\n", fname);
write_XF86Config(fname);
-#ifndef __EMX__
sync();
-#endif
/* compose a line with the real path */
-#ifndef __EMX__
sprintf(syscmdline, "X -probeonly -pn -xf86config %s 2> %s",
fname, d2name);
-#else
- /* OS/2 does not have symlinks, so "X" does not exist,
- * call the real X server
- */
- sprintf(syscmdline,"%s/"__XSERVERNAME__" -probeonly -pn -xf86config "
- TEMPORARY_XF86CONFIG_FILENAME " 2>" DUMBCONFIG2,
- __XOS2RedirRoot("/"__XSERVERNAME__"/bin",'\\'),
- card[card_selected].server);
-#endif
if (system(syscmdline)) {
printf("X -probeonly call failed.\n");
@@ -2548,10 +2486,8 @@ write_XF86Config(char *filename)
f = fopen(filename, "w");
if (f == NULL) {
printf("Failed to open filename for writing.\n");
-#ifndef __EMX__
if (getuid() != 0)
printf("Maybe you need to be root to write to the specified directory?\n");
-#endif
return(1);
}
@@ -2606,7 +2542,7 @@ write_XF86Config(char *filename)
fprintf(f, " Option \"Protocol\" \"%s\"\t# %s\n",
mouse_info[config_mousetype].name,
mouse_info[config_mousetype].desc);
-#if !defined(__UNIXOS2__) && !defined(QNX4)
+#if !defined(QNX4)
fprintf(f, " Option \"Device\" \"%s\"\n", config_pointerdevice);
#endif
fprintf(f, "%s", pointersection_text2);
@@ -2780,7 +2716,6 @@ ask_XF86Config_location(void) {
"I am going to write the " CONFIGNAME " file now. Make sure you don't accidently\n"
"overwrite a previously configured one.\n\n");
-#ifndef __EMX__
if (getuid() == 0) {
#ifdef PREFER_XF86CONFIG_IN_ETC
filename = Strdup("/etc/X11/" XCONFIGFILE);
@@ -2814,16 +2749,6 @@ ask_XF86Config_location(void) {
if (answerisyes(s))
return filename;
#endif
-#else /* __EMX__ */
- {
- printf("Please answer the following question with either 'y' or 'n'.\n");
- printf("Shall I write it to the default location, drive:/"__XSERVERNAME__"/lib/X11/XConfig? ");
- getstring(s);
- printf("\n");
- if (answerisyes(s)) {
- return __XOS2RedirRoot("/"__XSERVERNAME__"/lib/X11/XConfig",'/');
- }
-#endif /* __EMX__ */
}
if (filename)
@@ -2862,7 +2787,6 @@ __XSERVERNAME__" distribution for your OS.\n"
"libraries, configuration files and a server that you want to use.\n"
"\n";
-#ifndef __UNIXOS2__
static char *oldxfree86_text =
"The directory '/usr/X386/bin' exists. You probably have a very old version of\n"
"XFree86 installed, but this program was built to configure "__XSERVERNAME__" "XVERSIONSTRING"\n"
@@ -2882,7 +2806,6 @@ static char *pathnote_text =
"link is '/usr/bin/X11'.\n"
"\n"
"Make sure the path is OK before continuing.\n";
-#endif
static void
path_check(void) {
@@ -2899,7 +2822,6 @@ path_check(void) {
printf("\n");
}
-#ifndef __UNIXOS2__
ok = exists_dir("/usr/X386/bin");
if (!ok)
return;
@@ -2909,7 +2831,6 @@ path_check(void) {
getenv("PATH"));
printf("%s", pathnote_text);
keypress();
-#endif
}
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index e958c0eee..99dba60bd 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -55,8 +55,7 @@ Xnest_LDADD = $(XORG_CORE_LIBS) \
$(XNESTMODULES_LIBS) \
libfbcmap.a
-EXTRA_DIST = os2Stub.c \
- icon \
+EXTRA_DIST = icon \
screensaver \
Xnest.man.pre
diff --git a/hw/xnest/os2Stub.c b/hw/xnest/os2Stub.c
deleted file mode 100644
index 33675ec75..000000000
--- a/hw/xnest/os2Stub.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * (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 xnest. 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 <X11/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, 1L);
- /* 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, 1L);
- if (rc==640) return(0);
- 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/hw/xprint/attributes.c b/hw/xprint/attributes.c
index a24c1076b..d8ee5adf8 100644
--- a/hw/xprint/attributes.c
+++ b/hw/xprint/attributes.c
@@ -1375,7 +1375,6 @@ ReplaceAllKeywords(
defined(__CYGWIN__) || \
(defined(sun) && !defined(SVR4)) || \
(defined(SVR4) && !defined(sun) && !defined(__UNIXWARE__)) || \
- defined(__UNIXOS2__) || \
defined(ISC) || \
defined(Lynx) || \
defined(__QNX__) || \
diff --git a/include/os.h b/include/os.h
index 7399436fb..3d689478e 100644
--- a/include/os.h
+++ b/include/os.h
@@ -272,7 +272,7 @@ void OsBlockSignals (void);
void OsReleaseSignals (void);
-#if !defined(WIN32) && !defined(__UNIXOS2__)
+#if !defined(WIN32)
extern int System(char *);
extern pointer Popen(char *, char *);
extern int Pclose(pointer);
diff --git a/include/servermd.h b/include/servermd.h
index 4f32a9d2b..74b90b38a 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -447,8 +447,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__)
diff --git a/os/WaitFor.c b/os/WaitFor.c
index 4a606ac7d..ec1592c01 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -67,9 +67,6 @@ SOFTWARE.
#include <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 <X11/Xpoll.h>
#include "dixstruct.h"
diff --git a/os/access.c b/os/access.c
index 2de0ead43..e194bb8e6 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1193,9 +1193,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)
{
@@ -1206,10 +1203,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]);
@@ -1825,7 +1818,7 @@ ConvertAddr (
switch (saddr->sa_family)
{
case AF_UNSPEC:
-#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN)
+#if defined(UNIXCONN) || defined(LOCALCONN)
case AF_UNIX:
#endif
return FamilyLocal;
diff --git a/os/connection.c b/os/connection.c
index 693bb201c..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"
@@ -194,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;
@@ -329,8 +317,6 @@ InitConnectionLimits(void)
#ifndef __CYGWIN__
-#ifndef __UNIXOS2__
-
#if !defined(XNO_SYSCONF) && defined(_SC_OPEN_MAX)
lastfdesc = sysconf(_SC_OPEN_MAX) - 1;
#endif
@@ -345,10 +331,6 @@ InitConnectionLimits(void)
lastfdesc = _NFILE - 1;
#endif
-#else /* __UNIXOS2__ */
- lastfdesc = _nfiles - 1;
-#endif
-
#endif /* __CYGWIN__ */
/* This is the fallback */
@@ -464,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);
@@ -577,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");
diff --git a/os/io.c b/os/io.c
index 4e83e682b..835af54d9 100644
--- a/os/io.c
+++ b/os/io.c
@@ -70,7 +70,7 @@ SOFTWARE.
#include <X11/Xtrans/Xtrans.h>
#include <X11/Xmd.h>
#include <errno.h>
-#if !defined(__UNIXOS2__) && !defined(WIN32)
+#if !defined(WIN32)
#ifndef Lynx
#include <sys/uio.h>
#else
@@ -98,7 +98,6 @@ static void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
/* 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)
@@ -112,9 +111,6 @@ static void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
#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
static Bool CriticalOutputPending;
static int timesThisConnection = 0;
diff --git a/os/log.c b/os/log.c
index e8aa3fa01..0860847ec 100644
--- a/os/log.c
+++ b/os/log.c
@@ -182,9 +182,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/os/oscolor.c b/os/oscolor.c
index d53e4d8ff..e1756926d 100644
--- a/os/oscolor.c
+++ b/os/oscolor.c
@@ -225,16 +225,9 @@ OsInitColors(void)
if (!was_here)
{
-#ifndef __UNIXOS2__
path = (char*)ALLOCATE_LOCAL(strlen(rgbPath) +5);
strcpy(path, rgbPath);
strcat(path, ".txt");
-#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")))
{
ErrorF( "Couldn't open RGB_DB '%s'\n", rgbPath );
@@ -245,11 +238,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/os/osdep.h b/os/osdep.h
index 04e88ea49..965436df5 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -91,7 +91,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
diff --git a/os/osinit.c b/os/osinit.c
index 9a1c1133a..1f09f068e 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -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/os/utils.c b/os/utils.c
index dd5acd34b..3bb7dbeba 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -297,9 +297,7 @@ 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"
@@ -309,10 +307,6 @@ OsSignal(sig, handler)
#include <sys/param.h>
#endif
-#ifdef __UNIXOS2__
-#define link rename
-#endif
-
#ifndef PATH_MAX
#ifndef Lynx
#include <sys/param.h>
@@ -351,14 +345,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) :
@@ -399,13 +386,11 @@ LockServer(void)
FatalError("Could not create lock file in %s\n", tmp);
(void) sprintf(pid_str, "%10ld\n", (long)getpid());
(void) write(lfd, pid_str, 11);
-#ifndef __UNIXOS2__
#ifndef USE_CHMOD
(void) fchmod(lfd, 0444);
#else
(void) chmod(tmp, 0444);
#endif
-#endif
(void) close(lfd);
/*
@@ -484,9 +469,6 @@ UnlockServer(void)
if (!StillLocking){
-#ifdef __UNIXOS2__
- (void) chmod(LockFile,S_IREAD|S_IWRITE);
-#endif /* __UNIXOS2__ */
(void) unlink(LockFile);
}
}
@@ -914,7 +896,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
@@ -1246,7 +1228,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
@@ -1677,7 +1659,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.
@@ -1952,7 +1934,7 @@ Fclose(pointer iop)
#endif
}
-#endif /* !WIN32 && !__UNIXOS2__ */
+#endif /* !WIN32 */
/*
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index c24c56c1c..d79ae7a7b 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -77,7 +77,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 "/"
@@ -239,20 +239,8 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
if (XkbBaseDirectory!=NULL) {
-#ifndef __UNIXOS2__
char *xkbbasedir = XkbBaseDirectory;
char *xkbbindir = XkbBinDirectory;
-#else
- /* relocate the basedir and replace the slashes with backslashes */
- char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory);
- char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory);
- 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,
@@ -338,18 +326,8 @@ char tmpname[PATH_MAX];
for xkbcomp. xkbcomp does not read from stdin. */
char *xkmfile = tmpname;
#endif
-#ifndef __UNIXOS2__
char *xkbbasedir = XkbBaseDirectory;
char *xkbbindir = XkbBinDirectory;
-#else
- int i;
- char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory);
- char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory);
- 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/xkb/xkbInit.c b/xkb/xkbInit.c
index 716bc26a5..c0867adf0 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -847,7 +847,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;