diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-01-08 19:25:21 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-01-08 19:25:21 +0000 |
commit | 9f13ccb3562531b31642db1151f126fe31c972fb (patch) | |
tree | 0f61ce396a628e43e9951f255e68d4ef1c59c665 /newlib/libc/sys/rtems/crt0.c | |
parent | 9488c414887b7bbcf0123943d156af24b230d84f (diff) | |
download | cygnal-9f13ccb3562531b31642db1151f126fe31c972fb.tar.gz cygnal-9f13ccb3562531b31642db1151f126fe31c972fb.tar.bz2 cygnal-9f13ccb3562531b31642db1151f126fe31c972fb.zip |
2004-01-08 Joel Sherrill <joel@oarcorp.com>
* libc/sys/rtems/sys/queue.h: New file.
* libc/include/sys/signal.h: Reflect renumbering of signals to
fit into 32-bit mask.
* libc/include/sys/unistd.h: Add fdatasync() prototype.
* libc/sys/rtems/crt0.c: Add more symbols which may be implicitly
required. In particular, add the reentrant variants of libc calls.
* libc/sys/rtems/sys/dirent.h: Add scandir() prototype.
Diffstat (limited to 'newlib/libc/sys/rtems/crt0.c')
-rw-r--r-- | newlib/libc/sys/rtems/crt0.c | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c index 99b91feea..2e9522134 100644 --- a/newlib/libc/sys/rtems/crt0.c +++ b/newlib/libc/sys/rtems/crt0.c @@ -1,4 +1,3 @@ -void rtems_provides_crt0( void ) {} /* * RTEMS Fake crt0 * @@ -11,6 +10,10 @@ void rtems_provides_crt0( void ) {} * but this is enough to satisfy the autoconf macro AC_PROG_CC. */ +#include <reent.h> + +void rtems_provides_crt0( void ) {} /* dummy symbol so file always has one */ + /* RTEMS provides some of its own routines including a Malloc family */ void *malloc() { return 0; } @@ -23,13 +26,47 @@ int rtems_gxx_mutex_lock() { return -1; } int rtems_gxx_mutex_unlock() { return -1; } int rtems_gxx_once() { return -1; } +/* stubs for functions from reent.h */ +int _close_r (struct _reent *r, int fd) { return -1; } +#if NOT_USED_BY_RTEMS +int _execve_r (struct _reent *r, char *, char **, char **) { return -1; } +#endif +int _fcntl_r ( struct _reent *ptr, int fd, int cmd, int arg ) { return -1;} +#if NOT_USED_BY_RTEMS +int _fork_r (struct _reent *r) { return -1; } +#endif +int _fstat_r (struct _reent *r, int fd, struct stat *buf) { return -1; } +int _getpid_r (struct _reent *r) { return -1; } +int _kill_r ( struct _reent *r, int pid, int sig ) { return -1; } +int _link_r ( struct _reent *ptr, const char *existing, const char *new) { return -1; } +_off_t _lseek_r ( struct _reent *ptr, int fd, _off_t offset, int whence ) { return -1; } +int _open_r (struct _reent *r, const char *buf, int flags, int mode) { return -1; } +_ssize_t _read_r (struct _reent *r, int fd, void *buf, size_t nbytes) { return -1; } +#if NOT_USED_BY_RTEMS +void *_sbrk_r (struct _reent *r, ptrdiff_t) { return -1; } +#endif +int _stat_r (struct _reent *r, const char *path, struct stat *buf) { return -1; } +_CLOCK_T_ _times_r (struct _reent *r, struct tms *ptms) { return -1; } +int _unlink_r (struct _reent *r, const char *path) { return -1; } +#if NOT_USED_BY_RTEMS +int _wait_r (struct _reent *r, int *) { return -1; } +#endif +_ssize_t _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes) { return -1; } + +int isatty( int fd ) { return -1; } + +_realloc_r() {} +_calloc_r() {} +_malloc_r() {} +_free_r() {} + /* gcc can implicitly generate references to these */ -strcmp() {} -strcpy() {} -strlen() {} -memcmp() {} -memcpy() {} -memset() {} +/* strcmp() {} */ +/* strcpy() {} */ +/* strlen() {} */ +/* memcmp() {} */ +/* memcpy() {} */ +/* memset() {} */ /* The PowerPC expects certain symbols to be defined in the linker script. */ |