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]

[PATCH][Ada] Fix tasking on sparc64-linux (122 ACATS FAIL => 1 FAIL)


Hi,

Eric found out that struc_timeval tv_usec field on sparc64-linux
is not time_t/long (64 bits) like on other Linux platforms but is
int (32 bits).

The patch below shows what needs to be done to fix this issue
and get "normal" ACATS results instead of ~122 FAIL:

Without the patch:
http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg01380.html

With the patch:
http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg01676.html

Now should we create "-sparcv9" version of the three files to fix and
use gcc-interface/Makefile.in? Or do you suggest another way to do it?

Thanks in advance,

Laurent

Index: s-osinte-linux.ads
===================================================================
--- s-osinte-linux.ads  (revision 154267)
+++ s-osinte-linux.ads  (working copy)
@@ -533,7 +533,7 @@
 
    type struct_timeval is record
       tv_sec  : time_t;
-      tv_usec : time_t;
+      tv_usec : int;
    end record;
    pragma Convention (C, struct_timeval);
 
Index: s-osinte-posix.adb
===================================================================
--- s-osinte-posix.adb  (revision 154267)
+++ s-osinte-posix.adb  (working copy)
@@ -137,7 +137,7 @@
       return
         struct_timeval'
           (tv_sec  => S,
-           tv_usec => time_t (Long_Long_Integer (F * 10#1#E6)));
+           tv_usec => int (Long_Long_Integer (F * 10#1#E6)));
    end To_Timeval;
 
 end System.OS_Interface;
Index: s-osprim-posix.adb
===================================================================
--- s-osprim-posix.adb  (revision 154267)
+++ s-osprim-posix.adb  (working copy)
@@ -49,7 +49,7 @@
 
    type struct_timeval is record
       tv_sec       : time_t;
-      tv_usec      : Long_Integer;
+      tv_usec      : Integer;
    end record;
    pragma Convention (C, struct_timeval);




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