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: 14 Nov 1994 19:13:05 GMT	[thread overview]
Message-ID: <3a8cs1$kc0@news.iastate.edu> (raw)
In-Reply-To: 3a83il$q75@hermes.unt.edu

Steve Tate <srt@zaphod.csci.unt.edu> wrote:
}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!!!!
}
}> 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


  reply	other threads:[~1994-11-14 19:13 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 [this message]
1994-11-14 22:32       ` Charles M Richmond
1994-11-15  4:00         ` John Hascall
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