Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ukma!david From: david@ukma.uky.csnet (David Herron, NPR Lover) Newsgroups: net.unix-wizards Subject: Re: Microport Unix -- Large Model Problems Message-ID: <5068@ukme.ukma.uky.csnet> Date: Fri, 7-Nov-86 12:40:51 EST Article-I.D.: ukme.5068 Posted: Fri Nov 7 12:40:51 1986 Date-Received: Sat, 8-Nov-86 06:43:12 EST References: <1376@batcomputer.TN.CORNELL.EDU> <840@ur-valhalla.UUCP> Reply-To: david@ukme.UUCP (David Herron, NPR Lover) Organization: U of Kentucky, Mathematical Sciences Lines: 22 In article <840@ur-valhalla.UUCP> dave@valhalla.UUCP (Dave Carlson) writes: >A potential problem I smacked into yesterday when porting BSD to SV/AT >is ioctl(2) expects as the third argument: >union { int iarg; > char *cparg;} >Problem is that the union will pull 4 bytes off the stack (in large model) >but the program calling with an integer will only push 2 bytes. Oh S*$&! >I cast my integer args long and everything seems ok but what a pain... Argh! And you're doing a port of an operating system??? UNIONS are the SAME size regardless of WHICH part of them you use! A user which passes an int to a routine expecting a union is ASKING for trouble! Argh! -- David Herron, cbosgd!ukma!david, david@UKMA.BITNET, david@ms.uky.csnet (I'm also "postmaster", "news", "netnews", "uucp", "mmdf", and ...) (And also the ACM chapter chairperson.) (And even an all-around nice guy. Aren't you lucky to get something from me?)