diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-27 12:27:16 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-27 12:27:16 +0000 |
commit | ec21a388fcbb2ad6dffac00ab8b1d38fca07f203 (patch) | |
tree | 9b4f8b09d35bcb15d0b087c6989f50b3771498c7 /gcc/ada/g-socthi.ads | |
parent | 4532026e1544522881bff89e6308fe50020310b6 (diff) | |
download | gcc-ec21a388fcbb2ad6dffac00ab8b1d38fca07f203.tar.gz |
2004-10-26 Vincent Celier <celier@gnat.com>
Thomas Quinot <quinot@act-europe.fr>
* g-socthi-vms.adb, g-socthi-mingw.adb, g-socthi-vxworks.ads:
(C_Writev): Change MSG_Forced_Flags to Constants.MSG_Forced_Flags as
there is no use of GNAT.Sockets.Constants.
Remove remaining pragma Import for C_Write
Remove C_Read and C_Write from internal implementation unit
GNAT.Sockets.Thin, as their usage for sockets is non-portable (using
the read and write functions from the system runtime library is fine
on UNIX but won't work under Windows).
* g-socket.adb: (Abort_Selector): Use C_Send instead of C_Write.
(Check_Selector): Use C_Recv instead of C_Read.
Selectors are the GNAT.Sockets abstraction to perform a select()
call on a set of descriptors. To allow abortion of an ongoing
select operation, some data is written to a dedicated socket that
is always monitored.
Under Windows, the write and read library functions cannot operate
on sockets, so we need to use send and recv instead, which is portable
across all supported platforms.
* g-socthi.ads: Remove C_Read and C_Write from internal implementation
unit GNAT.Sockets.Thin, as their usage for sockets is non-portable
(using the read and write functions from the system runtime library is
fine on UNIX but won't work under Windows).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socthi.ads')
-rw-r--r-- | gcc/ada/g-socthi.ads | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/gcc/ada/g-socthi.ads b/gcc/ada/g-socthi.ads index 7a818d88a37..84918532f71 100644 --- a/gcc/ada/g-socthi.ads +++ b/gcc/ada/g-socthi.ads @@ -262,11 +262,6 @@ package GNAT.Sockets.Thin is (S : C.int; Backlog : C.int) return C.int; - function C_Read - (Fd : C.int; - Buf : System.Address; - Count : C.int) return C.int; - function C_Readv (Fd : C.int; Iov : System.Address; @@ -329,11 +324,6 @@ package GNAT.Sockets.Thin is function C_System (Command : System.Address) return C.int; - function C_Write - (Fd : C.int; - Buf : System.Address; - Count : C.int) return C.int; - function C_Writev (Fd : C.int; Iov : System.Address; @@ -400,14 +390,12 @@ private pragma Import (C, C_Getsockopt, "getsockopt"); pragma Import (C, C_Inet_Addr, "inet_addr"); pragma Import (C, C_Listen, "listen"); - pragma Import (C, C_Read, "read"); pragma Import (C, C_Readv, "readv"); pragma Import (C, C_Select, "select"); pragma Import (C, C_Setsockopt, "setsockopt"); pragma Import (C, C_Shutdown, "shutdown"); pragma Import (C, C_Strerror, "strerror"); pragma Import (C, C_System, "system"); - pragma Import (C, C_Write, "write"); pragma Import (C, C_Writev, "writev"); pragma Import (C, Free_Socket_Set, "__gnat_free_socket_set"); |