Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.sources.d Subject: Re: problems about Conquest Message-ID: <32644@sun.uucp> Date: Mon, 2-Nov-87 15:45:07 EST Article-I.D.: sun.32644 Posted: Mon Nov 2 15:45:07 1987 Date-Received: Fri, 6-Nov-87 00:05:44 EST References: <15100001@silver> <4696@zen.berkeley.edu> <989@kodak.UUCP> Sender: news@sun.uucp Lines: 16 > I'm running SunOS 3.4 on a Sun3/260 and cannot get the calls > to write(2) in io.c, function writedata(), to work properly. > I am pretty sure that the write(2) call in SunOS doesn't like > being passed an array of structure elements... If you're very sure about that, you're very wrong. "write" is quite happy to be passed a pointer to an array of structure elements (which is what that call does). You're better off handing it a "char *", as that's what "write" is defined to take as a second argument (i.e., the second argument should be cast to "char *"), but on some machines, including Suns, all pointers have the same representation so you can get away with that sort of thing. You shouldn't *rely* on being able to get away with it, though. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com