diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-07 17:01:27 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-07 17:01:27 +0200 |
commit | 3dd9959c810d51dac8ae52ce28212bcac2afc437 (patch) | |
tree | 97de4be619b593f2d66a2fa45de2b0a01f1177c0 /gcc/ada/socket.c | |
parent | dcd8728b8e5ad2b9920f184e028850553b243ba4 (diff) | |
download | gcc-3dd9959c810d51dac8ae52ce28212bcac2afc437.tar.gz |
[multiple changes]
2009-04-07 Robert Dewar <dewar@adacore.com>
(Osint.Fail): Change calling sequence to have one string arg
(Make.Make_Failed): Same change
All callers are adjusted to use concatenation
2009-04-07 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Fix documentation typo
2009-04-07 Robert Dewar <dewar@adacore.com>
* tbuild.ads: Minor reformatting
2009-04-07 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_DT): Avoid the generation of the OSD_Table
when compiling under ZFP runtime.
2009-04-07 Robert Dewar <dewar@adacore.com>
* g-comlin.adb: Minor reformatting
2009-04-07 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-socket.ads, g-sothco.ads:
Remove dynamic allocation of Fd_Set in Socket_Set_Type objects.
From-SVN: r145678
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r-- | gcc/ada/socket.c | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index aadc9b084f7..1716a96f6c2 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -57,13 +57,13 @@ extern int __gnat_create_signalling_fds (int *fds); extern int __gnat_read_signalling_fd (int rsig); extern int __gnat_write_signalling_fd (int wsig); extern void __gnat_close_signalling_fd (int sig); -extern void __gnat_free_socket_set (fd_set *); extern void __gnat_last_socket_in_set (fd_set *, int *); extern void __gnat_get_socket_from_set (fd_set *, int *, int *); extern void __gnat_insert_socket_in_set (fd_set *, int); extern int __gnat_is_socket_in_set (fd_set *, int); 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 *set); extern int __gnat_get_h_errno (void); /* Disable the sending of SIGPIPE for writes on a broken stream */ @@ -266,14 +266,6 @@ __gnat_safe_getservbyport (int port, const char *proto, } #endif -/* Free socket set. */ - -void -__gnat_free_socket_set (fd_set *set) -{ - __gnat_free (set); -} - /* Find the largest socket in the socket set SET. This is needed for `select'. LAST is the maximum value for the largest socket. This hint is used to avoid scanning very large socket sets. On return, LAST is the @@ -334,28 +326,6 @@ __gnat_is_socket_in_set (fd_set *set, int socket) return FD_ISSET (socket, set); } -/* Allocate a new socket set and set it as empty. */ - -fd_set * -__gnat_new_socket_set (fd_set *set) -{ - fd_set *new; - -#ifdef VMS -extern void *__gnat_malloc32 (__SIZE_TYPE__); - new = (fd_set *) __gnat_malloc32 (sizeof (fd_set)); -#else - new = (fd_set *) __gnat_malloc (sizeof (fd_set)); -#endif - - if (set) - memcpy (new, set, sizeof (fd_set)); - else - FD_ZERO (new); - - return new; -} - /* Remove SOCKET from the socket set SET. */ void @@ -364,6 +334,13 @@ __gnat_remove_socket_from_set (fd_set *set, int socket) FD_CLR (socket, set); } +/* Reset SET */ +void +__gnat_reset_socket_set (fd_set *set) +{ + FD_ZERO (set); +} + /* Get the value of the last host error */ int |