Commit c80645ab by Thomas Quinot Committed by Arnaud Charlet

gsocket.h: Make this file includable in a Nucleus environment, which does not support sockets.

2008-08-05  Thomas Quinot  <quinot@adacore.com>

	* gsocket.h: Make this file includable in a Nucleus environment, which
	does not support sockets.

	* socket.c: Remove Nucleus-specific hack.

From-SVN: r138720
parent 1a6587c8
...@@ -30,6 +30,15 @@ ...@@ -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 #ifndef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_SOURCE_EXTENDED 1 #define _XOPEN_SOURCE_EXTENDED 1
/* For HP-UX */ /* For HP-UX */
...@@ -190,3 +199,5 @@ ...@@ -190,3 +199,5 @@
#else #else
# define Has_Sockaddr_Len 0 # define Has_Sockaddr_Len 0
#endif #endif
#endif /* defined(__nucleus__) */
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
****************************************************************************/ ****************************************************************************/
/* This file provides a portable binding to the sockets API */ /* 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" #include "gsocket.h"
#if defined(HAVE_SOCKETS)
/* Include all the necessary system-specific headers and define the /* Include all the necessary system-specific headers and define the
* necessary macros (shared with gen-oscons). * necessary macros (shared with gen-oscons).
*/ */
...@@ -417,4 +417,7 @@ __gnat_get_h_errno (void) { ...@@ -417,4 +417,7 @@ __gnat_get_h_errno (void) {
return h_errno; return h_errno;
#endif #endif
} }
#endif /* __nucleus__ */
#else
#warning Sockets are not supported on this platform
#endif /* defined(HAVE_SOCKETS) */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment