diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/ada/g-comlin.adb | 5 | ||||
-rw-r--r-- | gcc/ada/osint-c.adb | 11 | ||||
-rw-r--r-- | gcc/ada/osint-c.ads | 4 | ||||
-rw-r--r-- | gcc/ada/socket.c | 4 |
5 files changed, 36 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ed49cb77411..dbd869b3e70 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,19 @@ +2009-04-20 Gary Dismukes <dismukes@adacore.com> + + * osint-c.ads, osint-c.adb (Get_Object_Output_File_Name): New function + to return the object file name saved by Set_Object_Output_File_Name. + +2009-04-20 Emmanuel Briot <briot@adacore.com> + + * g-comlin.adb (Initialize_Option_Scan): Fix initialization of parsers + for the standard command line, when argc has been modified since the + start of the application. + +2009-04-20 Thomas Quinot <quinot@adacore.com> + + * socket.c (__gnat_inet_pton, Windows case): Adjust return value. + WSAStringToAddress returns 0 for success and SOCKET_ERROR for failure. + 2009-04-20 Bob Duff <duff@adacore.com> * gnat1drv.adb (Gnat1drv): Put call to Check_Library_Items inside diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index 8ee4f427dfb..b0106226252 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -851,8 +851,9 @@ package body GNAT.Command_Line is if Command_Line = null then Parser := new Opt_Parser_Data (CL.Argument_Count); - Initialize_Option_Scan - (Switch_Char => Switch_Char, + Internal_Initialize_Option_Scan + (Parser => Parser, + Switch_Char => Switch_Char, Stop_At_First_Non_Switch => Stop_At_First_Non_Switch, Section_Delimiters => Section_Delimiters); else diff --git a/gcc/ada/osint-c.adb b/gcc/ada/osint-c.adb index e4dab2aed04..a93573e7754 100644 --- a/gcc/ada/osint-c.adb +++ b/gcc/ada/osint-c.adb @@ -236,6 +236,17 @@ package body Osint.C is end if; end Debug_File_Eol_Length; + --------------------------------- + -- Get_Output_Object_File_Name -- + --------------------------------- + + function Get_Output_Object_File_Name return String is + begin + pragma Assert (Output_Object_File_Name /= null); + + return Output_Object_File_Name.all; + end Get_Output_Object_File_Name; + ----------------------- -- More_Source_Files -- ----------------------- diff --git a/gcc/ada/osint-c.ads b/gcc/ada/osint-c.ads index 3c9cb69d378..1060934f79c 100644 --- a/gcc/ada/osint-c.ads +++ b/gcc/ada/osint-c.ads @@ -32,6 +32,10 @@ package Osint.C is -- Called by the subprogram processing the command line when an -- output object file name is found. + function Get_Output_Object_File_Name return String; + -- Returns the name of the output object file as saved by a call to + -- Set_Output_Object_File_Name. Only valid to call if name has been set. + function More_Source_Files return Boolean; -- Indicates whether more source file remain to be processed. Returns -- False right away if no source files, or if all source files have diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index 1c7de255c5c..4633ebfd774 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -423,7 +423,7 @@ __gnat_inet_pton (int af, const char *src, void *dst) { ss.ss_family = af; rc = WSAStringToAddressA (src, af, NULL, (struct sockaddr *)&ss, &sslen); - if (rc > 0) { + if (rc == 0) { switch (af) { case AF_INET: *(struct in_addr *)dst = ((struct sockaddr_in *)&ss)->sin_addr; @@ -435,7 +435,7 @@ __gnat_inet_pton (int af, const char *src, void *dst) { #endif } } - return rc; + return (rc == 0); #endif } #endif |