Skip to content

Commit

Permalink
ansification: remove _DEFUN
Browse files Browse the repository at this point in the history
Signed-off-by: Yaakov Selkowitz <[email protected]>
  • Loading branch information
yselkowitz committed Jan 17, 2018
1 parent 44276af commit 9087163
Show file tree
Hide file tree
Showing 729 changed files with 1,338 additions and 2,605 deletions.
3 changes: 1 addition & 2 deletions libgloss/bfin/_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
#include <_ansi.h>

void
_DEFUN (_exit, (rc),
int rc)
_exit (int rc)
{
while (1)
asm volatile ("EXCPT 0;");
Expand Down
3 changes: 1 addition & 2 deletions libgloss/close.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 1 addition & 2 deletions libgloss/cr16/fstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions libgloss/cr16/getpid.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1.
*/
int
_DEFUN (_getpid, (),
)
_getpid (void)
{
return __MYPID;
}
3 changes: 1 addition & 2 deletions libgloss/cr16/isatty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 1 addition & 2 deletions libgloss/cr16/kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions libgloss/cr16/putnum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/cr16/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/crx/fstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions libgloss/crx/getpid.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1.
*/
int
_DEFUN (getpid, (),
)
getpid (void)
{
return __MYPID;
}
3 changes: 1 addition & 2 deletions libgloss/crx/isatty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 1 addition & 2 deletions libgloss/crx/kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* kill -- go out via exit...
*/
int
_DEFUN (kill, (pid, sig),
int pid,
kill (int pid,
int sig)
{
if(pid == __MYPID)
Expand Down
3 changes: 1 addition & 2 deletions libgloss/crx/putnum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/crx/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libgloss/epiphany/_isatty.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <errno.h>

int
_DEFUN(_isatty, (fd), int fd)
_isatty (int fd)
{
struct stat buf;

Expand Down
3 changes: 1 addition & 2 deletions libgloss/frv/fstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions libgloss/frv/getpid.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
_DEFUN (_getpid, (),
)
_getpid (void)
{
return __MYPID;
}
3 changes: 1 addition & 2 deletions libgloss/frv/isatty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 1 addition & 2 deletions libgloss/frv/kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions libgloss/frv/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++);
Expand Down
3 changes: 1 addition & 2 deletions libgloss/frv/putnum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 3 additions & 6 deletions libgloss/frv/sim-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();

Expand All @@ -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);
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/frv/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/fstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions libgloss/ft32/fstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions libgloss/ft32/getpid.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
_DEFUN (_getpid, (),
)
_getpid (void)
{
return __MYPID;
}
3 changes: 1 addition & 2 deletions libgloss/ft32/isatty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 1 addition & 2 deletions libgloss/ft32/kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions libgloss/ft32/sim-lseek.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
* an error.
*/
off_t
_DEFUN (_lseek, (fd, offset, whence),
int fd,
_lseek (int fd,
off_t offset,
int whence)
{
Expand Down
3 changes: 1 addition & 2 deletions libgloss/ft32/sim-lseek.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
* an error.
*/
off_t
_DEFUN (_lseek, (fd, offset, whence),
int fd,
_lseek (int fd,
off_t offset,
int whence)
{
Expand Down
6 changes: 2 additions & 4 deletions libgloss/ft32/sim-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/ft32/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/getpid.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1.
*/
int
_DEFUN (getpid, (),
)
getpid (void)
{
return __MYPID;
}
3 changes: 1 addition & 2 deletions libgloss/isatty.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
* serial port, we'll say yes, return a 1.
*/
int
_DEFUN (isatty, (fd),
int fd)
isatty (int fd)
{
return (1);
}
3 changes: 1 addition & 2 deletions libgloss/kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
* kill -- go out via exit...
*/
int
_DEFUN (kill, (pid, sig),
int pid,
kill (int pid,
int sig)
{
if(pid == __MYPID)
Expand Down
3 changes: 1 addition & 2 deletions libgloss/libnosys/_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions libgloss/libnosys/chown.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
Loading

0 comments on commit 9087163

Please sign in to comment.