From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,47c3c23c50f4dcda X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,47c3c23c50f4dcda X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-11-14 12:29:41 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!newsrelay.iastate.edu!news.iastate.edu!john From: john@iastate.edu (John Hascall) Newsgroups: comp.sys.dec,comp.unix.osf.osf1 Subject: Re: Strange error in STREAMS code Date: 14 Nov 1994 19:13:05 GMT Organization: Iowa State University, Ames, Iowa (USA) Message-ID: <3a8cs1$kc0@news.iastate.edu> References: <3a5nmv$4n4@hermes.unt.edu> <3a6785$agm@hermes.unt.edu> <3a68l4$nf0@news.iastate.edu> <3a83il$q75@hermes.unt.edu> NNTP-Posting-Host: pooh.cc.iastate.edu Xref: nntp.gmd.de comp.sys.dec:19661 comp.unix.osf.osf1:6469 Steve Tate wrote: }John Hascall (john@iastate.edu) wrote: } }> From "man ioctl": } }> #include }> ioctl( }> int d, }> unsigned long request, <--- looks like it is intentional }> char *argp ); that they are 64 bits. } }Now isn't *THAT* interesting! Here's the prototype from }/usr/include/sys/ioctl.h: } } extern int ioctl(int, int, ...); } }So that directly contradicts the man page!!!! } }> I guess you should declare i->ioc_cmd as "unsigned long" too. } }I didn't declare ioc_cmd --- it's part of a standard structure (iocblk) }in /usr/include/sys/stream.h. That definition agrees with the prototype }for ioctl() in the standard header file, but neither agree with the }type of the constructed constants or with the man page. Ah. }Anyway, the only conclusion is that there are inconsistencies in the }way things are defines with respect to ioctl() --- does Digital have }a e-mail address for such bugs? Yup. Looks like DEC botched this. Seems to me that the only reasonable fix is for them to: * amend the man page, and * put a cast to int in the _IOC macro (assuming this would be kosher with Posix, XPG, OSF, their mom, etc) John -- John Hascall ``An ill-chosen word is the fool's messenger.'' Systems Software Engineer, ISU Comp Center + Ames, IA 50011 + 515/294-9551 & Hascall Systems - Unix/C/Internet Consulting, Training, Custom Programming