+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
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
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 --
-----------------------
-- 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
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;
#endif
}
}
- return rc;
+ return (rc == 0);
#endif
}
#endif