Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2017-12-04 06:43:30 +0300
committerYaakov Selkowitz <yselkowi@redhat.com>2018-01-17 20:47:26 +0300
commit9087163804df8af6dc2ec1f675a2341c25f7795f (patch)
tree86fcb38236347d0e97a16c957e41dca597b8e8a8 /newlib/libc/posix
parent44276afe2a0365d655425702205604640829668d (diff)
ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/posix')
-rw-r--r--newlib/libc/posix/_isatty.c2
-rw-r--r--newlib/libc/posix/closedir.c3
-rw-r--r--newlib/libc/posix/creat.c3
-rw-r--r--newlib/libc/posix/execl.c6
-rw-r--r--newlib/libc/posix/execle.c6
-rw-r--r--newlib/libc/posix/execlp.c6
-rw-r--r--newlib/libc/posix/execv.c3
-rw-r--r--newlib/libc/posix/execve.c3
-rw-r--r--newlib/libc/posix/execvp.c6
-rw-r--r--newlib/libc/posix/isatty.c2
-rw-r--r--newlib/libc/posix/opendir.c3
-rw-r--r--newlib/libc/posix/popen.c6
-rw-r--r--newlib/libc/posix/posix_spawn.c63
-rw-r--r--newlib/libc/posix/readdir.c3
-rw-r--r--newlib/libc/posix/readdir_r.c3
-rw-r--r--newlib/libc/posix/rewinddir.c3
-rw-r--r--newlib/libc/posix/scandir.c6
-rw-r--r--newlib/libc/posix/seekdir.c3
-rw-r--r--newlib/libc/posix/telldir.c9
19 files changed, 47 insertions, 92 deletions
diff --git a/newlib/libc/posix/_isatty.c b/newlib/libc/posix/_isatty.c
index 7d6ccae7c..c4dcc1f9c 100644
--- a/newlib/libc/posix/_isatty.c
+++ b/newlib/libc/posix/_isatty.c
@@ -6,7 +6,7 @@
#include <errno.h>
int
-_DEFUN(_isatty, (fd), int fd)
+_isatty (int fd)
{
struct stat buf;
diff --git a/newlib/libc/posix/closedir.c b/newlib/libc/posix/closedir.c
index 7801da043..032636d09 100644
--- a/newlib/libc/posix/closedir.c
+++ b/newlib/libc/posix/closedir.c
@@ -49,8 +49,7 @@ extern void _cleanupdir (DIR *dirp);
* close a directory.
*/
int
-_DEFUN(closedir, (dirp),
- register DIR *dirp)
+closedir (register DIR *dirp)
{
int rc;
diff --git a/newlib/libc/posix/creat.c b/newlib/libc/posix/creat.c
index 116f26ce3..fab807375 100644
--- a/newlib/libc/posix/creat.c
+++ b/newlib/libc/posix/creat.c
@@ -5,8 +5,7 @@
#include <fcntl.h>
int
-_DEFUN(creat, (path, mode),
- const char *path,
+creat (const char *path,
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 e25f21917..6ba95e2dc 100644
--- a/newlib/libc/posix/execl.c
+++ b/newlib/libc/posix/execl.c
@@ -18,8 +18,7 @@ static char ***p_environ = &environ;
#include <stdarg.h>
int
-_DEFUN(execl, (path, arg0, ...),
- const char *path,
+execl (const char *path,
const char *arg0, ...)
#else
@@ -27,8 +26,7 @@ _DEFUN(execl, (path, arg0, ...),
#include <varargs.h>
int
-_DEFUN(execl, (path, arg0, va_alist),
- const char *path,
+execl (const char *path,
const char *arg0,
va_dcl)
diff --git a/newlib/libc/posix/execle.c b/newlib/libc/posix/execle.c
index 67387f545..641bdac72 100644
--- a/newlib/libc/posix/execle.c
+++ b/newlib/libc/posix/execle.c
@@ -13,8 +13,7 @@
#include <stdarg.h>
int
-_DEFUN(execle, (path, arg0, ...),
- const char *path,
+execle (const char *path,
const char *arg0, ...)
#else
@@ -22,8 +21,7 @@ _DEFUN(execle, (path, arg0, ...),
#include <varargs.h>
int
-_DEFUN(execle, (path, arg0, va_alist),
- const char *path,
+execle (const char *path,
const char *arg0,
va_dcl)
diff --git a/newlib/libc/posix/execlp.c b/newlib/libc/posix/execlp.c
index f1de21f1c..41b300d8f 100644
--- a/newlib/libc/posix/execlp.c
+++ b/newlib/libc/posix/execlp.c
@@ -13,8 +13,7 @@
#include <stdarg.h>
int
-_DEFUN(execlp, (path, arg0, ...),
- const char *path,
+execlp (const char *path,
const char *arg0, ...)
#else
@@ -22,8 +21,7 @@ _DEFUN(execlp, (path, arg0, ...),
#include <varargs.h>
int
-_DEFUN(execlp, (path, arg0, va_alist),
- const char *path,
+execlp (const char *path,
const char *arg0,
va_dcl)
diff --git a/newlib/libc/posix/execv.c b/newlib/libc/posix/execv.c
index 96220dd98..6a1052c26 100644
--- a/newlib/libc/posix/execv.c
+++ b/newlib/libc/posix/execv.c
@@ -14,8 +14,7 @@
static char ***p_environ = &environ;
int
-_DEFUN (execv, (path, argv),
- const char *path,
+execv (const char *path,
char * const argv[])
{
return _execve (path, (char * const *) argv, *p_environ);
diff --git a/newlib/libc/posix/execve.c b/newlib/libc/posix/execve.c
index c2a2144f5..99c145426 100644
--- a/newlib/libc/posix/execve.c
+++ b/newlib/libc/posix/execve.c
@@ -10,8 +10,7 @@
int
-_DEFUN(execve, (path, argv, envp),
- const char *path,
+execve (const char *path,
char * const argv[],
char * const envp[])
{
diff --git a/newlib/libc/posix/execvp.c b/newlib/libc/posix/execvp.c
index 1c1fd3a01..be7e71cea 100644
--- a/newlib/libc/posix/execvp.c
+++ b/newlib/libc/posix/execvp.c
@@ -21,8 +21,7 @@
*/
static char *
-_DEFUN (strccpy, (s1, s2, c),
- char *s1,
+strccpy (char *s1,
char *s2,
char c)
{
@@ -36,8 +35,7 @@ _DEFUN (strccpy, (s1, s2, c),
}
int
-_DEFUN (execvp, (file, argv),
- const char *file,
+execvp (const char *file,
char * const argv[])
{
char *path = getenv ("PATH");
diff --git a/newlib/libc/posix/isatty.c b/newlib/libc/posix/isatty.c
index afd5ec85e..8a6740a55 100644
--- a/newlib/libc/posix/isatty.c
+++ b/newlib/libc/posix/isatty.c
@@ -4,7 +4,7 @@
#include <reent.h>
int
-_DEFUN(isatty, (fd), int fd)
+isatty (int fd)
{
return _isatty (fd);
}
diff --git a/newlib/libc/posix/opendir.c b/newlib/libc/posix/opendir.c
index ca764e156..1416f1053 100644
--- a/newlib/libc/posix/opendir.c
+++ b/newlib/libc/posix/opendir.c
@@ -47,8 +47,7 @@ static char sccsid[] = "@(#)opendir.c 5.11 (Berkeley) 2/23/91";
* open a directory.
*/
DIR *
-_DEFUN(opendir, (name),
- const char *name)
+opendir (const char *name)
{
register DIR *dirp;
register int fd;
diff --git a/newlib/libc/posix/popen.c b/newlib/libc/posix/popen.c
index bbd0fc424..04aca4c9f 100644
--- a/newlib/libc/posix/popen.c
+++ b/newlib/libc/posix/popen.c
@@ -109,8 +109,7 @@ static struct pid {
} *pidlist;
FILE *
-_DEFUN(popen, (program, type),
- const char *program,
+popen (const char *program,
const char *type)
{
struct pid *cur;
@@ -197,8 +196,7 @@ _DEFUN(popen, (program, type),
* if already `pclosed', or waitpid returns an error.
*/
int
-_DEFUN(pclose, (iop),
- FILE *iop)
+pclose (FILE *iop)
{
register struct pid *cur, *last;
int pstat;
diff --git a/newlib/libc/posix/posix_spawn.c b/newlib/libc/posix/posix_spawn.c
index cade6b005..19c5cd0fe 100644
--- a/newlib/libc/posix/posix_spawn.c
+++ b/newlib/libc/posix/posix_spawn.c
@@ -294,8 +294,7 @@ do_posix_spawn(pid_t *pid, const char *path,
}
int
-_DEFUN(posix_spawn, (pid, path, fa, sa, argv, envp),
- pid_t *pid,
+posix_spawn (pid_t *pid,
const char *path,
const posix_spawn_file_actions_t *fa,
const posix_spawnattr_t *sa,
@@ -306,8 +305,7 @@ _DEFUN(posix_spawn, (pid, path, fa, sa, argv, envp),
}
int
-_DEFUN(posix_spawnp, (pid, path, fa, sa, argv, envp),
- pid_t *pid,
+posix_spawnp (pid_t *pid,
const char *path,
const posix_spawn_file_actions_t *fa,
const posix_spawnattr_t *sa,
@@ -322,8 +320,7 @@ _DEFUN(posix_spawnp, (pid, path, fa, sa, argv, envp),
*/
int
-_DEFUN(posix_spawn_file_actions_init, (ret),
- posix_spawn_file_actions_t *ret)
+posix_spawn_file_actions_init (posix_spawn_file_actions_t *ret)
{
posix_spawn_file_actions_t fa;
@@ -337,8 +334,7 @@ _DEFUN(posix_spawn_file_actions_init, (ret),
}
int
-_DEFUN(posix_spawn_file_actions_destroy, (fa),
- posix_spawn_file_actions_t *fa)
+posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *fa)
{
posix_spawn_file_actions_entry_t *fae;
@@ -357,8 +353,7 @@ _DEFUN(posix_spawn_file_actions_destroy, (fa),
}
int
-_DEFUN(posix_spawn_file_actions_addopen, (fa, fildes, path, oflag, mode),
- posix_spawn_file_actions_t * __restrict fa,
+posix_spawn_file_actions_addopen (posix_spawn_file_actions_t * __restrict fa,
int fildes,
const char * __restrict path,
int oflag,
@@ -392,8 +387,7 @@ _DEFUN(posix_spawn_file_actions_addopen, (fa, fildes, path, oflag, mode),
}
int
-_DEFUN(posix_spawn_file_actions_adddup2, (fa, fildes, newfildes),
- posix_spawn_file_actions_t *fa,
+posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *fa,
int fildes,
int newfildes)
{
@@ -417,8 +411,7 @@ _DEFUN(posix_spawn_file_actions_adddup2, (fa, fildes, newfildes),
}
int
-_DEFUN(posix_spawn_file_actions_addclose, (fa, fildes),
- posix_spawn_file_actions_t *fa,
+posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *fa,
int fildes)
{
posix_spawn_file_actions_entry_t *fae;
@@ -444,8 +437,7 @@ _DEFUN(posix_spawn_file_actions_addclose, (fa, fildes),
*/
int
-_DEFUN(posix_spawnattr_init, (ret),
- posix_spawnattr_t *ret)
+posix_spawnattr_init (posix_spawnattr_t *ret)
{
posix_spawnattr_t sa;
@@ -459,16 +451,14 @@ _DEFUN(posix_spawnattr_init, (ret),
}
int
-_DEFUN(posix_spawnattr_destroy, (sa),
- posix_spawnattr_t *sa)
+posix_spawnattr_destroy (posix_spawnattr_t *sa)
{
free(*sa);
return (0);
}
int
-_DEFUN(posix_spawnattr_getflags, (sa, flags),
- const posix_spawnattr_t * __restrict sa,
+posix_spawnattr_getflags (const posix_spawnattr_t * __restrict sa,
short * __restrict flags)
{
*flags = (*sa)->sa_flags;
@@ -476,8 +466,7 @@ _DEFUN(posix_spawnattr_getflags, (sa, flags),
}
int
-_DEFUN(posix_spawnattr_getpgroup, (sa, pgroup),
- const posix_spawnattr_t * __restrict sa,
+posix_spawnattr_getpgroup (const posix_spawnattr_t * __restrict sa,
pid_t * __restrict pgroup)
{
*pgroup = (*sa)->sa_pgroup;
@@ -485,8 +474,7 @@ _DEFUN(posix_spawnattr_getpgroup, (sa, pgroup),
}
int
-_DEFUN(posix_spawnattr_getschedparam, (sa, schedparam),
- const posix_spawnattr_t * __restrict sa,
+posix_spawnattr_getschedparam (const posix_spawnattr_t * __restrict sa,
struct sched_param * __restrict schedparam)
{
*schedparam = (*sa)->sa_schedparam;
@@ -494,8 +482,7 @@ _DEFUN(posix_spawnattr_getschedparam, (sa, schedparam),
}
int
-_DEFUN(posix_spawnattr_getschedpolicy, (sa, schedpolicy),
- const posix_spawnattr_t * __restrict sa,
+posix_spawnattr_getschedpolicy (const posix_spawnattr_t * __restrict sa,
int * __restrict schedpolicy)
{
*schedpolicy = (*sa)->sa_schedpolicy;
@@ -503,8 +490,7 @@ _DEFUN(posix_spawnattr_getschedpolicy, (sa, schedpolicy),
}
int
-_DEFUN(posix_spawnattr_getsigdefault, (sa, sigdefault),
- const posix_spawnattr_t * __restrict sa,
+posix_spawnattr_getsigdefault (const posix_spawnattr_t * __restrict sa,
sigset_t * __restrict sigdefault)
{
*sigdefault = (*sa)->sa_sigdefault;
@@ -512,8 +498,7 @@ _DEFUN(posix_spawnattr_getsigdefault, (sa, sigdefault),
}
int
-_DEFUN(posix_spawnattr_getsigmask, (sa, sigmask),
- const posix_spawnattr_t * __restrict sa,
+posix_spawnattr_getsigmask (const posix_spawnattr_t * __restrict sa,
sigset_t * __restrict sigmask)
{
*sigmask = (*sa)->sa_sigmask;
@@ -521,8 +506,7 @@ _DEFUN(posix_spawnattr_getsigmask, (sa, sigmask),
}
int
-_DEFUN(posix_spawnattr_setflags, (sa, flags),
- posix_spawnattr_t *sa,
+posix_spawnattr_setflags (posix_spawnattr_t *sa,
short flags)
{
(*sa)->sa_flags = flags;
@@ -530,8 +514,7 @@ _DEFUN(posix_spawnattr_setflags, (sa, flags),
}
int
-_DEFUN(posix_spawnattr_setpgroup, (sa, pgroup),
- posix_spawnattr_t *sa,
+posix_spawnattr_setpgroup (posix_spawnattr_t *sa,
pid_t pgroup)
{
(*sa)->sa_pgroup = pgroup;
@@ -539,8 +522,7 @@ _DEFUN(posix_spawnattr_setpgroup, (sa, pgroup),
}
int
-_DEFUN(posix_spawnattr_setschedparam, (sa, schedparam),
- posix_spawnattr_t * __restrict sa,
+posix_spawnattr_setschedparam (posix_spawnattr_t * __restrict sa,
const struct sched_param * __restrict schedparam)
{
(*sa)->sa_schedparam = *schedparam;
@@ -548,8 +530,7 @@ _DEFUN(posix_spawnattr_setschedparam, (sa, schedparam),
}
int
-_DEFUN(posix_spawnattr_setschedpolicy, (sa, schedpolicy),
- posix_spawnattr_t *sa,
+posix_spawnattr_setschedpolicy (posix_spawnattr_t *sa,
int schedpolicy)
{
(*sa)->sa_schedpolicy = schedpolicy;
@@ -557,8 +538,7 @@ _DEFUN(posix_spawnattr_setschedpolicy, (sa, schedpolicy),
}
int
-_DEFUN(posix_spawnattr_setsigdefault, (sa, sigdefault),
- posix_spawnattr_t * __restrict sa,
+posix_spawnattr_setsigdefault (posix_spawnattr_t * __restrict sa,
const sigset_t * __restrict sigdefault)
{
(*sa)->sa_sigdefault = *sigdefault;
@@ -566,8 +546,7 @@ _DEFUN(posix_spawnattr_setsigdefault, (sa, sigdefault),
}
int
-_DEFUN(posix_spawnattr_setsigmask, (sa, sigmask),
- posix_spawnattr_t * __restrict sa,
+posix_spawnattr_setsigmask (posix_spawnattr_t * __restrict sa,
const sigset_t * __restrict sigmask)
{
(*sa)->sa_sigmask = *sigmask;
diff --git a/newlib/libc/posix/readdir.c b/newlib/libc/posix/readdir.c
index 3e620e328..40608f93c 100644
--- a/newlib/libc/posix/readdir.c
+++ b/newlib/libc/posix/readdir.c
@@ -45,8 +45,7 @@ extern int getdents (int fd, void *dp, int count);
* get next entry in a directory.
*/
struct dirent *
-_DEFUN(readdir, (dirp),
- register DIR *dirp)
+readdir (register DIR *dirp)
{
register struct dirent *dp;
diff --git a/newlib/libc/posix/readdir_r.c b/newlib/libc/posix/readdir_r.c
index a75eee9a3..8f4a98293 100644
--- a/newlib/libc/posix/readdir_r.c
+++ b/newlib/libc/posix/readdir_r.c
@@ -50,8 +50,7 @@ extern int getdents (int fd, void *dp, int count);
* get next entry in a directory using supplied dirent structure.
*/
int
-_DEFUN(readdir_r, (dirp, dp, dpp),
- register DIR *__restrict dirp,
+readdir_r (register DIR *__restrict dirp,
struct dirent *__restrict dp,
struct dirent **__restrict dpp) {
diff --git a/newlib/libc/posix/rewinddir.c b/newlib/libc/posix/rewinddir.c
index f9ca9f7d4..930b79afc 100644
--- a/newlib/libc/posix/rewinddir.c
+++ b/newlib/libc/posix/rewinddir.c
@@ -42,8 +42,7 @@ static char sccsid[] = "@(#)rewinddir.c 5.1 (Berkeley) 5/25/90";
#include <sys/lock.h>
void
-_DEFUN(rewinddir, (dirp),
- DIR *dirp)
+rewinddir (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 0ffe68971..d95cff378 100644
--- a/newlib/libc/posix/scandir.c
+++ b/newlib/libc/posix/scandir.c
@@ -68,8 +68,7 @@ static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91";
#endif
int
-_DEFUN(scandir, (dirname, namelist, select, dcomp),
- const char *dirname,
+scandir (const char *dirname,
struct dirent ***namelist,
int (*select) __P((const struct dirent *)),
int (*dcomp) __P((const struct dirent **, const struct dirent **)))
@@ -169,8 +168,7 @@ cleanup:
* Alphabetic order comparison routine for those who want it.
*/
int
-_DEFUN(alphasort, (d1, d2),
- const struct dirent **d1,
+alphasort (const struct dirent **d1,
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 f876d7075..6ffeb1415 100644
--- a/newlib/libc/posix/seekdir.c
+++ b/newlib/libc/posix/seekdir.c
@@ -46,8 +46,7 @@ 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
-_DEFUN(seekdir, (dirp, loc),
- DIR *dirp,
+seekdir (DIR *dirp,
long loc)
{
#ifdef HAVE_DD_LOCK
diff --git a/newlib/libc/posix/telldir.c b/newlib/libc/posix/telldir.c
index 9c945fcf7..af86d8d4f 100644
--- a/newlib/libc/posix/telldir.c
+++ b/newlib/libc/posix/telldir.c
@@ -81,8 +81,7 @@ __LOCK_INIT(static, __dd_hash_mutex);
#if !defined(_ELIX_LEVEL) || (_ELIX_LEVEL >= 2)
long
-_DEFUN(telldir, (dirp),
- DIR *dirp)
+telldir (DIR *dirp)
{
register int index;
register struct ddloc *lp;
@@ -119,8 +118,7 @@ _DEFUN(telldir, (dirp),
* Only values returned by "telldir" should be passed to seekdir.
*/
void
-_DEFUN(_seekdir, (dirp, loc),
- register DIR *dirp,
+_seekdir (register DIR *dirp,
long loc)
{
register struct ddloc *lp;
@@ -173,8 +171,7 @@ found:
/* clean out any hash entries from a closed directory */
void
-_DEFUN(_cleanupdir, (dirp),
- register DIR *dirp)
+_cleanupdir (register DIR *dirp)
{
int i;