+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.
+
2014-07-17 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
#define HOST_OBJECT_SUFFIX ".obj"
#endif
+#ifdef __PikeOS__
+#define __BSD_VISIBLE 1
+#endif
+
#ifdef IN_RTS
#include "tconfig.h"
#include "tsystem.h"
/* 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. */
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);
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);
/* 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. */
#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)
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
#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)
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)
* *
* C Implementation File *
* *
- * Copyright (C) 2005-2012, Free Software Foundation, Inc. *
+ * Copyright (C) 2005-2014, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
#endif
}
-void __gnat_unsetenv (char *name) {
+void __gnat_unsetenv (char *name)
+{
#if defined (VMS)
/* Not implemented */
return;
#endif
}
-void __gnat_clearenv (void) {
+void __gnat_clearenv (void)
+{
#if defined (VMS)
/* not implemented */
return;
#elif defined (sun) \
- || (defined (__vxworks) && ! defined (__RTP__)) || defined (__Lynx__)
+ || (defined (__vxworks) && ! defined (__RTP__)) || defined (__Lynx__) \
+ || defined (__PikeOS__)
/* On Solaris, VxWorks (not RTPs), and Lynx there is no system
call to unset a variable or to clear the environment so set all
the entries in the environ table to NULL (see comment in
* *
* C Implementation File *
* *
- * Copyright (C) 2001-2011, AdaCore *
+ * Copyright (C) 2001-2014, AdaCore *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
#include <sys/types.h>
#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__)
-/* ??? See comment in adaint.c. */
-#define GCC_RESOURCE_H
-#include <sys/wait.h>
-#elif defined (__nucleus__)
-/* No wait.h available on Nucleus */
+ /* ??? See comment in adaint.c. */
+# define GCC_RESOURCE_H
+# include <sys/wait.h>
+#elif defined (__nucleus__) || defined (__PikeOS__)
+ /* No wait.h available on Nucleus */
#else
#include <sys/wait.h>
#endif
#else
void
-__gnat_kill (int pid, int sig, int close)
+__gnat_kill (int pid ATTRIBUTE_UNUSED,
+ int sig ATTRIBUTE_UNUSED,
+ int close ATTRIBUTE_UNUSED)
{
}
int
-__gnat_waitpid (int pid, int sig)
+__gnat_waitpid (int pid ATTRIBUTE_UNUSED, int sig ATTRIBUTE_UNUSED)
{
return 0;
}
int
-__gnat_pipe (int *fd)
+__gnat_pipe (int *fd ATTRIBUTE_UNUSED)
{
return -1;
}
}
void
-__gnat_expect_portable_execvp (int *pid, char *cmd, char *argv[])
+__gnat_expect_portable_execvp (int *pid ATTRIBUTE_UNUSED,
+ char *cmd ATTRIBUTE_UNUSED,
+ char *argv[] ATTRIBUTE_UNUSED)
{
*pid = 0;
}
int
-__gnat_expect_poll (int *fd, int num_fd, int timeout, int *is_set)
+__gnat_expect_poll (int *fd ATTRIBUTE_UNUSED,
+ int num_fd ATTRIBUTE_UNUSED,
+ int timeout ATTRIBUTE_UNUSED,
+ int *is_set ATTRIBUTE_UNUSED)
{
return -1;
}
* *
* C Header File *
* *
- * Copyright (C) 2004-2012, Free Software Foundation, Inc. *
+ * Copyright (C) 2004-2014, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* *
****************************************************************************/
-#if defined(__nucleus__) || defined(VTHREADS) || defined(__ANDROID__)
+#if defined(__nucleus__) || defined(VTHREADS) || defined(__ANDROID__) \
+ || defined(__PikeOS__)
-#warning Sockets not supported on these platforms
+/* Sockets not supported on these platforms. */
#undef HAVE_SOCKETS
#else
-- contains the name of the file to which it is linked. Symbolic links may
-- span file systems and may refer to directories.
- S_Owner : constant := 1;
- S_Group : constant := 2;
- S_Others : constant := 4;
-
procedure Set_Writable (Name : String);
-- Change permissions on the named file to make it writable for its owner
-- This renaming is provided for backwards compatibility with previous
-- versions. The use of Set_Non_Writable is preferred (clearer name).
+ S_Owner : constant := 1;
+ S_Group : constant := 2;
+ S_Others : constant := 4;
+ -- Constants for use in Mode parameter to Set_Executable
+
procedure Set_Executable (Name : String; Mode : Positive := S_Owner);
- -- Change permissions on the named file to make it executable for its owner
+ -- Change permissions on the file given by Name to make it executable
+ -- for its owner, group or others, according to the setting of Mode.
+ -- As indicated, the default if no Mode parameter is given is owner.
procedure Set_Readable (Name : String);
-- Change permissions on the named file to make it readable for its
HB :=
Make_Attribute_Reference (Loc,
- Prefix =>
- Duplicate_Subexpr (P, Name_Req => True),
+ Prefix => Duplicate_Subexpr (P, Name_Req => True),
Attribute_Name => Name_Last,
Expressions => Dims);
* *
* C Implementation File *
* *
- * Copyright (C) 2003-2012, Free Software Foundation, Inc. *
+ * Copyright (C) 2003-2014, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
return s->s_proto;
}
-#else
-# warning Sockets are not supported on this platform
#endif /* defined(HAVE_SOCKETS) */
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2013, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2014, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
int *ch,
int *end_of_file,
int *avail,
- int waiting)
+ int waiting ATTRIBUTE_UNUSED)
{
#if defined (linux) || defined (sun) \
|| defined (__CYGWIN32__) || defined (__MACHTEN__) || defined (__hpux__) \
__gnat_localtime_tzoff (const time_t *, const int *, long *);
void
-__gnat_localtime_tzoff (const time_t *timer, const int *is_historic, long *off)
+__gnat_localtime_tzoff (const time_t *timer ATTRIBUTE_UNUSED,
+ const int *is_historic ATTRIBUTE_UNUSED,
+ long *off ATTRIBUTE_UNUSED)
{
- struct tm tp;
+ struct tm tp ATTRIBUTE_UNUSED;
/* AIX, HPUX, Sun Solaris */
#if defined (_AIX) || defined (__hpux__) || defined (sun)
/* Darwin, Free BSD, Linux, where component tm_gmtoff is present in
struct tm */
-#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\
- defined (__GLIBC__)
+#elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) \
+ || defined (__GLIBC__)
{
localtime_r (timer, &tp);
*off = tp.tm_gmtoff;
* *
* C Implementation File *
* *
- * Copyright (C) 2008-2013, AdaCore *
+ * Copyright (C) 2008-2014, AdaCore *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
/* First all usupported platforms. Add stubs for exported routines. */
-#if defined (VMS) || defined (__vxworks) || defined (__Lynx__) || \
- defined (__ANDROID__)
-
-void * __gnat_new_tty (void) { return (void*)0; }
-char * __gnat_tty_name (void* t) { return (char*)0; }
-int __gnat_interrupt_pid (int pid) { return -1; }
-int __gnat_interrupt_process (void* desc) { return -1; }
-int __gnat_setup_communication (void** desc) { return -1; }
-void __gnat_setup_parent_communication
- (void* d, int* i, int* o, int*e, int*p) { return -1; }
-int __gnat_setup_child_communication
- (void* d, char **n, int u) { return -1; }
-int __gnat_terminate_process (void *desc) { return -1; }
-int __gnat_tty_fd (void* t) { return -1; }
-int __gnat_tty_supported (void) { return 0; }
-int __gnat_tty_waitpid (void *desc) { return 1; }
-void __gnat_close_tty (void* t) {}
-void __gnat_free_process (void** process) {}
-void __gnat_reset_tty (void* t) {}
-void __gnat_send_header (void* d, char h[5], int s, int *r) {}
-void __gnat_setup_winsize (void *desc, int rows, int columns) {}
+#if defined (VMS) || defined (__vxworks) || defined (__Lynx__) \
+ || defined (__ANDROID__) || defined (__PikeOS__)
+
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+
+void *
+__gnat_new_tty (void)
+{
+ return (void*)0;
+}
+
+char *
+__gnat_tty_name (void* t ATTRIBUTE_UNUSED)
+{
+ return (char*)0;
+}
+
+int
+__gnat_interrupt_pid (int pid ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+int
+__gnat_interrupt_process (void* desc ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+int
+__gnat_setup_communication (void** desc ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+void
+__gnat_setup_parent_communication (void *d ATTRIBUTE_UNUSED,
+ int *i ATTRIBUTE_UNUSED,
+ int *o ATTRIBUTE_UNUSED,
+ int *e ATTRIBUTE_UNUSED,
+ int *p ATTRIBUTE_UNUSED)
+{
+}
+
+int
+__gnat_setup_child_communication (void *d ATTRIBUTE_UNUSED,
+ char **n ATTRIBUTE_UNUSED,
+ int u ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+int
+__gnat_terminate_process (void *desc ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+int
+__gnat_tty_fd (void* t ATTRIBUTE_UNUSED)
+{
+ return -1;
+}
+
+int
+__gnat_tty_supported (void)
+{
+ return 0;
+}
+
+int
+__gnat_tty_waitpid (void *desc ATTRIBUTE_UNUSED)
+{
+ return 1;
+}
+
+void
+__gnat_close_tty (void* t ATTRIBUTE_UNUSED)
+{
+}
+
+void
+__gnat_free_process (void** process ATTRIBUTE_UNUSED)
+{
+}
+
+void
+__gnat_reset_tty (void* t ATTRIBUTE_UNUSED)
+{
+}
+
+void
+__gnat_send_header (void* d ATTRIBUTE_UNUSED,
+ char h[5] ATTRIBUTE_UNUSED,
+ int s ATTRIBUTE_UNUSED,
+ int *r ATTRIBUTE_UNUSED)
+{
+}
+
+void
+__gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
+ int rows ATTRIBUTE_UNUSED,
+ int columns ATTRIBUTE_UNUSED)
+{
+}
/* For Windows platforms. */