diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-29 10:49:15 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-29 10:49:15 +0000 |
commit | a3e6563b2930eda54247c93617c90def3659c129 (patch) | |
tree | 0b6546d43b2e46559dc89368694673e09f48f367 /gcc/ada/g-socthi-vxworks.ads | |
parent | 86cf57b9cdb2979f0f96645567a9dca8ccb34bf7 (diff) | |
download | gcc-a3e6563b2930eda54247c93617c90def3659c129.tar.gz |
2009-04-29 Gary Dismukes <dismukes@adacore.com>
* exp_ch3.adb (Stream_Operation_OK): Return True for limited interfaces
(other conditions permitting), so that abstract stream subprograms will
be declared for them.
2009-04-29 Bob Duff <duff@adacore.com>
* g-expect.adb (Expect_Internal): Fix check for overfull buffer.
* g-expect.ads: Minor comment fixes.
2009-04-29 Ed Schonberg <schonberg@adacore.com>
* freeze.adb, lib-xref.adb (Check_Dispatching_Operation): if the
dispatching operation is a body without previous spec, update the list
of primitive operations to ensure that cross-reference information is
up-to-date.
2009-04-29 Albert Lee <lee@adacore.com>
* g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
g-socthi-vxworks.ads, g-socthi-mingw.adb, g-socthi-mingw.ads,
g-socthi.adb, g-socthi.ads, g-socket.adb, g-socket.ads
(GNAT.Sockets.Thin.C_Readv,
GNAT.Sockets.Thin.C_Writev): Remove unused subprograms.
(GNAT.Sockets.Thin.C_Recvmsg,
GNAT.Sockets.Thin.C_Sendmsg): New bindings to call recvmsg(2) and
sendmsg(2).
(GNAT.Sockets.Receive_Vector, GNAT.Sockets.Send_Vector): Use
C_Recvmsg/C_Sendmsg rather than Readv/C_Writev.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146949 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socthi-vxworks.ads')
-rw-r--r-- | gcc/ada/g-socthi-vxworks.ads | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/gcc/ada/g-socthi-vxworks.ads b/gcc/ada/g-socthi-vxworks.ads index 04e1278f2be..91641550338 100644 --- a/gcc/ada/g-socthi-vxworks.ads +++ b/gcc/ada/g-socthi-vxworks.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2008, AdaCore -- +-- Copyright (C) 2002-2009, 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- -- @@ -50,6 +50,22 @@ package GNAT.Sockets.Thin is package C renames Interfaces.C; + use type C.size_t; + type ssize_t is range -(2 ** (C.size_t'Size - 1)) + .. +(2 ** (C.size_t'Size - 1) - 1); + -- Signed type of the same size as size_t + + type Msghdr is record + Msg_Name : System.Address; + Msg_Namelen : C.unsigned; + Msg_Iov : System.Address; + Msg_Iovlen : C.int; + Msg_Control : System.Address; + Msg_Controllen : C.unsigned; + Msg_Flags : C.int; + end record; + pragma Convention (C, Msghdr); + function Socket_Errno return Integer renames GNAT.OS_Lib.Errno; -- Returns last socket error number @@ -125,11 +141,6 @@ package GNAT.Sockets.Thin is (S : C.int; Backlog : C.int) return C.int; - function C_Readv - (Fd : C.int; - Iov : System.Address; - Iovcnt : C.int) return C.int; - function C_Recv (S : C.int; Msg : System.Address; @@ -144,6 +155,11 @@ package GNAT.Sockets.Thin is From : Sockaddr_In_Access; Fromlen : not null access C.int) return C.int; + function C_Recvmsg + (S : C.int; + Msg : System.Address; + Flags : C.int) return ssize_t; + function C_Select (Nfds : C.int; Readfds : access Fd_Set; @@ -151,6 +167,11 @@ package GNAT.Sockets.Thin is Exceptfds : access Fd_Set; Timeout : Timeval_Access) return C.int; + function C_Sendmsg + (S : C.int; + Msg : System.Address; + Flags : C.int) return ssize_t; + function C_Sendto (S : C.int; Msg : System.Address; @@ -181,11 +202,6 @@ package GNAT.Sockets.Thin is function C_System (Command : System.Address) return C.int; - function C_Writev - (Fd : C.int; - Iov : System.Address; - Iovcnt : C.int) return C.int; - ------------------------------------------------------- -- Signalling file descriptors for selector abortion -- ------------------------------------------------------- @@ -224,11 +240,9 @@ private pragma Import (C, C_Getsockname, "getsockname"); pragma Import (C, C_Getsockopt, "getsockopt"); pragma Import (C, C_Listen, "listen"); - 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_Writev, "writev"); end GNAT.Sockets.Thin; |