Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!rutgers!sri-unix!hplabs!tektronix!uw-beaver!ubc-vision!van-bc!molihp!robbinj From: robbinj@molihp.UUCP (Robbin W Johnson) Newsgroups: news.software.b Subject: Re: Expire corrupts active file (2.11 news) Message-ID: <253@molihp.UUCP> Date: Mon, 1-Dec-86 21:40:15 EST Article-I.D.: molihp.253 Posted: Mon Dec 1 21:40:15 1986 Date-Received: Sat, 6-Dec-86 21:38:07 EST References: <250@molihp.UUCP> Organization: Moli Energy Ltd., Burnaby, BC, CANADA Lines: 44 Summary: Problem discovered and corrected Having found some time to look into this, I found the problem and a solution. As distributed, 2.11 news assumes that if it is being brought up upon a USG flavour of UN*X there is no directory(3) library (/usr/lib/libndir.a) and that the structure of a directory in the file system is vanilla SYS V. Believing this to be true it then provides its own limited version of the directory package, making several assumptions about the format of a directory as it lives in the file system. When dealing with Hewlett-Packards's HP-UX, this is a fatal mistake. HP-UX on a series 500 machine sits on top of other layers of software, including the "SDF file system". Because of this, the format of a directory is slightly different and totally incompatible with the SYS V model. Fortunately Hewlett-Packard has provided the directory(3) library with HP-UX and so solving the problem is very straight forward. I solved it in the Makefile by removing all dependencies upon "ndir.o" and adding a search of libndir.a for those programs which might require it. This can be done from within localize.sh with one exception. The "ndir.h" file to be included must be changed to "/usr/include/ndir.h". I took the easy way out by mv'ing the origional "ndir.h" to "ndir.h.rel" to get it out of the way and then ln'ing "/usr/include/ndir.h" to "ndir.h". This could cause problems if "ndir.h" is ever changed in a minor revision. There may be far more elegant ways, if anyone has suggestions I would appreciate hearing them. As far as the "ndir.o" dependencies were concerned, I corrected that by adding the following two lines to the "ed" script in localize.sh (if you reference my origional posting, place them anywhere before the "g/termlib/s//curses" line): g/^LIBS/s/=/= -lndir/ g/ ndir.o/s/// ^watch that space...its important You might also have to add: g/#NOTVMS/s/// to prevent the compiler from breaking on the "cc" line for inews. When rn is configured, it knows enough to check for libndir.a no matter what version of UN*X it is being brought up on. This would have been a nice idea for 2.11 news. Robbin.