[GRASS5] Socket compilation error on HP-UX

Glynn Clements glynn.clements at virgin.net
Wed May 30 12:14:46 EDT 2001


Robert =?iso-8859-1?Q?Lagac=E9?= wrote:

> > > > > However, it appears that <sys/types.h> is the correct file to
> > > > > include.
> > > >
> > > > This is still true. I'll change this.
> > >
> > > What are the symbols or functions defined there?
> > 
> > The ones for which <sys/select.h> was being used are the fd_set type
> > and the FD_ZERO and FD_SET macros. In GNU libc 2, these are defined in
> > <sys/select.h> but that file is included from <sys/types.h>. The
> > latter is apparently the correct file to include for these 
> > definitions.
> 
> On HP-UX 10.2, fd_set type and FD_ZERO and FD_SET macros are define in 
> <sys/types.h>.  If for other platforms, these definitions are as you 
> said in <sys/select.h> but included from <sys/types.h>, it not 
> necessary to put the include statement #include <sys/select.h> since 
> #include <sys/types.h> is already present.  The problem can only exist 
> for systems where thoses definitions are not included directly or 
> indirectly by <sys/types.h>.  In those case, the include will be 
> conditional. We need to identify those systems.  HP-UX and LINUX 
> seems OK.
> 
> One tempory solution i may be change the following statements in 
> connect_sock.c 

[snip]

None of this is necessary; "#include <sys/types.h>" is sufficient.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list