mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-16 00:19:55 +00:00
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.
This commit is contained in:
parent
8a06ff9ffa
commit
f7f3fe7fe7
50 changed files with 31 additions and 910 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -54,9 +54,6 @@ static struct MouseProtocol {
|
|||
char *name;
|
||||
int type;
|
||||
} protocols[] = {
|
||||
#ifdef __UNIXOS2__
|
||||
{"OS2Mouse", MTYPE_AUTOMOUSE},
|
||||
#endif
|
||||
#ifdef __SCO__
|
||||
{"OsMouse", MTYPE_AUTOMOUSE},
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,10 +36,6 @@
|
|||
* Implementation
|
||||
*/
|
||||
|
||||
#ifdef __UNIXOS2__
|
||||
static char dummy;
|
||||
#endif
|
||||
|
||||
#if !defined(USE_MODULES)
|
||||
/* these are defined in libdummy.a */
|
||||
int
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue