aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/bindgen.adb
diff options
context:
space:
mode:
authorGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
commita926878ddbd5a98b272c22171ce58663fc04c3e0 (patch)
tree86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/ada/bindgen.adb
parent542730f087133690b47e036dfd43eb0db8a650ce (diff)
parent07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff)
downloadgcc-devel/autopar_devel.zip
gcc-devel/autopar_devel.tar.gz
gcc-devel/autopar_devel.tar.bz2
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r--gcc/ada/bindgen.adb33
1 files changed, 21 insertions, 12 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index 9ac50fe..91b4cb3 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -197,6 +197,7 @@ package body Bindgen is
-- Main_CPU : Integer;
-- Default_Sized_SS_Pool : System.Address;
-- Binder_Sec_Stacks_Count : Natural;
+ -- XDR_Stream : Integer;
-- Main_Priority is the priority value set by pragma Priority in the main
-- program. If no such pragma is present, the value is -1.
@@ -295,6 +296,9 @@ package body Bindgen is
-- Binder_Sec_Stacks_Count is the number of generated secondary stacks in
-- the Default_Sized_SS_Pool.
+ -- XDR_Stream indicates whether streaming should be performed using the
+ -- XDR protocol. A value of one indicates that XDR streaming is enabled.
+
procedure WBI (Info : String) renames Osint.B.Write_Binder_Info;
-- Convenient shorthand used throughout
@@ -457,7 +461,7 @@ package body Bindgen is
if not Bind_For_Library and not CodePeer_Mode then
WBI (" procedure s_stalib_adafinal;");
- Set_String (" pragma Import (C, s_stalib_adafinal, ");
+ Set_String (" pragma Import (Ada, s_stalib_adafinal, ");
Set_String ("""system__standard_library__adafinal"");");
Write_Statement_Buffer;
end if;
@@ -758,13 +762,21 @@ package body Bindgen is
"""__gnat_default_ss_size"");");
end if;
- WBI (" Leap_Seconds_Support : Integer;");
- WBI (" pragma Import (C, Leap_Seconds_Support, " &
- """__gl_leap_seconds_support"");");
+ if Leap_Seconds_Support then
+ WBI (" Leap_Seconds_Support : Integer;");
+ WBI (" pragma Import (C, Leap_Seconds_Support, " &
+ """__gl_leap_seconds_support"");");
+ end if;
+
WBI (" Bind_Env_Addr : System.Address;");
WBI (" pragma Import (C, Bind_Env_Addr, " &
"""__gl_bind_env_addr"");");
+ if XDR_Stream then
+ WBI (" XDR_Stream : Integer;");
+ WBI (" pragma Import (C, XDR_Stream, ""__gl_xdr_stream"");");
+ end if;
+
-- Import entry point for elaboration time signal handler
-- installation, and indication of if it's been called previously.
@@ -978,16 +990,13 @@ package body Bindgen is
Set_String (";");
Write_Statement_Buffer;
- Set_String (" Leap_Seconds_Support := ");
-
if Leap_Seconds_Support then
- Set_Int (1);
- else
- Set_Int (0);
+ WBI (" Leap_Seconds_Support := 1;");
end if;
- Set_String (";");
- Write_Statement_Buffer;
+ if XDR_Stream then
+ WBI (" XDR_Stream := 1;");
+ end if;
if Bind_Env_String_Built then
WBI (" Bind_Env_Addr := Bind_Env'Address;");