summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-17 10:51:53 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-24 10:55:43 -0800
commit7a9fa61950200eb13600cdb57830e58a53bf78fa (patch)
tree2bba1bd11b0bb286dfd308775521d633058221d4
parent981dfdb23272bc02977c5bb9bc18d0d3fb618fa3 (diff)
unifdef __UNIXOS2__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--commands.c2
-rw-r--r--lisp/core.c2
-rw-r--r--lisp/helper.c4
-rw-r--r--lisp/math.c2
-rw-r--r--lisp/mp/mpi.c2
-rw-r--r--lisp/read.c2
-rw-r--r--lisp/time.c5
-rw-r--r--util.c6
-rw-r--r--xedit.c4
9 files changed, 4 insertions, 25 deletions
diff --git a/commands.c b/commands.c
index e64fe30..ef637d7 100644
--- a/commands.c
+++ b/commands.c
@@ -114,9 +114,7 @@ DoQuit(Widget w, XtPointer client_data, XtPointer call_data)
}
}
if (!source_changed) {
-#ifndef __UNIXOS2__
XeditLispCleanUp();
-#endif
exit(0);
}
diff --git a/lisp/core.c b/lisp/core.c
index 0cc455e..7404840 100644
--- a/lisp/core.c
+++ b/lisp/core.c
@@ -62,7 +62,7 @@ typedef struct _SeqInfo {
break; \
}
-#if defined(__UNIXOS2__) || defined(__APPLE__)
+#ifdef __APPLE__
# define finite(x) isfinite(x)
#endif
diff --git a/lisp/helper.c b/lisp/helper.c
index be3ee7b..36c113f 100644
--- a/lisp/helper.c
+++ b/lisp/helper.c
@@ -1060,12 +1060,8 @@ LispProbeFile(LispBuiltin *builtin, int probe)
else if (STREAMP(pathname) && pathname->data.stream.type == LispStreamFile)
name = THESTR(CAR(pathname->data.stream.pathname->data.pathname));
-#ifndef __UNIXOS2__
if (realpath(name, &resolved[0]) == NULL ||
stat(resolved, &st)) {
-#else
- if ((name == NULL) || stat(resolved, &st)) {
-#endif
if (probe)
return (NIL);
LispDestroy("%s: realpath(\"%s\"): %s",
diff --git a/lisp/math.c b/lisp/math.c
index f298e5c..4ca11e6 100644
--- a/lisp/math.c
+++ b/lisp/math.c
@@ -32,7 +32,7 @@
#include "lisp/math.h"
#include "lisp/private.h"
-#if defined(__UNIXOS2__) || defined(__APPLE__)
+#ifdef __APPLE__
# define finite(x) isfinite(x)
#endif
diff --git a/lisp/mp/mpi.c b/lisp/mp/mpi.c
index 7fcc30e..1e11f31 100644
--- a/lisp/mp/mpi.c
+++ b/lisp/mp/mpi.c
@@ -31,7 +31,7 @@
#include "mp.h"
-#if defined(__UNIXOS2__) || defined(__APPLE__)
+#ifdef __APPLE__
# define finite(x) isfinite(x)
#endif
diff --git a/lisp/read.c b/lisp/read.c
index 4103736..ca63079 100644
--- a/lisp/read.c
+++ b/lisp/read.c
@@ -62,7 +62,7 @@
#define READ_ERROR_FIXNUM() READ_ERROR0("number is not a fixnum")
#define READ_ERROR_INVARG() READ_ERROR0("invalid argument")
-#if defined(__UNIXOS2__) || defined(__APPLE__)
+#ifdef __APPLE__
# define finite(x) isfinite(x)
#endif
diff --git a/lisp/time.c b/lisp/time.c
index 763ca58..cb7ef0c 100644
--- a/lisp/time.c
+++ b/lisp/time.c
@@ -41,7 +41,6 @@ Lisp_Time(LispBuiltin *builtin)
time form
*/
{
-#ifndef __UNIXOS2__
struct itimerval real, virt, prof;
unsigned long count;
long sec, usec;
@@ -136,8 +135,4 @@ Lisp_Time(LispBuiltin *builtin)
lisp__data.gc.timebits = 0;
return (result);
-#else
- LispMessage("\"Lisp_Time\" not implemented under OS/2");
- return (NIL);
-#endif
}
diff --git a/util.c b/util.c
index 5471129..40b7834 100644
--- a/util.c
+++ b/util.c
@@ -490,15 +490,12 @@ SwitchTextSource(xedit_flist_item *item)
char *
ResolveName(char *filename)
{
-#ifndef __UNIXOS2__
static char *name;
char *result, *tmp = name;
-#endif
if (filename == NULL)
filename = GetString(filenamewindow);
-#ifndef __UNIXOS2__
/* Ensure not passing the same pointer again to realpath */
name = XtMalloc(BUFSIZ);
XtFree(tmp);
@@ -531,9 +528,6 @@ ResolveName(char *filename)
}
return (result);
-#else
- return filename;
-#endif
}
static void
diff --git a/xedit.c b/xedit.c
index 77c6bdc..efce0fc 100644
--- a/xedit.c
+++ b/xedit.c
@@ -55,11 +55,9 @@ static XtActionsRec actions[] = {
{"xedit-focus", XeditFocus},
{"other-window", OtherWindow},
{"switch-source", SwitchSource},
-#ifndef __UNIXOS2__
{"lisp-eval", XeditLispEval},
{"xedit-print-lisp-eval", XeditPrintLispEval},
{"xedit-keyboard-reset",XeditKeyboardReset},
-#endif
{"ispell", IspellAction},
{"line-edit", LineEditAction},
{"tags", TagsAction}
@@ -183,9 +181,7 @@ main(int argc, char *argv[])
}
XtRealizeWidget(topwindow);
-#ifndef __UNIXOS2__
XeditLispInitialize();
-#endif
options_popup = XtCreatePopupShell("optionsMenu", simpleMenuWidgetClass,
topwindow, NULL, 0);