Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!hplabs!sm.unisys.com!ucla-cs!admin.cognet.ucla.edu!casey From: casey@admin.cognet.ucla.edu (Casey Leedom) Newsgroups: comp.windows.x Subject: Re: HELP! (sockets/X) Keywords: portability, long != int, 0 parameter != ( *)0 parameter Message-ID: <15419@shemp.CS.UCLA.EDU> Date: 23 Aug 88 00:58:55 GMT References: <80100001@convex> Sender: news@CS.UCLA.EDU Reply-To: casey@cs.ucla.edu (Casey Leedom) Organization: UCLA Lines: 18 In article dana@dino.bellcore.com (Dana A. Chee) writes: > > readfiles = (1 << yourSocket) | (1 << Xfd ); > n = select(32, &readfiles, 0, 0, 0); > > if( readfiles & (1 << Xfd) ) > ... Just being picky here. But if you're not going to use the fd_set stuff from , you should at least get the types you are using right. The above should read: readfiles = (1L << yourSocket) | (1L << Xfd ); n = select(32, &readfiles, (long *)0, (long *)0, (struct timeval *)0); if( readfiles & (1L << Xfd) ) Casey