From: Arnaud Charlet Date: Mon, 11 Jun 2018 09:17:35 +0000 (+0000) Subject: [Ada] Memtrack: have only one definition of fwrite X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8c316b2a138983d5d0e7204d142f4363ddb79dd;p=gcc.git [Ada] Memtrack: have only one definition of fwrite 2018-06-11 Arnaud Charlet gcc/ada/ * libgnat/memtrack.adb (fwrite): Remove second definition. From-SVN: r261407 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1946e548017..791942d377c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-06-11 Arnaud Charlet + + * libgnat/memtrack.adb (fwrite): Remove second definition. + 2018-06-11 Javier Miranda * sinfo.ads (Is_Dynamic_Coextension): Adding documentation. diff --git a/gcc/ada/libgnat/memtrack.adb b/gcc/ada/libgnat/memtrack.adb index efe0fb19405..eba05b4402c 100644 --- a/gcc/ada/libgnat/memtrack.adb +++ b/gcc/ada/libgnat/memtrack.adb @@ -107,12 +107,6 @@ package body System.Memory is Size : size_t; Nmemb : size_t; Stream : File_Ptr); - - procedure fwrite - (Str : String; - Size : size_t; - Nmemb : size_t; - Stream : File_Ptr); pragma Import (C, fwrite); procedure fputc (C : Integer; Stream : File_Ptr); @@ -306,9 +300,13 @@ package body System.Memory is OS_Exit (255); end if; - fwrite ("GMEM DUMP" & ASCII.LF, 10, 1, Gmemfile); - fwrite (Timestamp'Address, Duration'Max_Size_In_Storage_Elements, 1, - Gmemfile); + declare + S : constant String := "GMEM DUMP" & ASCII.LF; + begin + fwrite (S'Address, S'Length, 1, Gmemfile); + fwrite (Timestamp'Address, Duration'Max_Size_In_Storage_Elements, + 1, Gmemfile); + end; end if; end Gmem_Initialize;