diff options
author | Thomas Quinot <quinot@adacore.com> | 2010-06-14 12:56:35 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-14 14:56:35 +0200 |
commit | 3a13e78582d1be59cd9e5ecb24f8f1c355261648 (patch) | |
tree | da97cc34e0d943bd7188f253703c8fdb1a724081 /gcc/ada/socket.c | |
parent | 001c7783c467b58d6107b6cf5e4d9b101c4d80dc (diff) | |
download | gcc-3a13e78582d1be59cd9e5ecb24f8f1c355261648.zip gcc-3a13e78582d1be59cd9e5ecb24f8f1c355261648.tar.gz gcc-3a13e78582d1be59cd9e5ecb24f8f1c355261648.tar.bz2 |
socket.c: Fix wrong condition in #ifdef
2010-06-14 Thomas Quinot <quinot@adacore.com>
* socket.c: Fix wrong condition in #ifdef
* g-socket.adb, g-sothco.ads: Functions imported from socket.c that
take or return char* values can't use Interfaces.C.Strings.chars_ptr,
because on VMS this type is a 32-bit pointer which is not compatible
with the default for C pointers for code compiled with gcc on that
platform.
From-SVN: r160735
Diffstat (limited to 'gcc/ada/socket.c')
-rw-r--r-- | gcc/ada/socket.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index d03ddea..e68f435 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -50,21 +50,7 @@ */ typedef char *__netdb_char_ptr __attribute__ (( mode (SI) )); typedef __netdb_char_ptr *__netdb_char_ptr_ptr __attribute__ (( mode (SI) )); -# define NEED_STRUCT_xxxENT -#elif defined (__vxworks) -/* - * For VxWorks we emulate getXXXbyYYY using the proprietary VxWorks API. - */ -typedef char *__netdb_char_ptr; -typedef __netdb_char_ptr *__netdb_char_ptr_ptr; -# define NEED_STRUCT_xxxENT - -#else -# undef NEED_STRUCT_xxxENT -#endif - -#ifdef NEED_STRUCT_xxxENT struct hostent { __netdb_char_ptr h_name; __netdb_char_ptr_ptr h_aliases; @@ -125,7 +111,7 @@ extern int __gnat_hostent_h_addrtype (struct hostent *); extern int __gnat_hostent_h_length (struct hostent *); extern char * __gnat_hostent_h_addr (struct hostent *, int); -#if defined (__vxworks) || defined (_WIN32) +#ifndef HAVE_INET_PTON extern int __gnat_inet_pton (int, const char *, void *); #endif |