diff options
Diffstat (limited to 'newlib/libc/posix')
-rw-r--r-- | newlib/libc/posix/closedir.c | 4 | ||||
-rw-r--r-- | newlib/libc/posix/creat.c | 4 | ||||
-rw-r--r-- | newlib/libc/posix/execl.c | 12 | ||||
-rw-r--r-- | newlib/libc/posix/execle.c | 12 | ||||
-rw-r--r-- | newlib/libc/posix/execlp.c | 12 | ||||
-rw-r--r-- | newlib/libc/posix/execve.c | 5 | ||||
-rw-r--r-- | newlib/libc/posix/isatty.c | 2 | ||||
-rw-r--r-- | newlib/libc/posix/opendir.c | 4 | ||||
-rw-r--r-- | newlib/libc/posix/popen.c | 10 | ||||
-rw-r--r-- | newlib/libc/posix/readdir.c | 5 | ||||
-rw-r--r-- | newlib/libc/posix/readdir_r.c | 8 | ||||
-rw-r--r-- | newlib/libc/posix/rewinddir.c | 4 | ||||
-rw-r--r-- | newlib/libc/posix/scandir.c | 16 | ||||
-rw-r--r-- | newlib/libc/posix/seekdir.c | 6 | ||||
-rw-r--r-- | newlib/libc/posix/telldir.c | 14 |
15 files changed, 65 insertions, 53 deletions
diff --git a/newlib/libc/posix/closedir.c b/newlib/libc/posix/closedir.c index 57222f947..634f5ad12 100644 --- a/newlib/libc/posix/closedir.c +++ b/newlib/libc/posix/closedir.c @@ -49,8 +49,8 @@ extern void _cleanupdir (DIR *dirp); * close a directory. */ int -closedir(dirp) - register DIR *dirp; +_DEFUN(closedir, (dirp), + register DIR *dirp) { int fd, rc; diff --git a/newlib/libc/posix/creat.c b/newlib/libc/posix/creat.c index 6b1116206..b8a4f9a14 100644 --- a/newlib/libc/posix/creat.c +++ b/newlib/libc/posix/creat.c @@ -5,7 +5,9 @@ #include <fcntl.h> int -creat (const char *path, mode_t mode) +_DEFUN(creat, (path, mode), + const char *path _AND + mode_t mode) { return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); } diff --git a/newlib/libc/posix/execl.c b/newlib/libc/posix/execl.c index 098005666..6acbe52ed 100644 --- a/newlib/libc/posix/execl.c +++ b/newlib/libc/posix/execl.c @@ -16,17 +16,19 @@ static char ***p_environ = &environ; #include <stdarg.h> int -execl (_CONST char *path, _CONST char *arg0, ...) +_DEFUN(execl, (path, arg0, ...), + _CONST char *path _AND + _CONST char *arg0 _DOTS) #else #include <varargs.h> int -execl (path, arg0, va_alist) - _CONST char *path; - _CONST char *arg0; - va_dcl +_DEFUN(execl, (path, arg0, va_alist), + _CONST char *path _AND + _CONST char *arg0 _AND + va_dcl) #endif diff --git a/newlib/libc/posix/execle.c b/newlib/libc/posix/execle.c index 439437023..efe204d86 100644 --- a/newlib/libc/posix/execle.c +++ b/newlib/libc/posix/execle.c @@ -11,17 +11,19 @@ #include <stdarg.h> int -execle (_CONST char *path, _CONST char *arg0, ...) +_DEFUN(execle, (path, arg0, ...), + _CONST char *path _AND + _CONST char *arg0 _DOTS) #else #include <varargs.h> int -execle (path, arg0, va_alist) - _CONST char *path; - _CONST char *arg0; - va_dcl +_DEFUN(execle, (path, arg0, va_alist), + _CONST char *path _AND + _CONST char *arg0 _AND + va_dcl) #endif diff --git a/newlib/libc/posix/execlp.c b/newlib/libc/posix/execlp.c index dd04914bc..5252cd988 100644 --- a/newlib/libc/posix/execlp.c +++ b/newlib/libc/posix/execlp.c @@ -11,17 +11,19 @@ #include <stdarg.h> int -execlp (_CONST char *path, _CONST char *arg0, ...) +_DEFUN(execlp, (path, arg0, ...), + _CONST char *path _AND + _CONST char *arg0 _DOTS) #else #include <varargs.h> int -execlp (path, arg0, va_alist) - _CONST char *path; - _CONST char *arg0; - va_dcl +_DEFUN(execlp, (path, arg0, va_alist), + _CONST char *path _AND + _CONST char *arg0 _AND + va_dcl) #endif diff --git a/newlib/libc/posix/execve.c b/newlib/libc/posix/execve.c index 1be0ed128..8083c03b0 100644 --- a/newlib/libc/posix/execve.c +++ b/newlib/libc/posix/execve.c @@ -8,7 +8,10 @@ int -execve (const char *path, char * const argv[], char * const envp[]) +_DEFUN(execve, (path, argv, envp), + const char *path _AND + char * const argv[] _AND + char * const envp[]) { return _execve (path, argv, envp); } diff --git a/newlib/libc/posix/isatty.c b/newlib/libc/posix/isatty.c index 3c64647a9..2732ca2a0 100644 --- a/newlib/libc/posix/isatty.c +++ b/newlib/libc/posix/isatty.c @@ -5,7 +5,7 @@ #include <sys/stat.h> int -isatty (int fd) +_DEFUN(isatty, (fd), int fd) { struct stat buf; diff --git a/newlib/libc/posix/opendir.c b/newlib/libc/posix/opendir.c index ce59cf4c8..c9a97dbf3 100644 --- a/newlib/libc/posix/opendir.c +++ b/newlib/libc/posix/opendir.c @@ -47,8 +47,8 @@ static char sccsid[] = "@(#)opendir.c 5.11 (Berkeley) 2/23/91"; * open a directory. */ DIR * -opendir(name) - const char *name; +_DEFUN(opendir, (name), + const char *name) { register DIR *dirp; register int fd; diff --git a/newlib/libc/posix/popen.c b/newlib/libc/posix/popen.c index f522c0b9d..0f25a3ed0 100644 --- a/newlib/libc/posix/popen.c +++ b/newlib/libc/posix/popen.c @@ -63,9 +63,9 @@ static struct pid { } *pidlist; FILE * -popen(program, type) - const char *program; - const char *type; +_DEFUN(popen, (program, type), + const char *program _AND + const char *type) { struct pid *cur; FILE *iop; @@ -144,8 +144,8 @@ popen(program, type) * if already `pclosed', or waitpid returns an error. */ int -pclose(iop) - FILE *iop; +_DEFUN(pclose, (iop), + FILE *iop) { register struct pid *cur, *last; int pstat; diff --git a/newlib/libc/posix/readdir.c b/newlib/libc/posix/readdir.c index 4de66e4f9..da07d5c00 100644 --- a/newlib/libc/posix/readdir.c +++ b/newlib/libc/posix/readdir.c @@ -45,8 +45,9 @@ extern int getdents (int fd, void *dp, int count); * get next entry in a directory. */ struct dirent * -readdir(dirp) -register DIR *dirp; { +_DEFUN(readdir, (dirp), + register DIR *dirp) +{ register struct dirent *dp; #ifdef HAVE_DD_LOCK diff --git a/newlib/libc/posix/readdir_r.c b/newlib/libc/posix/readdir_r.c index 805180cf5..9bc013c64 100644 --- a/newlib/libc/posix/readdir_r.c +++ b/newlib/libc/posix/readdir_r.c @@ -49,10 +49,10 @@ extern int getdents (int fd, void *dp, int count); * get next entry in a directory using supplied dirent structure. */ int -readdir_r(dirp, dp, dpp) - register DIR *dirp; - struct dirent *dp; - struct dirent **dpp; { +_DEFUN(readdir_r, (dirp, dp, dpp), + register DIR *dirp _AND + struct dirent *dp _AND + struct dirent **dpp) { struct dirent *tmpdp; diff --git a/newlib/libc/posix/rewinddir.c b/newlib/libc/posix/rewinddir.c index f7631f983..bffad9612 100644 --- a/newlib/libc/posix/rewinddir.c +++ b/newlib/libc/posix/rewinddir.c @@ -42,8 +42,8 @@ static char sccsid[] = "@(#)rewinddir.c 5.1 (Berkeley) 5/25/90"; #include <sys/lock.h> void -rewinddir(dirp) - DIR *dirp; +_DEFUN(rewinddir, (dirp), + DIR *dirp) { #ifdef HAVE_DD_LOCK __lock_acquire_recursive(dirp->dd_lock); diff --git a/newlib/libc/posix/scandir.c b/newlib/libc/posix/scandir.c index bcbe57fbd..97094a676 100644 --- a/newlib/libc/posix/scandir.c +++ b/newlib/libc/posix/scandir.c @@ -71,11 +71,11 @@ static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91"; #endif int -scandir(dirname, namelist, select, dcomp) - const char *dirname; - struct dirent ***namelist; - int (*select) __P((struct dirent *)); - int (*dcomp) __P((const void *, const void *)); +_DEFUN(scandir, (dirname, namelist, select, dcomp), + const char *dirname _AND + struct dirent ***namelist _AND + int (*select) __P((struct dirent *)) _AND + int (*dcomp) __P((const void *, const void *))) { register struct dirent *d, *p, **names; register size_t nitems; @@ -167,9 +167,9 @@ scandir(dirname, namelist, select, dcomp) * Alphabetic order comparison routine for those who want it. */ int -alphasort(d1, d2) - const struct dirent **d1; - const struct dirent **d2; +_DEFUN(alphasort, (d1, d2), + const struct dirent **d1 _AND + const struct dirent **d2) { return(strcmp((*d1)->d_name, (*d2)->d_name)); } diff --git a/newlib/libc/posix/seekdir.c b/newlib/libc/posix/seekdir.c index a945201c4..3965edabf 100644 --- a/newlib/libc/posix/seekdir.c +++ b/newlib/libc/posix/seekdir.c @@ -46,9 +46,9 @@ static char sccsid[] = "@(#)seekdir.c 5.7 (Berkeley) 6/1/90"; * _seekdir is in telldir.c so that it can share opaque data structures. */ void -seekdir(dirp, loc) - DIR *dirp; - long loc; +_DEFUN(seekdir, (dirp, loc), + DIR *dirp _AND + long loc) { #ifdef HAVE_DD_LOCK __lock_acquire_recursive(dirp->dd_lock); diff --git a/newlib/libc/posix/telldir.c b/newlib/libc/posix/telldir.c index 4e51114fd..a8c5440d1 100644 --- a/newlib/libc/posix/telldir.c +++ b/newlib/libc/posix/telldir.c @@ -78,8 +78,8 @@ __LOCK_INIT(static, dd_hash_lock); #ifndef _ELIX_LEVEL || _ELIX_LEVEL >= 2 long -telldir(dirp) - DIR *dirp; +_DEFUN(telldir, (dirp), + DIR *dirp) { register int index; register struct ddloc *lp; @@ -112,9 +112,9 @@ telldir(dirp) * Only values returned by "telldir" should be passed to seekdir. */ void -_seekdir(dirp, loc) - register DIR *dirp; - long loc; +_DEFUN(_seekdir, (dirp, loc), + register DIR *dirp _AND + long loc) { register struct ddloc *lp; register struct ddloc **prevlp; @@ -160,8 +160,8 @@ found: /* clean out any hash entries from a closed directory */ void -_cleanupdir (dirp) - register DIR *dirp; +_DEFUN(_cleanupdir, (dirp), + register DIR *dirp) { int i; |