diff options
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r-- | gcc/ada/socket.c | 52 |
1 files changed, 3 insertions, 49 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index 310de25..4a9e6ad 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -37,39 +37,7 @@ #include "gsocket.h" -#if defined(VMS) -/* - * For VMS, gsocket.h can't include sockets-related DEC C header files - * when building the runtime (because these files are in a DEC C text library - * (DECC$RTLDEF.TLB) not accessible to GCC). So, we generate a separate header - * file along with s-oscons.ads and include it here. - */ -# include "s-oscons.h" - -/* - * We also need the declaration of struct hostent/servent, which s-oscons - * can't provide, so we copy it manually here. This needs to be kept in synch - * with the definition of that structure in the DEC C headers, which - * hopefully won't change frequently. - */ -typedef char *__netdb_char_ptr __attribute__ (( mode (SI) )); -typedef __netdb_char_ptr *__netdb_char_ptr_ptr __attribute__ (( mode (SI) )); - -struct hostent { - __netdb_char_ptr h_name; - __netdb_char_ptr_ptr h_aliases; - int h_addrtype; - int h_length; - __netdb_char_ptr_ptr h_addr_list; -}; - -struct servent { - __netdb_char_ptr s_name; - __netdb_char_ptr_ptr s_aliases; - int s_port; - __netdb_char_ptr s_proto; -}; -#elif defined(__FreeBSD__) +#if defined(__FreeBSD__) typedef unsigned int IOCTL_Req_T; #else typedef int IOCTL_Req_T; @@ -142,7 +110,7 @@ __gnat_disable_all_sigpipes (void) #endif } -#if defined (_WIN32) || defined (__vxworks) || defined (VMS) +#if defined (_WIN32) || defined (__vxworks) /* * Signalling FDs operations are implemented in Ada for these platforms * (see subunit GNAT.Sockets.Thin.Signalling_Fds). @@ -509,15 +477,6 @@ __gnat_get_h_errno (void) { return -1; } -#elif defined (VMS) - /* h_errno is defined as follows in OpenVMS' version of <netdb.h>. - * However this header file is not available when building the GNAT - * runtime library using GCC, so we are hardcoding the definition - * directly. Note that the returned address is thread-specific. - */ - extern int *decc$h_errno_get_addr (); - return *decc$h_errno_get_addr (); - #elif defined (__rtems__) /* At this stage in the tool build, no networking .h files are available. * Newlib does not provide networking .h files and RTEMS is not built yet. @@ -550,11 +509,6 @@ __gnat_socket_ioctl (int fd, IOCTL_Req_T req, int *arg) { #ifndef HAVE_INET_PTON -#ifdef VMS -# define in_addr_t int -# define inet_addr decc$inet_addr -#endif - int __gnat_inet_pton (int af, const char *src, void *dst) { switch (af) { @@ -592,7 +546,7 @@ __gnat_inet_pton (int af, const char *src, void *dst) { } return (rc == 0); -#elif defined (__hpux__) || defined (VMS) +#elif defined (__hpux__) in_addr_t addr; int rc = -1; |