summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/newlibc.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-18 19:06:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-18 19:06:58 +0000
commit8d7a1d76e2d19cb77df60a14889ded1c445c28dd (patch)
tree554239df52eafa2c7eb453527c925204b74cc103 /cpukit/libcsupport/src/newlibc.c
parentchanged reboot to a macro to avoid the "noreturn returns" warning. (diff)
downloadrtems-8d7a1d76e2d19cb77df60a14889ded1c445c28dd.tar.bz2
minor changes to insure the few posix-ish routines needed in non-posix
mode have stubs.
Diffstat (limited to 'cpukit/libcsupport/src/newlibc.c')
-rw-r--r--cpukit/libcsupport/src/newlibc.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c
index 2509221d58..e57f537ff5 100644
--- a/cpukit/libcsupport/src/newlibc.c
+++ b/cpukit/libcsupport/src/newlibc.c
@@ -35,6 +35,7 @@
#include <string.h> /* for memset() */
#include <sys/reent.h> /* for extern of _REENT (aka _impure_ptr) */
+#include <errno.h>
/*
* NOTE: When using RTEMS fake stat, fstat, and isatty, all output
@@ -289,6 +290,14 @@ libc_init(int reentrant)
}
}
+/*
+ * Routines required by the gnat runtime.
+ */
+
+int get_errno()
+{
+ return errno;
+}
/*
* Function: _exit
@@ -338,19 +347,30 @@ void exit(int status)
* These are directly supported (and completely correct) in the posix api.
*/
-#ifndef RTEMS_POSIX_API
-
-#include <assert.h>
+#if !defined(__RTEMS_POSIX_API__)
pid_t __getpid(void)
{
- assert( 0 );
return 0;
}
+#endif
+
+#if !defined(__RTEMS_POSIX_API__) && !defined(__GO32__)
+pid_t getpid(void)
+{
+ return __getpid();
+}
+#endif
+
+#if !defined(__RTEMS_POSIX_API__) && !defined(__GO32__)
+int kill( pid_t pid, int sig )
+{
+ return 0;
+}
+#endif
int __kill( pid_t pid, int sig )
{
- assert( 0 );
return 0;
}
@@ -379,6 +399,5 @@ unsigned int sleep(
return 0;
}
-#endif
#endif