diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a7d738a3e..0fa293739 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,29 @@ +2003-06-06 Jeff Johnston + + * libc/argz/argz_add.c: Change to use _DEFUN macro for function + definition. + * libc/argz/argz_add_sep.c: Ditto. + * libc/argz/argz_append.c libc/argz/argz_count.c: Ditto. + * libc/argz/argz_create.c libc/argz/argz_create_sep.c: Ditto. + * libc/argz/argz_delete.c libc/argz/argz_extract.c: Ditto. + * libc/argz/argz_insert.c libc/argz/argz_next.c: Ditto. + * libc/argz/argz_replace.c libc/argz/argz_stringify.c: Ditto. + * libc/argz/envz_add.c libc/argz/envz_entry.c: Ditto. + * libc/argz/envz_get.c libc/argz/envz_merge.c: Ditto. + * libc/argz/envz_remove.c libc/argz/envz_strip.c: Ditto. + * libc/locale/nl_langinfo.c libc/misc/ffs.c: Ditto. + * libc/posix/closedir.c libc/posix/creat.c: Ditto. + * libc/posix/execl.c libc/posix/execle.c: Ditto. + * libc/posix/execlp.c libc/posix/execve.c: Ditto. + * libc/posix/isatty.c libc/posix/opendir.c: Ditto. + * libc/posix/popen.c libc/posix/readdir.c: Ditto. + * libc/posix/readdir_r.c libc/posix/rewinddir.c: Ditto. + * libc/posix/scandir.c libc/posix/seekdir.c: Ditto. + * libc/posix/telldir.c libc/search/hcreate.c: Ditto. + * libc/search/tdelete.c libc/search/tdestroy.c: Ditto. + * libc/search/tfind.c libc/search/tsearch.c: Ditto. + * libc/search/twalk.c libc/signal/signal.c: Ditto. + 2003-06-05 Nick Clifton * libc/include/sys/reent.h (struct _on_exit_args): New diff --git a/newlib/libc/argz/argz_add.c b/newlib/libc/argz/argz_add.c index 80f1951c3..46e71ca37 100644 --- a/newlib/libc/argz/argz_add.c +++ b/newlib/libc/argz/argz_add.c @@ -10,7 +10,10 @@ #include error_t -argz_add (char **argz, size_t *argz_len, const char *str) +_DEFUN (argz_add, (argz, argz_len, str), + char **argz _AND + size_t *argz_len _AND + const char *str) { int len_to_add = 0; size_t last = *argz_len; diff --git a/newlib/libc/argz/argz_add_sep.c b/newlib/libc/argz/argz_add_sep.c index e17555407..5a56ec931 100644 --- a/newlib/libc/argz/argz_add_sep.c +++ b/newlib/libc/argz/argz_add_sep.c @@ -11,7 +11,11 @@ #include error_t -argz_add_sep (char **argz, size_t *argz_len, const char *str, int sep) +_DEFUN (argz_add_sep, (argz, argz_len, str, sep), + char **argz _AND + size_t *argz_len _AND + const char *str _AND + int sep) { char *str_argz = 0; size_t str_argz_len = 0; diff --git a/newlib/libc/argz/argz_append.c b/newlib/libc/argz/argz_append.c index 708bc1917..7519e1608 100644 --- a/newlib/libc/argz/argz_append.c +++ b/newlib/libc/argz/argz_append.c @@ -10,7 +10,11 @@ #include error_t -argz_append (char **argz, size_t *argz_len, const char *buf, size_t buf_len) +_DEFUN (argz_append, (argz, argz_len, buf, buf_len), + char **argz _AND + size_t *argz_len _AND + const char *buf _AND + size_t buf_len) { size_t last = *argz_len; diff --git a/newlib/libc/argz/argz_count.c b/newlib/libc/argz/argz_count.c index daecd244c..0c8a816c1 100644 --- a/newlib/libc/argz/argz_count.c +++ b/newlib/libc/argz/argz_count.c @@ -4,10 +4,13 @@ * is freely granted, provided that this notice is preserved. */ +#include <_ansi.h> #include size_t -argz_count (const char *argz, size_t argz_len) +_DEFUN (argz_count, (argz, argz_len), + const char *argz _AND + size_t argz_len) { int i; size_t count = 0; diff --git a/newlib/libc/argz/argz_create.c b/newlib/libc/argz/argz_create.c index 1708a2ede..f5651c618 100644 --- a/newlib/libc/argz/argz_create.c +++ b/newlib/libc/argz/argz_create.c @@ -10,7 +10,10 @@ #include error_t -argz_create (char *const argv[], char **argz, size_t *argz_len) +_DEFUN (argz_create, (argv, argz, argz_len), + char *const argv[] _AND + char **argz _AND + size_t *argz_len) { int argc = 0; int i = 0; diff --git a/newlib/libc/argz/argz_create_sep.c b/newlib/libc/argz/argz_create_sep.c index f8d9ef1d3..bf0670bda 100644 --- a/newlib/libc/argz/argz_create_sep.c +++ b/newlib/libc/argz/argz_create_sep.c @@ -10,7 +10,11 @@ #include error_t -argz_create_sep (const char *string, int sep, char **argz, size_t *argz_len) +_DEFUN (argz_create_sep, (string, sep, argz, argz_len), + const char *string _AND + int sep _AND + char **argz _AND + size_t *argz_len) { int len = 0; int i = 0; diff --git a/newlib/libc/argz/argz_delete.c b/newlib/libc/argz/argz_delete.c index 47134cbff..237128c88 100644 --- a/newlib/libc/argz/argz_delete.c +++ b/newlib/libc/argz/argz_delete.c @@ -10,7 +10,10 @@ #include error_t -argz_delete (char **argz, size_t *argz_len, char *entry) +_DEFUN (argz_delete, (argz, argz_len, entry), + char **argz _AND + size_t *argz_len _AND + char *entry) { int len = 0; char *moveto = entry; diff --git a/newlib/libc/argz/argz_extract.c b/newlib/libc/argz/argz_extract.c index 54c1577da..289c6e100 100644 --- a/newlib/libc/argz/argz_extract.c +++ b/newlib/libc/argz/argz_extract.c @@ -8,7 +8,10 @@ #include void -argz_extract (char *argz, size_t argz_len, char **argv) +_DEFUN (argz_extract, (argz, argz_len, argv), + char *argz _AND + size_t argz_len _AND + char **argv) { size_t i = 0; int j = 0; diff --git a/newlib/libc/argz/argz_insert.c b/newlib/libc/argz/argz_insert.c index af16301c5..043a10193 100644 --- a/newlib/libc/argz/argz_insert.c +++ b/newlib/libc/argz/argz_insert.c @@ -11,7 +11,11 @@ #include error_t -argz_insert (char **argz, size_t *argz_len, char *before, const char *entry) +_DEFUN (argz_insert, (argz, argz_len, before, entry), + char **argz _AND + size_t *argz_len _AND + char *before _AND + const char *entry) { int len = 0; diff --git a/newlib/libc/argz/argz_next.c b/newlib/libc/argz/argz_next.c index 79da8473e..e9dbe0694 100644 --- a/newlib/libc/argz/argz_next.c +++ b/newlib/libc/argz/argz_next.c @@ -10,7 +10,10 @@ #include char * -argz_next (char *argz, size_t argz_len, const char *entry) +_DEFUN (argz_next, (argz, argz_len, entry), + char *argz _AND + size_t argz_len _AND + const char *entry) { if (entry) { diff --git a/newlib/libc/argz/argz_replace.c b/newlib/libc/argz/argz_replace.c index cc0d78f5a..cb01eaef5 100644 --- a/newlib/libc/argz/argz_replace.c +++ b/newlib/libc/argz/argz_replace.c @@ -13,7 +13,12 @@ #include "buf_findstr.h" error_t -argz_replace (char **argz, size_t *argz_len, const char *str, const char *with, unsigned *replace_count) +_DEFUN (argz_replace, (argz, argz_len, str, with, replace_count), + char **argz _AND + size_t *argz_len _AND + const char *str _AND + const char *with _AND + unsigned *replace_count) { const int str_len = strlen(str); const int with_len = strlen(with); diff --git a/newlib/libc/argz/argz_stringify.c b/newlib/libc/argz/argz_stringify.c index 739c9e1ec..6ff5dd001 100644 --- a/newlib/libc/argz/argz_stringify.c +++ b/newlib/libc/argz/argz_stringify.c @@ -4,10 +4,14 @@ * is freely granted, provided that this notice is preserved. */ +#include <_ansi.h> #include void -argz_stringify (char *argz, size_t argz_len, int sep) +_DEFUN (argz_stringify, (argz, argz_len, sep), + char *argz _AND + size_t argz_len _AND + int sep) { size_t i; diff --git a/newlib/libc/argz/envz_add.c b/newlib/libc/argz/envz_add.c index 75fba66ed..3e91a5867 100644 --- a/newlib/libc/argz/envz_add.c +++ b/newlib/libc/argz/envz_add.c @@ -12,7 +12,11 @@ #include error_t -envz_add (char **envz, size_t *envz_len, const char *name, const char *value) +_DEFUN (envz_add, (envz, envz_len, name, value), + char **envz _AND + size_t *envz_len _AND + const char *name _AND + const char *value) { char *concat = NULL; int name_len = 0; diff --git a/newlib/libc/argz/envz_entry.c b/newlib/libc/argz/envz_entry.c index 300aec9d5..3d1986ba7 100644 --- a/newlib/libc/argz/envz_entry.c +++ b/newlib/libc/argz/envz_entry.c @@ -13,7 +13,10 @@ #include "buf_findstr.h" char * -envz_entry (const char *envz, size_t envz_len, const char *name) +_DEFUN (envz_entry, (envz, envz_len, name), + const char *envz _AND + size_t envz_len _AND + const char *name) { char *buf_ptr = (char *)envz; size_t buf_len = envz_len; diff --git a/newlib/libc/argz/envz_get.c b/newlib/libc/argz/envz_get.c index 718806ec5..b4f7c2806 100644 --- a/newlib/libc/argz/envz_get.c +++ b/newlib/libc/argz/envz_get.c @@ -13,7 +13,10 @@ #include "buf_findstr.h" char * -envz_get (const char *envz, size_t envz_len, const char *name) +_DEFUN (envz_get, (envz, envz_len, name), + const char *envz _AND + size_t envz_len _AND + const char *name) { char *buf_ptr = (char *)envz; size_t buf_len = envz_len; diff --git a/newlib/libc/argz/envz_merge.c b/newlib/libc/argz/envz_merge.c index da2d8cb08..46832202e 100644 --- a/newlib/libc/argz/envz_merge.c +++ b/newlib/libc/argz/envz_merge.c @@ -12,7 +12,12 @@ #include error_t -envz_merge (char **envz, size_t *envz_len, const char *envz2, size_t envz2_len, int override) +_DEFUN (envz_merge, (envz, envz_len, envz2, envz2_len, override), + char **envz _AND + size_t *envz_len _AND + const char *envz2 _AND + size_t envz2_len _AND + int override) { char *entry = NULL; char *name_str = NULL; diff --git a/newlib/libc/argz/envz_remove.c b/newlib/libc/argz/envz_remove.c index ace547968..1882297f0 100644 --- a/newlib/libc/argz/envz_remove.c +++ b/newlib/libc/argz/envz_remove.c @@ -12,7 +12,10 @@ #include void -envz_remove(char **envz, size_t *envz_len, const char *name) +_DEFUN (envz_remove, (envz, envz_len, name), + char **envz _AND + size_t *envz_len _AND + const char *name) { char *entry = NULL; int len = 0; diff --git a/newlib/libc/argz/envz_strip.c b/newlib/libc/argz/envz_strip.c index f190befe8..e1c461091 100644 --- a/newlib/libc/argz/envz_strip.c +++ b/newlib/libc/argz/envz_strip.c @@ -12,7 +12,9 @@ #include void -envz_strip (char **envz, size_t *envz_len) +_DEFUN (envz_strip, (envz, envz_len), + char **envz _AND + size_t *envz_len) { char *entry = 0; int len = 0; diff --git a/newlib/libc/locale/nl_langinfo.c b/newlib/libc/locale/nl_langinfo.c index e762799b0..b2923bd65 100644 --- a/newlib/libc/locale/nl_langinfo.c +++ b/newlib/libc/locale/nl_langinfo.c @@ -42,7 +42,8 @@ #define _REL(BASE) ((int)item-BASE) char * -nl_langinfo(nl_item item) { +_DEFUN(nl_langinfo, (item), + nl_item item) { char *ret, *s, *cs; static char *csym = NULL; diff --git a/newlib/libc/misc/ffs.c b/newlib/libc/misc/ffs.c index e4afe7a41..292ffabee 100644 --- a/newlib/libc/misc/ffs.c +++ b/newlib/libc/misc/ffs.c @@ -24,9 +24,11 @@ PORTABILITY No supporting OS subroutines are required. */ +#include <_ansi.h> + int -ffs (word) - int word; +_DEFUN(ffs, (word), + int word) { int i; 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 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 int -execl (_CONST char *path, _CONST char *arg0, ...) +_DEFUN(execl, (path, arg0, ...), + _CONST char *path _AND + _CONST char *arg0 _DOTS) #else #include 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 int -execle (_CONST char *path, _CONST char *arg0, ...) +_DEFUN(execle, (path, arg0, ...), + _CONST char *path _AND + _CONST char *arg0 _DOTS) #else #include 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 int -execlp (_CONST char *path, _CONST char *arg0, ...) +_DEFUN(execlp, (path, arg0, ...), + _CONST char *path _AND + _CONST char *arg0 _DOTS) #else #include 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 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 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; diff --git a/newlib/libc/search/hcreate.c b/newlib/libc/search/hcreate.c index 78b854ea6..095e1f208 100644 --- a/newlib/libc/search/hcreate.c +++ b/newlib/libc/search/hcreate.c @@ -58,19 +58,21 @@ __RCSID("$NetBSD: hcreate.c,v 1.2 2001/02/19 21:26:04 ross Exp $"); static struct hsearch_data htab; int -hcreate(size_t nel) +_DEFUN(hcreate, (nel), size_t nel) { return hcreate_r (nel, &htab); } void -hdestroy(void) +_DEFUN_VOID (hdestroy) { hdestroy_r (&htab); } ENTRY * -hsearch(ENTRY item, ACTION action) +_DEFUN(hsearch, (item, action), + ENTRY item _AND + ACTION action) { ENTRY *retval; diff --git a/newlib/libc/search/tdelete.c b/newlib/libc/search/tdelete.c index e849ada81..e75659913 100644 --- a/newlib/libc/search/tdelete.c +++ b/newlib/libc/search/tdelete.c @@ -26,10 +26,10 @@ __RCSID("$NetBSD: tdelete.c,v 1.2 1999/09/16 11:45:37 lukem Exp $"); /* delete node with given key */ void * -tdelete(vkey, vrootp, compar) - const void *vkey; /* key to be deleted */ - void **vrootp; /* address of the root of tree */ - int (*compar)(const void *, const void *); +_DEFUN(tdelete, (vkey, vrootp, compar), + const void *vkey _AND /* key to be deleted */ + void **vrootp _AND /* address of the root of tree */ + int (*compar)(const void *, const void *)) { node_t **rootp = (node_t **)vrootp; node_t *p, *q, *r; diff --git a/newlib/libc/search/tdestroy.c b/newlib/libc/search/tdestroy.c index 2f8aae695..3e7327c4d 100644 --- a/newlib/libc/search/tdestroy.c +++ b/newlib/libc/search/tdestroy.c @@ -40,7 +40,9 @@ trecurse(root, free_action) } void -tdestroy (void *vrootp, void (*freefct)(void *)) +_DEFUN(tdestroy, (vrootp, freefct), + void *vrootp _AND + void (*freefct)(void *)) { node_t *root = (node_t *) vrootp; diff --git a/newlib/libc/search/tfind.c b/newlib/libc/search/tfind.c index 36c90a1cd..5d7c40c93 100644 --- a/newlib/libc/search/tfind.c +++ b/newlib/libc/search/tfind.c @@ -25,10 +25,10 @@ __RCSID("$NetBSD: tfind.c,v 1.2 1999/09/16 11:45:37 lukem Exp $"); /* find a node, or return 0 */ void * -tfind(vkey, vrootp, compar) - const void *vkey; /* key to be found */ - void **vrootp; /* address of the tree root */ - int (*compar)(const void *, const void *); +_DEFUN(tfind, (vkey, vrootp, compar), + const void *vkey _AND /* key to be found */ + void **vrootp _AND /* address of the tree root */ + int (*compar)(const void *, const void *)) { node_t **rootp = (node_t **)vrootp; diff --git a/newlib/libc/search/tsearch.c b/newlib/libc/search/tsearch.c index cda16992e..5f41b407d 100644 --- a/newlib/libc/search/tsearch.c +++ b/newlib/libc/search/tsearch.c @@ -25,10 +25,10 @@ __RCSID("$NetBSD: tsearch.c,v 1.3 1999/09/16 11:45:37 lukem Exp $"); /* find or insert datum into search tree */ void * -tsearch(vkey, vrootp, compar) - const void *vkey; /* key to be located */ - void **vrootp; /* address of tree root */ - int (*compar)(const void *, const void *); +_DEFUN(tsearch, (vkey, vrootp, compar), + const void *vkey _AND /* key to be located */ + void **vrootp _AND /* address of tree root */ + int (*compar)(const void *, const void *)) { node_t *q; node_t **rootp = (node_t **)vrootp; diff --git a/newlib/libc/search/twalk.c b/newlib/libc/search/twalk.c index 020e5d5ea..74ad5a615 100644 --- a/newlib/libc/search/twalk.c +++ b/newlib/libc/search/twalk.c @@ -49,9 +49,9 @@ trecurse(root, action, level) /* Walk the nodes of a tree */ void -twalk(vroot, action) - const void *vroot; /* Root of the tree to be walked */ - void (*action)(const void *, VISIT, int); +_DEFUN(twalk, (vroot, action), + const void *vroot _AND /* Root of the tree to be walked */ + void (*action)(const void *, VISIT, int)) { if (vroot != NULL && action != NULL) trecurse(vroot, action, 0); diff --git a/newlib/libc/signal/signal.c b/newlib/libc/signal/signal.c index df005f1b9..20e919e74 100644 --- a/newlib/libc/signal/signal.c +++ b/newlib/libc/signal/signal.c @@ -162,9 +162,9 @@ _DEFUN (_signal_r, (ptr, sig, func), } int -_raise_r (ptr, sig) - struct _reent *ptr; - int sig; +_DEFUN (_raise_r, (ptr, sig), + struct _reent *ptr _AND + int sig) { _sig_func_ptr func; @@ -196,9 +196,9 @@ _raise_r (ptr, sig) } int -__sigtramp_r (ptr, sig) - struct _reent *ptr; - int sig; +_DEFUN (__sigtramp_r, (ptr, sig), + struct _reent *ptr _AND + int sig) { _sig_func_ptr func; @@ -228,8 +228,8 @@ __sigtramp_r (ptr, sig) #ifndef _REENT_ONLY int -raise (sig) - int sig; +_DEFUN (raise, (sig), + int sig) { return _raise_r (_REENT, sig); } @@ -243,13 +243,13 @@ _DEFUN (signal, (sig, func), } int -_init_signal () +_DEFUN_VOID (_init_signal) { return _init_signal_r (_REENT); } int -__sigtramp (int sig) +_DEFUN (__sigtramp, (sig), int sig) { return __sigtramp_r (_REENT, sig); }