linton@marktwain.rad.sgi.com (Mark Linton) (06/01/91)
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 <sys/types.h>. 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.