This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ada Broken with h_errno change


Thomas Quinot wrote:
* Joel Sherrill <joel@OARcorp.com>, 2005-11-17 :


I hope the explanation above helps make it clearer.


Yes, thanks for the clarification. In light of this explanation the
proposed fix seems appropriate; maybe a comment could be added along
with the extern declaration to note that it is necessary because of the
way the bootstrap procedure is organized.

How about this? Can I commit it?


Index: gcc/ada/socket.c
===================================================================
--- gcc/ada/socket.c (revision 107308)
+++ gcc/ada/socket.c (working copy)
@@ -189,6 +189,13 @@
}
#elif defined(VMS)
return errno;
+#elif defined(__rtems__)
+ /* At this stage in the tool build, no networking .h files are available.
+ Newlib does not provide networking .h files and RTEMS is not built yet.
+ So we need to explicitly extern h_errno to access it.
+ */
+ extern int h_errno;
+ return h_errno;
#else
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]