#include <utime.h>
#endif
+/* wait.h processing */
#ifdef __MINGW32__
#if OLD_MINGW
#include <sys/wait.h>
preventing the inclusion of the GCC header from doing anything. */
#define GCC_RESOURCE_H
#include <sys/wait.h>
+#elif defined (__nucleus__)
+/* No wait() or waitpid() calls available */
#else
+/* Default case */
#include <sys/wait.h>
#endif
#elif defined (VMS)
#define GNAT_MAX_PATH_LEN 256 /* PATH_MAX */
-#elif defined (__vxworks) || defined (__OPENNT)
+#elif defined (__vxworks) || defined (__OPENNT) || defined(__nucleus__)
#define GNAT_MAX_PATH_LEN PATH_MAX
#else
/* Place the contents of the symbolic link named PATH in the buffer BUF,
which has size BUFSIZ. If PATH is a symbolic link, then return the number
- of characters of its content in BUF. Otherwise, return -1. For Windows,
- OS/2 and vxworks, always return -1. */
+ of characters of its content in BUF. Otherwise, return -1.
+ For systems not supporting symbolic links, always return -1. */
int
__gnat_readlink (char *path ATTRIBUTE_UNUSED,
char *buf ATTRIBUTE_UNUSED,
size_t bufsiz ATTRIBUTE_UNUSED)
{
-#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
- return -1;
-#elif defined (__INTERIX) || defined (VMS)
- return -1;
-#elif defined (__vxworks)
+#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__) \
+ || defined (__INTERIX) || defined (VMS) \
+ || defined(__vxworks) || defined (__nucleus__)
return -1;
#else
return readlink (path, buf, bufsiz);
#endif
}
-/* Creates a symbolic link named NEWPATH which contains the string OLDPATH. If
- NEWPATH exists it will NOT be overwritten. For Windows, OS/2, VxWorks,
- Interix and VMS, always return -1. */
+/* Creates a symbolic link named NEWPATH which contains the string OLDPATH.
+ If NEWPATH exists it will NOT be overwritten.
+ For systems not supporting symbolic links, always return -1. */
int
__gnat_symlink (char *oldpath ATTRIBUTE_UNUSED,
char *newpath ATTRIBUTE_UNUSED)
{
-#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
- return -1;
-#elif defined (__INTERIX) || defined (VMS)
- return -1;
-#elif defined (__vxworks)
+#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__) \
+ || defined (__INTERIX) || defined (VMS) \
+ || defined(__vxworks) || defined (__nucleus__)
return -1;
#else
return symlink (oldpath, newpath);
/* Try to lock a file, return 1 if success. */
-#if defined (__vxworks) || defined (MSDOS) || defined (_WIN32)
+#if defined (__vxworks) || defined (__nucleus__) || defined (MSDOS) || defined (_WIN32)
/* Version that does not use link. */
return mkstemp (path);
#elif defined (__Lynx__)
mktemp (path);
+#elif defined (__nucleus__)
+ return -1;
#else
if (mktemp (path) == NULL)
return -1;
void
__gnat_set_writable (char *name)
{
-#ifndef __vxworks
+#if ! defined (__vxworks) && ! defined(__nucleus__)
struct stat statbuf;
if (stat (name, &statbuf) == 0)
void
__gnat_set_executable (char *name)
{
-#ifndef __vxworks
+#if ! defined (__vxworks) && ! defined(__nucleus__)
struct stat statbuf;
if (stat (name, &statbuf) == 0)
void
__gnat_set_readonly (char *name)
{
-#ifndef __vxworks
+#if ! defined (__vxworks) && ! defined(__nucleus__)
struct stat statbuf;
if (stat (name, &statbuf) == 0)
int
__gnat_is_symbolic_link (char *name ATTRIBUTE_UNUSED)
{
-#if defined (__vxworks)
+#if defined (__vxworks) || defined (__nucleus__)
return 0;
#elif defined (_AIX) || defined (__APPLE__) || defined (__unix__)
else
return status;
-#elif defined (__vxworks)
+#elif defined (__vxworks) || defined(__nucleus__)
return -1;
#else
pid = win32_no_block_spawn (args[0], args);
return pid;
-#elif defined (__vxworks)
+#elif defined (__vxworks) || defined (__nucleus__)
return -1;
#else
#elif defined (__EMX__) || defined (MSDOS)
/* ??? See corresponding comment in portable_no_block_spawn. */
-#elif defined (__vxworks)
+#elif defined (__vxworks) || defined (__nucleus__)
/* Not sure what to do here, so do same as __EMX__ case, i.e., nothing but
return zero. */
#else
int
__gnat_copy_attribs (char *from, char *to, int mode)
{
-#if defined (VMS) || defined (__vxworks)
+#if defined (VMS) || defined (__vxworks) || defined (__nucleus__)
return -1;
#else
struct stat fbuf;