cdesktopenv/cde/programs/types
Marcin Cieslak 17a33f0430 Use KORNSHELL variable instead of /bin/ksh
This patch removes instances of hardcoded
invocation of /bin/ksh and allows to
replace it with, for, example,
/usr/local/bin/ksh93

Also "ksh93" is accepted whenever "ksh" is.

Tested using the following /bin/ksh:

----8<----
WHAT=`ps -o command= -p $PPID`
msg="Something tried to call /bin/ksh: $PPID: $WHAT"
print -u2 "$msg"
logger user.warn "$msg"
exit 99
----8<----
(Warning: first two lines are FreeBSD specific)

Scripts from Makefiles should now be executed either
with

$(KORNSHELL) korn-shell-script

or

$(SHELL) bourne-shell-script

therefore #!/bin/ksh has not been changed everywhere.

/usr/dt/bin/ scripts have been converted (e.g. Xsession)

Whenever possible Imake and CPP facilities have been used.

For C and C++ programs KORNSHELL needs to be defined to
"/path/to/your/ksh" (with quotes) so that it can make
a valid C constant.

Therefore, when adding KORNSHELL to Imakefile for C files,
you have to add

CXXEXTRA_DEFINES = -DKORNSHELL=\"$(KORNSHELL)\"

or similar (for example, see programs/dtprintinfo)

But for simple shell script substitution we usually change

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)

to:

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
                     -DKORNSHELL=$(KORNSHELL) \
                     -DXPROJECTROOT=X11ProjectRoot

since we don't want quotes for shell scripts.
2012-08-23 20:00:43 -06:00
..
demo Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
IconBrowse.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
Imakefile Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
action Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
actions.ddf Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
actions.fs Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
autoStart.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
compat.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
datatypes.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
develop.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dt-toolbox Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dt.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dt.softinit.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtappman.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtbuilder.dt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtcm.dt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtfile.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dthelp.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dthelpprint.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dthelptag.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtims.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtinfo.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtmail.dt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtpad.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtscreen.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
dtwm.fp.src Remove dtinfo launcher and icons from the default front panel. 2012-06-19 19:22:08 -06:00
error.ds.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
hp.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
ibm.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
laserrom.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
miscActions.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
miscImages.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
nlsREADME.txt Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
print.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
printerNN.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
sunOW.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
unsupported.dt.src Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
user-prefs.dt.src Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00
uxstd.dt.src Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00
xclients.dt.src Use KORNSHELL variable instead of /bin/ksh 2012-08-23 20:00:43 -06:00