Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: john@iastate.edu (John Hascall)
Subject: Re: Strange error in STREAMS code
Date: 15 Nov 1994 04:00:27 GMT	[thread overview]
Message-ID: <3a9bor$51t@news.iastate.edu> (raw)
In-Reply-To: CzA3xx.MGw@world.std.com

Charles M Richmond <cmr@world.std.com> wrote:
}srt@zaphod.csci.unt.edu (Steve Tate) writes:
}>John Hascall (john@iastate.edu) wrote:
}>> From "man ioctl":
}>>   #include <sys/ioctl.h>
}>>   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!!!!

}The man page is incorrect and I have filed a QAR to get it fixed.

Not only is the man page wrong, but so are the definitions of _IOR,
_IOW,  & _IOWR (and hence all of the xIOCyyyy manifest constants); for
example:

#define _IOC(inout,group,num,len) \
        (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))

#define _IOW(g,n,t)     _IOC(IOC_IN,    (g), (n), sizeof(t))
                                                  |
                                                  type is "size_t", which is
                                                  "unsigned long" on AXP-OSF/1

#define TIOCFLUSH       _IOW('t', 16, int)      /* flush buffers */

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


      reply	other threads:[~1994-11-15  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-13 18:59 Strange error in STREAMS code Steve Tate
1994-11-13 23:24 ` Steve Tate
1994-11-13 23:48   ` John Hascall
1994-11-14 16:34     ` Steve Tate
1994-11-14 19:13       ` John Hascall
1994-11-14 22:32       ` Charles M Richmond
1994-11-15  4:00         ` John Hascall [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox