From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121159 invoked by alias); 20 Nov 2017 07:54:39 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 121093 invoked by uid 10080); 20 Nov 2017 07:54:38 -0000 Date: Mon, 20 Nov 2017 07:54:00 -0000 Message-ID: <20171120075438.121091.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] RTEMS: Add missing functions to crt0 X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: 57732f9b4b4b7b10740ebd24bd85663ea6a096a1 X-Git-Newrev: 0e3e3753776d715a6032440e428052f036a29fac X-SW-Source: 2017-q4/txt/msg00021.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0e3e3753776d715a6032440e428052f036a29fac commit 0e3e3753776d715a6032440e428052f036a29fac Author: Sebastian Huber Date: Mon Nov 20 08:52:09 2017 +0100 RTEMS: Add missing functions to crt0 This helps to get some more features from libstdc++. Signed-off-by: Sebastian Huber Diff: --- newlib/libc/sys/rtems/crt0.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c index 0e9d426..a565274 100644 --- a/newlib/libc/sys/rtems/crt0.c +++ b/newlib/libc/sys/rtems/crt0.c @@ -10,12 +10,13 @@ * but this is enough to satisfy the autoconf macro AC_PROG_CC. */ +#include +#include +#include #include - -#include /* sigset_t */ -#include /* struct timespec */ -#include /* isatty */ -#include /* _Mutex_recursive_Control */ +#include +#include +#include #include #include @@ -97,6 +98,7 @@ 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; }) +RTEMS_STUB(int, fchmod(int fd, mode_t mode ), { return -1; }) RTEMS_STUB(int, fcntl( int fd, int cmd, ... /* arg */ ), { return -1; }) RTEMS_STUB(pid_t, fork(void), { return -1; }) RTEMS_STUB(int, fstat(int fd, struct stat *buf), { return -1; }) @@ -113,10 +115,12 @@ 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; }) RTEMS_STUB(int, pipe(int pipefd[2]), { return -1; }) RTEMS_STUB(_ssize_t, read(int fd, void *buf, size_t count), { return -1; }) +RTEMS_STUB(ssize_t, readv (int fd, const struct iovec *iov, int iovcnt), { return -1; }) RTEMS_STUB(int, sched_yield(void), { return -1; }) RTEMS_STUB(int, sigfillset(sigset_t *set), { return -1; }) RTEMS_STUB(int, sigprocmask(int how, const sigset_t *set, sigset_t *oldset), { return -1; }) RTEMS_STUB(int, stat(const char *path, struct stat *buf), { return -1; }) +RTEMS_STUB(long, sysconf(int name), { return -1; }) RTEMS_STUB(int, unlink(const char *pathname), { return -1; }) RTEMS_STUB(pid_t, vfork(void), { return -1; }) #if !defined(_NO_POPEN) && !defined(_NO_WORDEXP) @@ -124,6 +128,7 @@ RTEMS_STUB(pid_t, vfork(void), { return -1; }) RTEMS_STUB(int, waitpid (pid_t pid, int *status, int options), { return -1; }) #endif RTEMS_STUB(_ssize_t, write (int fd, const void *buf, size_t nbytes), { return -1; }) +RTEMS_STUB(ssize_t, writev (int fd, const struct iovec *iov, int iovcnt), { return -1; }) /* stubs for functions from reent.h */ RTEMS_STUB(int, _close_r (struct _reent *r, int fd), { return -1; })