From a9f0367e1af4f7543927b0147579ebdc50e2ec07 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 9 May 2012 09:03:06 +0000 Subject: * libc/sys/rtems/crt0.c: Add stubs for access(), ftruncate(), _getpid_r(), geteuid(), getgid, _getgid_r, getpid(), getppid(), and _getpid_r(). --- newlib/libc/sys/rtems/crt0.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'newlib/libc/sys') diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c index 1565859c3..e47d933f6 100644 --- a/newlib/libc/sys/rtems/crt0.c +++ b/newlib/libc/sys/rtems/crt0.c @@ -50,6 +50,7 @@ int rtems_gxx_recursive_mutex_unlock() { return -1; } #endif /* stubs for functions RTEMS provides */ +RTEMS_STUB(int, access(const char *pathname, int mode), { return -1; }) RTEMS_STUB(int, clock_gettime(clockid_t clk_id, struct timespec *tp), { return -1; }) RTEMS_STUB(int, close (int fd), { return -1; }) RTEMS_STUB(int, dup2(int oldfd, int newfd), { return -1; }) @@ -63,6 +64,7 @@ RTEMS_STUB(struct passwd *, getpwnam(const char *name), { return 0; }) RTEMS_STUB(struct passwd *, getpwuid(uid_t uid), { return 0; }) RTEMS_STUB(uid_t, getuid(void), { return 0; }) RTEMS_STUB(int, nanosleep(const struct timespec *req, struct timespec *rem), { return -1; }) +RTEMS_STUB(int, ftruncate(int fd, off_t length), { return -1; }) RTEMS_STUB(_off_t, lseek(int fd, _off_t offset, int whence), { return -1; }) RTEMS_STUB(int, lstat(const char *path, struct stat *buf), { return -1; }) RTEMS_STUB(int, open(const char *pathname, int flags, int mode), { return -1; }) @@ -93,7 +95,12 @@ RTEMS_STUB(int, _fork_r (struct _reent *r), { return -1; }) #endif #endif RTEMS_STUB(int, _fstat_r (struct _reent *r, int fd, struct stat *buf), { return -1; }) -RTEMS_STUB(int, _getpid_r (struct _reent *r), { return -1; }) +RTEMS_STUB(uid_t, geteuid (), { return -1; }) +RTEMS_STUB(gid_t, getgid (), { return -1; }) +RTEMS_STUB(gid_t, _getgid_r (struct _reent *r), { return -1; }) +RTEMS_STUB(pid_t, getpid (), { return -1; }) +RTEMS_STUB(pid_t, getppid (), { return -1; }) +RTEMS_STUB(pid_t, _getpid_r (struct _reent *r), { return -1; }) RTEMS_STUB(int, _gettimeofday_r(struct _reent *r, struct timeval *tp, void *tzp), { return 0; }) RTEMS_STUB(int, _isatty_r (struct _reent *r, int fd), { return isatty( fd ); }) RTEMS_STUB(int, _kill_r (struct _reent *r, int pid, int sig ), { return -1; }) -- cgit v1.2.3