Pascal Stumpf
29f2ad7dd7
dtlogin: correct path to getty.
2013-07-25 18:36:34 -06:00
Pascal Stumpf
1b319ff67d
include unistd.h for read(2) prototype. Fixes dtdocbook on PowerPC.
...
There are a lot more warnings here, but this one was an actual bug. Full
treatment pending ...
2013-07-23 19:01:13 -06:00
Pascal Stumpf
79486301d1
Make dtksh build on OpenBSD/powerpc.
2013-07-23 18:47:54 -06:00
Pascal Stumpf
c50eb571e3
OpenBSD.cf: don't include xorg.cf (leftover)
2013-07-23 18:46:31 -06:00
Pascal Stumpf
20081d15c9
ttsnoop: deal with iostream.h and missing sentinels.
...
Replacing strstream may be possible, but requires more work and a better
understanding of the code.
2013-07-23 18:44:56 -06:00
Pascal Stumpf
380232cb93
Kill iostream.h deprecation warnings on *BSD.
2013-07-23 18:43:05 -06:00
Pascal Stumpf
f9a70b5165
SECURITY fix for dtappintegrate: Use mktemp(1) to generate a template.
...
Using a fixed filename in /tmp is just begging for a symlink attack ...
2013-07-22 17:26:19 -06:00
Pascal Stumpf
6c42732461
error.ds.src: don't hardcode /usr/dt
2013-07-22 17:25:00 -06:00
Pascal Stumpf
aa470d2e3a
Adapt dtlogin/config/_common.ksh.src for OpenBSD:
...
* ps(1) is totally different on BSD and Linux. The OSF commandline works fine.
* fontpath is in /usr/X11R6 on OpenBSD.
2013-07-22 17:24:13 -06:00
Pascal Stumpf
2e6347984b
Simplify programs/Imakefile a bit. dtksh, dtlogin and dtcm build everywhere.
2013-07-22 17:23:24 -06:00
Pascal Stumpf
57cfd2162d
s,/usr/dt,CDE_INSTALLATION_TOP,g in dtlogin/config
2013-07-22 17:22:23 -06:00
Pascal Stumpf
5153c43c50
Xreset.src: Do not hardcode /usr/dt.
2013-07-22 17:21:20 -06:00
Pascal Stumpf
9bd98b70f2
Do not hardcode /usr/dt in print.dt.
2013-07-22 17:20:25 -06:00
Pascal Stumpf
7e0a9517e3
Silence lots of warnings in lib/DtHelp.
...
* 64bit warnings
* Missing prototypes
* explicit parentheses / brackets
There's still some work to be done, but, as always, it's a start ...
2013-07-22 17:19:13 -06:00
Pascal Stumpf
0c165f56f5
kill a few more warnings in DtPrint
2013-07-22 17:15:34 -06:00
Pascal Stumpf
387ae5bdab
sync warning flags betseen cc and c++ on OpenBSD
2013-07-22 17:14:15 -06:00
Pascal Stumpf
c48771be2b
Do not use -fpermissive in programs/nsgmls. It's not needed.
2013-07-22 17:13:11 -06:00
Pascal Stumpf
dc0e8ea74d
Kill most warnings in lib/DtTerm.
...
Mostly missing headers, explicit parentheses and new prototypes.
Some Caveats:
* I haven't compile-tested the SVR4 getpty file, it might need another tweak
* There were operator precedence bugs in TermPrimCursor.c and TermPrimRender.c
(^ vs. !=). This might change behaviour, but at least I haven't experienced
any crashes ...
* This adds a little more dependencies for include ordering, but unless we
want to play the "headers that include headers that include headers..." game,
this is unavoidable.
2013-07-22 17:12:07 -06:00
Pascal Stumpf
8f98ac92cd
Kill lots of warnings in DtSvc.
2013-07-21 15:54:39 -06:00
Pascal Stumpf
0ec1d6b692
Avoid negative array subscript; break out of the loop if that happens.
2012-11-27 23:46:12 -07:00
Pascal Stumpf
943aaadf86
Introduce DTKORNSHELL, analogous to KORNSHELL.
...
DTKORNSHELL is used to specify the install location of dtksh on your system,
preventing hardcoding of /usr/dt/bin/dtksh in Shebang lines and such.
2012-11-24 19:25:27 -07:00
Pascal Stumpf
b49a4ffc94
Keep track of the length of the string in ExpandVariables().
...
On OpenBSD, the 'S' option to malloc(3) enables guard pages (among other
things). This loop could have triggered this trap when reading beyond the
buffer. Also, the whole "while(*ip)" construct was based on the assumption that
the memory after the string is always zero-filled.
2012-11-24 19:25:19 -07:00
Pascal Stumpf
c64ac1985b
Set NATIVEXBINDIR on OpenBSD.
2012-11-20 17:17:37 -07:00
Pascal Stumpf
c57d2191e8
Respect CDE_CONFIGURATION_TOP and CDE_INSTALLATION_TOP.
...
Do not hardcode /etc/dt and /usr/dt.
2012-11-20 17:17:33 -07:00
Pascal Stumpf
76c874b068
dtgreet: Do not crash if LANG is not set in the environment.
...
In that case, catopen() will have never been called, and we'd feed 0 as the
first argument to catgets(). This crashes, at least on OpenBSD.
2012-11-20 17:17:29 -07:00
Pascal Stumpf
0e5560cee4
Correct paths to xterm as failsafe client on the BSDs.
2012-11-20 17:17:25 -07:00
Pascal Stumpf
d821557ca4
Use same SIGCHLD handling for OpenBSD as for OSF.
2012-11-20 17:17:18 -07:00
Pascal Stumpf
b64f79b1b8
On OpenBSD, use FILE_MAP_OPTIMIZED.
...
This has the effect of not performing a tt call each time in
ResolveLocalPathName() if we're on the local host anyway. Drastically reduces
dtfile startup time.
2012-11-19 19:44:32 -07:00
Pascal Stumpf
5b9d3fc5ec
Use /usr/sbin/sendmail as default mailer on OpenBSD.
2012-11-19 19:44:29 -07:00
Pascal Stumpf
6ecf213b63
Do not build motif manpages any more.
2012-11-19 19:44:24 -07:00
Pascal Stumpf
fad2d16d20
Remove hack adding csu objects to the linker command line on OpenBSD.
...
This is no longer needed now that $(CC) is used to link shared libraries.
2012-11-19 19:44:19 -07:00
Pascal Stumpf
38f3f5dcba
set AvoidNullMakeCommand on OpenBSD to avoid make warnings
2012-11-19 19:44:15 -07:00
Pascal Stumpf
b61e8ebad6
Add csu objects to shared libraries on OpenBSD.
...
This is required by recent changes to the stack protector code in gcc,
generating references to __guard_local instead of __guard, defined in
crtbeginS.o.
This is a temporary solution; strictly speaking, we shouldn't invoke ld
directly at all but use cc instead.
2012-09-25 11:37:23 -06:00
Pascal Stumpf
7ee2f3e80d
Fix localized build on OpenBSD.
...
Use the same set of langs as on Linux and FreeBSD (no Japanese), don't
redefine a needed macro as no-op, and unset LC_CTYPE in the environment
when building cat files.
2012-08-20 19:56:15 -06:00
Pascal Stumpf
3629a61f7c
Build dtksh on OpenBSD.
...
This needs ksh93 to bootstrap, available in the openbsd-wip for now as a port,
due to be committed some time soon ...
2012-08-19 18:14:37 -06:00
Pascal Stumpf
b578dca486
OpenBSD still uses GNU iconv, so the second argument to iconv(3) is not const.
2012-08-19 18:13:35 -06:00
Pascal Stumpf
1177e21080
WIP to make dtbuilder work on 64bit.
...
Fixes many, though not all 64bit-warnings. In lots of places, pointers are
cast to ints to be then used as array subscripts. The only way to deal with
this is to change them to long. Additionally, use calloc() to allocate the
int_array in istr.c and drop the (wrong) macro patch to istr.h. Should make
dtbuilder work on 32bit again.
2012-08-13 19:42:44 -06:00
Pascal Stumpf
3c6a0584dd
Use cpp -traditional.
...
StandardCppOptions do not get respected here, so change the default CppCmd
to cpp -traditional like for FreeBSD. Helps kill a few warnings.
2012-08-12 14:20:58 -06:00
Pascal Stumpf
72c954e5b3
sym2num: add path to cpp on OpenBSD.
2012-08-12 14:20:58 -06:00
Pascal Stumpf
a1cbcd24db
Low-hanging fruit: Fix most warnings in lib/DtSearch.
...
Most of these are related to missing includes and prototypes as well as
parens/braces. A few are also potential 64bit issues.
2012-08-12 14:20:58 -06:00
Pascal Stumpf
0bbd4ff9aa
Get rid of malloc.h.
...
This is a non-POSIX/ISO-C header. It is ok to include this on Linux, but it
is obsolete on BSD; FreeBSD even throws an error if you include it with
__STDC__ defined. Every system should nowadays have malloc() defined in
stdlib.h.
Diff is largely mechanical, replacing malloc.h with stdlib.h where it is not
yet included anyway.
2012-08-12 14:20:58 -06:00
Pascal Stumpf
18a5139d7a
Do not use the PID as a way of generating a "random" filename.
...
This script did not even check for the file's existence prior to cat'ing
random stuff into it. Ouch.
2012-08-12 14:20:57 -06:00
Pascal Stumpf
aa9ea72bfb
Do not use internal libjpeg.
...
Nowadays, OpenMotif is itself linked to libjpeg, so pulling in another
version of it causes symbol size mismatches, not to mention the maintenance
burden and security implications arising from keeping our own copy of libjpeg.
We still need some of the header files provided here because they are internal
to libjpeg and not installed on most distributions.
2012-08-12 14:20:57 -06:00
Pascal Stumpf
5a8d2bb16f
dtmail actually does work now on OpenBSD due to other changes.
2012-08-12 14:20:36 -06:00
Pascal Stumpf
71f3ed16f8
Patches for dtscreen, dtsearchpath, dtsession on OBSD.
...
Do not redefine round(3), and provide a manpath for OpenBSD.
(this is one of the few things that need to be adjusted for other BSDs)
2012-08-11 20:06:44 -06:00
Pascal Stumpf
43bae997c8
OpenBSD patches for ttsnoop.
...
Mostly adding std:: for strstream interfaces.
2012-08-11 20:06:44 -06:00
Pascal Stumpf
76984653b4
OpenBSD patches for dtpdmd and dtprintinfo.
...
Casts, #ifdefs, SIGCLD ...
2012-08-11 20:06:44 -06:00
Pascal Stumpf
d418376944
OpenBSD #ifdefs for imake templates for localisations.
2012-08-11 20:06:44 -06:00
Pascal Stumpf
205e26b3ef
Make nsgmls compile on OpenBSD.
...
As far as I can tell, the duplicate instantiations from entmgr_inst.m4 are
unnecessary and only cause compile failures without -fpermissive.
2012-08-11 20:06:43 -06:00
Pascal Stumpf
e3ad7e24e3
Current state of my dtmail work.
...
Mostly #ifdefs and casts; also, do not redefine strcasestr(). This will
probably be needed for Linux too when compiling without -fpermissive.
2012-08-11 19:53:02 -06:00
Pascal Stumpf
7c3a972d32
Make dtlogin compile on OpenBSD.
...
Most importantly, we *cannot* do the utmp stuff this code is attempting.
It is SysV-specific.
2012-08-11 19:51:35 -06:00
Pascal Stumpf
a8d5c1f0ba
Make dtinfo work on OpenBSD.
...
strstream.h is now called "strstream" and is obsolete, but use it anyway until
all code is converted over. This also needs std:: added, at least for GCC
4.2.1. Lastly, when hardcoding the path to perl, /usr/bin/perl should be used
rather than anything else.
2012-08-11 19:48:18 -06:00
Pascal Stumpf
3e4517dc2a
OpenBSD patches for dtcalc, dtdocbook, dthelp and dtimsstart.
2012-08-11 19:43:41 -06:00
Pascal Stumpf
131c7a9e04
Imakefile diffs for OpenBSD.
2012-08-11 19:23:43 -06:00
Pascal Stumpf
eaec696ad6
Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS.
2012-08-10 14:13:45 -06:00
Pascal Stumpf
57463ec10e
OpenBSD fixes for dtcm. There are no global "timezone" and "tzname" symbols on BSD. Apart from that, mainly #ifdefs.
2012-08-10 14:11:54 -06:00
Pascal Stumpf
3718075b7c
OpenBSD fixes for DtWidget, dtaction, dtappbuilder.
2012-08-10 14:10:52 -06:00
Pascal Stumpf
8bbf5a7a1b
Allow dtterm to at least allocate a pty on OpenBSD. Display is still mangled, however, and it frequently crashes (64bit issue).
2012-08-10 14:08:48 -06:00
Pascal Stumpf
19647809e4
OpenBSD fixes for lib/DtTerm: values.h, #ifdef's and some constants that are not defined on BSD. Also, leave out utmp stuff that does not work on BSD. Note that this terminal allocation does not work properly yet, but this will be fixed later.
2012-08-10 14:07:36 -06:00
Pascal Stumpf
3b77d7c065
Tooltalk fixes for OpenBSD. This consists mainly of #ifdefs, casts and some small type nits.
2012-08-10 06:24:29 -06:00
Pascal Stumpf
3d5a492038
OpenBSD fixes for DtPrint and csa.
2012-08-10 06:18:28 -06:00
Pascal Stumpf
185ec24999
OpenBSD fixed for lib/DtSvc.
2012-08-10 05:51:37 -06:00
Pascal Stumpf
78053ff2a4
SIGPWR is not present everywhere.
2012-08-10 05:44:49 -06:00
Pascal Stumpf
6fc45220c4
Provide support for installation under OpenBSD. Don't override PATH in the install script, it may hide needed tools, and the location of these binaries is highly OS-dependent anyway.
...
Also, allow overriding some variables in the install script.
2012-08-09 14:26:45 -06:00
Pascal Stumpf
f9c844aada
recognise OpenBSD version
2012-08-09 14:15:42 -06:00
Pascal Stumpf
18dd384068
Rename getline() to not conflict with the standard POSIX interface of the same name.
2012-08-09 14:15:25 -06:00