ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
		| @@ -17,8 +17,7 @@ | ||||
| #include <_ansi.h> | ||||
|  | ||||
| void | ||||
| _DEFUN (_exit, (rc), | ||||
| 	int rc) | ||||
| _exit (int rc) | ||||
| { | ||||
|   while (1) | ||||
|     asm volatile ("EXCPT 0;"); | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -19,8 +19,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (_getpid, (), | ||||
|         ) | ||||
| _getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -19,8 +19,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (getpid, (), | ||||
|         ) | ||||
| getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -19,8 +19,7 @@ | ||||
|  * kill -- go out via exit... | ||||
|  */ | ||||
| int | ||||
| _DEFUN (kill, (pid, sig), | ||||
|         int pid, | ||||
| kill (int pid, | ||||
|         int sig) | ||||
| { | ||||
|   if(pid == __MYPID) | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -20,7 +20,7 @@ | ||||
| #include <errno.h> | ||||
|  | ||||
| int | ||||
| _DEFUN(_isatty, (fd), int fd) | ||||
| _isatty (int fd) | ||||
| { | ||||
|   struct stat buf; | ||||
|  | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -18,8 +18,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (_getpid, (), | ||||
|         ) | ||||
| _getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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++); | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -18,8 +18,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (_getpid, (), | ||||
|         ) | ||||
| _getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -22,8 +22,7 @@ | ||||
|  * an error. | ||||
|  */ | ||||
| off_t | ||||
| _DEFUN (_lseek, (fd,  offset, whence), | ||||
|        int fd, | ||||
| _lseek (int fd, | ||||
|        off_t offset, | ||||
|        int whence) | ||||
| { | ||||
|   | ||||
| @@ -22,8 +22,7 @@ | ||||
|  * an error. | ||||
|  */ | ||||
| off_t | ||||
| _DEFUN (_lseek, (fd,  offset, whence), | ||||
|        int fd, | ||||
| _lseek (int fd, | ||||
|        off_t offset, | ||||
|        int whence) | ||||
| { | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -18,8 +18,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (getpid, (), | ||||
|         ) | ||||
| getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -20,8 +20,7 @@ | ||||
|  *           serial port, we'll say yes, return a 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (isatty, (fd), | ||||
|        int fd) | ||||
| isatty (int fd) | ||||
| { | ||||
|   return (1); | ||||
| } | ||||
|   | ||||
| @@ -18,8 +18,7 @@ | ||||
|  * kill -- go out via exit... | ||||
|  */ | ||||
| int | ||||
| _DEFUN (kill, (pid, sig), | ||||
|         int pid, | ||||
| kill (int pid, | ||||
|         int sig) | ||||
| { | ||||
|   if(pid == __MYPID) | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_close, (fildes), | ||||
|         int fildes) | ||||
| _close (int fildes) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_fork, (), | ||||
|         void) | ||||
| _fork (void) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_getpid, (), | ||||
|         void) | ||||
| _getpid (void) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_isatty, (file), | ||||
|         int file) | ||||
| _isatty (int file) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return 0; | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_kill, (pid, sig), | ||||
|         int pid, | ||||
| _kill (int pid, | ||||
|         int sig) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_link, (existing, new), | ||||
|         char *existing, | ||||
| _link (char *existing, | ||||
|         char *new) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_unlink, (name), | ||||
|         char *name) | ||||
| _unlink (char *name) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
|   | ||||
| @@ -11,8 +11,7 @@ extern int errno; | ||||
| #include "warning.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_wait, (status), | ||||
|         int  *status) | ||||
| _wait (int  *status) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -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--) | ||||
|     { | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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"); | ||||
|   | ||||
| @@ -15,8 +15,7 @@ | ||||
| #include <_ansi.h> | ||||
|  | ||||
| int | ||||
| _DEFUN (inbyte, (), | ||||
| 	void) | ||||
| inbyte (void) | ||||
|  | ||||
| { | ||||
|     return -1; | ||||
|   | ||||
| @@ -33,8 +33,7 @@ | ||||
|  * outbyte -- send a byte to the UART. | ||||
|  */ | ||||
| void | ||||
| _DEFUN (outbyte, (ch), | ||||
| 	char ch) | ||||
| outbyte (char ch) | ||||
| { | ||||
|     while (!(*SRREG & TRDY)) | ||||
| 	; | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -18,8 +18,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (_getpid, (), | ||||
|         ) | ||||
| _getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -18,8 +18,7 @@ | ||||
|  * kill -- go out via exit... | ||||
|  */ | ||||
| int | ||||
| _DEFUN (_kill, (pid, sig), | ||||
|         int pid, | ||||
| _kill (int pid, | ||||
|         int sig) | ||||
| { | ||||
|   if(pid == __MYPID) | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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++); | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -15,8 +15,7 @@ | ||||
| #include "glue.h" | ||||
|  | ||||
| int | ||||
| _DEFUN (_raise, (sig), | ||||
| 	int sig) | ||||
| _raise (int sig) | ||||
| { | ||||
|   return _kill (_getpid (), sig); | ||||
| } | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -20,8 +20,7 @@ | ||||
|  *           we just return an error. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (_unlink, (path), | ||||
|         char * path) | ||||
| _unlink (char * path) | ||||
| { | ||||
|   errno = EIO; | ||||
|   return (-1); | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -18,8 +18,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (_getpid, (), | ||||
|         ) | ||||
| _getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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++); | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -22,8 +22,7 @@ | ||||
|  * an error. | ||||
|  */ | ||||
| off_t | ||||
| _DEFUN (_lseek, (fd,  offset, whence), | ||||
|        int fd, | ||||
| _lseek (int fd, | ||||
|        off_t offset, | ||||
|        int whence) | ||||
| { | ||||
|   | ||||
| @@ -22,8 +22,7 @@ | ||||
|  * an error. | ||||
|  */ | ||||
| off_t | ||||
| _DEFUN (_lseek, (fd,  offset, whence), | ||||
|        int fd, | ||||
| _lseek (int fd, | ||||
|        off_t offset, | ||||
|        int whence) | ||||
| { | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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++); | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -31,7 +31,7 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com) | ||||
| */ | ||||
|  | ||||
| int | ||||
| getpid () | ||||
| getpid (void) | ||||
| { | ||||
| 	return (1); | ||||
| } | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -19,8 +19,7 @@ | ||||
|  * getpid -- only one process, so just return 1. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (getpid, (), | ||||
|         ) | ||||
| getpid (void) | ||||
| { | ||||
|   return __MYPID; | ||||
| } | ||||
|   | ||||
| @@ -19,8 +19,7 @@ | ||||
|  * kill -- go out via exit... | ||||
|  */ | ||||
| int | ||||
| _DEFUN (kill, (pid, sig), | ||||
|         int pid, | ||||
| kill (int pid, | ||||
|         int sig) | ||||
| { | ||||
|   if(pid == __MYPID) | ||||
|   | ||||
| @@ -20,8 +20,7 @@ | ||||
|  *           we just return an error. | ||||
|  */ | ||||
| int | ||||
| _DEFUN (unlink, (path), | ||||
|         char * path) | ||||
| unlink (char * path) | ||||
| { | ||||
|   errno = EIO; | ||||
|   return (-1); | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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); | ||||
| } | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user