this means the compiler treats them as system headers and does not give you
excessive warnings from them. This is used because X11 does not like the
-ansi and -pedantic warnings that CDE is compiled with.
Having this dependancy in here is a problem. Depending on how the src
is packaged, or, unpacked, an attempt could be made to regenerate this
file, which cannot succeed unless imports/motif is setup to point to a
compiled motif tree.
This file can be manually regenerated by removing XmPrivate.h, and then
doing a 'make XmPrivate.h' in the include/Xm dir.
- Add missing includes and prototypes
- Improve type compatibility
- Use <Xm/XmPrivate.h> for unofficial libXm headers
With this patch, dtpad no longer crashes on startup
on FreeBSD/amd64 because of a truncated 64-bit pointer.
- Improve pointer/int compatibility
- Include unpublished Dt headers in Dt
- Use <Xm/XmPrivate.h> for unpublished Motif functions
There are still warnings left generated because
ElementValue.parsed_value should really be a union.
There are also some warnings left because of XtPointer
casting and some unused variables and functions.
We need ANSI C prototypes of certain Motif
functions that are not published in the official
header files.
<Xm/XmPrivate.h> header file contains
the prototypes extracted from the Motif source.
To re-create <Xm/XmPrivate.h>:
1) Make sure you have sources of libXm
(lib/Xm directory of the Motif distribution)
accessible via imports/motif/lib/Xm
2) rm include/Xm/XmPrivate.h
3) make includes
Tested this change with both gawk and nawk and it worked fine. If
the extra escape character is present and gawk is used, you'll get
warnings from gawk telling you it's ignoring the escape sequence
and just treating it as the character to begin with.
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.