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]

Ada runtime 64 bit fixes


The POSIX style System.OS_Primitives assumes that time_t == Integer.  This
is wrong for 64 bit architectures, where time_t is a 64 bit integer.  The
same is true for the tv_usec member of struct_timeval.  For 32 bit targets
this should make no difference.

Andreas.

2001-12-05  Andreas Schwab  <schwab@suse.de>

	* 7sosprim.adb (time_t): Define as Long_Integer instead of
	Integer.
	(struct_timeval): Define tv_usec as Long_Integer.
	* g-os_lib.ads (OS_Time): Define as Long_Integer.

Index: gcc/ada/7sosprim.adb
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/7sosprim.adb,v
retrieving revision 1.1
diff -u -a -u -r1.1 gcc/ada/7sosprim.adb
--- gcc/ada/7sosprim.adb	2001/10/02 13:42:29	1.1
+++ gcc/ada/7sosprim.adb	2001/12/04 14:19:29
@@ -50,11 +50,11 @@
    pragma Convention (C, struct_timezone);
    type struct_timezone_ptr is access all struct_timezone;
 
-   type time_t is new Integer;
+   type time_t is new Long_Integer;
 
    type struct_timeval is record
       tv_sec       : time_t;
-      tv_usec      : Integer;
+      tv_usec      : Long_Integer;
    end record;
    pragma Convention (C, struct_timeval);
 
Index: gcc/ada/g-os_lib.ads
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/g-os_lib.ads,v
retrieving revision 1.1
diff -u -a -u -r1.1 gcc/ada/g-os_lib.ads
--- gcc/ada/g-os_lib.ads	2001/10/02 14:15:32	1.1
+++ gcc/ada/g-os_lib.ads	2001/12/04 14:19:29
@@ -497,7 +497,7 @@
    pragma Import (C, Path_Separator, "__gnat_path_separator");
    pragma Import (C, Directory_Separator, "__gnat_dir_separator");
 
-   type OS_Time is new Integer;
+   type OS_Time is new Long_Integer;
 
    type File_Descriptor is new Integer;
 

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5


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