summaryrefslogtreecommitdiff
path: root/os
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 /os
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.
Diffstat (limited to 'os')
-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
9 files changed, 10 insertions, 83 deletions
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 */
/*