]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s-oscons-tmplt.c: RTEMS defines AF_INET6 but does support it.
authorJoel Sherrill <joel.sherrill@oarcorp.com>
Mon, 11 Aug 2008 17:04:07 +0000 (17:04 +0000)
committerSamuel Tardieu <sam@gcc.gnu.org>
Mon, 11 Aug 2008 17:04:07 +0000 (17:04 +0000)
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

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Make-lang.in
gcc/ada/gsocket.h
gcc/ada/s-oscons-tmplt.c
gcc/ada/socket.c

index 41a76470647a34c9381b034b75272c17c81fa438..68857260db93e2b3eb045f7106d3fef823b037f6 100644 (file)
@@ -1,3 +1,9 @@
+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>
             Robert Dewar <dewar@adacore.com>
 
index cff834b5e1db3a9483e2adaad59a3fc453ff685c..400171001283f4873b5c394aaabb52e205d25e16 100644 (file)
@@ -933,9 +933,9 @@ OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
   ./s-oscons-tmplt.exe > s-oscons-tmplt.s
 
 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
-OSCONS_EXTRACT=$(GCC_FOR_TARGET) -S s-oscons-tmplt.i
+OSCONS_EXTRACT=$(GCC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S s-oscons-tmplt.i
 endif
 
 ada/s-oscons.ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb
index 58c4abb6e5e32ae04e953fee69d74a287fb50711..0dca1a9f50372e76931bff5350febe3de92cc762 100644 (file)
 
 #if defined (_AIX) || defined (__FreeBSD__) || defined (__hpux__) || defined (__osf__) || defined (_WIN32) || defined (__APPLE__)
 # 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
 #endif
 
 # 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
index 8017c3821377d605791f3550a9e3349026c144c0..614a8660d9b4caf759101e7a27d10ced32c8ca30 100644 (file)
@@ -829,6 +829,14 @@ CND(VEOL2, "Alternative EOL")
 #endif
 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
 # define AF_INET6 -1
 #else
index 9653aae1dfad287e2f98e8467c982e6aa8727630..aadc9b084f70fcea271fac4890b227a9ebb7a57f 100644 (file)
@@ -240,7 +240,7 @@ __gnat_safe_getservbyname (const char *name, const char *proto,
   struct servent *rh;
   int ri;
 
-#if defined(__linux__) || defined(__GLIBC__)
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
   (void) getservbyname_r (name, proto, ret, buf, buflen, &rh);
 #else
   rh = getservbyname_r (name, proto, ret, buf, buflen);
@@ -256,7 +256,7 @@ __gnat_safe_getservbyport (int port, const char *proto,
   struct servent *rh;
   int ri;
 
-#if defined(__linux__) || defined(__GLIBC__)
+#if defined(__linux__) || defined(__GLIBC__) || defined(__rtems__)
   (void) getservbyport_r (port, proto, ret, buf, buflen, &rh);
 #else
   rh = getservbyport_r (port, proto, ret, buf, buflen);