Commit f7f3fe7f authored by Adam Jackson's avatar Adam Jackson

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.
parent 8a06ff9f
......@@ -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",
......
......@@ -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\"
......
......@@ -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",
......
......@@ -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__ */
......
......@@ -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>
......
/* $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"
......
......@@ -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);
......
/*
* 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;
......
......@@ -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"
......
/*
* 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. */
......
......@@ -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;
}
......
......@@ -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>
......
......@@ -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
}
/*
......
......@@ -62,8 +62,6 @@
#define OSNAME "svr5"
#elif defined(SVR4)
#define OSNAME "svr4"
#elif defined(__UNIXOS2__)
#define OSNAME "os2"
#else
#define OSNAME "unknown"
#endif
......
......@@ -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)
......
......@@ -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
......
#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"
......
......@@ -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"
......
......@@ -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,11 +1583,7 @@ _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;
......@@ -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);
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -547,44 +547,6 @@ extern int errno;
#endif
/* __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 */
/**************************************************************************/
......
......@@ -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
......
/*
*
* 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);