This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][Ada] Updated GNAT Socket So *-rtems* Continues to Work
- From: Arnaud Charlet <charlet at adacore dot com>
- To: Laurent GUERBY <laurent at guerby dot net>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Date: Tue, 22 Jul 2008 18:03:37 +0200
- Subject: Re: [PATCH][Ada] Updated GNAT Socket So *-rtems* Continues to Work
- References: <484879B0.3010807@oarcorp.com> <1216660638.18723.1242.camel@localhost>
> Index: gen-soccon.c
> ===================================================================
> --- gen-soccon.c (revision 136364)
> +++ gen-soccon.c (working copy)
> @@ -156,8 +156,10 @@
> #ifndef AF_INET6
> # define AF_INET6 -1
> #else
> +#ifndef __rtems__
> # define HAVE_AF_INET6 1
> #endif
> +#endif
> CND(AF_INET6, "IPv6 address family")
> _NL
> TXT(" -----------")
This part will become obsolete soon, since we've redone this part without
the need to run a target executable.
Still, this change looks dubious, it's not logical to have AF_INET6 defined and
no struct sockaddr_in6 (HAVE_AF_INET6 is used only to indicate whether
we can take sizeof (struct sockaddr_in6)). Is it really the case that RTEMS
defines AF_INET6 but doesn't provide struct sockaddr_in6?
> Index: gsocket.h
> ===================================================================
> --- gsocket.h (revision 136364)
> +++ gsocket.h (working copy)
> @@ -185,7 +185,7 @@
> # define Need_Netdb_Buffer 0
> #endif
>
> -#if defined (__FreeBSD__) || defined (__vxworks)
> +#if defined (__FreeBSD__) || defined (__vxworks) || defined (__rtems__)
> # define Has_Sockaddr_Len 1
> #else
> # define Has_Sockaddr_Len 0
This part is OK.
g-soccon-rtems.ads part is OK too.
Arno