Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Apr 2002 23:39:52 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        "David E. O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/sys/sys ioccom.h
Message-ID:  <XFMail.20020408233952.jhb@FreeBSD.org>
In-Reply-To: <200204090222.g392ME945124@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 09-Apr-2002 David E. O'Brien wrote:
> obrien      2002/04/08 19:22:14 PDT
> 
>   Modified files:
>     sys/sys              ioccom.h 
>   Log:
>   Back out revision 1.11 which wrapped the ioctl prototype w/()'s.
>   While it may have allowed the XFree86 4 port to build; it killed TONS
>   of other ports.  The XFree86 4 can be patched to not use its macro a lot
>   easier than figuring how to deal with 1000 other now-broken ports.

Actually, that isn't correct.  For example, when compiling screen on my
ultra60, it whined because the auto* tools in their infinite wisdom (or lack
thereof) define ioctl as so in osdef.h:

extern int  ioctl __P((int, int, char *));

In sys/sys/ioccom.h we have:

int     (ioctl)(int, unsigned long, ...);

Note that the second arg is a long rather than an int, plus the 3rd argument
isn't defined.  Obviously then, the protoypes aren't going to match up on
platforms where sizeof(long) != sizeof(int).

Actually, I just tried taking out the parens around ioctl and now screen still
doesn't build on my i386 laptop running today's current:

> make
===>  Building for screen-3.9.11_1
cc -c -I. -I.    -O -pipe screen.c
In file included from screen.h:38,
                 from screen.c:85:
osdef.h:87: conflicting types for `ioctl'
/usr/include/sys/ioccom.h:75: previous declaration of `ioctl'

I have to wonder why screen(1) has decided that it has a better prototype for
ioctl() than the base system headers.  That seems to be the real bug to me. :(

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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




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