]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Apr 2009 10:41:25 +0000 (12:41 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 20 Apr 2009 10:41:25 +0000 (12:41 +0200)
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.

From-SVN: r146395

gcc/ada/ChangeLog
gcc/ada/g-comlin.adb
gcc/ada/osint-c.adb
gcc/ada/osint-c.ads
gcc/ada/socket.c

index ed49cb77411af7cba1225f2f2b9d0bda83676d79..dbd869b3e700de44f8213e7751c9b86b10c2c9e7 100644 (file)
@@ -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
index 8ee4f427dfb3841f4b20c5695c49adbcd2757c0a..b010622625283b78a9b417358eb9cd42427c98f7 100644 (file)
@@ -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
index e4dab2aed0493cfe0fc6be7c6d51c53ebf3b80c4..a93573e775408595fbf02997a20a4e3ff2fbc1f5 100644 (file)
@@ -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 --
    -----------------------
index 3c9cb69d378deb6801472c36c543d2b4d486d05d..1060934f79c84b6107cfdba23934563edaa253f4 100644 (file)
@@ -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
index 1c7de255c5c48dd6b3fcc978a19c4965d4bb2470..4633ebfd774b20053e977671d0d324211008a75f 100644 (file)
@@ -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