Commit Graph

114 Commits

Author SHA1 Message Date
Patrick Georgi ef2c655f55 Use NULL instead of nullptr
NULL is standard for long enough in POSIX to always be available,
while C23 introduced nullptr as a new constant, creating a conflict
here.
2025-12-18 22:58:26 +01:00
Nilton Perim Neto e4c1e173fa
Made a workaround to not use the sh_access
The sh_access was defined to two arguments
Made a workaround to not use the sh_access
that was outputting the error.
Not ideal, but it will hopefully compile on Arch Linux

Also added mksh for compatibility
Ksh is unmaintained in the Arch User Repository

Signed-off-by: Nilton Perim Neto <niltonperimneto@gmail.com>
2025-02-03 14:47:17 -03:00
hyousatsu 76812a9115 ksh93: fix a compilation error on 32-bit system. 2023-12-01 09:22:32 +00:00
Jon Trulson b909f1a9e8 dtksh: enable SHOPT_ECHOPRINT 2023-02-18 15:33:09 -07:00
Cy Schubert 8a24d70d5e Fix build under LLVM15
Fix many -Wint-conversion errors such as the example below, including
an aso atomics error.

connect.c:87:12: error: incompatible pointer to integer conversion initializing 'LONG' (aka 'int') with an expression of type 'void *' [-Wint-conversion]
   DB_ADDR mdba = NULL;   /* db address of current member record */
           ^      ~~~~
2023-02-18 14:47:38 -07:00
Jon Trulson 3300d665a0 Upgrade ksh93 to 1.0.3
This commit upgrades ksh93 to the latest version.  Some minor changes
were required in the dtkcmds.c to make this work.

Most of the changes were in Makefile.am - primarily ensuring that
SHOPTS_* defines matched between dtksh and ksh93 builds, and that
ksh93 was actually told about them :)

The SHOPTS_* defines need to be assigned as the integer 1 as well, or
various preprocessor checks in ksh93 would fail.

Also:

- got rid of SUIDEXECDEFINES - this is a holdover from the Imake days
  and was never defined anyway.

- removed some SHOPT_* defines that no longer existed.

- do not pass CFLAGS to the ksh build at all - no need to complicate
  things.
2022-08-27 18:04:53 -06:00
Jon Trulson 3a68f5db40 Merge commit '97ef0077f06cef6f6bb93b0dae22441078647486' as 'cde/programs/dtksh/ksh93' 2022-08-27 13:53:17 -06:00
Jon Trulson 4bea26e4b7 Remove ksh 1.0.0beta 2022-08-27 13:52:40 -06:00
Chase 9a9d586e87 configure: detect libdl 2022-07-31 18:33:49 -06:00
Chase cfc1664a31 configure.ac: remove patch requirement 2022-07-23 17:49:33 -06:00
Jon Trulson 81c3c7b0eb ksh93: fix BSD builds due to iconv confusion
For the BSD's we do not want to pass CFLAGS since it includes a
-I/usr/local/incude directive.

This breaks ksh's iconv detection due to the weird way in which iconv
seems to be handled on the BSD's - both a libc impl (preferred), and a
possibly external GNU iconv impl installed in /usr/local.

/usr/local/include is added to CFLAGS by the X11/Motif detection logic
- since that is where all of the needed headers are on the BSDs.

One of the patches from Martijn Decker added CFLAGS to the ksh93 build
CCFLAGS which made this problem show up.

So until/unless that is fixed in ksh93, we will avoid sending
anything to the ksh build system except for SUIDEXECDEFINES
2022-07-09 17:50:35 -06:00
Jon Trulson b4e936f6f8 gitignore: split out dtksh gitignores into a separate dtksh/.gitignore
Also, add new files based on upgrade patch from Martjin Dekker (ksh93
maintainer).
2022-07-09 17:50:35 -06:00
Martijn Dekker bf00d3b274 dtksh: Upgrade ksh93 to 1.0.0-beta.2 2021-12-28
Patch from current ksh93 maintainer <https://github.com/ksh93/ksh>.

cde/programs/dtksh/ksh93/**:
- Upgraded. A load of bugs fixed, some minor features added.
  See NEWS from 2021-02-01 upwards.

cde/programs/dtksh/Makefile.am:
- Don't cd into ksh93 any more to invoke the package or shtests
  scripts; they now automatically find their directories.
- Pass $(CFLAGS) to build ksh with optimisation.
- Remove -D_std_malloc flag as vmalloc is now deprecated and disabled
  by default.
- Add a 'make check' target to Makefile.am that runs the ksh93
  regression tests on dtksh to make sure the additions don't interfere
  with anything. It skips running the tests with shcomp because CDE
  doesn't use that. The tests all pass here on Slackware 14.2. :-)

cde/programs/dtksh/init.patch:
- Removed; I've upstreamed it. It was the only one that wasn't upstreamed
  yet, and more code cleanups are coming, breaking downstream patches. If
  something needs updating, just email me a diff.

cde/programs/dtksh/dtkcmds.h:
- Update the ADDBUILTIN macro to remove the __PROTO__ macro use. The
  proto(1) tool, responsible for all such pre-C89 K&R C compatibility
  voodoo, has been removed, so that macro is no longer defined.

cde/programs/dtksh/setup.sh:
- Workaround script removed. I rewrote 'bin/package flat make' in a way
  that works correctly and changed Makefile.am to use that instead.

Hope this helps. Happy new year.
2022-07-09 17:50:35 -06:00
Peter Howkins 341fdfbe71 various: Window objects should be initialised to 0 not NULL 2021-12-24 10:50:28 -07:00
Peter Howkins efa29a21e0 dtksh: Resolve uninitialized warningsc 2021-12-24 10:50:28 -07:00
Jon Trulson e10d06f210 configure/Makefiles: add checks for Xmu, Xext, and Xdmcp
We also remove sun pro specific options, and do some general cleanup
as well as remove hardcoded library refs like -lXm, -lXext, etc...
2021-12-21 16:42:22 -07:00
Jon Trulson f6c0a00a7a dtksh: fix implicit-function-declaration warnings
Tis does not fix those warnings in ksh93 itself, only the stuff we are
responsible for.
2021-11-16 12:39:18 -07:00
Jon Trulson d7223930d4 dtkcmds.c: fix some pointer<->int conversions 2021-10-23 15:47:09 -06:00
Jon Trulson efa6b6eadc dtksh: move fsym() into widget.c where it belongs
This function is only used in one place, so move it there and delete
findsym.c
2021-10-23 15:05:56 -06:00
Jon Trulson 51646fb06a programs/: remove Imakefiles for completed modules 2021-07-03 19:12:43 -06:00
Jon Trulson 9c3002a06f Merge commit 'c9b86876044cdce95730ea2c6a2af65e06a86125' as 'cde/programs/dtksh/ksh93' 2021-06-26 14:53:01 -06:00
Jon Trulson 2e1f8ae435 Removed cde/programs/dtksh/ksh93 submodule at commit 66e1d44642 2021-06-26 14:53:01 -06:00
Chase cbdb9cb3fa dtksh: allow parallel building 2021-02-13 19:19:18 -07:00
Jon Trulson 37eba21c97 dtksh: disable parallel builds
This module will crash on multicore builds, so disable that for dtksh
until we can investigate and fix, if possible.
2021-01-31 13:43:28 -07:00
Chase 4836c389f6 dtksh: specifically test for patch 2021-01-31 13:22:57 -07:00
Chase 6a62f10047 dtksh: make it build under autotools 2021-01-31 13:22:57 -07:00
Jon Trulson 1fad87f7bd ksh93: re-add the ksh submodule at 47468f 2021-01-30 19:12:43 -07:00
Jon Trulson 1941713a36 Remove no longer needed Makefile.am for ksh 2021-01-30 19:09:26 -07:00
Jon Trulson ece5c0ea14 Merge branch 'master' into autotools-conversion
Lost the ksh93 submodule so will re-add in a later commit.
2021-01-30 19:04:10 -07:00
Jon Trulson 6539c8c71a ksh93: re-add the ksh submodule at 47468f 2021-01-23 18:40:40 -07:00
Jon Trulson 047cefcf32 Merge branch 'master' into master-ksh93-upgrade 2021-01-23 18:31:28 -07:00
Chase eab8cf4c16 dtksh: update ksh to commit 47468f (fix musl compiler errors) 2021-01-23 17:13:46 -07:00
Lev Kujawski e54ee036ac Fix incompatibilites between the Desktop Korn Shell and the musl C library:
- Only check for POSIX's termios.h when deciding to use the POSIX terminal interfaces.
- Check for C99's va_copy in addition to __va_copy.
2021-01-23 16:39:44 -07:00
Chase ad39eebb2d dtksh: use std malloc instead of ast malloc 2021-01-18 18:02:11 -07:00
Chase 47dfe49a72 dtksh: make it build under openindiana 2021-01-18 18:00:41 -07:00
Chase e75a8162ad dtksh/Imakefile: make patch obey POSIX 2021-01-18 18:00:41 -07:00
Lev Kujawski 5c801a07a0 Hide FILE internals from the musl C library that conflict with the Desktop Korn Shell's SFIO. 2021-01-10 18:08:00 -07:00
Chase 10f2382561 dtksh/findsym.c: fix compiler warnings 2021-01-01 18:41:26 -07:00
Chase 428223ee80 use a patchfile to augment init.c instead of copying it entirely 2021-01-01 18:41:26 -07:00
Chase 90fff44682 dtksh: use bin/package flat make instead of shell
Shell isn't portable, so upstream ksh93 has a "flat" function that we can use
to put binaries in a static place that doesn't require a shell command. We still
do need an intermediate setup.sh shell script due to a bug in ksh that object
files aren't being put in lib, and FEATURE not in include. We also cut out some
 unused symbols, and a hpux specific implementation of dynlib (new hpux should
 conform to the posix implementation anyhow.)
2021-01-01 18:41:26 -07:00
Chase f884dce398 dtkcmds.c: use Empty macro instead of empty string 2020-12-13 17:45:39 -07:00
Chase 5cec09b9f2 dtksh: use sh_addbuiltin instead of manually editing builtins.c 2020-12-06 18:24:33 -07:00
Chase 80825d1651 dtksh: update to commit 67880e3 2020-12-06 18:24:33 -07:00
Jon Trulson 90e61dda5f Merge branch 'master' into autotools-conversion 2020-11-24 16:53:24 -07:00
Peter Howkins 67f62e5a8a all: remove deprecated sys_errlist[] and replace with ANSI C strerror() 2020-11-02 05:30:08 +00:00
Chase fc700e296b Dtksh: fix callback segfault 2020-10-19 18:36:29 -06:00
Chase 9f290039eb ksh93: update to commit dd9bc2 2020-10-19 18:36:29 -06:00
Chase 461d326bbe dtksh: Use ksh93 translate over augmented version
We can reduce our differences from upstream ksh by simply using their
ERROR_translate() function instead of our janky and obsolete msg_translate,
we also move DtGetMessage() to msgs.c and lockedfiledescriptors and,
unlockfiledescriptors to extra.c to lessen modifications to init.c, which
all changes will hopefully be moved elsewhere in the future
2020-10-19 18:36:29 -06:00
Chase 3443543744 dtkcmds.c: add extra field to discipline functions 2020-10-12 05:32:57 -06:00
Chase 96c4a3ea52 ksh: update to commit 092b90 2020-09-20 11:29:00 -06:00