[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
This commit is contained in:
Arnaud Charlet 2010-06-22 11:46:58 +02:00
parent d25eaf7449
commit a9e00bfdb8
5 changed files with 40 additions and 23 deletions

View File

@ -1,3 +1,17 @@
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>
* sem_res.adb (Make_Call_Into_Operator): Use First_Subtype for better

View File

@ -505,6 +505,10 @@ package body GNAT.Sockets.Thin is
else
Count := Count + Res;
end if;
-- Exit now if the buffer is not fully transmitted
exit when Stream_Element_Count (Res) < Iovec (J).Length;
end loop;
return System.CRTL.ssize_t (Count);

View File

@ -192,6 +192,10 @@ package body Osint.B is
Current_File_Name_Index := To;
end Set_Current_File_Name_Index;
-------------------
-- Set_List_File --
-------------------
procedure Set_List_File (Filename : String) is
begin
pragma Assert (Current_List_File = Invalid_FD);
@ -199,7 +203,6 @@ package body Osint.B is
if Current_List_File = Invalid_FD then
Fail ("cannot create list file: " & Filename);
else
Set_Output (Current_List_File);
end if;

View File

@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
@ -71,7 +71,6 @@ package body Prj.Attr is
"SVRproject_dir#" &
"lVmain#" &
"LVlanguages#" &
"SVmain_language#" &
"Lbroots#" &
"SVexternally_built#" &

View File

@ -42,13 +42,13 @@ package body Switch.B is
C : Character := ' ';
function Get_Optional_Filename return String_Ptr;
-- If current character is '=', return a newly allocated string
-- containing the remainder of the current switch (after the '='), else
-- If current character is '=', return a newly allocated string that
-- contains the remainder of the current switch (after the '='), else
-- return null.
function Get_Stack_Size (S : Character) return Int;
-- Used for -d and -D to scan stack size including handling k/m.
-- S is set to 'd' or 'D' to indicate the switch being scanned.
-- Used for -d and -D to scan stack size including handling k/m. S is
-- set to 'd' or 'D' to indicate the switch being scanned.
---------------------------
-- Get_Optional_Filename --
@ -56,6 +56,7 @@ package body Switch.B is
function Get_Optional_Filename return String_Ptr is
Result : String_Ptr;
begin
if Ptr <= Max and then Switch_Chars (Ptr) = '=' then
if Ptr = Max then
@ -87,11 +88,11 @@ package body Switch.B is
pragma Unsuppress (Overflow_Check);
begin
-- Check for additional character 'k' (for kilobytes) or 'm'
-- (for Megabytes), but only if we have not reached the end
-- of the switch string. Note that if this appears before the
-- end of the string we will get an error when we test to make
-- sure that the string is exhausted (at the end of the case).
-- Check for additional character 'k' (for kilobytes) or 'm' (for
-- Megabytes), but only if we have not reached the end of the
-- switch string. Note that if this appears before the end of the
-- string we will get an error when we test to make sure that the
-- string is exhausted (at the end of the case).
if Ptr <= Max then
if Switch_Chars (Ptr) = 'k' then
@ -123,8 +124,8 @@ package body Switch.B is
Ptr := Ptr + 1;
end if;
-- A little check, "gnat" at the start of a switch is not allowed
-- except for the compiler
-- A little check, "gnat" at the start of a switch is not allowed except
-- for the compiler
if Switch_Chars'Last >= Ptr + 3
and then Switch_Chars (Ptr .. Ptr + 3) = "gnat"
@ -163,7 +164,6 @@ package body Switch.B is
when 'c' =>
Ptr := Ptr + 1;
Check_Only := True;
-- Processing for C switch
@ -281,7 +281,7 @@ package body Switch.B is
Ptr := Ptr + 1;
C := Switch_Chars (Ptr);
if C in '1' .. '5'
if C in '1' .. '5'
or else C = '8'
or else C = 'p'
or else C = 'f'
@ -333,7 +333,6 @@ package body Switch.B is
if Output_File_Name_Present then
Osint.Fail ("duplicate -o switch");
else
Output_File_Name_Present := True;
end if;
@ -429,7 +428,6 @@ package body Switch.B is
Ptr := Ptr + 1;
case Switch_Chars (Ptr) is
when 'e' =>
Warning_Mode := Treat_As_Error;
@ -462,8 +460,7 @@ package body Switch.B is
Wide_Character_Encoding_Method_Specified := True;
Upper_Half_Encoding :=
Wide_Character_Encoding_Method in
WC_Upper_Half_Encoding_Method;
Wide_Character_Encoding_Method in WC_Upper_Half_Encoding_Method;
Ptr := Ptr + 1;
@ -515,7 +512,7 @@ package body Switch.B is
Osint.Fail ("missing path for --RTS");
else
-- valid --RTS switch
-- Valid --RTS switch
Opt.No_Stdinc := True;
Opt.RTS_Switch := True;
@ -537,8 +534,8 @@ package body Switch.B is
Lib_Path_Name /= null
then
-- Set the RTS_*_Path_Name variables, so that the
-- correct directories will be set when
-- Osint.Add_Default_Search_Dirs will be called later.
-- correct directories will be set when a subsequent
-- call Osint.Add_Default_Search_Dirs is made.
RTS_Src_Path_Name := Src_Path_Name;
RTS_Lib_Path_Name := Lib_Path_Name;