This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[patch,rtems] Add more stub functions to rtems/crt0.c
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: Newlib List <newlib at sources dot redhat dot com>
- Cc: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Mon, 01 Dec 2008 08:37:35 +0100
- Subject: [patch,rtems] Add more stub functions to rtems/crt0.c
Hi,
The fact RTEMS now uses newlib's posix/ and unix/ directory, requires
RTEMS libc/sys/rtems/crt0.c to be extended.
Ralf
2008-12-01 Ralf CorsÃpius <ralf.corsepius@rtems.org>
* libc/sys/rtems/crt0.c: Add stubs for getdents(), nanosleep(), _execve(),
_exit().
Index: libc/sys/rtems/crt0.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/rtems/crt0.c,v
retrieving revision 1.9
diff -u -r1.9 crt0.c
--- libc/sys/rtems/crt0.c 6 Dec 2005 21:58:45 -0000 1.9
+++ libc/sys/rtems/crt0.c 1 Dec 2008 07:16:43 -0000
@@ -77,6 +77,13 @@
_malloc_r() {}
_free_r() {}
+/* stubs for functions required by libc/posix */
+int getdents(int fd, void *dp, int count) { return -1; }
+struct timespec;
+int nanosleep(const struct timespec *req, struct timespec *rem) { return -1; }
+int _execve(const char *path, char * const *argv, char * const *envp) { return -1; }
+int _exit(int status) { return -1; }
+
/* gcc can implicitly generate references to these */
/* strcmp() {} */
/* strcpy() {} */