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/socket.c | |
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/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 |