So here is where I am at with testing alternate platforms with the new imported
ksh:
Working:
Linux Mint 20
CentOS 8 (patch needs to be explicitly installed for some reason, even though
it is a POSIX utility)
FreeBSD 12.1
Openindiana hipster* (I needed to add a custom patch in dtdocbook that points
make to the write version of tcl, -ltcl is incorrect, -ltcl8.6 isn't, not sure
when this was changes since I don't use openindiana normally, but I am not
going to mess with it since I know some people still use legacy opensolaris and
I assume it is -ltcl on there)
Not Working:
OpenBSD 6.7, segfaults whenever free() is called, but this does work with the
old version, so it is a regression, but OpenBSD couldn't even boot when I
compiled normal master, it hung at dthello
manjaro, fedora 33, opensuse: this was only because the gcc 10 patches haven't
been applied to master-ksh93-upgrade yet, if centos 8 works, these probably
should as well
Unknown: NetBSD, couldn't get package manager to cooperate
Not tested: solaris 11.4, aix, hpux (lack of legal way to get them)
I feel like this should be sufficient, I wouldn't know where to start with the
OpenBSD segfault however, I know almost nothing about how they do memory
management...
Thank you for your time,
-Chase
From 6eea340e2219cac27ec5e59dd2eba61ba9e98597 Mon Sep 17 00:00:00 2001
From: Chase <nicetry...@protonmail.ch>
Date: Sat, 16 Jan 2021 14:53:03 -0600
Subject: [PATCH 1/2] dtksh/Imakefile: make patch obey POSIX
---
cde/programs/dtksh/Imakefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cde/programs/dtksh/Imakefile b/cde/programs/dtksh/Imakefile
index 177019904..78c00ba9b 100644
--- a/cde/programs/dtksh/Imakefile
+++ b/cde/programs/dtksh/Imakefile
@@ -107,7 +107,7 @@ libshell.a: $(KSH93LIBSHELL) init.o
pmain.o:
cd ksh93; ./bin/package flat make CCFLAGS='$(SUIDEXECDEFINES) -g'
cp ./ksh93/src/cmd/ksh93/sh/init.c init.c
- patch -u init.c -i init.patch
+ patch --posix init.c -i init.patch
./setup.sh
SpecialObjectRule(init.o, $(NULL), -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_2DMATCH -DSHOPT_PFSH -DSHOPT_MULTIBYTE -DSHOPT_BGX -DSHOPT_AUDIT '-D_API_ast=20100309' -D_PACKAGE_ast -DSHOPT_DYNAMIC -D_BLD_shell -DSHOPT_KIA -DKSHELL -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_ESH -DSHOPT_VSH -DSHOPT_FIXEDARRAY '-DERROR_CONTEXT_T=Error_context_t' -DSHOPT_SUID_EXEC -DSHOPT_BRACEPAT -DBUILD_DTKSH -l$(KSH93SRC)/lib/libcmd.a -l$(KSH93SRC)/lib/libast.a -l$(KSH93SRC)/lib/libdll.a)
--
2.17.1
From d1f670996475f1fe743725f1774fb048a0a8b1dd Mon Sep 17 00:00:00 2001
From: Chase <nicetry...@protonmail.ch>
Date: Sun, 17 Jan 2021 14:16:11 -0600
Subject: [PATCH 2/2] dtksh: make it build under openindiana
---
cde/programs/dtksh/Imakefile | 3 +--
cde/programs/dtksh/dtkcmds.c | 2 --
cde/programs/dtksh/dtkcvt.c | 2 --
cde/programs/dtksh/dtksh.h | 2 --
cde/programs/dtksh/init.patch | 24 +++++++-----------------
cde/programs/dtksh/ksh93 | 2 +-
cde/programs/dtksh/widget.c | 2 --
cde/programs/dtksh/widget.h | 2 --
cde/programs/dtksh/xmcmds.c | 2 --
cde/programs/dtksh/xmcvt.c | 2 --
cde/programs/dtksh/xmwidgets.c | 2 --
11 files changed, 9 insertions(+), 36 deletions(-)
diff --git a/cde/programs/dtksh/Imakefile b/cde/programs/dtksh/Imakefile
index 78c00ba9b..18bad1f92 100644
--- a/cde/programs/dtksh/Imakefile
+++ b/cde/programs/dtksh/Imakefile
@@ -29,8 +29,7 @@ LOCAL_LDFLAGS = -bE:dtksh.exp
#ifdef SunArchitecture
.NO_PARALLEL:
-/* These need to be manually set for Solaris due to a bug in the build system */
-KSH_LDFLAGS = -lm -lsocket
+SYS_LIBRARIES = -lm -lsecdb -lsocket -lnsl
#endif
DEPEND_DEFINES = $(DEPENDDEFINES)
diff --git a/cde/programs/dtksh/dtkcmds.c b/cde/programs/dtksh/dtkcmds.c
index 43c5b1baa..8528e8a29 100644
--- a/cde/programs/dtksh/dtkcmds.c
+++ b/cde/programs/dtksh/dtkcmds.c
@@ -58,9 +58,7 @@
#include "hash.h"
#include "stdio.h"
#include "defs.h"
-#define NO_AST
#include "dtksh.h"
-#undef NO_AST
#include "xmksh.h"
#include "dtkcmds.h"
#include "xmcvt.h"
diff --git a/cde/programs/dtksh/dtkcvt.c b/cde/programs/dtksh/dtkcvt.c
index f2414376c..2b0a2d36a 100644
--- a/cde/programs/dtksh/dtkcvt.c
+++ b/cde/programs/dtksh/dtkcvt.c
@@ -55,9 +55,7 @@
#include <Dt/Print.h>
#include "hash.h"
#include "stdio.h"
-#define NO_AST
#include "dtksh.h"
-#undef NO_AST
#include "xmksh.h"
#include "XtCvtrs.h"
#include "dtkcmds.h"
diff --git a/cde/programs/dtksh/dtksh.h b/cde/programs/dtksh/dtksh.h
index 0205c0d95..1313c414f 100644
--- a/cde/programs/dtksh/dtksh.h
+++ b/cde/programs/dtksh/dtksh.h
@@ -33,9 +33,7 @@
#ifndef _Dtksh_dtksh_h
#define _Dtksh_dtksh_h
-#if !defined(NO_AST)
#include "nval.h"
-#endif
#define SUCCESS 0
#define FAIL (-1)
diff --git a/cde/programs/dtksh/init.patch b/cde/programs/dtksh/init.patch
index 7da703098..8fd85079f 100644
--- a/cde/programs/dtksh/init.patch
+++ b/cde/programs/dtksh/init.patch
@@ -1,31 +1,22 @@
---- ./ksh93/src/cmd/ksh93/sh/init.c 2020-11-22 15:34:35.964537420 -0600
-+++ init.c 2020-12-31 19:31:00.091176802 -0600
-@@ -48,6 +48,38 @@
+--- ./ksh93/src/cmd/ksh93/sh/init.c 2021-01-16 15:27:03.589079734 -0600
++++ init.c 2021-01-16 15:53:50.700864511 -0600
+@@ -48,6 +48,28 @@
#include "lexstates.h"
#include "version.h"
+#ifdef BUILD_DTKSH
+#include <Dt/DtNlUtils.h>
+#include <Dt/EnvControlP.h>
-+#include <stdio.h>
-+#include <nl_types.h>
+#include <X11/X.h>
+#include <X11/Intrinsic.h>
+#include <X11/IntrinsicP.h>
+#include <X11/CoreP.h>
+#include <X11/StringDefs.h>
+#include <Xm/XmStrDefs.h>
-+#include <setjmp.h>
-+#include <string.h>
-+#include <ctype.h>
+#include <Xm/Xm.h>
+#include <Xm/Protocols.h>
-+#include "hash.h"
-+#include "stdio.h"
+
-+#define NO_AST
+#include "dtksh.h"
-+#undef NO_AST
+#include "xmksh.h"
+#include "dtkcmds.h"
+#include "xmcvt.h"
@@ -33,16 +24,15 @@
+#include "extra.h"
+#include "xmwidgets.h"
+#include "msgs.h"
-+#include <locale.h>
+#endif
+
#if _hdr_wctype
#include <ast_wchar.h>
#include <wctype.h>
-@@ -1469,6 +1501,16 @@
- #endif
- if(shp->userinit=userinit)
- (*userinit)(shp, 0);
+@@ -1481,6 +1503,16 @@
+ shp->exittrap = 0;
+ shp->errtrap = 0;
+ shp->end_fn = 0;
+#ifdef BUILD_DTKSH
+ int * lockedFds = LockKshFileDescriptors();
+ (void) XtSetLanguageProc((XtAppContext)NULL, (XtLanguageProc)NULL,
diff --git a/cde/programs/dtksh/ksh93 b/cde/programs/dtksh/ksh93
index 737438a30..6025c8125 160000
--- a/cde/programs/dtksh/ksh93
+++ b/cde/programs/dtksh/ksh93
@@ -1 +1 @@
-Subproject commit 737438a30f3ccee326a74950d6c2ca7c7123d2f7
+Subproject commit 6025c8125e596ccf5e25c651a8800c072310f3a4
diff --git a/cde/programs/dtksh/widget.c b/cde/programs/dtksh/widget.c
index 924caed68..3595cc6fe 100644
--- a/cde/programs/dtksh/widget.c
+++ b/cde/programs/dtksh/widget.c
@@ -42,9 +42,7 @@
#include <Xm/DialogS.h>
#include "hash.h"
#include "stdio.h"
-#define NO_AST
#include "dtksh.h"
-#undef NO_AST
#include "xmksh.h"
#include "dtkcmds.h"
#include "xmcvt.h"
diff --git a/cde/programs/dtksh/widget.h b/cde/programs/dtksh/widget.h
index f50d34a73..1af64641a 100644
--- a/cde/programs/dtksh/widget.h
+++ b/cde/programs/dtksh/widget.h
@@ -45,9 +45,7 @@
#include <X11/X.h>
#include <X11/Intrinsic.h>
#include <X11/IntrinsicP.h>
-#define NO_AST
#include "dtksh.h"
-#undef NO_AST
extern int Wtab_free;
extern wtab_t **W;
diff --git a/cde/programs/dtksh/xmcmds.c b/cde/programs/dtksh/xmcmds.c
index 547905990..7afbfae5d 100644
--- a/cde/programs/dtksh/xmcmds.c
+++ b/cde/programs/dtksh/xmcmds.c
@@ -47,9 +47,7 @@
#include <Xm/Protocols.h>
#include "hash.h"
#include "stdio.h"
-#define NO_AST
#include "dtksh.h"
-#undef NO_AST
#include "xmksh.h"
#include "dtkcmds.h"
#include "XtCvtrs.h"
diff --git a/cde/programs/dtksh/xmcvt.c b/cde/programs/dtksh/xmcvt.c
index 21320bcf4..f178b6a0b 100644
--- a/cde/programs/dtksh/xmcvt.c
+++ b/cde/programs/dtksh/xmcvt.c
@@ -55,9 +55,7 @@
#include <Tt/tttk.h>
#include "hash.h"
#include "stdio.h"
-#define NO_AST
#include "dtksh.h"
-#undef NO_AST
#include "xmksh.h"
#include "XtCvtrs.h"
#include "dtkcmds.h"
diff --git a/cde/programs/dtksh/xmwidgets.c b/cde/programs/dtksh/xmwidgets.c
index a3833442e..de08d8fb3 100644
--- a/cde/programs/dtksh/xmwidgets.c
+++ b/cde/programs/dtksh/xmwidgets.c
@@ -77,9 +77,7 @@
#include <Dt/HelpQuickD.h>
#include <Dt/Print.h>
-#define NO_AST
#include "dtksh.h"
-#undef NO_AST
#include "xmksh.h"
#include "dtkcmds.h"
--
2.17.1
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel