Commit a9e00bfd by Arnaud Charlet

[multiple changes]

2010-06-22  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: Remove project level attribute Main_Language.

2010-06-22  Robert Dewar  <dewar@adacore.com>

	* switch-b.adb, osint-b.adb: Minor reformatting.

2010-06-22  Pascal Obry  <obry@adacore.com>

	* g-socthi-mingw.adb (C_Sendmsg): Do not attempt to send data from a
	vector if previous send was not fully successful. If only part of
	the vector data was sent, we exit the loop.

From-SVN: r161157
parent d25eaf74
2010-06-22 Vincent Celier <celier@adacore.com>
* prj-attr.adb: Remove project level attribute Main_Language.
2010-06-22 Robert Dewar <dewar@adacore.com>
* switch-b.adb, osint-b.adb: Minor reformatting.
2010-06-22 Pascal Obry <obry@adacore.com>
* g-socthi-mingw.adb (C_Sendmsg): Do not attempt to send data from a
vector if previous send was not fully successful. If only part of
the vector data was sent, we exit the loop.
2010-06-22 Thomas Quinot <quinot@adacore.com> 2010-06-22 Thomas Quinot <quinot@adacore.com>
* sem_res.adb (Make_Call_Into_Operator): Use First_Subtype for better * sem_res.adb (Make_Call_Into_Operator): Use First_Subtype for better
......
...@@ -505,6 +505,10 @@ package body GNAT.Sockets.Thin is ...@@ -505,6 +505,10 @@ package body GNAT.Sockets.Thin is
else else
Count := Count + Res; Count := Count + Res;
end if; end if;
-- Exit now if the buffer is not fully transmitted
exit when Stream_Element_Count (Res) < Iovec (J).Length;
end loop; end loop;
return System.CRTL.ssize_t (Count); return System.CRTL.ssize_t (Count);
......
...@@ -192,6 +192,10 @@ package body Osint.B is ...@@ -192,6 +192,10 @@ package body Osint.B is
Current_File_Name_Index := To; Current_File_Name_Index := To;
end Set_Current_File_Name_Index; end Set_Current_File_Name_Index;
-------------------
-- Set_List_File --
-------------------
procedure Set_List_File (Filename : String) is procedure Set_List_File (Filename : String) is
begin begin
pragma Assert (Current_List_File = Invalid_FD); pragma Assert (Current_List_File = Invalid_FD);
...@@ -199,7 +203,6 @@ package body Osint.B is ...@@ -199,7 +203,6 @@ package body Osint.B is
if Current_List_File = Invalid_FD then if Current_List_File = Invalid_FD then
Fail ("cannot create list file: " & Filename); Fail ("cannot create list file: " & Filename);
else else
Set_Output (Current_List_File); Set_Output (Current_List_File);
end if; end if;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -71,7 +71,6 @@ package body Prj.Attr is ...@@ -71,7 +71,6 @@ package body Prj.Attr is
"SVRproject_dir#" & "SVRproject_dir#" &
"lVmain#" & "lVmain#" &
"LVlanguages#" & "LVlanguages#" &
"SVmain_language#" &
"Lbroots#" & "Lbroots#" &
"SVexternally_built#" & "SVexternally_built#" &
......
...@@ -42,13 +42,13 @@ package body Switch.B is ...@@ -42,13 +42,13 @@ package body Switch.B is
C : Character := ' '; C : Character := ' ';
function Get_Optional_Filename return String_Ptr; function Get_Optional_Filename return String_Ptr;
-- If current character is '=', return a newly allocated string -- If current character is '=', return a newly allocated string that
-- containing the remainder of the current switch (after the '='), else -- contains the remainder of the current switch (after the '='), else
-- return null. -- return null.
function Get_Stack_Size (S : Character) return Int; function Get_Stack_Size (S : Character) return Int;
-- Used for -d and -D to scan stack size including handling k/m. -- Used for -d and -D to scan stack size including handling k/m. S is
-- S is set to 'd' or 'D' to indicate the switch being scanned. -- set to 'd' or 'D' to indicate the switch being scanned.
--------------------------- ---------------------------
-- Get_Optional_Filename -- -- Get_Optional_Filename --
...@@ -56,6 +56,7 @@ package body Switch.B is ...@@ -56,6 +56,7 @@ package body Switch.B is
function Get_Optional_Filename return String_Ptr is function Get_Optional_Filename return String_Ptr is
Result : String_Ptr; Result : String_Ptr;
begin begin
if Ptr <= Max and then Switch_Chars (Ptr) = '=' then if Ptr <= Max and then Switch_Chars (Ptr) = '=' then
if Ptr = Max then if Ptr = Max then
...@@ -87,11 +88,11 @@ package body Switch.B is ...@@ -87,11 +88,11 @@ package body Switch.B is
pragma Unsuppress (Overflow_Check); pragma Unsuppress (Overflow_Check);
begin begin
-- Check for additional character 'k' (for kilobytes) or 'm' -- Check for additional character 'k' (for kilobytes) or 'm' (for
-- (for Megabytes), but only if we have not reached the end -- Megabytes), but only if we have not reached the end of the
-- of the switch string. Note that if this appears before the -- switch string. Note that if this appears before the end of the
-- end of the string we will get an error when we test to make -- string we will get an error when we test to make sure that the
-- sure that the string is exhausted (at the end of the case). -- string is exhausted (at the end of the case).
if Ptr <= Max then if Ptr <= Max then
if Switch_Chars (Ptr) = 'k' then if Switch_Chars (Ptr) = 'k' then
...@@ -123,8 +124,8 @@ package body Switch.B is ...@@ -123,8 +124,8 @@ package body Switch.B is
Ptr := Ptr + 1; Ptr := Ptr + 1;
end if; end if;
-- A little check, "gnat" at the start of a switch is not allowed -- A little check, "gnat" at the start of a switch is not allowed except
-- except for the compiler -- for the compiler
if Switch_Chars'Last >= Ptr + 3 if Switch_Chars'Last >= Ptr + 3
and then Switch_Chars (Ptr .. Ptr + 3) = "gnat" and then Switch_Chars (Ptr .. Ptr + 3) = "gnat"
...@@ -163,7 +164,6 @@ package body Switch.B is ...@@ -163,7 +164,6 @@ package body Switch.B is
when 'c' => when 'c' =>
Ptr := Ptr + 1; Ptr := Ptr + 1;
Check_Only := True; Check_Only := True;
-- Processing for C switch -- Processing for C switch
...@@ -281,7 +281,7 @@ package body Switch.B is ...@@ -281,7 +281,7 @@ package body Switch.B is
Ptr := Ptr + 1; Ptr := Ptr + 1;
C := Switch_Chars (Ptr); C := Switch_Chars (Ptr);
if C in '1' .. '5' if C in '1' .. '5'
or else C = '8' or else C = '8'
or else C = 'p' or else C = 'p'
or else C = 'f' or else C = 'f'
...@@ -333,7 +333,6 @@ package body Switch.B is ...@@ -333,7 +333,6 @@ package body Switch.B is
if Output_File_Name_Present then if Output_File_Name_Present then
Osint.Fail ("duplicate -o switch"); Osint.Fail ("duplicate -o switch");
else else
Output_File_Name_Present := True; Output_File_Name_Present := True;
end if; end if;
...@@ -429,7 +428,6 @@ package body Switch.B is ...@@ -429,7 +428,6 @@ package body Switch.B is
Ptr := Ptr + 1; Ptr := Ptr + 1;
case Switch_Chars (Ptr) is case Switch_Chars (Ptr) is
when 'e' => when 'e' =>
Warning_Mode := Treat_As_Error; Warning_Mode := Treat_As_Error;
...@@ -462,8 +460,7 @@ package body Switch.B is ...@@ -462,8 +460,7 @@ package body Switch.B is
Wide_Character_Encoding_Method_Specified := True; Wide_Character_Encoding_Method_Specified := True;
Upper_Half_Encoding := Upper_Half_Encoding :=
Wide_Character_Encoding_Method in Wide_Character_Encoding_Method in WC_Upper_Half_Encoding_Method;
WC_Upper_Half_Encoding_Method;
Ptr := Ptr + 1; Ptr := Ptr + 1;
...@@ -515,7 +512,7 @@ package body Switch.B is ...@@ -515,7 +512,7 @@ package body Switch.B is
Osint.Fail ("missing path for --RTS"); Osint.Fail ("missing path for --RTS");
else else
-- valid --RTS switch -- Valid --RTS switch
Opt.No_Stdinc := True; Opt.No_Stdinc := True;
Opt.RTS_Switch := True; Opt.RTS_Switch := True;
...@@ -537,8 +534,8 @@ package body Switch.B is ...@@ -537,8 +534,8 @@ package body Switch.B is
Lib_Path_Name /= null Lib_Path_Name /= null
then then
-- Set the RTS_*_Path_Name variables, so that the -- Set the RTS_*_Path_Name variables, so that the
-- correct directories will be set when -- correct directories will be set when a subsequent
-- Osint.Add_Default_Search_Dirs will be called later. -- call Osint.Add_Default_Search_Dirs is made.
RTS_Src_Path_Name := Src_Path_Name; RTS_Src_Path_Name := Src_Path_Name;
RTS_Lib_Path_Name := Lib_Path_Name; RTS_Lib_Path_Name := Lib_Path_Name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment