Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!bnr-vpa!bruce
From: bruce@bnr-vpa.UUCP
Newsgroups: news.software.b
Subject: fcntl.h File on HP9000 Series 500 Confuses News 2.11
Message-ID: <186@bnr-vpa.UUCP>
Date: Thu, 3-Dec-87 16:07:06 EST
Article-I.D.: bnr-vpa.186
Posted: Thu Dec  3 16:07:06 1987
Date-Received: Sun, 6-Dec-87 16:54:54 EST
Reply-To: bruce@bnr-vpa.UUCP (Bruce Townsend)
Organization: Bell-Northern Research, Ottawa, Ontario
Lines: 28


	The /usr/include/fcntl.h file on HP9000 Series 500 HP-UX version
5.2 includes the following two lines:

#define	F_SETLK  6	/* Set file lock */
#define F_RDLCK 01

which to the file inews.c implies that file locking using fcntl() exists
(at line 143 in inews.c patch 13):

# if	defined(F_RDLCK) && defined(F_SETLK)
	news_lock.l_type = F_RDLCK;
	if (fcntl(fileno(actfp), F_SETLK, &news_lock) < 0) {

whereas in fact it is not supported in that release.  The HP-UX man
page indicates that F_GETLK, F_SETLK, F_SETLKW are not supported on
series 200 and 500 machines.  This causes inews.c to exit thusly:

inews: Can't lock /usr/lib/news/active: Invalid argument

which drops a lot of news on the floor!  My fix was to comment out the
appropriate defines in the system's /usr/include/fcntl.h file, but
a better fix would be have an additional option to LOCKF, which
would specify the use of fcntl() over lockf().
-- 
Bruce Townsend (bnr-vpa!bruce)	Phone:	(613) 726-3008
Bell-Northern Research		Usenet: {utzoo, utcs}!bnr-vpa!bruce
P.O. Box 3511, Station C, Ottawa, Ontario, Canada, K1Y 4H7