diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2017-12-03 21:43:30 -0600 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2018-01-17 11:47:26 -0600 |
commit | 9087163804df8af6dc2ec1f675a2341c25f7795f (patch) | |
tree | 86fcb38236347d0e97a16c957e41dca597b8e8a8 /libgloss | |
parent | 44276afe2a0365d655425702205604640829668d (diff) | |
download | newlib-9087163804df8af6dc2ec1f675a2341c25f7795f.zip newlib-9087163804df8af6dc2ec1f675a2341c25f7795f.tar.gz newlib-9087163804df8af6dc2ec1f675a2341c25f7795f.tar.bz2 |
ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'libgloss')
107 files changed, 118 insertions, 233 deletions
diff --git a/libgloss/bfin/_exit.c b/libgloss/bfin/_exit.c index e818632..e55cf08 100644 --- a/libgloss/bfin/_exit.c +++ b/libgloss/bfin/_exit.c @@ -17,8 +17,7 @@ #include <_ansi.h> void -_DEFUN (_exit, (rc), - int rc) +_exit (int rc) { while (1) asm volatile ("EXCPT 0;"); diff --git a/libgloss/close.c b/libgloss/close.c index 7aafcea..48156aa 100644 --- a/libgloss/close.c +++ b/libgloss/close.c @@ -18,8 +18,7 @@ * close -- We don't need to do anything, but pretend we did. */ int -_DEFUN (close ,(fd), - int fd) +close (int fd) { return (0); } diff --git a/libgloss/cr16/fstat.c b/libgloss/cr16/fstat.c index 73e1fa2..781b2a2 100644 --- a/libgloss/cr16/fstat.c +++ b/libgloss/cr16/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (_fstat, (fd, buf), - int fd, +_fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/cr16/getpid.c b/libgloss/cr16/getpid.c index d254c9b..efe1900 100644 --- a/libgloss/cr16/getpid.c +++ b/libgloss/cr16/getpid.c @@ -19,8 +19,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (_getpid, (), - ) +_getpid (void) { return __MYPID; } diff --git a/libgloss/cr16/isatty.c b/libgloss/cr16/isatty.c index 604e8f0..fa3cd03 100644 --- a/libgloss/cr16/isatty.c +++ b/libgloss/cr16/isatty.c @@ -20,8 +20,7 @@ * serial port, we'll say yes and return a 1. */ int -_DEFUN (_isatty, (fd), - int fd) +_isatty (int fd) { return (1); } diff --git a/libgloss/cr16/kill.c b/libgloss/cr16/kill.c index 43c3ec5..f51ddb5 100644 --- a/libgloss/cr16/kill.c +++ b/libgloss/cr16/kill.c @@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__)); * kill -- go out via exit... */ int -_DEFUN (_kill, (pid, sig), - int pid, +_kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/cr16/putnum.c b/libgloss/cr16/putnum.c index 3317bbf..af72322 100644 --- a/libgloss/cr16/putnum.c +++ b/libgloss/cr16/putnum.c @@ -18,8 +18,7 @@ * putnum -- print a 32 bit number in hex */ void -_DEFUN (putnum, (num), - unsigned int num) +putnum (unsigned int num) { char buf[9]; int cnt; diff --git a/libgloss/cr16/stat.c b/libgloss/cr16/stat.c index 743fc94..3900a1b 100644 --- a/libgloss/cr16/stat.c +++ b/libgloss/cr16/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (_stat, (path, buf), - const char *path, +_stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/crx/fstat.c b/libgloss/crx/fstat.c index 75f8635..e96cc07 100644 --- a/libgloss/crx/fstat.c +++ b/libgloss/crx/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (fstat, (fd, buf), - int fd, +fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/crx/getpid.c b/libgloss/crx/getpid.c index 3c1a7b8..912ca18 100644 --- a/libgloss/crx/getpid.c +++ b/libgloss/crx/getpid.c @@ -19,8 +19,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (getpid, (), - ) +getpid (void) { return __MYPID; } diff --git a/libgloss/crx/isatty.c b/libgloss/crx/isatty.c index ac3d041..c0039a5 100644 --- a/libgloss/crx/isatty.c +++ b/libgloss/crx/isatty.c @@ -20,8 +20,7 @@ * serial port, we'll say yes and return a 1. */ int -_DEFUN (isatty, (fd), - int fd) +isatty (int fd) { return (1); } diff --git a/libgloss/crx/kill.c b/libgloss/crx/kill.c index db5018c..98cd3c4 100644 --- a/libgloss/crx/kill.c +++ b/libgloss/crx/kill.c @@ -19,8 +19,7 @@ * kill -- go out via exit... */ int -_DEFUN (kill, (pid, sig), - int pid, +kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/crx/putnum.c b/libgloss/crx/putnum.c index 3317bbf..af72322 100644 --- a/libgloss/crx/putnum.c +++ b/libgloss/crx/putnum.c @@ -18,8 +18,7 @@ * putnum -- print a 32 bit number in hex */ void -_DEFUN (putnum, (num), - unsigned int num) +putnum (unsigned int num) { char buf[9]; int cnt; diff --git a/libgloss/crx/stat.c b/libgloss/crx/stat.c index 9562b90..497ef83 100644 --- a/libgloss/crx/stat.c +++ b/libgloss/crx/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (stat, (path, buf), - const char *path, +stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/epiphany/_isatty.c b/libgloss/epiphany/_isatty.c index 9ec5060..cfb1bf6 100644 --- a/libgloss/epiphany/_isatty.c +++ b/libgloss/epiphany/_isatty.c @@ -20,7 +20,7 @@ #include <errno.h> int -_DEFUN(_isatty, (fd), int fd) +_isatty (int fd) { struct stat buf; diff --git a/libgloss/frv/fstat.c b/libgloss/frv/fstat.c index 680c4a1..99f0abf 100644 --- a/libgloss/frv/fstat.c +++ b/libgloss/frv/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (_fstat, (fd, buf), - int fd, +_fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/frv/getpid.c b/libgloss/frv/getpid.c index e6d5682..1809a2d 100644 --- a/libgloss/frv/getpid.c +++ b/libgloss/frv/getpid.c @@ -18,8 +18,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (_getpid, (), - ) +_getpid (void) { return __MYPID; } diff --git a/libgloss/frv/isatty.c b/libgloss/frv/isatty.c index e4c9906..65c02b7 100644 --- a/libgloss/frv/isatty.c +++ b/libgloss/frv/isatty.c @@ -20,8 +20,7 @@ * serial port, we'll say yes and return a 1. */ int -_DEFUN (_isatty, (fd), - int fd) +_isatty (int fd) { return (1); } diff --git a/libgloss/frv/kill.c b/libgloss/frv/kill.c index 8dda1e9..3be632e 100644 --- a/libgloss/frv/kill.c +++ b/libgloss/frv/kill.c @@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__)); * kill -- go out via exit... */ int -_DEFUN (_kill, (pid, sig), - int pid, +_kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/frv/print.c b/libgloss/frv/print.c index 8c8be84..3dc3d0f 100644 --- a/libgloss/frv/print.c +++ b/libgloss/frv/print.c @@ -18,8 +18,7 @@ * print -- do a raw print of a string */ void -_DEFUN (_print, (ptr), -char *ptr) +_print (char *ptr) { while (*ptr) { outbyte (*ptr++); diff --git a/libgloss/frv/putnum.c b/libgloss/frv/putnum.c index c7fa121..a07315e 100644 --- a/libgloss/frv/putnum.c +++ b/libgloss/frv/putnum.c @@ -18,8 +18,7 @@ * putnum -- print a 32 bit number in hex */ void -_DEFUN (_putnum, (num), - unsigned int num) +_putnum (unsigned int num) { char buf[9]; int cnt; diff --git a/libgloss/frv/sim-time.c b/libgloss/frv/sim-time.c index 196f855..7a6af4a 100644 --- a/libgloss/frv/sim-time.c +++ b/libgloss/frv/sim-time.c @@ -38,8 +38,7 @@ extern time_t _sim_time (void) __asm__("_sim_time"); * time -- return current time in seconds. */ time_t -_DEFUN (time, time (t), - time_t *t) +time (time_t *t) { time_t ret = _sim_time (); @@ -53,8 +52,7 @@ _DEFUN (time, time (t), * _times -- no clock, so return an error. */ int -_DEFUN (_times, _times (buf), - struct tms *buf) +_times (struct tms *buf) { errno = EINVAL; return (-1); @@ -65,8 +63,7 @@ _DEFUN (_times, _times (buf), * microseconds. */ int -_DEFUN (_gettimeofday, _gettimeofday (tv, tz), - struct timeval *tv, +_gettimeofday (struct timeval *tv, void *tzvp) { struct timezone *tz = tzvp; diff --git a/libgloss/frv/stat.c b/libgloss/frv/stat.c index ceaedc2..b471f54 100644 --- a/libgloss/frv/stat.c +++ b/libgloss/frv/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (_stat, (path, buf), - const char *path, +_stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/fstat.c b/libgloss/fstat.c index e7f9133..c9d14d1 100644 --- a/libgloss/fstat.c +++ b/libgloss/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (fstat, (fd, buf), - int fd, +fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/ft32/fstat.c b/libgloss/ft32/fstat.c index 0bd432e..517d134 100644 --- a/libgloss/ft32/fstat.c +++ b/libgloss/ft32/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (_fstat, (fd, buf), - int fd, +_fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/ft32/getpid.c b/libgloss/ft32/getpid.c index 75bba42..435d093 100644 --- a/libgloss/ft32/getpid.c +++ b/libgloss/ft32/getpid.c @@ -18,8 +18,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (_getpid, (), - ) +_getpid (void) { return __MYPID; } diff --git a/libgloss/ft32/isatty.c b/libgloss/ft32/isatty.c index fd2d737..def8ff0 100644 --- a/libgloss/ft32/isatty.c +++ b/libgloss/ft32/isatty.c @@ -20,8 +20,7 @@ * serial port, we'll say yes and return a 1. */ int -_DEFUN (_isatty, (fd), - int fd) +_isatty (int fd) { return (1); } diff --git a/libgloss/ft32/kill.c b/libgloss/ft32/kill.c index 4b2241f..06ec59c 100644 --- a/libgloss/ft32/kill.c +++ b/libgloss/ft32/kill.c @@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__)); * kill -- go out via exit... */ int -_DEFUN (_kill, (pid, sig), - int pid, +_kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/ft32/sim-lseek.S b/libgloss/ft32/sim-lseek.S index c2a134c..488edf3 100644 --- a/libgloss/ft32/sim-lseek.S +++ b/libgloss/ft32/sim-lseek.S @@ -22,8 +22,7 @@ * an error. */ off_t -_DEFUN (_lseek, (fd, offset, whence), - int fd, +_lseek (int fd, off_t offset, int whence) { diff --git a/libgloss/ft32/sim-lseek.c b/libgloss/ft32/sim-lseek.c index e5c08c8..d35e082 100644 --- a/libgloss/ft32/sim-lseek.c +++ b/libgloss/ft32/sim-lseek.c @@ -22,8 +22,7 @@ * an error. */ off_t -_DEFUN (_lseek, (fd, offset, whence), - int fd, +_lseek (int fd, off_t offset, int whence) { diff --git a/libgloss/ft32/sim-time.c b/libgloss/ft32/sim-time.c index 8f417eb..9d2993b 100644 --- a/libgloss/ft32/sim-time.c +++ b/libgloss/ft32/sim-time.c @@ -21,8 +21,7 @@ * _times -- no clock, so return an error. */ int -_DEFUN (_times, _times (buf), - struct tms *buf) +_times (struct tms *buf) { errno = EINVAL; return (-1); @@ -33,8 +32,7 @@ _DEFUN (_times, _times (buf), * microseconds. */ int -_DEFUN (_gettimeofday, _gettimeofday (tv, tz), - struct timeval *tv, +_gettimeofday (struct timeval *tv, void *tzvp) { struct timezone *tz = tzvp; diff --git a/libgloss/ft32/stat.c b/libgloss/ft32/stat.c index 4d738ef..df7ef39 100644 --- a/libgloss/ft32/stat.c +++ b/libgloss/ft32/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (_stat, (path, buf), - const char *path, +_stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/getpid.c b/libgloss/getpid.c index 07f7f92..9814fd5 100644 --- a/libgloss/getpid.c +++ b/libgloss/getpid.c @@ -18,8 +18,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (getpid, (), - ) +getpid (void) { return __MYPID; } diff --git a/libgloss/isatty.c b/libgloss/isatty.c index 675d99b..2b54861 100644 --- a/libgloss/isatty.c +++ b/libgloss/isatty.c @@ -20,8 +20,7 @@ * serial port, we'll say yes, return a 1. */ int -_DEFUN (isatty, (fd), - int fd) +isatty (int fd) { return (1); } diff --git a/libgloss/kill.c b/libgloss/kill.c index ada45f6..a0eaee7 100644 --- a/libgloss/kill.c +++ b/libgloss/kill.c @@ -18,8 +18,7 @@ * kill -- go out via exit... */ int -_DEFUN (kill, (pid, sig), - int pid, +kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/libnosys/_exit.c b/libgloss/libnosys/_exit.c index 44d845b..731dea7 100644 --- a/libgloss/libnosys/_exit.c +++ b/libgloss/libnosys/_exit.c @@ -6,8 +6,7 @@ #include <_syslist.h> void -_DEFUN (_exit, (rc), - int rc) +_exit (int rc) { /* Default stub just causes a divide by 0 exception. */ int x = rc / INT_MAX; diff --git a/libgloss/libnosys/chown.c b/libgloss/libnosys/chown.c index 0ddb85d..faea82b 100644 --- a/libgloss/libnosys/chown.c +++ b/libgloss/libnosys/chown.c @@ -12,8 +12,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_chown, (path, owner, group), - const char *path, +_chown (const char *path, uid_t owner, gid_t group) { diff --git a/libgloss/libnosys/close.c b/libgloss/libnosys/close.c index b759b86..8dc3e8b 100644 --- a/libgloss/libnosys/close.c +++ b/libgloss/libnosys/close.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_close, (fildes), - int fildes) +_close (int fildes) { errno = ENOSYS; return -1; diff --git a/libgloss/libnosys/execve.c b/libgloss/libnosys/execve.c index a93641a..950a43c 100644 --- a/libgloss/libnosys/execve.c +++ b/libgloss/libnosys/execve.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_execve, (name, argv, env), - char *name, +_execve (char *name, char **argv, char **env) { diff --git a/libgloss/libnosys/fork.c b/libgloss/libnosys/fork.c index 5fbf68b..c4724a3 100644 --- a/libgloss/libnosys/fork.c +++ b/libgloss/libnosys/fork.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_fork, (), - void) +_fork (void) { errno = ENOSYS; return -1; diff --git a/libgloss/libnosys/fstat.c b/libgloss/libnosys/fstat.c index d04b407..c85b9f2 100644 --- a/libgloss/libnosys/fstat.c +++ b/libgloss/libnosys/fstat.c @@ -13,8 +13,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_fstat, (fildes, st), - int fildes, +_fstat (int fildes, struct stat *st) { errno = ENOSYS; diff --git a/libgloss/libnosys/getpid.c b/libgloss/libnosys/getpid.c index 9ed416c..f8d451e 100644 --- a/libgloss/libnosys/getpid.c +++ b/libgloss/libnosys/getpid.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_getpid, (), - void) +_getpid (void) { errno = ENOSYS; return -1; diff --git a/libgloss/libnosys/gettod.c b/libgloss/libnosys/gettod.c index 5e0b2db..2b5354e 100644 --- a/libgloss/libnosys/gettod.c +++ b/libgloss/libnosys/gettod.c @@ -15,8 +15,7 @@ extern int errno; struct timeval; int -_DEFUN (_gettimeofday, (ptimeval, ptimezone), - struct timeval *ptimeval, +_gettimeofday (struct timeval *ptimeval, void *ptimezone) { errno = ENOSYS; diff --git a/libgloss/libnosys/isatty.c b/libgloss/libnosys/isatty.c index d93e177..a175bf9 100644 --- a/libgloss/libnosys/isatty.c +++ b/libgloss/libnosys/isatty.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_isatty, (file), - int file) +_isatty (int file) { errno = ENOSYS; return 0; diff --git a/libgloss/libnosys/kill.c b/libgloss/libnosys/kill.c index c583287..27c4f8c 100644 --- a/libgloss/libnosys/kill.c +++ b/libgloss/libnosys/kill.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_kill, (pid, sig), - int pid, +_kill (int pid, int sig) { errno = ENOSYS; diff --git a/libgloss/libnosys/link.c b/libgloss/libnosys/link.c index b27b5bc..0bae1ef 100644 --- a/libgloss/libnosys/link.c +++ b/libgloss/libnosys/link.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_link, (existing, new), - char *existing, +_link (char *existing, char *new) { errno = ENOSYS; diff --git a/libgloss/libnosys/lseek.c b/libgloss/libnosys/lseek.c index f583a14..fcc7be4 100644 --- a/libgloss/libnosys/lseek.c +++ b/libgloss/libnosys/lseek.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_lseek, (file, ptr, dir), - int file, +_lseek (int file, int ptr, int dir) { diff --git a/libgloss/libnosys/open.c b/libgloss/libnosys/open.c index ee8bece..0c864a5 100644 --- a/libgloss/libnosys/open.c +++ b/libgloss/libnosys/open.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_open, (file, flags, mode), - char *file, +_open (char *file, int flags, int mode) { diff --git a/libgloss/libnosys/read.c b/libgloss/libnosys/read.c index 0ff3a9a..cfc2812 100644 --- a/libgloss/libnosys/read.c +++ b/libgloss/libnosys/read.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_read, (file, ptr, len), - int file, +_read (int file, char *ptr, int len) { diff --git a/libgloss/libnosys/readlink.c b/libgloss/libnosys/readlink.c index 00f3f89..014c956 100644 --- a/libgloss/libnosys/readlink.c +++ b/libgloss/libnosys/readlink.c @@ -12,8 +12,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_readlink, (path, buf, bufsize), - const char *path, +_readlink (const char *path, char *buf, size_t bufsize) { diff --git a/libgloss/libnosys/stat.c b/libgloss/libnosys/stat.c index 9fa7003..734f672 100644 --- a/libgloss/libnosys/stat.c +++ b/libgloss/libnosys/stat.c @@ -13,8 +13,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_stat, (file, st), - const char *file, +_stat (const char *file, struct stat *st) { errno = ENOSYS; diff --git a/libgloss/libnosys/symlink.c b/libgloss/libnosys/symlink.c index cf7a158..bebfbba 100644 --- a/libgloss/libnosys/symlink.c +++ b/libgloss/libnosys/symlink.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_symlink, (path1, path2), - const char *path1, +_symlink (const char *path1, const char *path2) { errno = ENOSYS; diff --git a/libgloss/libnosys/times.c b/libgloss/libnosys/times.c index f205e50..908cd8d 100644 --- a/libgloss/libnosys/times.c +++ b/libgloss/libnosys/times.c @@ -12,8 +12,7 @@ extern int errno; #include "warning.h" clock_t -_DEFUN (_times, (buf), - struct tms *buf) +_times (struct tms *buf) { errno = ENOSYS; return -1; diff --git a/libgloss/libnosys/unlink.c b/libgloss/libnosys/unlink.c index c543709..3414bf8 100644 --- a/libgloss/libnosys/unlink.c +++ b/libgloss/libnosys/unlink.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_unlink, (name), - char *name) +_unlink (char *name) { errno = ENOSYS; return -1; diff --git a/libgloss/libnosys/wait.c b/libgloss/libnosys/wait.c index 2a785be..029dcbc 100644 --- a/libgloss/libnosys/wait.c +++ b/libgloss/libnosys/wait.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_wait, (status), - int *status) +_wait (int *status) { errno = ENOSYS; return -1; diff --git a/libgloss/libnosys/write.c b/libgloss/libnosys/write.c index 0ada770..33d727b 100644 --- a/libgloss/libnosys/write.c +++ b/libgloss/libnosys/write.c @@ -11,8 +11,7 @@ extern int errno; #include "warning.h" int -_DEFUN (_write, (file, ptr, len), - int file, +_write (int file, char *ptr, int len) { diff --git a/libgloss/lm32/isatty.c b/libgloss/lm32/isatty.c index 69833fa..d90b4df 100644 --- a/libgloss/lm32/isatty.c +++ b/libgloss/lm32/isatty.c @@ -33,8 +33,7 @@ * other files are not. */ int -_DEFUN (_isatty, (fd), - int fd) +_isatty (int fd) { if ((fd == 0) || (fd == 1) || (fd == 2)) return 1; diff --git a/libgloss/lseek.c b/libgloss/lseek.c index 42a28d9..2fde60d 100644 --- a/libgloss/lseek.c +++ b/libgloss/lseek.c @@ -20,8 +20,7 @@ * lseek -- Since a serial port is non-seekable, we return an error. */ off_t -_DEFUN (lseek, (fd, offset, whence), - int fd, +lseek (int fd, off_t offset, int whence) { diff --git a/libgloss/m68k/idp-outbyte.c b/libgloss/m68k/idp-outbyte.c index a95dc0c..761d679 100644 --- a/libgloss/m68k/idp-outbyte.c +++ b/libgloss/m68k/idp-outbyte.c @@ -32,8 +32,7 @@ * to channel A. */ static void -_DEFUN (raw_outbyte, (byte), - char byte) +raw_outbyte (char byte) { /* First, wait for the UART to finish clocking out the last character we sent, if any. Then, give it the next character to @@ -64,8 +63,7 @@ _DEFUN (raw_outbyte, (byte), * latter we put in libidp.a, which is selected by idp.ld. */ void -_DEFUN (outbyte, (byte), - char byte) +outbyte (char byte) { #ifdef GDB_MONITOR_OUTPUT raw_outbyte (0x0f); diff --git a/libgloss/m68k/mc68ec.c b/libgloss/m68k/mc68ec.c index d5ee9b5..76e737f 100644 --- a/libgloss/m68k/mc68ec.c +++ b/libgloss/m68k/mc68ec.c @@ -25,8 +25,7 @@ * prompt. It can be restarted from there. */ void -_DEFUN (_exit, (status), - int_status) +_exit (int_status) { /* Use `i' constraint to get proper immediate-operand syntax for target assembler configuration. */ @@ -38,8 +37,7 @@ _DEFUN (_exit, (status), * use the timer, but I'm waiting for docs. (sigh) */ void -_DEFUN (delay, (num), - int num) +delay (int num) { while (num--) { diff --git a/libgloss/mcore/close.c b/libgloss/mcore/close.c index b94cb60..0a9f811 100644 --- a/libgloss/mcore/close.c +++ b/libgloss/mcore/close.c @@ -18,8 +18,7 @@ * close -- We don't need to do anything, but pretend we did. */ int -_DEFUN (_close ,(fd), - int fd) +_close (int fd) { return (0); } diff --git a/libgloss/mcore/cmb-exit.c b/libgloss/mcore/cmb-exit.c index 0e1de85..84703eb 100644 --- a/libgloss/mcore/cmb-exit.c +++ b/libgloss/mcore/cmb-exit.c @@ -18,8 +18,7 @@ * _exit -- Just cause a breakpoint so user can see why we exited. */ void -_DEFUN (_exit, (val), - int val) +_exit (int val) { while (1) { asm("bkpt"); diff --git a/libgloss/mcore/cmb-inbyte.c b/libgloss/mcore/cmb-inbyte.c index 839ffe6..9bfbbde 100644 --- a/libgloss/mcore/cmb-inbyte.c +++ b/libgloss/mcore/cmb-inbyte.c @@ -15,8 +15,7 @@ #include <_ansi.h> int -_DEFUN (inbyte, (), - void) +inbyte (void) { return -1; diff --git a/libgloss/mcore/cmb-outbyte.c b/libgloss/mcore/cmb-outbyte.c index ea2aaef..ea31cc5 100644 --- a/libgloss/mcore/cmb-outbyte.c +++ b/libgloss/mcore/cmb-outbyte.c @@ -33,8 +33,7 @@ * outbyte -- send a byte to the UART. */ void -_DEFUN (outbyte, (ch), - char ch) +outbyte (char ch) { while (!(*SRREG & TRDY)) ; diff --git a/libgloss/mcore/fstat.c b/libgloss/mcore/fstat.c index 6a2323a..671f56a 100644 --- a/libgloss/mcore/fstat.c +++ b/libgloss/mcore/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (_fstat, (fd, buf), - int fd, +_fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/mcore/getpid.c b/libgloss/mcore/getpid.c index eee2ac0..cc9e857 100644 --- a/libgloss/mcore/getpid.c +++ b/libgloss/mcore/getpid.c @@ -18,8 +18,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (_getpid, (), - ) +_getpid (void) { return __MYPID; } diff --git a/libgloss/mcore/kill.c b/libgloss/mcore/kill.c index 8883c8e..833fe89 100644 --- a/libgloss/mcore/kill.c +++ b/libgloss/mcore/kill.c @@ -18,8 +18,7 @@ * kill -- go out via exit... */ int -_DEFUN (_kill, (pid, sig), - int pid, +_kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/mcore/lseek.c b/libgloss/mcore/lseek.c index 423e11e..dc419c7 100644 --- a/libgloss/mcore/lseek.c +++ b/libgloss/mcore/lseek.c @@ -20,8 +20,7 @@ * lseek -- Since a serial port is non-seekable, we return an error. */ off_t -_DEFUN (_lseek, (fd, offset, whence), - int fd, +_lseek (int fd, off_t offset, int whence) { diff --git a/libgloss/mcore/open.c b/libgloss/mcore/open.c index 6b816e8..fdc1b30 100644 --- a/libgloss/mcore/open.c +++ b/libgloss/mcore/open.c @@ -20,8 +20,7 @@ * we return an error. */ int -_DEFUN (_open, (buf, flags, mode), - const char *buf, +_open (const char *buf, int flags, int mode) { diff --git a/libgloss/mcore/print.c b/libgloss/mcore/print.c index d0d2bce..f5d0dba 100644 --- a/libgloss/mcore/print.c +++ b/libgloss/mcore/print.c @@ -18,8 +18,7 @@ * print -- do a raw print of a string */ void -_DEFUN (_print, (ptr), -char *ptr) +_print (char *ptr) { while (*ptr) { outbyte (*ptr++); diff --git a/libgloss/mcore/putnum.c b/libgloss/mcore/putnum.c index 2e37c09..10e298b 100644 --- a/libgloss/mcore/putnum.c +++ b/libgloss/mcore/putnum.c @@ -18,8 +18,7 @@ * putnum -- print a 32 bit number in hex */ void -_DEFUN (_putnum, (num), - unsigned int num) +_putnum (unsigned int num) { char buf[9]; int cnt; diff --git a/libgloss/mcore/raise.c b/libgloss/mcore/raise.c index 6657aa6..e392077 100644 --- a/libgloss/mcore/raise.c +++ b/libgloss/mcore/raise.c @@ -15,8 +15,7 @@ #include "glue.h" int -_DEFUN (_raise, (sig), - int sig) +_raise (int sig) { return _kill (_getpid (), sig); } diff --git a/libgloss/mcore/read.c b/libgloss/mcore/read.c index d97d98d..d7c5670 100644 --- a/libgloss/mcore/read.c +++ b/libgloss/mcore/read.c @@ -21,8 +21,7 @@ extern char inbyte (void); * we only have stdin. */ int -_DEFUN (_read, (fd, buf, nbytes), - int fd, +_read (int fd, char *buf, int nbytes) { diff --git a/libgloss/mcore/stat.c b/libgloss/mcore/stat.c index d07042a..1e16e0e 100644 --- a/libgloss/mcore/stat.c +++ b/libgloss/mcore/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (_stat, (path, buf), - const char *path, +_stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/mcore/unlink.c b/libgloss/mcore/unlink.c index 16dda14..9cbcfc5 100644 --- a/libgloss/mcore/unlink.c +++ b/libgloss/mcore/unlink.c @@ -20,8 +20,7 @@ * we just return an error. */ int -_DEFUN (_unlink, (path), - char * path) +_unlink (char * path) { errno = EIO; return (-1); diff --git a/libgloss/mcore/write.c b/libgloss/mcore/write.c index 189ea62..87dca10 100644 --- a/libgloss/mcore/write.c +++ b/libgloss/mcore/write.c @@ -22,8 +22,7 @@ extern int _EXFUN (outbyte, (char x)); * open will only return an error. */ int -_DEFUN (_write, (fd, buf, nbytes), - int fd, +_write (int fd, char *buf, int nbytes) { diff --git a/libgloss/moxie/fstat.c b/libgloss/moxie/fstat.c index 38dd07b..78dd932 100644 --- a/libgloss/moxie/fstat.c +++ b/libgloss/moxie/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (_fstat, (fd, buf), - int fd, +_fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/moxie/getpid.c b/libgloss/moxie/getpid.c index 957eee7..93704ce 100644 --- a/libgloss/moxie/getpid.c +++ b/libgloss/moxie/getpid.c @@ -18,8 +18,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (_getpid, (), - ) +_getpid (void) { return __MYPID; } diff --git a/libgloss/moxie/isatty.c b/libgloss/moxie/isatty.c index 73ade07..f986aa7 100644 --- a/libgloss/moxie/isatty.c +++ b/libgloss/moxie/isatty.c @@ -20,8 +20,7 @@ * serial port, we'll say yes and return a 1. */ int -_DEFUN (_isatty, (fd), - int fd) +_isatty (int fd) { return (1); } diff --git a/libgloss/moxie/kill.c b/libgloss/moxie/kill.c index d602829..623f158 100644 --- a/libgloss/moxie/kill.c +++ b/libgloss/moxie/kill.c @@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__)); * kill -- go out via exit... */ int -_DEFUN (_kill, (pid, sig), - int pid, +_kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/moxie/print.c b/libgloss/moxie/print.c index a20743a..1857258 100644 --- a/libgloss/moxie/print.c +++ b/libgloss/moxie/print.c @@ -18,8 +18,7 @@ * print -- do a raw print of a string */ void -_DEFUN (_print, (ptr), -char *ptr) +_print (char *ptr) { while (*ptr) { outbyte (*ptr++); diff --git a/libgloss/moxie/putnum.c b/libgloss/moxie/putnum.c index f5bac1f..0f7e894 100644 --- a/libgloss/moxie/putnum.c +++ b/libgloss/moxie/putnum.c @@ -18,8 +18,7 @@ * putnum -- print a 32 bit number in hex */ void -_DEFUN (_putnum, (num), - unsigned int num) +_putnum (unsigned int num) { char buf[9]; int cnt; diff --git a/libgloss/moxie/qemu-time.c b/libgloss/moxie/qemu-time.c index 1abd5a9..0049c24 100644 --- a/libgloss/moxie/qemu-time.c +++ b/libgloss/moxie/qemu-time.c @@ -40,8 +40,7 @@ * _times -- FIXME */ int -_DEFUN (_times, _times (buf), - struct tms *buf) +_times (struct tms *buf) { errno = EINVAL; return (-1); @@ -70,8 +69,7 @@ rtc_write (unsigned char reg, unsigned char val) * time -- return current time in seconds. */ time_t -_DEFUN (time, time (t), - time_t *t) +time (time_t *t) { struct tm tm; time_t ret; @@ -100,8 +98,7 @@ _DEFUN (time, time (t), * return the microseconds. */ int -_DEFUN (_gettimeofday, _gettimeofday (tv, tz), - struct timeval *tv, +_gettimeofday (struct timeval *tv, void *tzvp) { struct timezone *tz = tzvp; diff --git a/libgloss/moxie/sim-lseek.S b/libgloss/moxie/sim-lseek.S index 5e5493c..86fb675 100644 --- a/libgloss/moxie/sim-lseek.S +++ b/libgloss/moxie/sim-lseek.S @@ -22,8 +22,7 @@ * an error. */ off_t -_DEFUN (_lseek, (fd, offset, whence), - int fd, +_lseek (int fd, off_t offset, int whence) { diff --git a/libgloss/moxie/sim-lseek.c b/libgloss/moxie/sim-lseek.c index d22d722..dacd769 100644 --- a/libgloss/moxie/sim-lseek.c +++ b/libgloss/moxie/sim-lseek.c @@ -22,8 +22,7 @@ * an error. */ off_t -_DEFUN (_lseek, (fd, offset, whence), - int fd, +_lseek (int fd, off_t offset, int whence) { diff --git a/libgloss/moxie/sim-time.c b/libgloss/moxie/sim-time.c index d3f43d3..53793bf 100644 --- a/libgloss/moxie/sim-time.c +++ b/libgloss/moxie/sim-time.c @@ -37,8 +37,7 @@ extern time_t _sim_time (void) __asm__("_sim_time"); * time -- return current time in seconds. */ time_t -_DEFUN (time, time (t), - time_t *t) +time (time_t *t) { time_t ret = _sim_time (); @@ -52,8 +51,7 @@ _DEFUN (time, time (t), * _times -- no clock, so return an error. */ int -_DEFUN (_times, _times (buf), - struct tms *buf) +_times (struct tms *buf) { errno = EINVAL; return (-1); @@ -64,8 +62,7 @@ _DEFUN (_times, _times (buf), * microseconds. */ int -_DEFUN (_gettimeofday, _gettimeofday (tv, tz), - struct timeval *tv, +_gettimeofday (struct timeval *tv, void *tzvp) { struct timezone *tz = tzvp; diff --git a/libgloss/moxie/stat.c b/libgloss/moxie/stat.c index 01a9582..c80e8d3 100644 --- a/libgloss/moxie/stat.c +++ b/libgloss/moxie/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (_stat, (path, buf), - const char *path, +_stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/open.c b/libgloss/open.c index 90787b1..a0eb171 100644 --- a/libgloss/open.c +++ b/libgloss/open.c @@ -20,8 +20,7 @@ * we return an error. */ int -_DEFUN (open, (buf, flags, mode), - const char *buf, +open (const char *buf, int flags, int mode) { diff --git a/libgloss/print.c b/libgloss/print.c index 8f78ff2..76d543b 100644 --- a/libgloss/print.c +++ b/libgloss/print.c @@ -18,8 +18,7 @@ * print -- do a raw print of a string */ void -_DEFUN (print, (ptr), -char *ptr) +print (char *ptr) { while (*ptr) { outbyte (*ptr++); diff --git a/libgloss/putnum.c b/libgloss/putnum.c index 842e10f..c368c41 100644 --- a/libgloss/putnum.c +++ b/libgloss/putnum.c @@ -18,8 +18,7 @@ * putnum -- print a 32 bit number in hex */ void -_DEFUN (putnum, (num), - unsigned int num) +putnum (unsigned int num) { char buf[9]; int cnt; diff --git a/libgloss/read.c b/libgloss/read.c index 507c980..24108ce 100644 --- a/libgloss/read.c +++ b/libgloss/read.c @@ -21,8 +21,7 @@ extern char inbyte (void); * we only have stdin. */ int -_DEFUN (read, (fd, buf, nbytes), - int fd, +read (int fd, char *buf, int nbytes) { diff --git a/libgloss/spu/getpid.c b/libgloss/spu/getpid.c index ff2d820..8936172 100644 --- a/libgloss/spu/getpid.c +++ b/libgloss/spu/getpid.c @@ -31,7 +31,7 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com) */ int -getpid () +getpid (void) { return (1); } diff --git a/libgloss/stat.c b/libgloss/stat.c index 5957645..4d63128 100644 --- a/libgloss/stat.c +++ b/libgloss/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (stat, (path, buf), - const char *path, +stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/tic6x/getpid.c b/libgloss/tic6x/getpid.c index 3c1a7b8..912ca18 100644 --- a/libgloss/tic6x/getpid.c +++ b/libgloss/tic6x/getpid.c @@ -19,8 +19,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (getpid, (), - ) +getpid (void) { return __MYPID; } diff --git a/libgloss/tic6x/kill.c b/libgloss/tic6x/kill.c index db5018c..98cd3c4 100644 --- a/libgloss/tic6x/kill.c +++ b/libgloss/tic6x/kill.c @@ -19,8 +19,7 @@ * kill -- go out via exit... */ int -_DEFUN (kill, (pid, sig), - int pid, +kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/unlink.c b/libgloss/unlink.c index 15ea7e8..76c1a4f 100644 --- a/libgloss/unlink.c +++ b/libgloss/unlink.c @@ -20,8 +20,7 @@ * we just return an error. */ int -_DEFUN (unlink, (path), - char * path) +unlink (char * path) { errno = EIO; return (-1); diff --git a/libgloss/write.c b/libgloss/write.c index 69f452c..4b25cfc 100644 --- a/libgloss/write.c +++ b/libgloss/write.c @@ -22,8 +22,7 @@ extern int _EXFUN (outbyte, (char x)); * open will only return an error. */ int -_DEFUN (write, (fd, buf, nbytes), - int fd, +write (int fd, char *buf, int nbytes) { diff --git a/libgloss/xc16x/misc.c b/libgloss/xc16x/misc.c index 2eb951a..d965501 100644 --- a/libgloss/xc16x/misc.c +++ b/libgloss/xc16x/misc.c @@ -17,21 +17,19 @@ /* _raise(), getpid(), and kill() are required by abort().
getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES. */
-int _DEFUN(_raise,(sig),
- int sig)
+int _raise (int sig)
{
errno = ENOSYS;
return -1;
}
-int _DEFUN(_getpid,(),)
+int _getpid (void)
{
errno = ENOSYS;
return -1;
}
-int _DEFUN(_kill,(pid, sig),
- int pid,
+int _kill (int pid,
int sig)
{
errno = ENOSYS;
diff --git a/libgloss/xstormy16/close.c b/libgloss/xstormy16/close.c index 5fcfbf5..2b50e64 100644 --- a/libgloss/xstormy16/close.c +++ b/libgloss/xstormy16/close.c @@ -18,8 +18,7 @@ * close -- We don't need to do anything, but pretend we did. */ int -_DEFUN (_close ,(fd), - int fd) +_close (int fd) { return (0); } diff --git a/libgloss/xstormy16/fstat.c b/libgloss/xstormy16/fstat.c index 2926cca..b962036 100644 --- a/libgloss/xstormy16/fstat.c +++ b/libgloss/xstormy16/fstat.c @@ -19,8 +19,7 @@ * fstat -- Since we have no file system, we just return an error. */ int -_DEFUN (_fstat, (fd, buf), - int fd, +_fstat (int fd, struct stat *buf) { buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ diff --git a/libgloss/xstormy16/getpid.c b/libgloss/xstormy16/getpid.c index 0f081a1..e49fde4 100644 --- a/libgloss/xstormy16/getpid.c +++ b/libgloss/xstormy16/getpid.c @@ -18,8 +18,7 @@ * getpid -- only one process, so just return 1. */ int -_DEFUN (_getpid, (), - ) +_getpid (void) { return __MYPID; } diff --git a/libgloss/xstormy16/isatty.c b/libgloss/xstormy16/isatty.c index 0e92a9f..f7d8fa0 100644 --- a/libgloss/xstormy16/isatty.c +++ b/libgloss/xstormy16/isatty.c @@ -20,8 +20,7 @@ * serial port, we'll say yes and return a 1. */ int -_DEFUN (_isatty, (fd), - int fd) +_isatty (int fd) { return (1); } diff --git a/libgloss/xstormy16/kill.c b/libgloss/xstormy16/kill.c index 2374dc2..f5ccd21 100644 --- a/libgloss/xstormy16/kill.c +++ b/libgloss/xstormy16/kill.c @@ -18,8 +18,7 @@ * kill -- go out via exit... */ int -_DEFUN (_kill, (pid, sig), - int pid, +_kill (int pid, int sig) { if(pid == __MYPID) diff --git a/libgloss/xstormy16/lseek.c b/libgloss/xstormy16/lseek.c index 11dbab0..c006657 100644 --- a/libgloss/xstormy16/lseek.c +++ b/libgloss/xstormy16/lseek.c @@ -20,8 +20,7 @@ * lseek -- Since a serial port is non-seekable, we return an error. */ off_t -_DEFUN (_lseek, (fd, offset, whence), - int fd, +_lseek (int fd, off_t offset, int whence) { diff --git a/libgloss/xstormy16/open.c b/libgloss/xstormy16/open.c index 600f929..f96484c 100644 --- a/libgloss/xstormy16/open.c +++ b/libgloss/xstormy16/open.c @@ -20,8 +20,7 @@ * we return an error. */ int -_DEFUN (_open, (buf, flags, mode), - const char *buf, +_open (const char *buf, int flags, int mode) { diff --git a/libgloss/xstormy16/stat.c b/libgloss/xstormy16/stat.c index b80b83c..7d089ed 100644 --- a/libgloss/xstormy16/stat.c +++ b/libgloss/xstormy16/stat.c @@ -20,8 +20,7 @@ * stat -- Since we have no file system, we just return an error. */ int -_DEFUN (_stat, (path, buf), - const char *path, +_stat (const char *path, struct stat *buf) { errno = EIO; diff --git a/libgloss/xstormy16/unlink.c b/libgloss/xstormy16/unlink.c index 1c56663..10180ac 100644 --- a/libgloss/xstormy16/unlink.c +++ b/libgloss/xstormy16/unlink.c @@ -20,8 +20,7 @@ * we just return an error. */ int -_DEFUN (_unlink, (path), - char * path) +_unlink (char * path) { errno = EIO; return (-1); |