This is the mail archive of the gcc-patches@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]

RTEMS Ada RTS 4.x patches


Hi,

There are a couple of minor issues which prevent the
Ada RTS from compiling for *-rtems.  This is filed
as PR19488.


2005-01-17 Joel Sherrill <joel.sherrill@oarcorp.com>


        * 5rtpopsp.adb: Initialize ATCB_Key and fix style.
        * gsocket.h: Do not include <sys/socket.h> with RTEMS either.

RTEMS does not use ATCB_Key since it has an optimized
Self but it has to be initialized to avoid a terminating
compiler error.  If there is a better way to get it initialized,
I am happy to change it.

--
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: gcc/ada/5rtpopsp.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/5rtpopsp.adb,v
retrieving revision 1.3
diff -u -r1.3 5rtpopsp.adb
--- gcc/ada/5rtpopsp.adb	8 Apr 2004 17:54:03 -0000	1.3
+++ gcc/ada/5rtpopsp.adb	17 Jan 2005 17:50:20 -0000
@@ -54,11 +54,13 @@
    -- Initialize --
    ----------------
 
-   procedure Initialize (Environment_Task : Task_ID) is
+   procedure Initialize (Environment_Task : Task_Id) is
       pragma Warnings (Off, Environment_Task);
-      Result : Interfaces.C.int;
 
+      procedure Set_ATCB_Key (key : access pthread_key_t);
+      pragma Import (C, Set_ATCB_Key, "rtems_gnat_set_atcb_key");
    begin
+      Set_ATCB_Key (ATCB_Key'Access);
       RTEMS_Ada_Self := To_Address (Environment_Task);
    end Initialize;
 
@@ -75,8 +77,7 @@
    -- Set --
    ---------
 
-   procedure Set (Self_Id : Task_ID) is
-      Result : Interfaces.C.int;
+   procedure Set (Self_Id : Task_Id) is
    begin
       RTEMS_Ada_Self := To_Address (Self_Id);
    end Set;
@@ -98,7 +99,7 @@
    --  hierarchy, much like the existing implicitly created signal-server
    --  tasks.
 
-   function Self return Task_ID is
+   function Self return Task_Id is
       Result : System.Address;
 
    begin
Index: gcc/ada/gsocket.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/gsocket.h,v
retrieving revision 1.1
diff -u -r1.1 gsocket.h
--- gcc/ada/gsocket.h	3 Jan 2005 15:30:02 -0000	1.1
+++ gcc/ada/gsocket.h	17 Jan 2005 17:50:21 -0000
@@ -62,6 +62,6 @@
 #include "system.h"
 #endif
 
-#if !(defined (VMS) || defined (__MINGW32__))
+#if !(defined (VMS) || defined (__MINGW32__) || defined(__rtems__))
 # include <sys/socket.h>
 #endif

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