From: Bastian M. <bma...@we...> - 2018-04-05 06:19:27
|
> Gesendet: Donnerstag, 05. April 2018 um 00:23 Uhr > Am 04.04.2018 um 22:47 schrieb Ethan A Merritt via gnuplot-beta: > > > > I thought that MSDOS referred to 16-bit legacy code that we > > no longer support. Maybe I am mistaken. > > You are, kinda. MSDOS refers to the operating system, but not > necessarily in its original 16-bit incarnation. We still do carry > support for DJGPP, which is a 32-bit target working on top of MSDOS. It > has suffered some bit-rot since I last tried to build it, but it should > still be viable. A few months ago I was asking myself if gnuplot could still be compiled on MSDOS. Here are my findings: In fact there are (at least) three 32bit MSDOS compilers which were used in the past: DJGPP: Still under active development, POSIX, gcc 7.2 available, as well as cross-compilers OpenWatcom: Development stale/slowed down, also supported for gnuplot on Windows EMX: Used on DOS and OS/2, so removing support for it might break OS/2, too (Petr?) I have tested building with DJGPP and OpenWatcom. There's indeed some bit-rot, but that can be easily fixed. I just pushed my local "msdos-platform" branch to my gnuplot "fork" on SF. Beware of frequent rebases, though. To my knowledge there have only been official releases using DJGPP in the more recent past: 4.0 by HBB, 4.2-4.6 by Tatsuro (I think) > > Building and testing the executables built by/for that target is getting > ever more tricky these days, what with all the usual desktop platforms > being 64-bit, so they can no longer executabe any 16-bit code (down to > and including the 16-bit "stub" that starts the 32-bit DJGPP runtime > environment). So you need a VirtualBox setup or similar to run it. But > OTOH, DJGPP on FREEDOS may well be the only version of gnuplot that > would still work on truly old boxes that won't support any "modern" > Linux any more... If you build for Windows using cygwin or MSYS/MSYS2, compiling for DJGPP is actually pretty straightforward using the cross-compilers. I have updated the DJGPP makefile to do that and also enabled out-of-tree builds. Changes are still entangled with my work on the "svga" terminal, though. It can be found in the "djsvga-terminal" branch in my "fork". Beware of rebases here, too. For the fun of it, I also added most of the modern gnuplot features to the djsvga terminal: RGB and palette colors, enhanced text, filled polygons and boxes, images, and mousing. Since the underlying GRX/MGRX graphics library is also available on Windows and Linux, this terminal can be maintained even without testing on DOS. The plan was to clean up the patches before integration into mainline gnuplot. This should resurrect DOS as an actively supported platform. > > > Should the test be replaced by a test for _WIN32 instead? > > No. > > > Can we get rid of the macros HUGE and GPFAR? > > GPFAR: almost certainly yes. We've long since dropped support for all > platforms that needed it (segmented architectures like Win16 and 16-bit > DOS). > > HUGE is a different issue, as that's about quirky floating point > support, not the target OS. Or was it GPHUGE you were thinking of? > That one can actually go, too, if GPFAR does. Those are two parts of > the same technique. > > > Can we get rid of GP_FARMALLOC? > > That would go wherever GPFAR does. As an aside: PROTO could now finally go there, too. Bastian |