This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix winsock2.h include order in ada/gsocket.h
- From: Ozkan Sezer <sezeroz at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Kai Tietz <ktietz70 at googlemail dot com>
- Date: Sat, 10 Apr 2010 16:26:38 +0300
- Subject: Re: [PATCH] fix winsock2.h include order in ada/gsocket.h
- References: <i2v647fe9b11004080940ob09247b4je3a461a7b0b759cf@mail.gmail.com>
PING.
On Thu, Apr 8, 2010 at 7:40 PM, Ozkan Sezer <sezeroz@gmail.com> wrote:
> Hi:
>
> gcc/ada/gsocket.h includes windows.h before winsock2.h which leads to
> clashing definitions with winsock.h included from within windows.h, at
> least for mingw-w64. It is common practice to include winsock2.h before
> windows.h, because winsock2.h always includes windows.h itself. The
> trivial patch below fixes that. Please consider for applying to any
> active branch if possible.
>
> Regards.
>
>
> 2010-04-08 ?Ozkan Sezer ?<sezeroz@gmail.com>
>
> ? ? ? ?* gsocket.h: Make sure that winsock2.h is included before windows.h
>
>
> Index: gsocket.h
> ===================================================================
> --- gsocket.h ? (revision 158038)
> +++ gsocket.h ? (working copy)
> @@ -72,7 +72,6 @@
>
> ?#elif defined (WINNT)
> ?#define FD_SETSIZE 1024
> -#include <windows.h>
>
> ?#ifdef __MINGW32__
> ?#include <winsock2.h>
> @@ -161,6 +160,8 @@
>
> ?#endif
>
> +#include <windows.h>
> +
> ?#elif defined(VMS)
> ?#define FD_SETSIZE 4096
> ?#ifndef IN_RTS
>
> --
> Ozkan
>