]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Minor editing.
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 6 Jun 2007 10:54:04 +0000 (12:54 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 6 Jun 2007 10:54:04 +0000 (12:54 +0200)
Update constants.
Update copyright notice.

From-SVN: r125479

15 files changed:
gcc/ada/alloc.ads
gcc/ada/cuintp.c
gcc/ada/freeze.ads
gcc/ada/g-soccon-linux-64.ads
gcc/ada/g-soccon-linux-ppc.ads
gcc/ada/g-soccon-linux-x86.ads
gcc/ada/g-soccon-lynxos.ads [new file with mode: 0644]
gcc/ada/g-socthi-mingw.adb
gcc/ada/g-socthi-mingw.ads
gcc/ada/g-thread.ads
gcc/ada/i-forbla-darwin.adb [new file with mode: 0644]
gcc/ada/i-forbla.adb [new file with mode: 0644]
gcc/ada/mingw32.h
gcc/ada/nlists.ads
gcc/ada/sem_dist.ads

index a8da51d1701e78dfe1c93467a127066bda107507..4d00671d77ebea681ce545424116ea0e34b6e1a3 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2006, 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- --
index f81072823231b72966a8478e4c8e380e1cd3b00e..2d11b2f485fbaae6a250c063702c290ef4ae0d7e 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2007 Free Software Foundation, Inc.          *
+ *          Copyright (C) 1992-2007, 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- *
index 491f866ecdc4e68707fe5c91778a158f4e6534a5..125a706f533bc9b3ab399faea8960f15a071cfdc 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, 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- --
index fc8c507b3a7159867082b06c6d91918b73ec4227..5c2946b4b348517617d33ed78b6cc4e8b1a60d80 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2000-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 2000-2007, 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- --
@@ -178,4 +178,17 @@ package GNAT.Sockets.Constants is
    SIZEOF_tv_sec      : constant :=            8; --  tv_sec
    SIZEOF_tv_usec     : constant :=            8; --  tv_usec
 
+   ----------------------------------------
+   -- Properties of supported interfaces --
+   ----------------------------------------
+
+   Need_Netdb_Buffer  : constant :=            1; --  Need buffer for Netdb ops
+
+   ----------------------
+   -- Additional flags --
+   ----------------------
+
+   Thread_Blocking_IO : constant Boolean := True;
+   --  Set False for contexts where socket i/o are process blocking
+
 end GNAT.Sockets.Constants;
index 185a8da4d248b83758b7996829fe13a0158c6891..eb254e94ca2b79831651ea6aa74e63ef47308b3f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2000-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 2000-2007, 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- --
@@ -178,4 +178,17 @@ package GNAT.Sockets.Constants is
    SIZEOF_tv_sec      : constant :=            4; --  tv_sec
    SIZEOF_tv_usec     : constant :=            4; --  tv_usec
 
+   ----------------------------------------
+   -- Properties of supported interfaces --
+   ----------------------------------------
+
+   Need_Netdb_Buffer  : constant :=            1; --  Need buffer for Netdb ops
+
+   ----------------------
+   -- Additional flags --
+   ----------------------
+
+   Thread_Blocking_IO : constant Boolean := True;
+   --  Set False for contexts where socket i/o are process blocking
+
 end GNAT.Sockets.Constants;
index 6b0521fcc0421f4fcce3e4f1893d1ccf041dc440..cb42441a57c6e93ba37b52a717c94e0c9e1014df 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2000-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 2000-2007, 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- --
@@ -178,4 +178,17 @@ package GNAT.Sockets.Constants is
    SIZEOF_tv_sec      : constant :=            4; --  tv_sec
    SIZEOF_tv_usec     : constant :=            4; --  tv_usec
 
+   ----------------------------------------
+   -- Properties of supported interfaces --
+   ----------------------------------------
+
+   Need_Netdb_Buffer  : constant :=            1; --  Need buffer for Netdb ops
+
+   ----------------------
+   -- Additional flags --
+   ----------------------
+
+   Thread_Blocking_IO : constant Boolean := True;
+   --  Set False for contexts where socket i/o are process blocking
+
 end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-lynxos.ads b/gcc/ada/g-soccon-lynxos.ads
new file mode 100644 (file)
index 0000000..851bfbe
--- /dev/null
@@ -0,0 +1,194 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                         GNAT COMPILER COMPONENTS                         --
+--                                                                          --
+--               G N A T . S O C K E T S . C O N S T A N T S                --
+--                                                                          --
+--                                 S p e c                                  --
+--                                                                          --
+--          Copyright (C) 2000-2007, 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- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNAT;  see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  This package provides target dependent definitions of constant for use
+--  by the GNAT.Sockets package (g-socket.ads). This package should not be
+--  directly with'ed by an applications program.
+
+--  This is the version for i386-elf-lynxos
+--  This file is generated automatically, do not modify it by hand! Instead,
+--  make changes to gen-soccon.c and re-run it on each target.
+
+package GNAT.Sockets.Constants is
+
+   --------------
+   -- Families --
+   --------------
+
+   AF_INET            : constant :=          2; --  IPv4 address family
+   AF_INET6           : constant :=         28; --  IPv6 address family
+
+   -----------
+   -- Modes --
+   -----------
+
+   SOCK_STREAM        : constant :=          1; --  Stream socket
+   SOCK_DGRAM         : constant :=          2; --  Datagram socket
+
+   -------------------
+   -- Socket errors --
+   -------------------
+
+   EACCES             : constant :=         13; --  Permission denied
+   EADDRINUSE         : constant :=         98; --  Address already in use
+   EADDRNOTAVAIL      : constant :=         99; --  Cannot assign address
+   EAFNOSUPPORT       : constant :=         97; --  Addr family not supported
+   EALREADY           : constant :=        114; --  Operation in progress
+   EBADF              : constant :=          9; --  Bad file descriptor
+   ECONNABORTED       : constant :=        103; --  Connection aborted
+   ECONNREFUSED       : constant :=        111; --  Connection refused
+   ECONNRESET         : constant :=        104; --  Connection reset by peer
+   EDESTADDRREQ       : constant :=         89; --  Destination addr required
+   EFAULT             : constant :=         14; --  Bad address
+   EHOSTDOWN          : constant :=        112; --  Host is down
+   EHOSTUNREACH       : constant :=        113; --  No route to host
+   EINPROGRESS        : constant :=        115; --  Operation now in progress
+   EINTR              : constant :=          4; --  Interrupted system call
+   EINVAL             : constant :=         22; --  Invalid argument
+   EIO                : constant :=          5; --  Input output error
+   EISCONN            : constant :=        106; --  Socket already connected
+   ELOOP              : constant :=         40; --  Too many symbolic lynks
+   EMFILE             : constant :=         24; --  Too many open files
+   EMSGSIZE           : constant :=         90; --  Message too long
+   ENAMETOOLONG       : constant :=         36; --  Name too long
+   ENETDOWN           : constant :=        100; --  Network is down
+   ENETRESET          : constant :=        102; --  Disconn. on network reset
+   ENETUNREACH        : constant :=        101; --  Network is unreachable
+   ENOBUFS            : constant :=        105; --  No buffer space available
+   ENOPROTOOPT        : constant :=         92; --  Protocol not available
+   ENOTCONN           : constant :=        107; --  Socket not connected
+   ENOTSOCK           : constant :=         88; --  Operation on non socket
+   EOPNOTSUPP         : constant :=         95; --  Operation not supported
+   EPFNOSUPPORT       : constant :=         96; --  Unknown protocol family
+   EPROTONOSUPPORT    : constant :=         93; --  Unknown protocol
+   EPROTOTYPE         : constant :=         91; --  Unknown protocol type
+   ESHUTDOWN          : constant :=        108; --  Cannot send once shutdown
+   ESOCKTNOSUPPORT    : constant :=         94; --  Socket type not supported
+   ETIMEDOUT          : constant :=        110; --  Connection timed out
+   ETOOMANYREFS       : constant :=        109; --  Too many references
+   EWOULDBLOCK        : constant :=         11; --  Operation would block
+
+   -----------------
+   -- Host errors --
+   -----------------
+
+   HOST_NOT_FOUND     : constant :=          1; --  Unknown host
+   TRY_AGAIN          : constant :=          2; --  Host name lookup failure
+   NO_DATA            : constant :=          4; --  No data record for name
+   NO_RECOVERY        : constant :=          3; --  Non recoverable errors
+
+   -------------------
+   -- Control flags --
+   -------------------
+
+   FIONBIO            : constant :=      21537; --  Set/clear non-blocking io
+   FIONREAD           : constant :=      21531; --  How many bytes to read
+
+   --------------------
+   -- Shutdown modes --
+   --------------------
+
+   SHUT_RD            : constant :=          0; --  No more recv
+   SHUT_WR            : constant :=          1; --  No more send
+   SHUT_RDWR          : constant :=          2; --  No more recv/send
+
+   ---------------------
+   -- Protocol levels --
+   ---------------------
+
+   SOL_SOCKET         : constant :=      65535; --  Options for socket level
+   IPPROTO_IP         : constant :=          0; --  Dummy protocol for IP
+   IPPROTO_UDP        : constant :=         17; --  UDP
+   IPPROTO_TCP        : constant :=          6; --  TCP
+
+   -------------------
+   -- Request flags --
+   -------------------
+
+   MSG_OOB            : constant :=          1; --  Process out-of-band data
+   MSG_PEEK           : constant :=          2; --  Peek at incoming data
+   MSG_EOR            : constant :=        128; --  Send end of record
+   MSG_WAITALL        : constant :=        256; --  Wait for full reception
+   MSG_NOSIGNAL       : constant :=         -1; --  No SIGPIPE on send
+   MSG_Forced_Flags   : constant :=          0;
+   --  Flags set on all send(2) calls
+
+   --------------------
+   -- Socket options --
+   --------------------
+
+   TCP_NODELAY        : constant :=          1; --  Do not coalesce packets
+   SO_REUSEADDR       : constant :=          4; --  Bind reuse local address
+   SO_KEEPALIVE       : constant :=          8; --  Enable keep-alive msgs
+   SO_LINGER          : constant :=        128; --  Defer close to flush data
+   SO_BROADCAST       : constant :=         32; --  Can send broadcast msgs
+   SO_SNDBUF          : constant :=       4097; --  Set/get send buffer size
+   SO_RCVBUF          : constant :=       4098; --  Set/get recv buffer size
+   SO_SNDTIMEO        : constant :=       4101; --  Emission timeout
+   SO_RCVTIMEO        : constant :=       4102; --  Reception timeout
+   SO_ERROR           : constant :=       4103; --  Get/clear error status
+   IP_MULTICAST_IF    : constant :=          9; --  Set/get mcast interface
+   IP_MULTICAST_TTL   : constant :=         10; --  Set/get multicast TTL
+   IP_MULTICAST_LOOP  : constant :=         11; --  Set/get mcast loopback
+   IP_ADD_MEMBERSHIP  : constant :=         12; --  Join a multicast group
+   IP_DROP_MEMBERSHIP : constant :=         13; --  Leave a multicast group
+
+   -------------------
+   -- System limits --
+   -------------------
+
+   IOV_MAX            : constant := 2147483647; --  Maximum writev iovcnt
+
+   ----------------------
+   -- Type definitions --
+   ----------------------
+
+   --  Sizes (in bytes) of the components of struct timeval
+
+   SIZEOF_tv_sec      : constant :=          4; --  tv_sec
+   SIZEOF_tv_usec     : constant :=          4; --  tv_usec
+
+   ----------------------------------------
+   -- Properties of supported interfaces --
+   ----------------------------------------
+
+   Need_Netdb_Buffer  : constant :=          1; --  Need buffer for Netdb ops
+
+   ----------------------
+   -- Additional flags --
+   ----------------------
+
+   Thread_Blocking_IO : constant Boolean := True;
+   --  Set False for contexts where socket i/o are process blocking
+
+end GNAT.Sockets.Constants;
index 1b74d907670c7eb633ac095dc6fa74c696aaad8d..a99db4bb0a05a4eabc0beca64a622d27306ccf1e 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---                     Copyright (C) 2001-2006, AdaCore                     --
+--                     Copyright (C) 2001-2007, AdaCore                     --
 --                                                                          --
 -- 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- --
 
 --  This version is for NT
 
-with GNAT.Sockets.Constants; use GNAT.Sockets.Constants;
-with Interfaces.C.Strings;   use Interfaces.C.Strings;
-
-with System; use System;
+with Interfaces.C.Strings; use Interfaces.C.Strings;
+with System;               use System;
 
 package body GNAT.Sockets.Thin is
 
@@ -51,11 +49,6 @@ package body GNAT.Sockets.Thin is
    WS_Version  : constant := 16#0202#;
    Initialized : Boolean := False;
 
-   SYSNOTREADY     : constant := 10091;
-   VERNOTSUPPORTED : constant := 10092;
-   NOTINITIALISED  : constant := 10093;
-   EDISCON         : constant := 10101;
-
    function Standard_Connect
      (S       : C.int;
       Name    : System.Address;
@@ -108,10 +101,10 @@ package body GNAT.Sockets.Thin is
       N_ENAMETOOLONG,
       N_EHOSTDOWN,
       N_EHOSTUNREACH,
-      N_SYSNOTREADY,
-      N_VERNOTSUPPORTED,
-      N_NOTINITIALISED,
-      N_EDISCON,
+      N_WSASYSNOTREADY,
+      N_WSAVERNOTSUPPORTED,
+      N_WSANOTINITIALISED,
+      N_WSAEDISCON,
       N_HOST_NOT_FOUND,
       N_TRY_AGAIN,
       N_NO_RECOVERY,
@@ -199,20 +192,20 @@ package body GNAT.Sockets.Thin is
         New_String ("Host is down"),
       N_EHOSTUNREACH =>
         New_String ("No route to host"),
-      N_SYSNOTREADY =>
+      N_WSASYSNOTREADY =>
         New_String ("Returned by WSAStartup(), indicating that "
                     & "the network subsystem is unusable"),
-      N_VERNOTSUPPORTED =>
+      N_WSAVERNOTSUPPORTED =>
         New_String ("Returned by WSAStartup(), indicating that "
                     & "the Windows Sockets DLL cannot support "
                     & "this application"),
-      N_NOTINITIALISED =>
+      N_WSANOTINITIALISED =>
         New_String ("Winsock not initialized. This message is "
                     & "returned by any function except WSAStartup(), "
                     & "indicating that a successful WSAStartup() has "
                     & "not yet been performed"),
-      N_EDISCON =>
-        New_String ("Disconnect"),
+      N_WSAEDISCON =>
+        New_String ("Disconnected"),
       N_HOST_NOT_FOUND =>
         New_String ("Host not found. This message indicates "
                     & "that the key (name, address, and so on) was not found"),
@@ -245,8 +238,8 @@ package body GNAT.Sockets.Thin is
       Res := Standard_Connect (S, Name, Namelen);
 
       if Res = -1 then
-         if Socket_Errno = EWOULDBLOCK then
-            Set_Socket_Errno (EINPROGRESS);
+         if Socket_Errno = Constants.EWOULDBLOCK then
+            Set_Socket_Errno (Constants.EINPROGRESS);
          end if;
       end if;
 
@@ -347,7 +340,7 @@ package body GNAT.Sockets.Thin is
       if EFS /= No_Fd_Set then
          declare
             EFSC    : constant Fd_Set_Access := New_Socket_Set (EFS);
-            Flag    : constant C.int := MSG_PEEK + MSG_OOB;
+            Flag    : constant C.int := Constants.MSG_PEEK + Constants.MSG_OOB;
             Buffer  : Character;
             Length  : C.int;
             Fromlen : aliased C.int;
@@ -404,31 +397,6 @@ package body GNAT.Sockets.Thin is
       return Res;
    end C_Select;
 
-   -----------------
-   -- C_Inet_Addr --
-   -----------------
-
-   function C_Inet_Addr
-     (Cp : C.Strings.chars_ptr) return C.int
-   is
-      use type C.unsigned_long;
-
-      function Internal_Inet_Addr
-        (Cp : C.Strings.chars_ptr) return C.unsigned_long;
-      pragma Import (Stdcall, Internal_Inet_Addr, "inet_addr");
-
-      Res : C.unsigned_long;
-   begin
-      Res := Internal_Inet_Addr (Cp);
-
-      if Res = C.unsigned_long'Last then
-         --  This value is returned in case of error
-         return -1;
-      else
-         return C.int (Internal_Inet_Addr (Cp));
-      end if;
-   end C_Inet_Addr;
-
    --------------
    -- C_Writev --
    --------------
@@ -474,19 +442,34 @@ package body GNAT.Sockets.Thin is
       end if;
    end Finalize;
 
+   -------------------------
+   -- Host_Error_Messages --
+   -------------------------
+
+   package body Host_Error_Messages is
+
+      --  On Windows, socket and host errors share the same code space, and
+      --  error messages are provided by Socket_Error_Message. The default
+      --  separate body for Host_Error_Messages is therefore not used in
+      --  this case.
+
+      function Host_Error_Message
+        (H_Errno : Integer) return C.Strings.chars_ptr
+        renames Socket_Error_Message;
+
+   end Host_Error_Messages;
+
    ----------------
    -- Initialize --
    ----------------
 
-   procedure Initialize (Process_Blocking_IO : Boolean) is
-      pragma Unreferenced (Process_Blocking_IO);
-
+   procedure Initialize is
+      use type Interfaces.C.int;
       Return_Value : Interfaces.C.int;
-
    begin
       if not Initialized then
          Return_Value := WSAStartup (WS_Version, WSAData_Dummy'Address);
-         pragma Assert (Interfaces.C."=" (Return_Value, 0));
+         pragma Assert (Return_Value = 0);
          Initialized := True;
       end if;
    end Initialize;
@@ -555,6 +538,7 @@ package body GNAT.Sockets.Thin is
    function Socket_Error_Message
      (Errno : Integer) return C.Strings.chars_ptr
    is
+      use GNAT.Sockets.Constants;
    begin
       case Errno is
          when EINTR =>           return Error_Messages (N_EINTR);
@@ -594,14 +578,23 @@ package body GNAT.Sockets.Thin is
          when ENAMETOOLONG =>    return Error_Messages (N_ENAMETOOLONG);
          when EHOSTDOWN =>       return Error_Messages (N_EHOSTDOWN);
          when EHOSTUNREACH =>    return Error_Messages (N_EHOSTUNREACH);
-         when SYSNOTREADY =>     return Error_Messages (N_SYSNOTREADY);
-         when VERNOTSUPPORTED => return Error_Messages (N_VERNOTSUPPORTED);
-         when NOTINITIALISED =>  return Error_Messages (N_NOTINITIALISED);
-         when EDISCON =>         return Error_Messages (N_EDISCON);
+
+         --  Windows-specific error codes
+
+         when WSASYSNOTREADY =>  return Error_Messages (N_WSASYSNOTREADY);
+         when WSAVERNOTSUPPORTED =>
+                                 return Error_Messages (N_WSAVERNOTSUPPORTED);
+         when WSANOTINITIALISED =>
+                                 return Error_Messages (N_WSANOTINITIALISED);
+         when WSAEDISCON =>      return Error_Messages (N_WSAEDISCON);
+
+         --  h_errno values
+
          when HOST_NOT_FOUND =>  return Error_Messages (N_HOST_NOT_FOUND);
          when TRY_AGAIN =>       return Error_Messages (N_TRY_AGAIN);
          when NO_RECOVERY =>     return Error_Messages (N_NO_RECOVERY);
          when NO_DATA =>         return Error_Messages (N_NO_DATA);
+
          when others =>          return Error_Messages (N_OTHERS);
       end case;
    end Socket_Error_Message;
index 9db2866f5cf38117029b576159cdc1640b7eb679..906b6691e0c317680a507a4e1de2d678d5fad2a1 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                     Copyright (C) 2001-2006, AdaCore                     --
+--                     Copyright (C) 2001-2007, AdaCore                     --
 --                                                                          --
 -- 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- --
@@ -62,12 +62,21 @@ package GNAT.Sockets.Thin is
 
    function Socket_Error_Message (Errno : Integer) return C.Strings.chars_ptr;
    --  Returns the error message string for the error number Errno. If Errno is
-   --  not known it returns "Unknown system error".
+   --  not known, returns "Unknown system error".
 
    function Host_Errno return Integer;
    pragma Import (C, Host_Errno, "__gnat_get_h_errno");
    --  Returns last host error number
 
+   package Host_Error_Messages is
+
+      function Host_Error_Message
+        (H_Errno : Integer) return C.Strings.chars_ptr;
+      --  Returns the error message string for the host error number H_Errno.
+      --  If H_Errno is not known, returns "Unknown system error".
+
+   end Host_Error_Messages;
+
    subtype Fd_Set_Access is System.Address;
    No_Fd_Set : constant Fd_Set_Access := System.Null_Address;
 
@@ -109,8 +118,11 @@ package GNAT.Sockets.Thin is
    type In_Addr is record
       S_B1, S_B2, S_B3, S_B4 : C.unsigned_char;
    end record;
+   for In_Addr'Alignment use C.int'Alignment;
    pragma Convention (C, In_Addr);
-   --  Internet address
+   --  IPv4 address, represented as a network-order C.int. Note that the
+   --  underlying operating system may assume that values of this type have
+   --  C.int alignment, so we need to provide a suitable alignment clause here.
 
    type In_Addr_Access is access all In_Addr;
    pragma Convention (C, In_Addr_Access);
@@ -217,6 +229,10 @@ package GNAT.Sockets.Thin is
    --  Indices into an Fd_Pair value providing access to each of the connected
    --  file descriptors.
 
+   --------------------------------
+   -- Standard library functions --
+   --------------------------------
+
    function C_Accept
      (S       : C.int;
       Addr    : System.Address;
@@ -235,14 +251,6 @@ package GNAT.Sockets.Thin is
       Name    : System.Address;
       Namelen : C.int) return C.int;
 
-   function C_Gethostbyaddr
-     (Addr : System.Address;
-      Len  : C.int;
-      Typ  : C.int) return Hostent_Access;
-
-   function C_Gethostbyname
-     (Name : C.char_array) return Hostent_Access;
-
    function C_Gethostname
      (Name    : System.Address;
       Namelen : C.int) return C.int;
@@ -252,14 +260,6 @@ package GNAT.Sockets.Thin is
       Name    : System.Address;
       Namelen : not null access C.int) return C.int;
 
-   function C_Getservbyname
-     (Name  : C.char_array;
-      Proto : C.char_array) return Servent_Access;
-
-   function C_Getservbyport
-     (Port  : C.int;
-      Proto : C.char_array) return Servent_Access;
-
    function C_Getsockname
      (S       : C.int;
       Name    : System.Address;
@@ -355,6 +355,10 @@ package GNAT.Sockets.Thin is
      (WS_Version     : Interfaces.C.int;
       WSADataAddress : System.Address) return Interfaces.C.int;
 
+   -------------------------------------------------------
+   -- Signalling file descriptors for selector abortion --
+   -------------------------------------------------------
+
    package Signalling_Fds is
 
       function Create (Fds : not null access Fd_Pair) return C.int;
@@ -372,8 +376,16 @@ package GNAT.Sockets.Thin is
       --  Write one byte of data to wsig, the write end of a pair of signalling
       --  fds created by Create_Signalling_Fds.
 
+      procedure Close (Sig : C.int);
+      pragma Convention (C, Close);
+      --  Close one end of a pair of signalling fds (ignoring any error)
+
    end Signalling_Fds;
 
+   ----------------------------
+   -- Socket sets management --
+   ----------------------------
+
    procedure Free_Socket_Set
      (Set : Fd_Set_Access);
    --  Free system-dependent socket set
@@ -382,11 +394,11 @@ package GNAT.Sockets.Thin is
      (Set    : Fd_Set_Access;
       Socket : Int_Access;
       Last   : Int_Access);
-   --  Get last socket in Socket and remove it from the socket
-   --  set. The parameter Last is a maximum value of the largest
-   --  socket. This hint is used to avoid scanning very large socket
-   --  sets. After a call to Get_Socket_From_Set, Last is set back to
-   --  the real largest socket in the socket set.
+   --  Get last socket in Socket and remove it from the socket set. The
+   --  parameter Last is a maximum value of the largest socket. This hint is
+   --  used to avoid scanning very large socket sets. After a call to
+   --  Get_Socket_From_Set, Last is set back to the real largest socket in the
+   --  socket set.
 
    procedure Insert_Socket_In_Set
      (Set    : Fd_Set_Access;
@@ -421,21 +433,18 @@ package GNAT.Sockets.Thin is
 
    procedure WSACleanup;
 
+   procedure Initialize;
    procedure Finalize;
-   procedure Initialize (Process_Blocking_IO : Boolean);
 
 private
    pragma Import (Stdcall, C_Accept, "accept");
    pragma Import (Stdcall, C_Bind, "bind");
    pragma Import (Stdcall, C_Close, "closesocket");
-   pragma Import (Stdcall, C_Gethostbyaddr, "gethostbyaddr");
-   pragma Import (Stdcall, C_Gethostbyname, "gethostbyname");
    pragma Import (Stdcall, C_Gethostname, "gethostname");
    pragma Import (Stdcall, C_Getpeername, "getpeername");
-   pragma Import (Stdcall, C_Getservbyname, "getservbyname");
-   pragma Import (Stdcall, C_Getservbyport, "getservbyport");
    pragma Import (Stdcall, C_Getsockname, "getsockname");
    pragma Import (Stdcall, C_Getsockopt, "getsockopt");
+   pragma Import (Stdcall, C_Inet_Addr, "inet_addr");
    pragma Import (Stdcall, C_Ioctl, "ioctlsocket");
    pragma Import (Stdcall, C_Listen, "listen");
    pragma Import (Stdcall, C_Recv, "recv");
index c1ea8a042b8f71c6908e370f70ea252378b545d7..df2c67613f754e22b4a18d56dccfa46193d4249d 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---                     Copyright (C) 1998-2005 AdaCore                      --
+--                     Copyright (C) 1998-2007, AdaCore                     --
 --                                                                          --
 -- 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- --
@@ -133,7 +133,7 @@ package GNAT.Threads is
    --  extern void __gnat_get_thread (void *id, pthread_t *thread);
 
    function To_Task_Id
-     (Id   : System.Address)
+     (Id : System.Address)
       return Ada.Task_Identification.Task_Id;
    --  Ada interface only.
    --  Given a low level Id, as returned by Create_Thread, return a Task_Id,
diff --git a/gcc/ada/i-forbla-darwin.adb b/gcc/ada/i-forbla-darwin.adb
new file mode 100644 (file)
index 0000000..81464aa
--- /dev/null
@@ -0,0 +1,38 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                         GNAT RUN-TIME COMPONENTS                         --
+--                                                                          --
+--                         INTERFACES.FORTRAN.BLAS                          --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2006, 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- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNAT;  see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  Version for Mac OS X
+
+package body Interfaces.Fortran.BLAS is
+   pragma Linker_Options ("-Wl,-framework,vecLib");
+end Interfaces.Fortran.BLAS;
diff --git a/gcc/ada/i-forbla.adb b/gcc/ada/i-forbla.adb
new file mode 100644 (file)
index 0000000..2f7198c
--- /dev/null
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                         GNAT RUN-TIME COMPONENTS                         --
+--                                                                          --
+--               I N T E R F A C E S . F O R T R A N . B L A S              --
+--                                                                          --
+--                                 B o d y                                  --
+--                                                                          --
+--            Copyright (C) 2006, 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- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNAT;  see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
+--                                                                          --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.                                      --
+--                                                                          --
+-- GNAT was originally developed  by the GNAT team at  New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc.      --
+--                                                                          --
+------------------------------------------------------------------------------
+
+--  For platforms without, or with unknown libraries, no libraries are linked
+--  by default. The user has to specify the required BLAS and LAPACK libraries
+--  explicitly on the command line.
+
+package body Interfaces.Fortran.BLAS is
+end Interfaces.Fortran.BLAS;
index 6637fd1f9d7302a290702114a0428498e6c1d4a1..e58b45f760a0aece0557bf8c0f91e4c49c6f69e0 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                              C Header File                               *
  *                                                                          *
- *          Copyright (C) 2002-2006, Free Software Foundation, Inc.         *
+ *          Copyright (C) 2002-2007, 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- *
index 533b5a8be8ccdad30568a8ba3de99c81db2ea9ae..fe9c9414821644ca80bc0ca657516b5f795a7848 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2007, 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- --
@@ -291,6 +291,9 @@ package Nlists is
    procedure Lock;
    --  Called to lock tables before back end is called
 
+   procedure Unlock;
+   --  Unlock tables, in cases where the back end needs to modify them
+
    procedure Tree_Read;
    --  Initializes internal tables from current tree file using the relevant
    --  Table.Tree_Read routines. Note that Initialize should not be called if
index 24745890b53a619b9f9b864a39290ef3efa863ee..f27a9e60005452d2f750057dda841f3fc5b717c2 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2005, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2006, 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- --