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
15 lines
598 B
Plaintext
15 lines
598 B
Plaintext
$OpenBSD: patch-gcc_ada_a-calend_adb,v 1.1 2014/02/07 01:27:21 tobiasu Exp $
|
|
--- gcc/ada/a-calend.adb.orig Sun Jan 19 01:33:14 2014
|
|
+++ gcc/ada/a-calend.adb Sun Jan 19 01:34:06 2014
|
|
@@ -1448,9 +1448,7 @@ package body Ada.Calendar is
|
|
subtype long is Long_Integer;
|
|
type long_Pointer is access all long;
|
|
|
|
- type time_t is
|
|
- range -(2 ** (Standard'Address_Size - Integer'(1))) ..
|
|
- +(2 ** (Standard'Address_Size - Integer'(1)) - 1);
|
|
+ type time_t is new Long_Long_Integer;
|
|
type time_t_Pointer is access all time_t;
|
|
|
|
procedure localtime_tzoff
|