bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Porting patch to VMS


From: Steve Little
Subject: Re: Porting patch to VMS
Date: Thu, 18 Mar 2004 10:36:36 +0000 (GMT)

Hi Paul,

> Please email them to bug-gnu-utils.  If they're trivial we won't need
> copyright assignment forms.  Otherwise there will be some paperwork.

Ok, they're relatively trivial IMHO, but do include a DCL script and
makefile which are entirely new. I'm more than happy to hand over the IP
rights for all of it, whether paperwork is needed for that or not.

> I prefer changes that do not affect the existing source code at all;
> instead, put them into the VMS config.h, with auxiliary files in
> a vms subdirectory.  See the existing pc subdirectory for ideas.

Ok, I've downloaded v2.5.9 and managed to get that working, with just a
couple of new VMS specific files. However, I'd like to make a suggestion
for one or two changes to the code which IMHO would improve it's
portability.

1) I get a bunch of compiler warnings about implicitly declared functions,
which could be fixed by including a few more standard headers (mostly
unistd.h, fcntl.h and stdlib.h) in a few places. I can provide full
details if you'd be willing to consider this, or a patch with suitable
#ifdef HAVE_STDLIB_H etc around them...

2) I was wondering why unlink() has been used as opposed to remove(),
since (according to K&R) the latter is a standard C library function,
whereas the former is more unix-specific (i realise that remove() can also
delete directories as of libc > 5, but don't see that as necessarily a
problem) In the case of VMS, this can be solved by #including unistd.h, or
#define'ing unlink to remove in config.h_vms

3) On VMS, the linker is not case-sensitive (i know, it's nasty, but i
didn't write it ;) so Fseek clashes with fseek from the C RTL at link
time. For now I've #define'd it to _fseek in config.h_vms, which solves
it, but I wondered why it's there at all? Is it simply for systems that
don't have a real fseek function? is it still needed, or could the library
fseek be used instead?

4) In a couple of places I see:
#ifndef HAVE_MALLOC
"you must run the autoconf test for a GNU libc compatible malloc"
#endif

Would this not be better changed to #error "you must run..."? Or are there
some compilers which do not have the #error macro?

> Also you should start with patch 2.5.9.  See
> <http://ftp.debian.org/debian/pool/main/p/patch/patch_2.5.9.orig.tar.gz>.

Thanks for the link, the latest I had managed to find on the mirrors I'd
tried was 2.5.4. *shrug*

Please find attached a tarball with a few VMS specific files, to be placed
in a ./VMS directory

Thanks,

Steve

Attachment: vms-patch.tgz
Description: GNU Unix tar archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]