summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc/syscalls.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-01-29 00:29:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-01-29 00:29:25 +0000
commitdcec5a4d60405c206b1fab8630534e917fdf9857 (patch)
tree53dd9f4fbaffd74fbb5e8311ec6a2efe83eb84ea /c/src/lib/libc/syscalls.c
parentAll RTEMS system call implementation renamed to be __rtems_*. (diff)
downloadrtems-dcec5a4d60405c206b1fab8630534e917fdf9857.tar.bz2
Merged newlib's libgloss support for rtems into this directory. This
should simplify the build process.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libc/syscalls.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/c/src/lib/libc/syscalls.c b/c/src/lib/libc/syscalls.c
index af17dd1375..44b967b50c 100644
--- a/c/src/lib/libc/syscalls.c
+++ b/c/src/lib/libc/syscalls.c
@@ -23,16 +23,19 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
+#include <errno.h>
+#include <string.h>
+#include <stdio.h> /* only for puts */
/*
* fstat, stat, and isatty must lie consistently and report that everything
* is a tty or stdout will not be line buffered.
*/
-int __fstat(int _fd, struct stat* _sbuf)
+int __rtems_fstat(int _fd, struct stat* _sbuf)
{
if ( _fd > 2 ) {
- puts( "__fstat -- only stdio supported" );
+ puts( "__rtems_fstat -- only stdio supported" );
assert( 0 );
}
_sbuf->st_mode = S_IFCHR;
@@ -42,7 +45,7 @@ int __fstat(int _fd, struct stat* _sbuf)
return 0;
}
-int __isatty(int _fd)
+int __rtems_isatty(int _fd)
{
return 1;
}
@@ -52,7 +55,7 @@ int stat( const char *path, struct stat *buf )
if ( strncmp( "/dev/", path, 5 ) ) {
return -1;
}
- return __fstat( 0, buf );
+ return __rtems_fstat( 0, buf );
}
int link( const char *existing, const char *new )
@@ -67,4 +70,28 @@ int unlink( const char *path )
return -1;
}
+char *getcwd( char *_buf, size_t _size) {
+/* assert( FALSE ); */
+ errno = ENOSYS;
+ return 0;
+}
+int fork() {
+ puts( "fork -- not supported!!!" );
+ assert( 0 );
+ errno = ENOSYS;
+ return -1;
+}
+int execv(const char *_path, char * const _argv[] ) {
+ puts( "execv -- not supported!!!" );
+ assert( 0 );
+ errno = ENOSYS;
+ return -1;
+}
+int wait() {
+ puts( "wait -- not supported!!!" );
+ assert( 0 );
+ errno = ENOSYS;
+ return -1;
+}
+
#endif