Re: [Plib-users] need help compiling plib
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2002-04-22 02:35:19
|
Sebastian Ude wrote: > > On Sun, 21 Apr 2002, sjb...@ai... (Steve Baker) wrote: > > Date: Sun, 21 Apr 2002 18:48:23 -0500 > > To: ud...@ha... > > From: sjb...@ai... (Steve Baker) > > CC: pli...@li... > > Reply-To: sjb...@ai... > > Subject: Re: [Plib-users] need help compiling plib > > [...] > > > > The source file should include "sys/types.h", but it doesn't. (To the > > > original author: typedef'ing "socklen_t" to be "int" is not a solution. > > > > There are problems with some OS's (I think IRIX is one of them) with > > those things. I don't think older Unixen define socklen_t - so you have > > to use an 'int'. > > Okay. The problem is, however, that by not including "sys/types.h", the > current code even typedef's "socklen_t" to be "int" on machines that *do* > define socklen_t, which can be fatal when it comes to pointers to those > types. > > As the manuals of standard-conforming UNIX systems do, I really suggest > including "sys/types.h" in addition to "sys/socket.h". It is a standard > header file - does IRIX miss it, too ? If yes, just add a check for it in > configure.in. sys/types.h exists - but the socklen_t type does not. Clearly we should be including that header - but we may need conditional compilation to use socklen_t only if it's defined and fall back on an 'int' instead. To be honest though, it's hard to imagine a socket system whose internal structure was more than 2^32 bytes long! ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |