Commit d12f9524 authored by Mike Gabriel's avatar Mike Gabriel

drop platform support: unifdef __UNIXOS2__.

Fixes ArcticaProject/nx-libs#271.
parent 86a6a340
...@@ -1117,13 +1117,6 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686 ...@@ -1117,13 +1117,6 @@ XCOMM Keep cpp from replacing path elements containing i486/i586/i686
#endif #endif
#endif #endif
#ifdef emxos2
#define MacroIncludeFile <os2.cf>
#define MacroFile os2.cf
#define OS2Architecture
#define i386Architecture
#endif /* emxos2 */
#if defined(__QNX__) && !defined(__QNXNTO__) #if defined(__QNX__) && !defined(__QNXNTO__)
#define MacroIncludeFile <QNX4.cf> #define MacroIncludeFile <QNX4.cf>
#define MacroFile QNX4.cf #define MacroFile QNX4.cf
......
...@@ -466,7 +466,7 @@ XCOMM the platform-specific parameters - edit site.def to change ...@@ -466,7 +466,7 @@ XCOMM the platform-specific parameters - edit site.def to change
#define HasBasename YES #define HasBasename YES
#endif #endif
#ifndef HasGetopt #ifndef HasGetopt
# if !defined(Win32Architecture) && !defined(OS2Architecture) # if !defined(Win32Architecture)
# define HasGetopt YES # define HasGetopt YES
# else # else
# define HasGetopt NO # define HasGetopt NO
......
...@@ -513,7 +513,7 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 ...@@ -513,7 +513,7 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# if SystemV || SystemV4 || \ # if SystemV || SystemV4 || \
(defined(LinuxArchitecture) && !defined(Mc68020Architecture)) || \ (defined(LinuxArchitecture) && !defined(Mc68020Architecture)) || \
defined(i386BsdArchitecture) || defined(LynxOSArchitecture) || \ defined(i386BsdArchitecture) || defined(LynxOSArchitecture) || \
defined(OS2Architecture) || defined(GNUMachArchitecture) || \ defined(GNUMachArchitecture) || \
(defined(KFreeBSDArchitecture) && defined(i386Architecture)) (defined(KFreeBSDArchitecture) && defined(i386Architecture))
# define BuildScanpci YES # define BuildScanpci YES
# else # else
......
...@@ -340,7 +340,7 @@ typedef long int int64_t; ...@@ -340,7 +340,7 @@ typedef long int int64_t;
typedef long long int int64_t; typedef long long int int64_t;
#endif /* __arch64__ */ #endif /* __arch64__ */
#endif /* __STDC__ */ #endif /* __STDC__ */
#elif defined(__UNIXOS2__) || defined(__SOL64__) #elif defined(__SOL64__)
typedef long int int32_t; typedef long int int32_t;
typedef long long int int64_t; typedef long long int int64_t;
#elif defined( __VMS ) #elif defined( __VMS )
......
...@@ -36,11 +36,6 @@ ...@@ -36,11 +36,6 @@
#include "m_debug.h" #include "m_debug.h"
#include "m_debug_util.h" #include "m_debug_util.h"
#ifdef __UNIXOS2__
/* The linker doesn't like empty files */
static char dummy;
#endif
#ifdef DEBUG /* This code only used for debugging */ #ifdef DEBUG /* This code only used for debugging */
static clip_func *clip_tab[2] = { static clip_func *clip_tab[2] = {
......
...@@ -38,11 +38,6 @@ ...@@ -38,11 +38,6 @@
#include "m_debug_util.h" #include "m_debug_util.h"
#ifdef __UNIXOS2__
/* The linker doesn't like empty files */
static char dummy;
#endif
#ifdef DEBUG /* This code only used for debugging */ #ifdef DEBUG /* This code only used for debugging */
......
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
#include "m_debug.h" #include "m_debug.h"
#include "m_debug_util.h" #include "m_debug_util.h"
#ifdef __UNIXOS2__
/* The linker doesn't like empty files */
static char dummy;
#endif
#ifdef DEBUG /* This code only used for debugging */ #ifdef DEBUG /* This code only used for debugging */
......
...@@ -246,12 +246,6 @@ typedef unsigned long fd_mask; ...@@ -246,12 +246,6 @@ typedef unsigned long fd_mask;
#endif #endif
#endif /* XPG4 else */ #endif /* XPG4 else */
#ifdef __UNIXOS2__
typedef unsigned long fd_mask;
#include <limits.h>
#define MAX_PATH _POSIX_PATH_MAX
#endif
#ifdef __GNU__ #ifdef __GNU__
#define PATH_MAX 4096 #define PATH_MAX 4096
#define MAXPATHLEN 4096 #define MAXPATHLEN 4096
...@@ -269,7 +263,7 @@ typedef unsigned long fd_mask; ...@@ -269,7 +263,7 @@ typedef unsigned long fd_mask;
#define NGROUPS 16 #define NGROUPS 16
#endif #endif
#if defined(ISC) || defined(__UNIXOS2__) || \ #if defined(ISC) || \
(defined(__linux__) && !defined(__GLIBC__)) || \ (defined(__linux__) && !defined(__GLIBC__)) || \
(defined(__QNX__) && !defined(UNIXCONN)) (defined(__QNX__) && !defined(UNIXCONN))
/* /*
......
...@@ -127,11 +127,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -127,11 +127,6 @@ in this Software without prior written authorization from The Open Group.
#define X_NOT_STDC_ENV #define X_NOT_STDC_ENV
#endif #endif
#ifdef __UNIXOS2__
#define USGISH
#define NULL_NOT_ZERO
#endif
#ifdef __DARWIN__ #ifdef __DARWIN__
#define NULL_NOT_ZERO #define NULL_NOT_ZERO
#endif #endif
......
...@@ -31,10 +31,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -31,10 +31,6 @@ in this Software without prior written authorization from The Open Group.
#ifdef USE_DYNAMIC_XCURSOR #ifdef USE_DYNAMIC_XCURSOR
#ifdef __UNIXOS2__
#define RTLD_LAZY 1
#define LIBXCURSOR "Xcursor.dll"
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#if defined(hpux) #if defined(hpux)
......
...@@ -184,10 +184,6 @@ XGetDefault( ...@@ -184,10 +184,6 @@ XGetDefault(
#ifdef WIN32 #ifdef WIN32
char *progname2; char *progname2;
#endif #endif
#ifdef __UNIXOS2__
char *progname2;
char *dotpos;
#endif
/* /*
* strip path off of program name (XXX - this is OS specific) * strip path off of program name (XXX - this is OS specific)
...@@ -198,13 +194,6 @@ XGetDefault( ...@@ -198,13 +194,6 @@ XGetDefault(
if (progname2 && (!progname || progname < progname2)) if (progname2 && (!progname || progname < progname2))
progname = progname2; progname = progname2;
#endif #endif
#ifdef __UNIXOS2__ /* Very similar to WIN32 */
progname2 = strrchr (prog, '\\');
if (progname2 && (!progname || progname < progname2))
progname = progname2;
dotpos = strrchr (prog, '.');
if (dotpos && (dotpos>progname2)) *dotpos='\0';
#endif /* We take out the .exe suffix */
if (progname) if (progname)
progname++; progname++;
......
...@@ -806,7 +806,7 @@ SRCS3 = \ ...@@ -806,7 +806,7 @@ SRCS3 = \
LockDis.c \ LockDis.c \
x11_trans.c \ x11_trans.c \
xim_trans.c \ xim_trans.c \
$(XKBSRCS) $(LCSRCS) $(MISCSRCS) $(XKBSRCS) $(LCSRCS)
OBJS3 = \ OBJS3 = \
Lab.o \ Lab.o \
...@@ -889,7 +889,7 @@ OBJS3 = \ ...@@ -889,7 +889,7 @@ OBJS3 = \
LockDis.o \ LockDis.o \
x11_trans.o \ x11_trans.o \
xim_trans.o \ xim_trans.o \
$(XKBOBJS) $(LCOBJS) $(MISCOBJS) $(XKBOBJS) $(LCOBJS)
SHAREDLCDEPSYMSRCS = XlcDL.c XlcSL.c SHAREDLCDEPSYMSRCS = XlcDL.c XlcSL.c
...@@ -1036,14 +1036,6 @@ SHAREDLCOBJS = \ ...@@ -1036,14 +1036,6 @@ SHAREDLCOBJS = \
$(SHAREDLCDEPOBJS) \ $(SHAREDLCDEPOBJS) \
$(SHAREDI18NSTATICOBJS) $(SHAREDI18NSTATICOBJS)
#ifdef OS2Architecture
MISCSRCS = os2Stubs.c
#endif
#ifdef OS2Architecture
MISCOBJS = os2Stubs.o
#endif
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
EXTRAUNSHAREDOBJS = $(STATICLCOBJS) EXTRAUNSHAREDOBJS = $(STATICLCOBJS)
......
...@@ -129,9 +129,6 @@ XReadBitmapFileData ( ...@@ -129,9 +129,6 @@ XReadBitmapFileData (
int hx = -1; /* x hotspot */ int hx = -1; /* x hotspot */
int hy = -1; /* y hotspot */ int hy = -1; /* y hotspot */
#ifdef __UNIXOS2__
filename = __XOS2RedirRoot(filename);
#endif
if (!(fstream = fopen(filename, "r"))) if (!(fstream = fopen(filename, "r")))
return BitmapOpenFailed; return BitmapOpenFailed;
......
...@@ -99,7 +99,7 @@ _XlcMapOSLocaleName( ...@@ -99,7 +99,7 @@ _XlcMapOSLocaleName(
char *osname, char *osname,
char *siname) char *siname)
{ {
#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(__UNIXOS2__) || defined(linux) #if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(linux)
# ifdef hpux # ifdef hpux
# ifndef _LastCategory # ifndef _LastCategory
/* HPUX 9 and earlier */ /* HPUX 9 and earlier */
...@@ -116,7 +116,7 @@ _XlcMapOSLocaleName( ...@@ -116,7 +116,7 @@ _XlcMapOSLocaleName(
# define STARTCHAR '\001' # define STARTCHAR '\001'
# define ENDCHAR '\001' # define ENDCHAR '\001'
# else # else
# if defined(WIN32) || defined(__UNIXOS2__) # if defined(WIN32)
# define SKIPCOUNT 1 # define SKIPCOUNT 1
# define STARTCHAR '=' # define STARTCHAR '='
# define ENDCHAR ';' # define ENDCHAR ';'
......
...@@ -122,14 +122,6 @@ void XSetWMProperties ( ...@@ -122,14 +122,6 @@ void XSetWMProperties (
* systems will have to change this. * systems will have to change this.
*/ */
char *cp = strrchr (argv[0], '/'); char *cp = strrchr (argv[0], '/');
#ifdef __UNIXOS2__
char *os2_cp = strrchr (argv[0],'\\');
char *dot_cp = strrchr (argv[0],'.');
if (os2_cp && (os2_cp > cp)) {
if(dot_cp && (dot_cp > os2_cp)) *dot_cp = '\0';
cp=os2_cp;
}
#endif
tmp.res_name = (cp ? cp + 1 : argv[0]); tmp.res_name = (cp ? cp + 1 : argv[0]);
} }
tmp.res_class = classHints->res_class; tmp.res_class = classHints->res_class;
......
...@@ -105,9 +105,6 @@ XWriteBitmapFile( ...@@ -105,9 +105,6 @@ XWriteBitmapFile(
else else
name++; name++;
#ifdef __UNIXOS2__
filename = (char*)__XOS2RedirRoot(filename);
#endif
if (!(stream = fopen(filename, "w"))) if (!(stream = fopen(filename, "w")))
return(BitmapOpenFailed); return(BitmapOpenFailed);
......
...@@ -279,11 +279,7 @@ _XkbGetCharset(void) ...@@ -279,11 +279,7 @@ _XkbGetCharset(void)
else { else {
struct stat sbuf; struct stat sbuf;
FILE *file; FILE *file;
#ifndef __UNIXOS2__
char *cf = CHARSET_FILE; char *cf = CHARSET_FILE;
#else
char *cf = __XOS2RedirRoot(CHARSET_FILE);
#endif
#ifndef S_ISREG #ifndef S_ISREG
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
......
...@@ -51,13 +51,9 @@ in this Software without prior written authorization from The Open Group. ...@@ -51,13 +51,9 @@ in this Software without prior written authorization from The Open Group.
#ifndef X_WCHAR #ifndef X_WCHAR
#include <stddef.h> #include <stddef.h>
#else #else
#ifdef __UNIXOS2__
#include <stdlib.h>
#else
/* replace this with #include or typedef appropriate for your system */ /* replace this with #include or typedef appropriate for your system */
typedef unsigned long wchar_t; typedef unsigned long wchar_t;
#endif #endif
#endif
extern int extern int
......
...@@ -169,14 +169,9 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *); ...@@ -169,14 +169,9 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *);
#define ECHECK(err) (WSAGetLastError() == err) #define ECHECK(err) (WSAGetLastError() == err)
#define ESET(val) WSASetLastError(val) #define ESET(val) WSASetLastError(val)
#else #else
#ifdef __UNIXOS2__
#define ECHECK(err) (errno == err)
#define ESET(val)
#else
#define ECHECK(err) (errno == err) #define ECHECK(err) (errno == err)
#define ESET(val) errno = val #define ESET(val) errno = val
#endif #endif
#endif
#if defined(LOCALCONN) || defined(LACHMAN) #if defined(LOCALCONN) || defined(LACHMAN)
#ifdef EMSGSIZE #ifdef EMSGSIZE
...@@ -190,14 +185,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *); ...@@ -190,14 +185,6 @@ extern int _X11TransSocketCongestionChange(XtransConnInfo, int *);
#endif #endif
#endif #endif
#ifdef __UNIXOS2__
#if !USE_XCB
#define select(n,r,w,x,t) os2ClientSelect(n,r,w,x,t)
#endif /* !USE_XCB */
#include <limits.h>
#define MAX_PATH _POSIX_PATH_MAX
#endif
#if !USE_XCB #if !USE_XCB
#define STARTITERATE(tpvar,type,start,endcond) \ #define STARTITERATE(tpvar,type,start,endcond) \
...@@ -4054,10 +4041,6 @@ static int AccessFile (path, pathbuf, len_pathbuf, pathret) ...@@ -4054,10 +4041,6 @@ static int AccessFile (path, pathbuf, len_pathbuf, pathret)
/* try the places set in the environment */ /* try the places set in the environment */
drive = getenv ("_XBASEDRIVE"); drive = getenv ("_XBASEDRIVE");
#ifdef __UNIXOS2__
if (!drive)
drive = getenv ("X11ROOT");
#endif
if (!drive) if (!drive)
drive = "C:"; drive = "C:";
len = strlen (drive) + strlen (path); len = strlen (drive) + strlen (path);
...@@ -4070,7 +4053,6 @@ static int AccessFile (path, pathbuf, len_pathbuf, pathret) ...@@ -4070,7 +4053,6 @@ static int AccessFile (path, pathbuf, len_pathbuf, pathret)
return 1; return 1;
} }
#ifndef __UNIXOS2__
/* one last place to look */ /* one last place to look */
drive = getenv ("HOMEDRIVE"); drive = getenv ("HOMEDRIVE");
if (drive) { if (drive) {
...@@ -4105,7 +4087,6 @@ static int AccessFile (path, pathbuf, len_pathbuf, pathret) ...@@ -4105,7 +4087,6 @@ static int AccessFile (path, pathbuf, len_pathbuf, pathret)
} }
} }
} }
#endif
return 0; return 0;
} }
......
...@@ -1249,12 +1249,6 @@ struct _XConnWatchInfo { /* info from XAddConnectionWatch */ ...@@ -1249,12 +1249,6 @@ struct _XConnWatchInfo { /* info from XAddConnectionWatch */
struct _XConnWatchInfo *next; struct _XConnWatchInfo *next;
}; };
#ifdef __UNIXOS2__
extern char* __XOS2RedirRoot(
char*
);
#endif
extern int _XTextHeight( extern int _XTextHeight(
XFontStruct* /* font_struct */, XFontStruct* /* font_struct */,
_Xconst char* /* string */, _Xconst char* /* string */,
......
...@@ -305,7 +305,7 @@ typedef unsigned char XrmBits; ...@@ -305,7 +305,7 @@ typedef unsigned char XrmBits;
static XrmBits const xrmtypes[256] = { static XrmBits const xrmtypes[256] = {
EOS,0,0,0,0,0,0,0, EOS,0,0,0,0,0,0,0,
0,SPACE,EOL,0,0, 0,SPACE,EOL,0,0,
#if defined(WIN32) || defined(__UNIXOS2__) #if defined(WIN32)
EOL, /* treat CR the same as LF, just in case */ EOL, /* treat CR the same as LF, just in case */
#else #else
0, 0,
...@@ -1575,10 +1575,6 @@ ReadInFile(_Xconst char *filename) ...@@ -1575,10 +1575,6 @@ ReadInFile(_Xconst char *filename)
register int fd, size; register int fd, size;
char * filebuf; char * filebuf;
#ifdef __UNIXOS2__
filename = __XOS2RedirRoot(filename);
#endif
/* /*
* MS-Windows and OS/2 note: Default open mode includes O_TEXT * MS-Windows and OS/2 note: Default open mode includes O_TEXT
*/ */
...@@ -1610,17 +1606,6 @@ ReadInFile(_Xconst char *filename) ...@@ -1610,17 +1606,6 @@ ReadInFile(_Xconst char *filename)
} }
size = read (fd, filebuf, size); size = read (fd, filebuf, size);
#ifdef __UNIXOS2__
{ /* kill CRLF */
int i,k;
for (i=k=0; i<size; i++)
if (filebuf[i] != 0x0d) {
filebuf[k++] = filebuf[i];
}
filebuf[k] = 0;
}
#endif
if (size < 0) { if (size < 0) {
close (fd); close (fd);
Xfree(filebuf); Xfree(filebuf);
......
...@@ -730,9 +730,6 @@ LoadColornameDB(void) ...@@ -730,9 +730,6 @@ LoadColornameDB(void)
if ((pathname = getenv("XCMSDB")) == NULL) { if ((pathname = getenv("XCMSDB")) == NULL) {
pathname = XCMSDB; pathname = XCMSDB;
} }
#ifdef __UNIXOS2__
pathname = __XOS2RedirRoot(pathname);
#endif
length = strlen(pathname); length = strlen(pathname);
if ((length == 0) || (length >= (BUFSIZ - 5))){ if ((length == 0) || (length >= (BUFSIZ - 5))){
......
...@@ -344,15 +344,6 @@ read_line( ...@@ -344,15 +344,6 @@ read_line(
cur += len; cur += len;
str[cur] = '\0'; str[cur] = '\0';
#ifdef __UNIXOS2__ /* Take out carriage returns under OS/2 */
if (cur>1) {
if (str[cur-2] == '\r' && str[cur-1] == '\n') {
str[cur-2] = '\n';
str[cur-1] = '\0';
cur--;
}
}
#endif
if (!quoted && cur > 1 && str[cur - 2] == SYM_BACKSLASH && if (!quoted && cur > 1 && str[cur - 2] == SYM_BACKSLASH &&
(str[cur - 1] == SYM_NEWLINE || str[cur-1] == SYM_CR)) { (str[cur - 1] == SYM_NEWLINE || str[cur-1] == SYM_CR)) {
/* the line is ended backslash followed by newline. /* the line is ended backslash followed by newline.
...@@ -1286,11 +1277,7 @@ _XlcCreateLocaleDataBase( ...@@ -1286,11 +1277,7 @@ _XlcCreateLocaleDataBase(
if (name == NULL) if (name == NULL)
return (XPointer)NULL; return (XPointer)NULL;
#ifndef __UNIXOS2__
name_q = XrmStringToQuark(name); name_q = XrmStringToQuark(name);
#else
name_q = XrmStringToQuark((char*)__XOS2RedirRoot(name));
#endif
for (list = _db_list; list; list = list->next) { for (list = _db_list; list; list = list->next) {
if (name_q == list->name_q) { if (name_q == list->name_q) {
list->ref_count++; list->ref_count++;
......
...@@ -36,9 +36,6 @@ ...@@ -36,9 +36,6 @@
/************************************************************************/ /************************************************************************/
#ifdef __UNIXOS2__
# define seteuid setuid
#endif
#define iscomment(ch) ((ch) == '#' || (ch) == '\0') #define iscomment(ch) ((ch) == '#' || (ch) == '\0')
#if defined(WIN32) #if defined(WIN32)
#define isreadable(f) (_XAccessFile(f)) #define isreadable(f) (_XAccessFile(f))
...@@ -46,11 +43,7 @@ ...@@ -46,11 +43,7 @@
#define isreadable(f) ((access((f), R_OK) != -1) ? 1 : 0) #define isreadable(f) ((access((f), R_OK) != -1) ? 1 : 0)
#endif #endif
#ifndef __UNIXOS2__
#define LC_PATHDELIM ':' #define LC_PATHDELIM ':'
#else
#define LC_PATHDELIM ';'
#endif
#define XLC_BUFSIZE 256 #define XLC_BUFSIZE 256
...@@ -92,40 +85,7 @@ parse_line( ...@@ -92,40 +85,7 @@ parse_line(
return argc; return argc;
} }
#ifdef __UNIXOS2__ #if defined(WIN32)
/* fg021216: entries in locale files are separated by colons while under
OS/2, path entries are separated by semicolon, so we need two functions */
static int
parse_line1(
char *line,
char **argv,
int argsize)
{
int argc = 0;
char *p = line;
while (argc < argsize) {
while (isspace(*p)) {
++p;
}
if (*p == '\0') {
break;
}
argv[argc++] = p;
while (*p != ';' && *p != '\n' && *p != '\0') {
++p;
}
if (*p == '\0') {
break;
}
*p++ = '\0';
}
return argc;
}
#elif defined(WIN32)
/* this is parse_line but skips drive letters at the beginning of the entry */ /* this is parse_line but skips drive letters at the beginning of the entry */
static int static int
...@@ -160,7 +120,7 @@ parse_line1( ...@@ -160,7 +120,7 @@ parse_line1(
return argc; return argc;
} }
#endif /* __UNIXOS2__ */ #endif /* WIN32 */
/* Splits a colon separated list of directories, and returns the constituent /* Splits a colon separated list of directories, and returns the constituent
paths (without trailing slash). At most argsize constituents are stored paths (without trailing slash). At most argsize constituents are stored
...@@ -174,7 +134,7 @@ _XlcParsePath( ...@@ -174,7 +134,7 @@ _XlcParsePath(
char *p = path; char *p = path;
int n, i; int n, i;
#if !defined(__UNIXOS2__) && !defined(WIN32) #if !defined(WIN32)
n = parse_line(path, argv, argsize); n = parse_line(path, argv, argsize);
#else #else
n = parse_line1(path, argv, argsize); n = parse_line1(path, argv, argsize);
...@@ -265,11 +225,7 @@ xlocaledir( ...@@ -265,11 +225,7 @@ xlocaledir(
#endif /* NO_XLOCALEDIR */ #endif /* NO_XLOCALEDIR */
if (len < buf_len) if (len < buf_len)
#ifndef __UNIXOS2__
strncpy(p, XLOCALEDIR, buf_len - len); strncpy(p, XLOCALEDIR, buf_len - len);
#else
strncpy(p,__XOS2RedirRoot(XLOCALEDIR), buf_len - len);
#endif
buf[buf_len-1] = '\0'; buf[buf_len-1] = '\0';
} }
...@@ -343,11 +299,7 @@ xlocalelibdir( ...@@ -343,11 +299,7 @@ xlocalelibdir(
#endif /* NO_XLOCALEDIR */ #endif /* NO_XLOCALEDIR */
if (len < buf_len) if (len < buf_len)
#ifndef __UNIXOS2__
strncpy(p, XLOCALELIBDIR, buf_len - len); strncpy(p, XLOCALELIBDIR, buf_len - len);
#else
strncpy(p,__XOS2RedirRoot(XLOCALELIBDIR), buf_len - len);
#endif
buf[buf_len-1] = '\0'; buf[buf_len-1] = '\0';
} }
...@@ -374,17 +326,6 @@ resolve_name( ...@@ -374,17 +326,6 @@ resolve_name(
char *p = buf; char *p = buf;
int n; int n;
char *args[2], *from, *to; char *args[2], *from, *to;
#ifdef __UNIXOS2__ /* Take out CR under OS/2 */
int len;
len = strlen(p);
if (len > 1) {
if (*(p+len-2) == '\r' && *(p+len-1) == '\n') {
*(p+len-2) = '\n';
*(p+len-1) = '\0';
}
}
#endif
while (isspace(*p)) { while (isspace(*p)) {
++p; ++p;
} }
......
...@@ -523,7 +523,7 @@ SUBDIRS = $(STDDIRS) \ ...@@ -523,7 +523,7 @@ SUBDIRS = $(STDDIRS) \
$(IPLANDIRS) $(ILBMDIR) \ $(IPLANDIRS) $(ILBMDIR) \
$(DDXDIRS) $(FBSUBDIR) $(KDRIVEDIRS) $(MIEXTDIRS) $(DDXDIRS) $(FBSUBDIR) $(KDRIVEDIRS) $(MIEXTDIRS)
#if defined(ServerToInstall) && !defined(OS2Architecture) #if defined(ServerToInstall)
install:: install::
-(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) ServerToInstall X) -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) ServerToInstall X)
#endif #endif
......
...@@ -1481,11 +1481,7 @@ SecurityFreePropertyAccessList(void) ...@@ -1481,11 +1481,7 @@ SecurityFreePropertyAccessList(void)
} }
} /* SecurityFreePropertyAccessList */ } /* SecurityFreePropertyAccessList */
#ifndef __UNIXOS2__
#define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') ) #define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') )
#else
#define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') )
#endif
static char * static char *
SecuritySkipWhitespace( SecuritySkipWhitespace(
...@@ -1774,8 +1770,6 @@ SecurityLoadPropertyAccessList(void) ...@@ -1774,8 +1770,6 @@ SecurityLoadPropertyAccessList(void)
#endif #endif
#ifndef __UNIXOS2__
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
f = Fopen(_NXGetPolicyFilePath(SecurityPolicyFile), "r"); f = Fopen(_NXGetPolicyFilePath(SecurityPolicyFile), "r");
...@@ -1786,20 +1780,6 @@ SecurityLoadPropertyAccessList(void) ...@@ -1786,20 +1780,6 @@ SecurityLoadPropertyAccessList(void)
#endif #endif
#else
#ifdef NXAGENT_SERVER
f = Fopen((char*)__XOS2RedirRoot( _NXGetPolicyFilePath(SecurityPolicyFile)), "r");
#else
f = Fopen((char*)__XOS2RedirRoot(SecurityPolicyFile), "r");
#endif
#endif
if (!f) if (!f)
{ {
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
......
...@@ -6,11 +6,6 @@ NULL = ...@@ -6,11 +6,6 @@ NULL =
SUBDIRS = compext \ SUBDIRS = compext \
$(NULL) $(NULL)
#ifdef OS2Architecture
SRCS1 = os2Stub.c
OBJS1 = os2Stub.o
#endif
SRCS = \ SRCS = \
NXwindow.c \ NXwindow.c \
NXevents.c \ NXevents.c \
...@@ -71,7 +66,6 @@ SRCS = \ ...@@ -71,7 +66,6 @@ SRCS = \
stubs.c \ stubs.c \
xpstubs.c \ xpstubs.c \
miinitext.c \ miinitext.c \
$(SRCS1) \
$(NULL) $(NULL)
OBJS = \ OBJS = \
...@@ -134,7 +128,6 @@ OBJS = \ ...@@ -134,7 +128,6 @@ OBJS = \
stubs.o \ stubs.o \
xpstubs.o \ xpstubs.o \
miinitext.o \ miinitext.o \
$(OBJS1) \
$(NULL) $(NULL)
VFBINCLUDES = \ VFBINCLUDES = \
......
...@@ -263,7 +263,7 @@ void OsBlockSignals (void); ...@@ -263,7 +263,7 @@ void OsBlockSignals (void);
void OsReleaseSignals (void); void OsReleaseSignals (void);
#if !defined(WIN32) && !defined(__UNIXOS2__) #if !defined(WIN32)
extern int System(char *); extern int System(char *);
extern void * Popen(char *, char *); extern void * Popen(char *, char *);
extern int Pclose(void *); extern int Pclose(void *);
......
...@@ -327,8 +327,6 @@ SOFTWARE. ...@@ -327,8 +327,6 @@ SOFTWARE.
#if (defined(SVR4) && defined(i386)) || \ #if (defined(SVR4) && defined(i386)) || \
defined(__alpha__) || defined(__alpha) || \ defined(__alpha__) || defined(__alpha) || \
defined(__i386__) || defined(__i386) || \ defined(__i386__) || defined(__i386) || \
defined(__UNIXOS2__) || \
defined(__OS2ELF__) || \
defined(__QNX__) || \ defined(__QNX__) || \
defined(__s390x__) || defined(__s390__) defined(__s390x__) || defined(__s390__)
......
...@@ -91,9 +91,6 @@ SOFTWARE. ...@@ -91,9 +91,6 @@ SOFTWARE.
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include "misc.h" #include "misc.h"
#ifdef __UNIXOS2__
#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t)
#endif
#include "osdep.h" #include "osdep.h"
#include <nx-X11/Xpoll.h> #include <nx-X11/Xpoll.h>
#include "dixstruct.h" #include "dixstruct.h"
......
...@@ -1139,9 +1139,6 @@ ResetHosts (char *display) ...@@ -1139,9 +1139,6 @@ ResetHosts (char *display)
if (fnamelen > sizeof(fname)) if (fnamelen > sizeof(fname))
FatalError("Display name `%s' is too long\n", display); FatalError("Display name `%s' is too long\n", display);
sprintf(fname, ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX, 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) if ((fd = fopen (fname, "r")) != 0)
{ {
...@@ -1152,10 +1149,6 @@ ResetHosts (char *display) ...@@ -1152,10 +1149,6 @@ ResetHosts (char *display)
continue; continue;
if ((ptr = strchr(ohostname, '\n')) != 0) if ((ptr = strchr(ohostname, '\n')) != 0)
*ptr = 0; *ptr = 0;
#ifdef __UNIXOS2__
if ((ptr = strchr(ohostname, '\r')) != 0)
*ptr = 0;
#endif
hostlen = strlen(ohostname) + 1; hostlen = strlen(ohostname) + 1;
for (i = 0; i < hostlen; i++) for (i = 0; i < hostlen; i++)
lhostname[i] = tolower(ohostname[i]); lhostname[i] = tolower(ohostname[i]);
......
...@@ -107,11 +107,6 @@ SOFTWARE. ...@@ -107,11 +107,6 @@ SOFTWARE.
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif #endif
#ifdef __UNIXOS2__
#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t)
extern __const__ int _nfiles;
#endif
#if defined(TCPCONN) #if defined(TCPCONN)
# include <netinet/in.h> # include <netinet/in.h>
# include <arpa/inet.h> # include <arpa/inet.h>
...@@ -124,21 +119,17 @@ extern __const__ int _nfiles; ...@@ -124,21 +119,17 @@ extern __const__ int _nfiles;
# ifdef CSRG_BASED # ifdef CSRG_BASED
# include <sys/param.h> # include <sys/param.h>
# endif # endif
# ifndef __UNIXOS2__
# include <netinet/tcp.h> # include <netinet/tcp.h>
# endif # endif
# endif # endif
# endif
# include <arpa/inet.h> # include <arpa/inet.h>
#endif #endif
#if !defined(__UNIXOS2__)
#ifndef Lynx #ifndef Lynx
#include <sys/uio.h> #include <sys/uio.h>
#else #else
#include <uio.h> #include <uio.h>
#endif #endif
#endif
#endif /* WIN32 */ #endif /* WIN32 */
#include "misc.h" #include "misc.h"
#include "osdep.h" #include "osdep.h"
...@@ -173,9 +164,6 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ ...@@ -173,9 +164,6 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
Bool PartialNetwork; /* continue even if unable to bind all addrs */ Bool PartialNetwork; /* continue even if unable to bind all addrs */
static Pid_t ParentProcess; static Pid_t ParentProcess;
#ifdef __UNIXOS2__
Pid_t GetPPID(Pid_t pid);
#endif
static Bool debug_conns = FALSE; static Bool debug_conns = FALSE;
...@@ -314,8 +302,6 @@ InitConnectionLimits(void) ...@@ -314,8 +302,6 @@ InitConnectionLimits(void)
#ifndef __CYGWIN__ #ifndef __CYGWIN__
#ifndef __UNIXOS2__
#if !defined(XNO_SYSCONF) && defined(_SC_OPEN_MAX) #if !defined(XNO_SYSCONF) && defined(_SC_OPEN_MAX)
lastfdesc = sysconf(_SC_OPEN_MAX) - 1; lastfdesc = sysconf(_SC_OPEN_MAX) - 1;
#endif #endif
...@@ -330,10 +316,6 @@ InitConnectionLimits(void) ...@@ -330,10 +316,6 @@ InitConnectionLimits(void)
lastfdesc = _NFILE - 1; lastfdesc = _NFILE - 1;
#endif #endif
#else /* __UNIXOS2__ */
lastfdesc = _nfiles - 1;
#endif
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
/* This is the fallback */ /* This is the fallback */
...@@ -449,15 +431,6 @@ CreateWellKnownSockets(void) ...@@ -449,15 +431,6 @@ CreateWellKnownSockets(void)
RunFromSmartParent = TRUE; RunFromSmartParent = TRUE;
OsSignal(SIGUSR1, handler); OsSignal(SIGUSR1, handler);
ParentProcess = getppid (); 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 (RunFromSmartParent) {
if (ParentProcess > 1) { if (ParentProcess > 1) {
kill (ParentProcess, SIGUSR1); kill (ParentProcess, SIGUSR1);
......
...@@ -70,7 +70,7 @@ SOFTWARE. ...@@ -70,7 +70,7 @@ SOFTWARE.
#include <nx-X11/Xtrans/Xtrans.h> #include <nx-X11/Xtrans/Xtrans.h>
#include <nx-X11/Xmd.h> #include <nx-X11/Xmd.h>
#include <errno.h> #include <errno.h>
#if !defined(__UNIXOS2__) && !defined(WIN32) #if !defined(WIN32)
#ifndef Lynx #ifndef Lynx
#include <sys/uio.h> #include <sys/uio.h>
#else #else
...@@ -92,7 +92,6 @@ CallbackListPtr FlushCallback; ...@@ -92,7 +92,6 @@ CallbackListPtr FlushCallback;
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
* systems are broken and return EWOULDBLOCK when they should return EAGAIN * systems are broken and return EWOULDBLOCK when they should return EAGAIN
*/ */
#ifndef __UNIXOS2__
#ifndef WIN32 #ifndef WIN32
#if defined(EAGAIN) && defined(EWOULDBLOCK) #if defined(EAGAIN) && defined(EWOULDBLOCK)
#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK) #define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK)
...@@ -106,9 +105,6 @@ CallbackListPtr FlushCallback; ...@@ -106,9 +105,6 @@ CallbackListPtr FlushCallback;
#else /* WIN32 The socket errorcodes differ from the normal errors*/ #else /* WIN32 The socket errorcodes differ from the normal errors*/
#define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK) #define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK)
#endif #endif
#else /* __UNIXOS2__ Writing to full pipes may return ENOSPC */
#define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK || err == ENOSPC)
#endif
Bool CriticalOutputPending; Bool CriticalOutputPending;
int timesThisConnection = 0; int timesThisConnection = 0;
......
...@@ -214,9 +214,6 @@ LogInit(const char *fname, const char *backup) ...@@ -214,9 +214,6 @@ LogInit(const char *fname, const char *backup)
sprintf(suffix, backup, display); sprintf(suffix, backup, display);
sprintf(oldLog, "%s%s", logFileName, suffix); sprintf(oldLog, "%s%s", logFileName, suffix);
free(suffix); free(suffix);
#ifdef __UNIXOS2__
remove(oldLog);
#endif
if (rename(logFileName, oldLog) == -1) { if (rename(logFileName, oldLog) == -1) {
FatalError("Cannot move old log file (\"%s\" to \"%s\"\n", FatalError("Cannot move old log file (\"%s\" to \"%s\"\n",
logFileName, oldLog); logFileName, oldLog);
......
...@@ -397,7 +397,6 @@ OsInitColors(void) ...@@ -397,7 +397,6 @@ OsInitColors(void)
if (!was_here) if (!was_here)
{ {
#ifndef __UNIXOS2__
#ifdef NX_TRANS_SOCKET #ifdef NX_TRANS_SOCKET
/* /*
* Add the trailing '.txt' if a * Add the trailing '.txt' if a
...@@ -418,12 +417,6 @@ OsInitColors(void) ...@@ -418,12 +417,6 @@ OsInitColors(void)
strcpy(path, rgbPath); strcpy(path, rgbPath);
strcat(path, ".txt"); strcat(path, ".txt");
#endif #endif
#else
char *tmp = (char*)__XOS2RedirRoot(rgbPath);
path = (char*)ALLOCATE_LOCAL(strlen(tmp) +5);
strcpy(path, tmp);
strcat(path, ".txt");
#endif
if (!(rgb = fopen(path, "r"))) if (!(rgb = fopen(path, "r")))
{ {
#ifdef NX_TRANS_SOCKET #ifdef NX_TRANS_SOCKET
...@@ -438,11 +431,7 @@ OsInitColors(void) ...@@ -438,11 +431,7 @@ OsInitColors(void)
while(fgets(line, sizeof(line), rgb)) while(fgets(line, sizeof(line), rgb))
{ {
lineno++; lineno++;
#ifndef __UNIXOS2__
if (sscanf(line,"%d %d %d %[^\n]\n", &red, &green, &blue, name) == 4) 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 && if (red >= 0 && red <= 0xff &&
green >= 0 && green <= 0xff && green >= 0 && green <= 0xff &&
......
...@@ -91,7 +91,7 @@ SOFTWARE. ...@@ -91,7 +91,7 @@ SOFTWARE.
#if defined(NOFILE) && !defined(NOFILES_MAX) #if defined(NOFILE) && !defined(NOFILES_MAX)
#define OPEN_MAX NOFILE #define OPEN_MAX NOFILE
#else #else
#if !defined(__UNIXOS2__) && !defined(WIN32) #if !defined(WIN32)
#define OPEN_MAX NOFILES_MAX #define OPEN_MAX NOFILES_MAX
#else #else
#define OPEN_MAX 256 #define OPEN_MAX 256
......
...@@ -133,7 +133,7 @@ OsInit(void) ...@@ -133,7 +133,7 @@ OsInit(void)
dup2 (fileno (err), 2); dup2 (fileno (err), 2);
fclose (err); 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]; static char buf[BUFSIZ];
setvbuf (stderr, buf, _IOLBF, BUFSIZ); setvbuf (stderr, buf, _IOLBF, BUFSIZ);
......
...@@ -318,9 +318,7 @@ OsSignal(sig, handler) ...@@ -318,9 +318,7 @@ OsSignal(sig, handler)
* server at a time. This keeps the servers from stomping on each other * server at a time. This keeps the servers from stomping on each other
* if the user forgets to give them different display numbers. * if the user forgets to give them different display numbers.
*/ */
#ifndef __UNIXOS2__
#define LOCK_DIR "/tmp" #define LOCK_DIR "/tmp"
#endif
#define LOCK_TMP_PREFIX "/.tX" #define LOCK_TMP_PREFIX "/.tX"
#define LOCK_PREFIX "/.X" #define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock" #define LOCK_SUFFIX "-lock"
...@@ -330,10 +328,6 @@ OsSignal(sig, handler) ...@@ -330,10 +328,6 @@ OsSignal(sig, handler)
#include <sys/param.h> #include <sys/param.h>
#endif #endif
#ifdef __UNIXOS2__
#define link rename
#endif
#ifndef PATH_MAX #ifndef PATH_MAX
#ifndef Lynx #ifndef Lynx
#include <sys/param.h> #include <sys/param.h>
...@@ -372,14 +366,7 @@ LockServer(void) ...@@ -372,14 +366,7 @@ LockServer(void)
/* /*
* Path names * Path names
*/ */
#ifndef __UNIXOS2__
tmppath = LOCK_DIR; 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)); sprintf(port, "%d", atoi(display));
len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) : len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) :
...@@ -422,13 +409,11 @@ LockServer(void) ...@@ -422,13 +409,11 @@ LockServer(void)
if (write(lfd, pid_str, 11) != 11) if (write(lfd, pid_str, 11) != 11)
FatalError("Could not write pid to lock file in %s\n", tmp); FatalError("Could not write pid to lock file in %s\n", tmp);
#ifndef __UNIXOS2__
#ifndef USE_CHMOD #ifndef USE_CHMOD
(void) fchmod(lfd, 0444); (void) fchmod(lfd, 0444);
#else #else
(void) chmod(tmp, 0444); (void) chmod(tmp, 0444);
#endif #endif
#endif
(void) close(lfd); (void) close(lfd);
/* /*
...@@ -507,9 +492,6 @@ UnlockServer(void) ...@@ -507,9 +492,6 @@ UnlockServer(void)
if (!StillLocking){ if (!StillLocking){
#ifdef __UNIXOS2__
(void) chmod(LockFile,S_IREAD|S_IWRITE);
#endif /* __UNIXOS2__ */
(void) unlink(LockFile); (void) unlink(LockFile);
} }
} }
...@@ -928,7 +910,7 @@ ProcessCommandLine(int argc, char *argv[]) ...@@ -928,7 +910,7 @@ ProcessCommandLine(int argc, char *argv[])
#ifdef SERVER_LOCK #ifdef SERVER_LOCK
else if ( strcmp ( argv[i], "-nolock") == 0) else if ( strcmp ( argv[i], "-nolock") == 0)
{ {
#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__) #if !defined(WIN32) && !defined(__CYGWIN__)
if (getuid() != 0) if (getuid() != 0)
ErrorF("Warning: the -nolock option can only be used by root\n"); ErrorF("Warning: the -nolock option can only be used by root\n");
else else
...@@ -1260,7 +1242,7 @@ ExpandCommandLine(int *pargc, char ***pargv) ...@@ -1260,7 +1242,7 @@ ExpandCommandLine(int *pargc, char ***pargv)
{ {
int i; int i;
#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__) #if !defined(WIN32) && !defined(__CYGWIN__)
if (getuid() != geteuid()) if (getuid() != geteuid())
return; return;
#endif #endif
...@@ -1609,7 +1591,7 @@ OsReleaseSignals (void) ...@@ -1609,7 +1591,7 @@ OsReleaseSignals (void)
#endif #endif
} }
#if !defined(WIN32) && !defined(__UNIXOS2__) #if !defined(WIN32)
/* /*
* "safer" versions of system(3), popen(3) and pclose(3) which give up * "safer" versions of system(3), popen(3) and pclose(3) which give up
* all privs before running a command. * all privs before running a command.
...@@ -1964,7 +1946,7 @@ Fclose(void * iop) ...@@ -1964,7 +1946,7 @@ Fclose(void * iop)
#endif #endif
} }
#endif /* !WIN32 && !__UNIXOS2__ */ #endif /* !WIN32 */
/* /*
......
...@@ -128,9 +128,6 @@ XkbConfigRtrnPtr rtrn; ...@@ -128,9 +128,6 @@ XkbConfigRtrnPtr rtrn;
sprintf(buf,"X%s-config%s%s",display,(dName[0]?".":""),dName); sprintf(buf,"X%s-config%s%s",display,(dName[0]?".":""),dName);
} }
#endif #endif
#ifdef __UNIXOS2__
strcpy(buf,(char*)__XOS2RedirRoot(buf));
#endif
#ifdef DEBUG #ifdef DEBUG
ErrorF("Looking for keyboard configuration in %s...",buf); ErrorF("Looking for keyboard configuration in %s...",buf);
#endif #endif
......
...@@ -82,7 +82,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -82,7 +82,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\"" #define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
#define POST_ERROR_MSG2 "\"End of messages from xkbcomp\"" #define POST_ERROR_MSG2 "\"End of messages from xkbcomp\""
#if defined(__UNIXOS2__) || defined(WIN32) #if defined(WIN32)
#define PATHSEPARATOR "\\" #define PATHSEPARATOR "\\"
#else #else
#define PATHSEPARATOR "/" #define PATHSEPARATOR "/"
...@@ -558,8 +558,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; ...@@ -558,8 +558,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
#endif #endif
#ifndef __UNIXOS2__
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory); char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory);
char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory); char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory);
...@@ -568,23 +566,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; ...@@ -568,23 +566,6 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
char *xkbbindir = XkbBinDirectory; char *xkbbindir = XkbBinDirectory;
#endif #endif
#else
/* relocate the basedir and replace the slashes with backslashes */
#ifdef NXAGENT_SERVER
char *xkbbasedir = (char*)__XOS2RedirRoot(_NXGetXkbBasePath(XkbBaseDirectory));
char *xkbbindir = (char*)__XOS2RedirRoot(_NXGetXkbCompPath(XkbBinDirectory));
#else
char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory);
char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory);
#endif
int i;
for (i=0; i<strlen(xkbbasedir); i++)
if (xkbbasedir[i]=='/') xkbbasedir[i]='\\';
for (i=0; i<strlen(xkbbindir); i++)
if (xkbbindir[i]=='/') xkbbindir[i]='\\';
#endif
cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"",
xkbbindir, xkbbindir,
((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)),
...@@ -675,7 +656,6 @@ char tmpname[PATH_MAX]; ...@@ -675,7 +656,6 @@ char tmpname[PATH_MAX];
for xkbcomp. xkbcomp does not read from stdin. */ for xkbcomp. xkbcomp does not read from stdin. */
char *xkmfile = tmpname; char *xkmfile = tmpname;
#endif #endif
#ifndef __UNIXOS2__
#ifdef NXAGENT_SERVER #ifdef NXAGENT_SERVER
char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory); char *xkbbasedir = _NXGetXkbBasePath(XkbBaseDirectory);
char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory); char *xkbbindir = _NXGetXkbCompPath(XkbBinDirectory);
...@@ -683,20 +663,6 @@ char tmpname[PATH_MAX]; ...@@ -683,20 +663,6 @@ char tmpname[PATH_MAX];
char *xkbbasedir = XkbBaseDirectory; char *xkbbasedir = XkbBaseDirectory;
char *xkbbindir = XkbBinDirectory; char *xkbbindir = XkbBinDirectory;
#endif #endif
#else
int i;
#ifdef NXAGENT_SERVER
char *xkbbasedir = (char*)__XOS2RedirRoot(_NXGetXkbBasePath(XkbBaseDirectory));
char *xkbbindir = (char*)__XOS2RedirRoot(_NXGetXkbCompPath(XkbBinDirectory));
#else
char *xkbbasedir = (char*)__XOS2RedirRoot(XkbBaseDirectory);
char *xkbbindir = (char*)__XOS2RedirRoot(XkbBinDirectory);
#endif
for (i=0; i<strlen(xkbbasedir); i++)
if (xkbbasedir[i]=='/') xkbbasedir[i]='\\';
for (i=0; i<strlen(xkbbindir); i++)
if (xkbbindir[i]=='/') xkbbindir[i]='\\';
#endif
buf = Xprintf( buf = Xprintf(
"\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"", "\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm \"%s\" -em1 %s -emp %s -eml %s \"%s%s.xkm\"",
......
...@@ -914,7 +914,7 @@ XkbProcessArguments(int argc,char *argv[],int i) ...@@ -914,7 +914,7 @@ XkbProcessArguments(int argc,char *argv[],int i)
} }
else if (strncmp(argv[i], "-xkbdir", 7) == 0) { else if (strncmp(argv[i], "-xkbdir", 7) == 0) {
if(++i < argc) { if(++i < argc) {
#if !defined(WIN32) && !defined(__UNIXOS2__) && !defined(__CYGWIN__) #if !defined(WIN32) && !defined(__CYGWIN__)
if (getuid() != geteuid()) { if (getuid() != geteuid()) {
LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n"); LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n");
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment