This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: DOS/Windows-specific code: sparcl-tdep.c
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: DOS/Windows-specific code: sparcl-tdep.c
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Wed, 9 May 2001 13:16:09 +0300 (IDT)
- cc: gdb at sources dot redhat dot com
On Tue, 8 May 2001, Kevin Buettner wrote:
> On May 8, 2:49pm, Eli Zaretskii wrote:
>
> > * sparcl-tdep.c:
> >
> > #if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN32__)
> > #define HAVE_SOCKETS
> > #include <sys/time.h>
> > #include <sys/socket.h>
> > #include <netinet/in.h>
> > #include <netdb.h>
> > #endif
> >
> > Looks like an Autoconf test for HAVE_SOCKETS should do here.
>
> Why not just add an autoconf test for the sys/socket.h header file and
> then do:
>
> #ifdef HAVE_SYS_SOCKET_H
> #define HAVE_SOCKETS
> #include <sys/time.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <netdb.h>
> #endif
Yes, that would be good, I think.
> (If you wanted to be paranoid you could test for some of the other
> header files as well.)
I think sys/sockets.h test should be enough.