diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-19 12:47:49 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-06-19 12:47:49 +0200 |
commit | f26d5cd3cb349d6a5bb39a74ae28d47bd378c937 (patch) | |
tree | 31da1477689d9bd7c842a6bbc41616f2437f5d87 /gcc/ada/socket.c | |
parent | 1abad480e041d8f50044e3c64968957746507e3f (diff) | |
download | gcc-f26d5cd3cb349d6a5bb39a74ae28d47bd378c937.tar.gz |
[multiple changes]
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
From-SVN: r148694
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r-- | gcc/ada/socket.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index 226f3be8592..df3b1206428 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -73,6 +73,7 @@ extern fd_set *__gnat_new_socket_set (fd_set *); extern void __gnat_remove_socket_from_set (fd_set *, int); extern void __gnat_reset_socket_set (fd_set *); extern int __gnat_get_h_errno (void); +extern int __gnat_socket_ioctl (int, int, int *); #if defined (__vxworks) || defined (_WIN32) extern int __gnat_inet_pton (int, const char *, void *); #endif @@ -409,6 +410,17 @@ __gnat_get_h_errno (void) { #endif } +/* Wrapper for ioctl(2), which is a variadic function */ + +int +__gnat_socket_ioctl (int fd, int req, int *arg) { +#if defined (_WIN32) + return ioctlsocket (fd, req, arg); +#else + return ioctl (fd, req, arg); +#endif +} + #ifndef HAVE_INET_PTON #ifdef VMS |