aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r--gcc/ada/adaint.c45
1 files changed, 28 insertions, 17 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 151f2e6..a3829f7 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -73,6 +73,10 @@
#define HOST_OBJECT_SUFFIX ".obj"
#endif
+#ifdef __PikeOS__
+#define __BSD_VISIBLE 1
+#endif
+
#ifdef IN_RTS
#include "tconfig.h"
#include "tsystem.h"
@@ -144,20 +148,20 @@ UINT CurrentCodePage;
/* wait.h processing */
#ifdef __MINGW32__
-#if OLD_MINGW
-#include <sys/wait.h>
-#endif
+# if OLD_MINGW
+# include <sys/wait.h>
+# endif
#elif defined (__vxworks) && defined (__RTP__)
-#include <wait.h>
+# include <wait.h>
#elif defined (__Lynx__)
/* ??? We really need wait.h and it includes resource.h on Lynx. GCC
has a resource.h header as well, included instead of the lynx
version in our setup, causing lots of errors. We don't really need
the lynx contents of this file, so just workaround the issue by
preventing the inclusion of the GCC header from doing anything. */
-#define GCC_RESOURCE_H
-#include <sys/wait.h>
-#elif defined (__nucleus__)
+# define GCC_RESOURCE_H
+# include <sys/wait.h>
+#elif defined (__nucleus__) || defined (__PikeOS__)
/* No wait() or waitpid() calls available. */
#else
/* Default case. */
@@ -506,7 +510,7 @@ __gnat_readlink (char *path ATTRIBUTE_UNUSED,
size_t bufsiz ATTRIBUTE_UNUSED)
{
#if defined (_WIN32) || defined (VMS) \
- || defined(__vxworks) || defined (__nucleus__)
+ || defined(__vxworks) || defined (__nucleus__) || defined (__PikeOS__)
return -1;
#else
return readlink (path, buf, bufsiz);
@@ -522,7 +526,7 @@ __gnat_symlink (char *oldpath ATTRIBUTE_UNUSED,
char *newpath ATTRIBUTE_UNUSED)
{
#if defined (_WIN32) || defined (VMS) \
- || defined(__vxworks) || defined (__nucleus__)
+ || defined(__vxworks) || defined (__nucleus__) || defined (__PikeOS__)
return -1;
#else
return symlink (oldpath, newpath);
@@ -532,7 +536,7 @@ __gnat_symlink (char *oldpath ATTRIBUTE_UNUSED,
/* Try to lock a file, return 1 if success. */
#if defined (__vxworks) || defined (__nucleus__) \
- || defined (_WIN32) || defined (VMS)
+ || defined (_WIN32) || defined (VMS) || defined (__PikeOS__)
/* Version that does not use link. */
@@ -2475,13 +2479,14 @@ __gnat_is_symbolic_link (char *name ATTRIBUTE_UNUSED)
#endif
int
-__gnat_portable_spawn (char *args[])
+__gnat_portable_spawn (char *args[] ATTRIBUTE_UNUSED)
{
- int status = 0;
+ int status ATTRIBUTE_UNUSED = 0;
int finished ATTRIBUTE_UNUSED;
int pid ATTRIBUTE_UNUSED;
-#if defined (__vxworks) || defined(__nucleus__) || defined(RTX)
+#if defined (__vxworks) || defined(__nucleus__) || defined(RTX) \
+ || defined(__PikeOS__)
return -1;
#elif defined (_WIN32)
@@ -2551,12 +2556,15 @@ __gnat_dup (int oldfd)
Return -1 if an error occurred. */
int
-__gnat_dup2 (int oldfd, int newfd)
+__gnat_dup2 (int oldfd ATTRIBUTE_UNUSED, int newfd ATTRIBUTE_UNUSED)
{
#if defined (__vxworks) && !defined (__RTP__)
/* Not supported on VxWorks 5.x, but supported on VxWorks 6.0 when using
RTPs. */
return -1;
+#elif defined (__PikeOS__)
+ /* Not supported. */
+ return -1;
#elif defined (_WIN32)
/* Special case when oldfd and newfd are identical and are the standard
input, output or error as this makes Windows XP hangs. Note that we
@@ -2809,10 +2817,12 @@ win32_wait (int *status)
#endif
int
-__gnat_portable_no_block_spawn (char *args[])
+__gnat_portable_no_block_spawn (char *args[] ATTRIBUTE_UNUSED)
{
-#if defined (__vxworks) || defined (__nucleus__) || defined (RTX)
+#if defined (__vxworks) || defined (__nucleus__) || defined (RTX) \
+ || defined (__PikeOS__)
+ /* Not supported. */
return -1;
#elif defined (_WIN32)
@@ -2855,7 +2865,8 @@ __gnat_portable_wait (int *process_status)
int status = 0;
int pid = 0;
-#if defined (__vxworks) || defined (__nucleus__) || defined (RTX)
+#if defined (__vxworks) || defined (__nucleus__) || defined (RTX) \
+ || defined (__PikeOS__)
/* Not sure what to do here, so do nothing but return zero. */
#elif defined (_WIN32)