diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 19e7e799d..85ed2d24e 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,25 @@ +2008-01-02 Jeff Johnston + + * libc/syscalls/sysclose.c: Always call reentrant version of the + underlying syscall since one is guaranteed to exist in libc/reent. + * libc/syscalls/sysexecve.c: Ditto. + * libc/syscalls/sysfcntl.c: Ditto. + * libc/syscalls/sysfork.c: Ditto. + * libc/syscalls/sysfstat.c: Ditto. + * libc/syscalls/sysgetpid.c: Ditto. + * libc/syscalls/sysgettod.c: Ditto. + * libc/syscalls/syskill.c: Ditto. + * libc/syscalls/syslink.c: Ditto. + * libc/syscalls/syslseek.c: Ditto. + * libc/syscalls/sysopen.c: Ditto. + * libc/syscalls/sysread.c: Ditto. + * libc/syscalls/syssbrk.c: Ditto. + * libc/syscalls/sysstat.c: Ditto. + * libc/syscalls/systimes.c: Ditto. + * libc/syscalls/sysunlink.c: Ditto. + * libc/syscalls/syswait.c: Ditto. + * libc/syscalls/syswrite.c: Ditto. + 2007-12-19 Jeff Johnston * NEWS: Update with 1.16.0 info. diff --git a/newlib/libc/syscalls/sysclose.c b/newlib/libc/syscalls/sysclose.c index 90f321fc0..d05d2866c 100644 --- a/newlib/libc/syscalls/sysclose.c +++ b/newlib/libc/syscalls/sysclose.c @@ -6,9 +6,5 @@ int _DEFUN (close, (fd), int fd) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _close_r (_REENT, fd); -#else - return _close (fd); -#endif } diff --git a/newlib/libc/syscalls/sysexecve.c b/newlib/libc/syscalls/sysexecve.c index a43b47a0b..4917446a9 100644 --- a/newlib/libc/syscalls/sysexecve.c +++ b/newlib/libc/syscalls/sysexecve.c @@ -8,9 +8,5 @@ _DEFUN (execve, (name, argv, env), char **argv _AND char **env) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _execve_r (_REENT, name, argv, env); -#else - return _execve (name, argv, env); -#endif } diff --git a/newlib/libc/syscalls/sysfcntl.c b/newlib/libc/syscalls/sysfcntl.c index 5e6de7e77..12d09a8af 100644 --- a/newlib/libc/syscalls/sysfcntl.c +++ b/newlib/libc/syscalls/sysfcntl.c @@ -11,11 +11,7 @@ _DEFUN (fcntl, (fd, flag, arg), int arg) { #ifdef HAVE_FCNTL -# ifdef REENTRANT_SYSCALLS_PROVIDED return _fcntl_r (_REENT, fd, flag, arg); -# else - return _fcntl (fd, flag, arg); -# endif #else /* !HAVE_FCNTL */ errno = ENOSYS; return -1; diff --git a/newlib/libc/syscalls/sysfork.c b/newlib/libc/syscalls/sysfork.c index 96d23c7dd..fd2839148 100644 --- a/newlib/libc/syscalls/sysfork.c +++ b/newlib/libc/syscalls/sysfork.c @@ -9,11 +9,7 @@ int _DEFUN_VOID (fork) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _fork_r (_REENT); -#else - return _fork (); -#endif } #endif diff --git a/newlib/libc/syscalls/sysfstat.c b/newlib/libc/syscalls/sysfstat.c index 7d446e825..864c0ab9c 100644 --- a/newlib/libc/syscalls/sysfstat.c +++ b/newlib/libc/syscalls/sysfstat.c @@ -8,9 +8,5 @@ _DEFUN (fstat, (fd, pstat), int fd _AND struct stat *pstat) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _fstat_r (_REENT, fd, pstat); -#else - return _fstat (fd, pstat); -#endif } diff --git a/newlib/libc/syscalls/sysgetpid.c b/newlib/libc/syscalls/sysgetpid.c index 794f5194b..a7048acc7 100644 --- a/newlib/libc/syscalls/sysgetpid.c +++ b/newlib/libc/syscalls/sysgetpid.c @@ -5,9 +5,5 @@ int _DEFUN_VOID (getpid) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _getpid_r (_REENT); -#else - return _getpid (); -#endif } diff --git a/newlib/libc/syscalls/sysgettod.c b/newlib/libc/syscalls/sysgettod.c index 9208a30b9..273d19e59 100644 --- a/newlib/libc/syscalls/sysgettod.c +++ b/newlib/libc/syscalls/sysgettod.c @@ -12,9 +12,5 @@ _DEFUN (gettimeofday, (ptimeval, ptimezone), struct timeval *ptimeval _AND struct timezone *ptimezone) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _gettimeofday_r (_REENT, ptimeval, ptimezone); -#else - return _gettimeofday (ptimeval, ptimezone); -#endif } diff --git a/newlib/libc/syscalls/syskill.c b/newlib/libc/syscalls/syskill.c index 15cfecba8..fb364f511 100644 --- a/newlib/libc/syscalls/syskill.c +++ b/newlib/libc/syscalls/syskill.c @@ -7,9 +7,5 @@ _DEFUN (kill, (pid, sig), int pid _AND int sig) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _kill_r (_REENT, pid, sig); -#else - return _kill (pid, sig); -#endif } diff --git a/newlib/libc/syscalls/syslink.c b/newlib/libc/syscalls/syslink.c index df235eeaa..841684f46 100644 --- a/newlib/libc/syscalls/syslink.c +++ b/newlib/libc/syscalls/syslink.c @@ -7,9 +7,5 @@ _DEFUN (link, (old, new), char *old _AND char *new) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _link_r (_REENT, old, new); -#else - return _link (old, new); -#endif } diff --git a/newlib/libc/syscalls/syslseek.c b/newlib/libc/syscalls/syslseek.c index a1722471c..275d67ce4 100644 --- a/newlib/libc/syscalls/syslseek.c +++ b/newlib/libc/syscalls/syslseek.c @@ -9,9 +9,5 @@ _DEFUN (lseek, (fd, pos, whence), off_t pos _AND int whence) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _lseek_r (_REENT, fd, pos, whence); -#else - return _lseek (fd, pos, whence); -#endif } diff --git a/newlib/libc/syscalls/sysopen.c b/newlib/libc/syscalls/sysopen.c index 7e7df995f..ed0cb604a 100644 --- a/newlib/libc/syscalls/sysopen.c +++ b/newlib/libc/syscalls/sysopen.c @@ -18,11 +18,7 @@ _DEFUN (open, (file, flags, ...), int ret; va_start (ap, flags); -#ifdef REENTRANT_SYSCALLS_PROVIDED ret = _open_r (_REENT, file, flags, va_arg (ap, int)); -#else - ret = _open (file, flags, va_arg (ap, int)); -#endif va_end (ap); return ret; } @@ -35,11 +31,7 @@ open (file, flags, mode) int flags; int mode; { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _open_r (_REENT, file, flags, mode); -#else - return _open (file, flags, mode); -#endif } #endif /* ! _HAVE_STDC */ diff --git a/newlib/libc/syscalls/sysread.c b/newlib/libc/syscalls/sysread.c index ae19f5b46..bcf002d9d 100644 --- a/newlib/libc/syscalls/sysread.c +++ b/newlib/libc/syscalls/sysread.c @@ -9,9 +9,5 @@ _DEFUN (read, (fd, buf, cnt), void *buf _AND size_t cnt) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _read_r (_REENT, fd, buf, cnt); -#else - return _read (fd, buf, cnt); -#endif } diff --git a/newlib/libc/syscalls/syssbrk.c b/newlib/libc/syscalls/syssbrk.c index de368678e..a3e550579 100644 --- a/newlib/libc/syscalls/syssbrk.c +++ b/newlib/libc/syscalls/syssbrk.c @@ -10,9 +10,5 @@ void * _DEFUN (sbrk, (incr), ptrdiff_t incr) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _sbrk_r (_REENT, incr); -#else - return _sbrk (incr); -#endif } diff --git a/newlib/libc/syscalls/sysstat.c b/newlib/libc/syscalls/sysstat.c index e2247dcf0..e93f61919 100644 --- a/newlib/libc/syscalls/sysstat.c +++ b/newlib/libc/syscalls/sysstat.c @@ -8,9 +8,5 @@ _DEFUN (stat, (file, pstat), char *file _AND struct stat *pstat) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _stat_r (_REENT, file, pstat); -#else - return _stat (file, pstat); -#endif } diff --git a/newlib/libc/syscalls/systimes.c b/newlib/libc/syscalls/systimes.c index 353553be7..cc30a3e38 100644 --- a/newlib/libc/syscalls/systimes.c +++ b/newlib/libc/syscalls/systimes.c @@ -7,9 +7,5 @@ clock_t _DEFUN (times, (buf), struct tms *buf) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _times_r (_REENT, buf); -#else - return _times (buf); -#endif } diff --git a/newlib/libc/syscalls/sysunlink.c b/newlib/libc/syscalls/sysunlink.c index ac04184f2..1c5a69cfe 100644 --- a/newlib/libc/syscalls/sysunlink.c +++ b/newlib/libc/syscalls/sysunlink.c @@ -6,9 +6,5 @@ int _DEFUN (unlink, (file), char *file) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _unlink_r (_REENT, file); -#else - return _unlink (file); -#endif } diff --git a/newlib/libc/syscalls/syswait.c b/newlib/libc/syscalls/syswait.c index 355906c37..ec38a321f 100644 --- a/newlib/libc/syscalls/syswait.c +++ b/newlib/libc/syscalls/syswait.c @@ -6,9 +6,5 @@ int _DEFUN (wait, (status), int *status) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _wait_r (_REENT, status); -#else - return _wait (status); -#endif } diff --git a/newlib/libc/syscalls/syswrite.c b/newlib/libc/syscalls/syswrite.c index 089975958..0f080fb4d 100644 --- a/newlib/libc/syscalls/syswrite.c +++ b/newlib/libc/syscalls/syswrite.c @@ -9,9 +9,5 @@ _DEFUN (write, (fd, buf, cnt), const void *buf _AND size_t cnt) { -#ifdef REENTRANT_SYSCALLS_PROVIDED return _write_r (_REENT, fd, buf, cnt); -#else - return _write (fd, buf, cnt); -#endif }