diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-19 10:47:49 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-19 10:47:49 +0000 |
commit | ddbf7f2e4844855b0f011110ca885a965552616b (patch) | |
tree | 31da1477689d9bd7c842a6bbc41616f2437f5d87 /gcc/ada/g-socthi-vxworks.adb | |
parent | a781c0fc71e1bf32c083c8c409f5821f764b1501 (diff) | |
download | gcc-ddbf7f2e4844855b0f011110ca885a965552616b.tar.gz |
2009-06-19 Thomas Quinot <quinot@adacore.com>
* i-vxwoio.ads: Add comments
2009-06-19 Thomas Quinot <quinot@adacore.com>
* socket.c, 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-sothco.ads
(GNAT.Sockets.Thin.C_Ioctl): Rename to Socket_Ioctl.
(GNAT.Sockets.Thin.Socket_Ioctl): Use new function
Thin_Common.Socket_Ioctl.
(GNAT.Sockets.Thin_Common.Socket_Ioctl): Binding to new C wrapper
__gnat_socket_ioctl.
(__gnat_socket_ioctl): Wrapper for ioctl(2) called with a single int*
argument after the file descriptor and request code.
2009-06-19 Robert Dewar <dewar@adacore.com>
* checks.adb: Minor reformatting
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148694 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socthi-vxworks.adb')
-rw-r--r-- | gcc/ada/g-socthi-vxworks.adb | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/gcc/ada/g-socthi-vxworks.adb b/gcc/ada/g-socthi-vxworks.adb index a35e429fbb2..67e6c25eeb8 100644 --- a/gcc/ada/g-socthi-vxworks.adb +++ b/gcc/ada/g-socthi-vxworks.adb @@ -80,12 +80,6 @@ package body GNAT.Sockets.Thin is Namelen : C.int) return C.int; pragma Import (C, Syscall_Connect, "connect"); - function Syscall_Ioctl - (S : C.int; - Req : C.int; - Arg : access C.int) return C.int; - pragma Import (C, Syscall_Ioctl, "ioctl"); - function Syscall_Recv (S : C.int; Msg : System.Address; @@ -161,11 +155,11 @@ package body GNAT.Sockets.Thin is and then R /= Failure then -- A socket inherits the properties of its server especially - -- the FIONBIO flag. Do not use C_Ioctl as this subprogram + -- the FIONBIO flag. Do not use Socket_Ioctl as this subprogram -- tracks sockets set in non-blocking mode by user. Set_Non_Blocking_Socket (R, Non_Blocking_Socket (S)); - Res := Syscall_Ioctl (R, SOSC.FIONBIO, Val'Access); + Res := C_Ioctl (R, SOSC.FIONBIO, Val'Access); -- Is it OK to ignore result ??? end if; @@ -230,26 +224,24 @@ package body GNAT.Sockets.Thin is end if; end C_Connect; - ------------- - -- C_Ioctl -- - ------------- + ------------------ + -- Socket_Ioctl -- + ------------------ - function C_Ioctl - (S : C.int; - Req : C.int; - Arg : access C.int) return C.int + function Socket_Ioctl + (S : C.int; + Req : C.int; + Arg : access C.int) return C.int is begin - if not SOSC.Thread_Blocking_IO - and then Req = SOSC.FIONBIO - then + if not SOSC.Thread_Blocking_IO and then Req = SOSC.FIONBIO then if Arg.all /= 0 then Set_Non_Blocking_Socket (S, True); end if; end if; - return Syscall_Ioctl (S, Req, Arg); - end C_Ioctl; + return C_Ioctl (S, Req, Arg); + end Socket_Ioctl; ------------ -- C_Recv -- @@ -399,10 +391,10 @@ package body GNAT.Sockets.Thin is if not SOSC.Thread_Blocking_IO and then R /= Failure then - -- Do not use C_Ioctl as this subprogram tracks sockets set + -- Do not use Socket_Ioctl as this subprogram tracks sockets set -- in non-blocking mode by user. - Res := Syscall_Ioctl (R, SOSC.FIONBIO, Val'Access); + Res := C_Ioctl (R, SOSC.FIONBIO, Val'Access); -- Is it OK to ignore result ??? Set_Non_Blocking_Socket (R, False); end if; |