From owner-freebsd-bugs Thu Aug 27 00:58:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA29264 for freebsd-bugs-outgoing; Thu, 27 Aug 1998 00:58:18 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA29259 for ; Thu, 27 Aug 1998 00:58:15 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id RAA07536; Thu, 27 Aug 1998 17:57:23 +1000 Date: Thu, 27 Aug 1998 17:57:23 +1000 From: Bruce Evans Message-Id: <199808270757.RAA07536@godzilla.zeta.org.au> To: dmm125@bellatlantic.net, jdp@polstra.com Subject: Re: error in libcompat (2.2.7) Cc: bugs@FreeBSD.ORG Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >> Also, in SysV/ftok.c, ftok is defined as >> >> key_t ftok(const char *path, char id) but /usr/include/sys/ipc.h declares >> ftok as >> >> ftok(const char *, int); >> >> so basically in the source file the second arg is a char, but the header >> file (ipc.h) declares the second arg to be an int. > >True, that's a bug. I don't think it has any actual effect, since >the function definition has the old pre-ANSI form: > > key_t > ftok(path, id) > const char *path; > char id; > >which means that "id" is assumed to be passed as an int, even though >only the low-order byte of it is used. But it should be fixed. Not a bug. The prototype must declare the arg as an int to match the old-style-but-still-ANSI definition. The definition uses char for historical reasons. Changing it would be incompatible. See rev.1.4 of ftok.3 for some notes about this. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message