Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 1998 23:02:31 -0700
From:      John Polstra <jdp@polstra.com>
To:        dmm125@bellatlantic.net
Cc:        bugs@FreeBSD.ORG
Subject:   Re: error in libcompat (2.2.7)
Message-ID:  <199808270602.XAA08550@austin.polstra.com>
In-Reply-To: <Pine.NEB.3.96.980826235640.21704A-100000@myname.my.domain>
References:  <Pine.NEB.3.96.980826235640.21704A-100000@myname.my.domain>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.NEB.3.96.980826235640.21704A-100000@myname.my.domain>,
Donn Miller  <dmm125@bellatlantic.net> wrote:
> Could someone running the stock 2.2.7 check out /usr/src/lib/libcompat?
> 
> If you cd /usr/src/lib/libcompat, and make, see if SysV gets made, which
> includes ftok.c.  e.g. do make |& tee make.log and then grep ftok make.log

In 2.2.7, the SysV subdirectory of libcompat doesn't even exist.  I
eliminated it in revision 1.1.6.1 of ftok.c.  At the same time, I
moved that file into libc.  If you still have a SysV directory, then
you probably forgot the "-P" flag when doing a cvs update.

> 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.

John
--
   John Polstra                                       jdp@polstra.com
   John D. Polstra & Co., Inc.                Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808270602.XAA08550>