C functions have been modified to use same-size types on both sides. There are no checks in gcc to make sure the types match, and it happily trashes the stack or reads bogus data without this fix. The C shim in gnatlib is still casting down to long (by design), thus gnat is not 2038-proof on 32 bit architectures. Fixing this is an ongoing project, but I'm running out of time for this release. Getting the timezone offset is now supported; the unused usleep procedure that snuck in from FreeBSD support got removed. Tested on all supported architectures, plus new bootstraps due to the stack trashing, just in case... Conceptually fine with brad@ deraadt@ is unhappy with the partial solution, fixing this remains a high priority todo
17 lines
592 B
Plaintext
17 lines
592 B
Plaintext
$OpenBSD: patch-gcc_ada_g-calend_ads,v 1.1 2014/02/07 01:27:21 tobiasu Exp $
|
|
--- gcc/ada/g-calend.ads.orig Sun Jan 19 06:14:19 2014
|
|
+++ gcc/ada/g-calend.ads Sun Jan 19 06:17:58 2014
|
|
@@ -129,7 +129,11 @@ private
|
|
-- This is a dummy declaration that should be the largest possible timeval
|
|
-- structure of all supported targets.
|
|
|
|
- type timeval is array (1 .. 2) of Interfaces.C.long;
|
|
+ type timeval is
|
|
+ record
|
|
+ tv_sec : Long_Long_Integer;
|
|
+ tv_usec : Interfaces.C.long;
|
|
+ end record;
|
|
|
|
function Julian_Day
|
|
(Year : Ada.Calendar.Year_Number;
|