[Bug ada/82384] [8 Regression] s-taprop.adb failed to compile for x32

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 2 07:52:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82384

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Thank you for reporting this. Could you please check that the attached
> untested patch fixes the issue you are reporting? (or tell me how to
> reproduce on my x86_64-linux box :-)) Thank you in advance!

I have essentially the same patch locally:

Index: s-linux__x32.ads
===================================================================
--- s-linux__x32.ads    (revision 253315)
+++ s-linux__x32.ads    (working copy)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  S p e c                                 --
 --                                                                          --
---             Copyright (C) 2013-2017, Free Software Foundation, Inc.      --
+--          Copyright (C) 2013-2017, Free Software Foundation, Inc.         --
 --
 --                                                                          --
 -- GNARL is free software; you can  redistribute it  and/or modify it under --
@@ -45,8 +45,9 @@ package System.Linux is
    -- Time --
    ----------

-   type time_t       is new Long_Long_Integer;
-   subtype clockid_t is Interfaces.C.int;
+   subtype suseconds_t is Long_Long_Integer;
+   subtype time_t      is Long_Long_Integer;
+   subtype clockid_t   is Interfaces.C.int;

    type timespec is record
       tv_sec  : time_t;
@@ -56,7 +57,7 @@ package System.Linux is

    type timeval is record
       tv_sec  : time_t;
-      tv_usec : Long_Long_Integer;
+      tv_usec : suseconds_t;
    end record;
    pragma Convention (C, timeval);

with additional tweaks to make it resemble s-linux.ads more closely.


More information about the Gcc-bugs mailing list