pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Aw: Re: Outdated version of uCON64.



Hi Thomas and John,

> Gesendet: Montag, 05. März 2018 um 06:26 Uhr
> Von: "Thomas Klausner" <wiz%NetBSD.org@localhost>
> An: "John Nemeth" <jnemeth%cue.bc.ca@localhost>
> Cc: "Daniël Hörchner" <dbjh%gmx.net@localhost>, pkgsrc-users%netbsd.org@localhost
> Betreff: Re: Outdated version of uCON64.
> On Sun, Mar 04, 2018 at 12:51:36PM -0800, John Nemeth wrote:
> > On Mar 4, 4:22pm, Thomas Klausner wrote:
> > } On Sun, Mar 04, 2018 at 09:31:40AM +0100, "Daniël Hörchner" wrote:
> > } >
> > } > I noticed on http://pkgsrc.se/emulators/ucon64 that you are still using version
> > } > 2.0.0 of uCON64, which I develop and maintain. Would it be possible for you to
> > } > upgrade to the latest version, 2.1.0? It includes quite a few bug fixes and
> > } > code improvements as well as new features. If you need any assistance I am
> > } > willing to help, but I do not have access to nor the time to set up a machine
> > } > running NetBSD.
> > } > The download link of the source code of uCON64 2.1.0 is:
> > } > https://sourceforge.net/projects/ucon64/files/ucon64/ucon64-2.1.0/ucon64-2.1.0-> src.tar.gz/download[https://sourceforge.net/projects/ucon64/files/ucon64/ucon64-2.1.0/ucon64-2.1.0-src.tar.gz/download]
> > } >
> > } > Kind regards,
> > } > Daniel
> > }
> > }
> > } I've just updated the package.
> > }
> > } I've attached the three patches we're using in pkgsrc now.
> > }
> > } A short description:
> > } * OF() is not defined in all zlib.h installations.
> > } * We want to let users define their own optimization settings, so I've removed the -O3 override
> > } * A header file needs to learn about NetBSD (which also provides inttypes.h)
> > }
> > } Perhaps you can merge at least two of them :)
> >
> > There's a bug in the second patch (missing "||")...
> 
> Interesting. I see that there should be || for symmetry, but when I
> add that, compilation breaks like before I added the
> defined(__NetBSD__).
> 
> Now I'm confused.
> Thomas
> 
That was very fast. Thanks for that.

However, I realized that NetBSD support in uCON64 was incomplete/broken, so there were more fundamental issues. I have attached a patch which should add full support for NetBSD, i.e., make all features of uCON64 2.1.0 available on NetBSD.
Let me first comment on your patches.
* OF() is not defined in all zlib.h installations.
OF has been present since at least version 1.1.3 of zlib (in zconf.h), which will turn 20 in July. So, that patch would add "support" for versions older than that. 1.1.3 has the infamous double-free bug. The author of unzip.h, Gilles Vollant appears to originally have written his code for zlib 1.2.3, but also suggests 1.1.4 as older version. I don't feel comfortable adding a "fix" that lets the code compile, without anyone having tested the combination of such an ancient version of zlib and a newer unzip.c. However, if you had to make that change on an actual machine I would accept it.

* We want to let users define their own optimization settings, so I've removed the -O3 override
If that is your policy, I don't object. However, I prefer user friendly defaults :-P

* A header file needs to learn about NetBSD (which also provides inttypes.h)
I inverted the condition in the attached patch to hopefully solve the issue you were having. As usual Microsoft is the only outlier. The latest version of DJGPP does have inttypes.h, but I prefer to touch the DOS code as little as possible.

Then the new changes in my patch.
By default uCON64 will be compiled to be able to communicate with backup units through a parallel port (built-in or via PCIe parallel port card). If you don't want that use the configure option --disable-parallel. I could not find conclusive up-to-date documentation about how NetBSD deals with changing the I/O privilege level. OpenBSD appears to use amd64_iopl() on x86_64 in the library libamd64. So, I assumed NetBSD does the same. OpenBSD used to use i386_iopl() on x86 in the library libi386 and NetBSD used to do the same. I simply don't know if that has changed for NetBSD.

By default libcd64 will not be compiled, but I configure release versions of uCON64 with the configure option --with-libcd64. In order to make that possible for NetBSD I also updated libcd64 with the same assumption as above. libcd64 does not contain inline assembly (as uCON64 does) for raw port I/O, but uses the functions in pio.h instead. It appears pio.h should these days be included from the include directory machine (#include <machine/pio.h>). It used to be i386 for OpenBSD, but I have changed that.

In order to avoid confusion I have updated config.mak.in, configure and configure.in to rename the variables that hold the linker argument for the library that provides amd64_iopl() or i386_iopl().

Please let me know if there are any issues with this patch.

Kind regards,
Daniël

Attachment: netbsd.patch
Description: Binary data



Home | Main Index | Thread Index | Old Index