On Sun, 23 Apr 2006, Nick Guenther wrote:

> On 4/23/06, Dave Feustel <[EMAIL PROTECTED]> wrote:
> > I have downloaded the source code accompanying
> > Stevens' book _Advanced Network Programming
> > - The Socket Programming API, vol 1, 3rd ed.
> > After uncompressing the tar ball, cd'ing to the source code
> > directory , running ./configure and attempting to gmake the source
> > in lib, I get a number of errors which seem to stem from failure
> > of the ./configure command to find many of the OpenBSD include files
> > related to sockets. This failure shows up in the file config.h, where
> > defines created during the configure process specify that OpenBSD
> > is missing many include files and socket-related structures. This results
> > in compile errors when socket structures are redefined during compilation.
> > I started to fix individual errors until I figured out that there was a more
> > general problem in ./configure. I have looked at the shell script in 
> > ./configure
> > but so far I have not figured out where the configure goes wrong. Is there a
> > simple way to run or fix ./configure so that the config.h generated by
> > configure reflects the actual content of openbsd include files and 
> > subsequent
> > compiles of Stevens' source work?
> 
> Well, socket(2) shows that OpenBSD certainly has the full socket API
> (afterall, they were invented on BSD). My guess is that the book was
> designed for linux and no thought was given to users of other OSes.

This shows that you don't know Stevens' books. Stevens books are among
the books to read if you want to learn how to write good POSIX
programs.  Most of them were written before Linux became popular. 

For fun I tried to compile some of the programs mentioned, and the
programs I tested compiled fine, be it with some warnings about
usage of non-safe string functions.

        -Otto

> So, to fix it, you should just have to redirect the socket includes to
> the proper place (i.e:
>      #include <sys/types.h>
>      #include <sys/socket.h>
> )
> 
> Also: Hi Dave!
> 
> -Nick

Reply via email to