This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Ada Broken with h_errno change
- From: "Joel Sherrill <joel at OARcorp dot com>" <joel dot sherrill at OARcorp dot com>
- To: gcc at gcc dot gnu dot org, Thomas Quinot <quinot at adacore dot com>
- Date: Wed, 16 Nov 2005 14:56:10 -0600
- Subject: Ada Broken with h_errno change
- Reply-to: joel dot sherrill at OARcorp dot com
As of this morning, Ada no longer compiles for *-rtems.
I think this change broke it.
2005-11-14 Thomas Quinot <quinot@adacore.com>
* socket.c (__gnat_get_h_errno): New function to retrieve h_errno, the
hosts database last error code.
RTEMS has networking functions but they are not available at this stage
during the build. You only have the .h files provided with newlib. So
this patch is needed to make *-rtems compile again. OK to commit?
Index: gcc/ada/socket.c
===================================================================
--- gcc/ada/socket.c (revision 107093)
+++ gcc/ada/socket.c (working copy)
@@ -190,6 +190,10 @@
#elif defined(VMS)
return errno;
#else
+#if defined(__rtems__)
+ /* No networking .h files are available from newlib so extern this. */
+ extern int h_errno;
+#endif
return h_errno;
#endif
}
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985