Commit 269b85b7 by Joel Sherrill Committed by Samuel Tardieu

s-oscons-tmplt.c: RTEMS defines AF_INET6 but does support it.

2008-08-11  Joel Sherrill  <joel.sherrill@oarcorp.com>

    gcc/ada/
	* s-oscons-tmplt.c: RTEMS defines AF_INET6 but does support it.
	* gsocket.h, socket.c: Update to support RTEMS.
	* gcc-interface/Make-lang.in: Include CFLAGS_FOR_TARGET when cross.

From-SVN: r138957
parent dd79750c
2008-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* s-oscons-tmplt.c: RTEMS defines AF_INET6 but does support it.
* gsocket.h, socket.c: Update to support RTEMS.
* gcc-interface/Make-lang.in: Include CFLAGS_FOR_TARGET when cross.
2008-08-10 Samuel Tardieu <sam@rfc1149.net> 2008-08-10 Samuel Tardieu <sam@rfc1149.net>
Robert Dewar <dewar@adacore.com> Robert Dewar <dewar@adacore.com>
...@@ -933,9 +933,9 @@ OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \ ...@@ -933,9 +933,9 @@ OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
./s-oscons-tmplt.exe > s-oscons-tmplt.s ./s-oscons-tmplt.exe > s-oscons-tmplt.s
else else
OSCONS_CPP=$(GCC_FOR_TARGET) -E -C \ OSCONS_CPP=$(GCC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -E -C \
-DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
OSCONS_EXTRACT=$(GCC_FOR_TARGET) -S s-oscons-tmplt.i OSCONS_EXTRACT=$(GCC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S s-oscons-tmplt.i
endif endif
ada/s-oscons.ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb ada/s-oscons.ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
#if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__) #if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
# define HAVE_THREAD_SAFE_GETxxxBYyyy 1 # define HAVE_THREAD_SAFE_GETxxxBYyyy 1
#elif defined (sgi) || defined (linux) || defined (__GLIBC__) || (defined (sun) && defined (__SVR4) && !defined (__vxworks)) #elif defined (sgi) || defined (linux) || defined (__GLIBC__) || (defined (sun) && defined (__SVR4) && !defined (__vxworks)) || defined(__rtems__)
# define HAVE_GETxxxBYyyy_R 1 # define HAVE_GETxxxBYyyy_R 1
#endif #endif
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
# define Need_Netdb_Buffer 0 # define Need_Netdb_Buffer 0
#endif #endif
#if defined (__FreeBSD__) || defined (__vxworks) #if defined (__FreeBSD__) || defined (__vxworks) || defined(__rtems__)
# define Has_Sockaddr_Len 1 # define Has_Sockaddr_Len 1
#else #else
# define Has_Sockaddr_Len 0 # define Has_Sockaddr_Len 0
......
...@@ -829,6 +829,14 @@ CND(VEOL2, "Alternative EOL") ...@@ -829,6 +829,14 @@ CND(VEOL2, "Alternative EOL")
#endif #endif
CND(AF_INET, "IPv4 address family") CND(AF_INET, "IPv4 address family")
/**
** RTEMS lies and defines AF_INET6 even though there is no IPV6 support.
** Its TCP/IP stack is in transition. It has newer .h files but no IPV6 yet.
**/
#if defined(__rtems__)
# undef AF_INET6
#endif
#ifndef AF_INET6 #ifndef AF_INET6
# define AF_INET6 -1 # define AF_INET6 -1
#else #else
......
...@@ -240,7 +240,7 @@ __gnat_safe_getservbyname (const char *name, const char *proto, ...@@ -240,7 +240,7 @@ __gnat_safe_getservbyname (const char *name, const char *proto,
struct servent *rh; struct servent *rh;
int ri; int ri;
#if defined(__linux__) || defined(__GLIBC__) #if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
(void) getservbyname_r (name, proto, ret, buf, buflen, &rh); (void) getservbyname_r (name, proto, ret, buf, buflen, &rh);
#else #else
rh = getservbyname_r (name, proto, ret, buf, buflen); rh = getservbyname_r (name, proto, ret, buf, buflen);
...@@ -256,7 +256,7 @@ __gnat_safe_getservbyport (int port, const char *proto, ...@@ -256,7 +256,7 @@ __gnat_safe_getservbyport (int port, const char *proto,
struct servent *rh; struct servent *rh;
int ri; int ri;
#if defined(__linux__) || defined(__GLIBC__) #if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
(void) getservbyport_r (port, proto, ret, buf, buflen, &rh); (void) getservbyport_r (port, proto, ret, buf, buflen, &rh);
#else #else
rh = getservbyport_r (port, proto, ret, buf, buflen); rh = getservbyport_r (port, proto, ret, buf, buflen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment