Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!sgi!shinobu!fido.wpd.sgi.com!marktwain.rad.sgi.com!linton From: linton@marktwain.rad.sgi.com (Mark Linton) Newsgroups: comp.windows.interviews Subject: Re: portability of InterViews-3.0 Message-ID: <1991Jun1.004743.17539@fido.wpd.sgi.com> Date: 1 Jun 91 00:47:43 GMT References: <9105311949.AA04835@athos.Berkeley.EDU> Sender: news@fido.wpd.sgi.com (Usenet News Admin) Reply-To: linton@marktwain.rad.sgi.com (Mark Linton) Organization: sgi Lines: 23 In article <9105311949.AA04835@athos.Berkeley.EDU>, mcgeer@ATHOS.BERKELEY.EDU writes: |> An fd_set in Sun OS is a structure with a single long |> element, which is a bit-vector. Ultrix uses int *'s for the arguments. |> As nearly as I can tell from the man pages, the int *'s represent the |> same things and are similarly encoded. My fix was simply to cast off |> the fd_set *'s to int *'s; e.g: |> |> /* nfound = select(_nfds, &rmaskret, &wmaskret, &emaskret, howlong); */ |> nfound = select(_nfds, (int *)&rmaskret, (int *)&wmaskret, (int *)&emask |> ret, howlong); fd_set is not SunOS-specific; in fact, it is defined on Ultrix in . I believe the select prototype is wrong; it should in fact take fd_sets. |> (2) IV-X11/xworld.c, line 591, routine World::inputReady: Under ultrix, |> the third argument to ioctl must be a char *. Solved by casting &pending to char *. If someone knows what POSIX specifies for ioctl, I'd appreciate knowing. It might be that it should be caddr_t rather than char*. In response to the general question about portability (which was specifically about Data General in another posting), our experience is that the C++ compiler and the system include files are the only issues on Unix/X platforms.