summaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-17 06:14:35 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-17 06:14:35 +0000
commit8cb1db0dea3d9776c0cbe0ac7bb05387f4b410be (patch)
treee69d504d24e1249b981b7150ceb6cc8107e5e456 /gcc/ada/adaint.c
parentc1efebf99e1d1fc1f196fbe3b3222ac3cc19c262 (diff)
downloadgcc-8cb1db0dea3d9776c0cbe0ac7bb05387f4b410be.tar.gz
2014-07-17 Pascal Obry <obry@adacore.com>
* s-os_lib.ads: Minor comment update. 2014-07-17 Tristan Gingold <gingold@adacore.com> * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some indentation. * socket.c: Remove #warning to avoid warning. * expect.c: Indent some preprocessor directives to clarify nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED to remove warnings. * env.c: Fix indentation. Port to PikeOS. * gsocket.h: Port to PikeOS. Remove #warning. * terminals.c: Port to PikeOS. Fix indentation of the stubs. Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement of stubbed __gnat_setup_parent_communication. * adaint.c: Port to PikeOS. Reindent some preprocessor directives to clarify nested if. Fix indentation. Add missing ATTRIBUTE_UNUSED. 2014-07-17 Robert Dewar <dewar@adacore.com> * sem_attr.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212717 138bc75d-0d04-0410-961f-82ee72b054a4
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 151f2e60b87..a3829f7be1f 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)