diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/gsocket.h | 11 | ||||
-rw-r--r-- | gcc/ada/socket.c | 13 |
2 files changed, 19 insertions, 5 deletions
diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h index 8b8c838..b98da05 100644 --- a/gcc/ada/gsocket.h +++ b/gcc/ada/gsocket.h @@ -30,6 +30,15 @@ * * ****************************************************************************/ +#if defined(__nucleus__) + +#warning Sockets not supported on this platform +#undef HAVE_SOCKETS + +#else + +#define HAVE_SOCKETS + #ifndef _XOPEN_SOURCE_EXTENDED #define _XOPEN_SOURCE_EXTENDED 1 /* For HP-UX */ @@ -190,3 +199,5 @@ #else # define Has_Sockaddr_Len 0 #endif + +#endif /* defined(__nucleus__) */ diff --git a/gcc/ada/socket.c b/gcc/ada/socket.c index bad0655..9653aae 100644 --- a/gcc/ada/socket.c +++ b/gcc/ada/socket.c @@ -31,11 +31,11 @@ ****************************************************************************/ /* This file provides a portable binding to the sockets API */ -#if defined (__nucleus__) -/* ??? Need proper implementation */ -#warning Sockets not yet supported on Nucleus -#else + #include "gsocket.h" + +#if defined(HAVE_SOCKETS) + /* Include all the necessary system-specific headers and define the * necessary macros (shared with gen-oscons). */ @@ -417,4 +417,7 @@ __gnat_get_h_errno (void) { return h_errno; #endif } -#endif /* __nucleus__ */ + +#else +#warning Sockets are not supported on this platform +#endif /* defined(HAVE_SOCKETS) */ |