diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2017-12-03 21:43:30 -0600 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2018-01-17 11:47:26 -0600 |
commit | 9087163804df8af6dc2ec1f675a2341c25f7795f (patch) | |
tree | 86fcb38236347d0e97a16c957e41dca597b8e8a8 /newlib/libc/stdlib | |
parent | 44276afe2a0365d655425702205604640829668d (diff) | |
download | newlib-9087163804df8af6dc2ec1f675a2341c25f7795f.zip newlib-9087163804df8af6dc2ec1f675a2341c25f7795f.tar.gz newlib-9087163804df8af6dc2ec1f675a2341c25f7795f.tar.bz2 |
ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/stdlib')
90 files changed, 179 insertions, 350 deletions
diff --git a/newlib/libc/stdlib/_Exit.c b/newlib/libc/stdlib/_Exit.c index b07559a..8e205a0 100644 --- a/newlib/libc/stdlib/_Exit.c +++ b/newlib/libc/stdlib/_Exit.c @@ -34,8 +34,7 @@ Supporting OS subroutines required: <<_exit>>. #include <reent.h> void -_DEFUN (_Exit, (code), - int code) +_Exit (int code) { _exit (code); } diff --git a/newlib/libc/stdlib/__adjust.c b/newlib/libc/stdlib/__adjust.c index 7627cc7..4c478f3 100644 --- a/newlib/libc/stdlib/__adjust.c +++ b/newlib/libc/stdlib/__adjust.c @@ -9,8 +9,7 @@ #define abs(x) (((x) < 0) ? -(x) : (x)) double -_DEFUN (__adjust, (ptr, acc, dexp, sign), - struct _reent *ptr, +__adjust (struct _reent *ptr, double *acc, int dexp, int sign) diff --git a/newlib/libc/stdlib/__atexit.c b/newlib/libc/stdlib/__atexit.c index cb4a268..18e47dc 100644 --- a/newlib/libc/stdlib/__atexit.c +++ b/newlib/libc/stdlib/__atexit.c @@ -63,9 +63,7 @@ static struct _atexit _global_atexit0 = _ATEXIT_INIT; */ int -_DEFUN (__register_exitproc, - (type, fn, arg, d), - int type, +__register_exitproc (int type, void (*fn) (void), void *arg, void *d) diff --git a/newlib/libc/stdlib/__call_atexit.c b/newlib/libc/stdlib/__call_atexit.c index ad70fcd..d8e7299 100644 --- a/newlib/libc/stdlib/__call_atexit.c +++ b/newlib/libc/stdlib/__call_atexit.c @@ -65,8 +65,7 @@ register_fini(void) */ void -_DEFUN (__call_exitprocs, (code, d), - int code, void *d) +__call_exitprocs (int code, void *d) { register struct _atexit *p; struct _atexit **lastp; diff --git a/newlib/libc/stdlib/__exp10.c b/newlib/libc/stdlib/__exp10.c index 1ff81a6..cf22374 100644 --- a/newlib/libc/stdlib/__exp10.c +++ b/newlib/libc/stdlib/__exp10.c @@ -6,8 +6,7 @@ #include "std.h" double -_DEFUN (__exp10, (x), - unsigned x) +__exp10 (unsigned x) { static const double powtab[] = {1.0, diff --git a/newlib/libc/stdlib/__ten_mu.c b/newlib/libc/stdlib/__ten_mu.c index a7fe70c..25af8d0 100644 --- a/newlib/libc/stdlib/__ten_mu.c +++ b/newlib/libc/stdlib/__ten_mu.c @@ -9,8 +9,7 @@ #include "std.h" int -_DEFUN (__ten_mul, (acc, digit), - double *acc, +__ten_mul (double *acc, int digit) { /* diff --git a/newlib/libc/stdlib/a64l.c b/newlib/libc/stdlib/a64l.c index 8d68ed0..dcac2e0 100644 --- a/newlib/libc/stdlib/a64l.c +++ b/newlib/libc/stdlib/a64l.c @@ -56,8 +56,7 @@ Supporting OS subroutines required: None. #include <limits.h> long -_DEFUN (a64l, (input), - const char *input) +a64l (const char *input) { const char *ptr; char ch; diff --git a/newlib/libc/stdlib/abs.c b/newlib/libc/stdlib/abs.c index d347265..85a3fec 100644 --- a/newlib/libc/stdlib/abs.c +++ b/newlib/libc/stdlib/abs.c @@ -32,7 +32,7 @@ No supporting OS subroutines are required. #include <stdlib.h> int -_DEFUN (abs, (i), int i) +abs (int i) { return (i < 0) ? -i : i; } diff --git a/newlib/libc/stdlib/assert.c b/newlib/libc/stdlib/assert.c index ba5b461..46ac92b 100644 --- a/newlib/libc/stdlib/assert.c +++ b/newlib/libc/stdlib/assert.c @@ -50,8 +50,7 @@ Supporting OS subroutines required (only if enabled): <<close>>, <<fstat>>, #ifndef HAVE_ASSERT_FUNC /* func can be NULL, in which case no function information is given. */ void -_DEFUN (__assert_func, (file, line, func, failedexpr), - const char *file, +__assert_func (const char *file, int line, const char *func, const char *failedexpr) @@ -66,8 +65,7 @@ _DEFUN (__assert_func, (file, line, func, failedexpr), #endif /* HAVE_ASSERT_FUNC */ void -_DEFUN (__assert, (file, line, failedexpr), - const char *file, +__assert (const char *file, int line, const char *failedexpr) { diff --git a/newlib/libc/stdlib/atexit.c b/newlib/libc/stdlib/atexit.c index 1710aff..1d300bd 100644 --- a/newlib/libc/stdlib/atexit.c +++ b/newlib/libc/stdlib/atexit.c @@ -53,9 +53,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, */ int -_DEFUN (atexit, - (fn), - void _EXFNPTR(fn, (void))) +atexit (void _EXFNPTR(fn, (void))) { return __register_exitproc (__et_atexit, fn, NULL, NULL); } diff --git a/newlib/libc/stdlib/atof.c b/newlib/libc/stdlib/atof.c index 7dfbd9c..17ba0fa 100644 --- a/newlib/libc/stdlib/atof.c +++ b/newlib/libc/stdlib/atof.c @@ -57,8 +57,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #include <_ansi.h> double -_DEFUN (atof, (s), - const char *s) +atof (const char *s) { return strtod (s, NULL); } diff --git a/newlib/libc/stdlib/atoff.c b/newlib/libc/stdlib/atoff.c index 2966254..e25ff29 100644 --- a/newlib/libc/stdlib/atoff.c +++ b/newlib/libc/stdlib/atoff.c @@ -2,8 +2,7 @@ #include <_ansi.h> float -_DEFUN (atoff, (s), - const char *s) +atoff (const char *s) { return strtof (s, NULL); } diff --git a/newlib/libc/stdlib/atoi.c b/newlib/libc/stdlib/atoi.c index 83ad241..4da53e8 100644 --- a/newlib/libc/stdlib/atoi.c +++ b/newlib/libc/stdlib/atoi.c @@ -47,16 +47,14 @@ No supporting OS subroutines are required. #ifndef _REENT_ONLY int -_DEFUN (atoi, (s), - const char *s) +atoi (const char *s) { return (int) strtol (s, NULL, 10); } #endif /* !_REENT_ONLY */ int -_DEFUN (_atoi_r, (s), - struct _reent *ptr, +_atoi_r (struct _reent *ptr, const char *s) { return (int) _strtol_r (ptr, s, NULL, 10); diff --git a/newlib/libc/stdlib/atol.c b/newlib/libc/stdlib/atol.c index cad512f..a5c8ee9 100644 --- a/newlib/libc/stdlib/atol.c +++ b/newlib/libc/stdlib/atol.c @@ -7,14 +7,14 @@ #ifndef _REENT_ONLY long -_DEFUN (atol, (s), const char *s) +atol (const char *s) { return strtol (s, NULL, 10); } #endif /* !_REENT_ONLY */ long -_DEFUN (_atol_r, (ptr, s), struct _reent *ptr, const char *s) +_atol_r (struct _reent *ptr, const char *s) { return _strtol_r (ptr, s, NULL, 10); } diff --git a/newlib/libc/stdlib/atoll.c b/newlib/libc/stdlib/atoll.c index e853f25..a8c56fe 100644 --- a/newlib/libc/stdlib/atoll.c +++ b/newlib/libc/stdlib/atoll.c @@ -69,16 +69,14 @@ No supporting OS subroutines are required. #ifndef _REENT_ONLY long long -_DEFUN(atoll, (str), - const char *str) +atoll (const char *str) { return strtoll(str, (char **)NULL, 10); } #endif /* !_REENT_ONLY */ long long -_DEFUN(_atoll_r, (ptr, str), - struct _reent *ptr, +_atoll_r (struct _reent *ptr, const char *str) { return _strtoll_r(ptr, str, (char **)NULL, 10); diff --git a/newlib/libc/stdlib/calloc.c b/newlib/libc/stdlib/calloc.c index f853f4f..208e27e 100644 --- a/newlib/libc/stdlib/calloc.c +++ b/newlib/libc/stdlib/calloc.c @@ -46,8 +46,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #ifndef _REENT_ONLY void * -_DEFUN (calloc, (n, size), - size_t n, +calloc (size_t n, size_t size) { return _calloc_r (_REENT, n, size); diff --git a/newlib/libc/stdlib/cxa_atexit.c b/newlib/libc/stdlib/cxa_atexit.c index 096add4..ae2d21a 100644 --- a/newlib/libc/stdlib/cxa_atexit.c +++ b/newlib/libc/stdlib/cxa_atexit.c @@ -22,9 +22,7 @@ const void * const __cxa_atexit_dummy = &__on_exit_args; */ int -_DEFUN (__cxa_atexit, - (fn, arg, d), - void (*fn) (void *), +__cxa_atexit (void (*fn) (void *), void *arg, void *d) { diff --git a/newlib/libc/stdlib/cxa_finalize.c b/newlib/libc/stdlib/cxa_finalize.c index 17d0526..4675328 100644 --- a/newlib/libc/stdlib/cxa_finalize.c +++ b/newlib/libc/stdlib/cxa_finalize.c @@ -13,8 +13,7 @@ */ void -_DEFUN (__cxa_finalize, (d), - void * d) +__cxa_finalize (void * d) { __call_exitprocs (0, d); } diff --git a/newlib/libc/stdlib/div.c b/newlib/libc/stdlib/div.c index 4d2ffee..20ad7b8 100644 --- a/newlib/libc/stdlib/div.c +++ b/newlib/libc/stdlib/div.c @@ -81,8 +81,7 @@ No supporting OS subroutines are required. #include <stdlib.h> /* div_t */ div_t -_DEFUN (div, (num, denom), - int num, +div (int num, int denom) { div_t r; diff --git a/newlib/libc/stdlib/drand48.c b/newlib/libc/stdlib/drand48.c index 6c4dca1..0616894 100644 --- a/newlib/libc/stdlib/drand48.c +++ b/newlib/libc/stdlib/drand48.c @@ -14,8 +14,7 @@ #include "rand48.h" double -_DEFUN (_drand48_r, (r), - struct _reent *r) +_drand48_r (struct _reent *r) { _REENT_CHECK_RAND48(r); return _erand48_r(r, __rand48_seed); diff --git a/newlib/libc/stdlib/dtoa.c b/newlib/libc/stdlib/dtoa.c index 3b89764..c38f37a 100644 --- a/newlib/libc/stdlib/dtoa.c +++ b/newlib/libc/stdlib/dtoa.c @@ -33,9 +33,7 @@ #include "mprec.h" static int -_DEFUN (quorem, - (b, S), - _Bigint * b, _Bigint * S) +quorem (_Bigint * b, _Bigint * S) { int n; __Long borrow, y; @@ -177,9 +175,7 @@ _DEFUN (quorem, char * -_DEFUN (_dtoa_r, - (ptr, _d, mode, ndigits, decpt, sign, rve), - struct _reent *ptr, +_dtoa_r (struct _reent *ptr, double _d, int mode, int ndigits, diff --git a/newlib/libc/stdlib/dtoastub.c b/newlib/libc/stdlib/dtoastub.c index a857c24..d1c8a67 100644 --- a/newlib/libc/stdlib/dtoastub.c +++ b/newlib/libc/stdlib/dtoastub.c @@ -8,9 +8,7 @@ #ifndef _REENT_ONLY char * -_DEFUN (__dtoa, - (d, mode, ndigits, decpt, sign, rve), - double d, +__dtoa (double d, int mode, int ndigits, int *decpt, diff --git a/newlib/libc/stdlib/ecvtbuf.c b/newlib/libc/stdlib/ecvtbuf.c index 2326f55..e3d7b55 100644 --- a/newlib/libc/stdlib/ecvtbuf.c +++ b/newlib/libc/stdlib/ecvtbuf.c @@ -58,8 +58,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #include "local.h" static void -_DEFUN (print_f, (ptr, buf, invalue, ndigit, type, dot, mode), - struct _reent *ptr, +print_f (struct _reent *ptr, char *buf, double invalue, int ndigit, @@ -126,8 +125,7 @@ _DEFUN (print_f, (ptr, buf, invalue, ndigit, type, dot, mode), WIDTH is the number of digits of precision after the decimal point. */ static void -_DEFUN (print_e, (ptr, buf, invalue, width, type, dot), - struct _reent *ptr, +print_e (struct _reent *ptr, char *buf, double invalue, int width, @@ -209,8 +207,7 @@ _DEFUN (print_e, (ptr, buf, invalue, width, type, dot), support ecvt and fcvt, which aren't ANSI anyway. */ char * -_DEFUN (fcvtbuf, (invalue, ndigit, decpt, sign, fcvt_buf), - double invalue, +fcvtbuf (double invalue, int ndigit, int *decpt, int *sign, @@ -266,8 +263,7 @@ _DEFUN (fcvtbuf, (invalue, ndigit, decpt, sign, fcvt_buf), } char * -_DEFUN (ecvtbuf, (invalue, ndigit, decpt, sign, fcvt_buf), - double invalue, +ecvtbuf (double invalue, int ndigit, int *decpt, int *sign, @@ -317,8 +313,7 @@ _DEFUN (ecvtbuf, (invalue, ndigit, decpt, sign, fcvt_buf), #endif char * -_DEFUN (_gcvt, (ptr, invalue, ndigit, buf, type, dot), - struct _reent *ptr, +_gcvt (struct _reent *ptr, double invalue, int ndigit, char *buf, @@ -425,8 +420,7 @@ _DEFUN (_gcvt, (ptr, invalue, ndigit, buf, type, dot), } char * -_DEFUN (_dcvt, (ptr, buffer, invalue, precision, width, type, dot), - struct _reent *ptr, +_dcvt (struct _reent *ptr, char *buffer, double invalue, int precision, diff --git a/newlib/libc/stdlib/efgcvt.c b/newlib/libc/stdlib/efgcvt.c index e354bb1..9314bf3 100644 --- a/newlib/libc/stdlib/efgcvt.c +++ b/newlib/libc/stdlib/efgcvt.c @@ -103,8 +103,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #include "local.h" char * -_DEFUN (fcvt, (d, ndigit, decpt, sign), - double d, +fcvt (double d, int ndigit, int *decpt, int *sign) @@ -113,8 +112,7 @@ _DEFUN (fcvt, (d, ndigit, decpt, sign), } char * -_DEFUN (fcvtf, (d, ndigit, decpt, sign), - float d, +fcvtf (float d, int ndigit, int *decpt, int *sign) @@ -124,8 +122,7 @@ _DEFUN (fcvtf, (d, ndigit, decpt, sign), char * -_DEFUN (gcvtf, (d, ndigit, buf), - float d, +gcvtf (float d, int ndigit, char *buf) { @@ -135,8 +132,7 @@ _DEFUN (gcvtf, (d, ndigit, buf), char * -_DEFUN (ecvt, (d, ndigit, decpt, sign), - double d, +ecvt (double d, int ndigit, int *decpt, int *sign) @@ -145,8 +141,7 @@ _DEFUN (ecvt, (d, ndigit, decpt, sign), } char * -_DEFUN (ecvtf, (d, ndigit, decpt, sign), - float d, +ecvtf (float d, int ndigit, int *decpt, int *sign) @@ -156,8 +151,7 @@ _DEFUN (ecvtf, (d, ndigit, decpt, sign), char * -_DEFUN (gcvt, (d, ndigit, buf), - double d, +gcvt (double d, int ndigit, char *buf) { diff --git a/newlib/libc/stdlib/erand48.c b/newlib/libc/stdlib/erand48.c index a62ff34..1be4a95 100644 --- a/newlib/libc/stdlib/erand48.c +++ b/newlib/libc/stdlib/erand48.c @@ -14,8 +14,7 @@ #include "rand48.h" double -_DEFUN (_erand48_r, (r, xseed), - struct _reent *r, +_erand48_r (struct _reent *r, unsigned short xseed[3]) { __dorand48(r, xseed); @@ -26,8 +25,7 @@ _DEFUN (_erand48_r, (r, xseed), #ifndef _REENT_ONLY double -_DEFUN (erand48, (xseed), - unsigned short xseed[3]) +erand48 (unsigned short xseed[3]) { return _erand48_r (_REENT, xseed); } diff --git a/newlib/libc/stdlib/exit.c b/newlib/libc/stdlib/exit.c index 8fa9490..95108ad 100644 --- a/newlib/libc/stdlib/exit.c +++ b/newlib/libc/stdlib/exit.c @@ -50,8 +50,7 @@ Supporting OS subroutines required: <<_exit>>. */ void -_DEFUN (exit, (code), - int code) +exit (int code) { #ifdef _LITE_EXIT /* Refer to comments in __atexit.c for more details of lite exit. */ diff --git a/newlib/libc/stdlib/gdtoa-gethex.c b/newlib/libc/stdlib/gdtoa-gethex.c index 18d9cc1..939e0dd 100644 --- a/newlib/libc/stdlib/gdtoa-gethex.c +++ b/newlib/libc/stdlib/gdtoa-gethex.c @@ -59,8 +59,7 @@ const unsigned char __hexdig[256]= }; #else /* !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) && !defined(_SMALL_HEXDIG) */ unsigned char -_DEFUN (__hexdig_fun, (c), - unsigned char c) +__hexdig_fun (unsigned char c) { if(c>='0' && c<='9') return c-'0'+0x10; else if(c>='a' && c<='f') return c-'a'+0x10+10; @@ -70,8 +69,7 @@ _DEFUN (__hexdig_fun, (c), #endif /* !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) && !defined(_SMALL_HEXDIG) */ static void -_DEFUN(rshift, (b, k), - _Bigint *b, +rshift (_Bigint *b, int k) { __ULong *x, *x1, *xe, y; @@ -101,8 +99,7 @@ _DEFUN(rshift, (b, k), } static _Bigint * -_DEFUN (increment, (ptr, b), - struct _reent *ptr, +increment (struct _reent *ptr, _Bigint *b) { __ULong *x, *xe; diff --git a/newlib/libc/stdlib/gdtoa-hexnan.c b/newlib/libc/stdlib/gdtoa-hexnan.c index fa98646..a17e5a6 100644 --- a/newlib/libc/stdlib/gdtoa-hexnan.c +++ b/newlib/libc/stdlib/gdtoa-hexnan.c @@ -45,8 +45,7 @@ THIS SOFTWARE. #ifdef INFNAN_CHECK int -_DEFUN (match, (sp, t), - const char **sp, +match (const char **sp, char *t) { int c, d; @@ -63,8 +62,7 @@ _DEFUN (match, (sp, t), } static void -_DEFUN (L_shift, (x, x1, i), - __ULong *x, +L_shift (__ULong *x, __ULong *x1, int i) { @@ -80,8 +78,7 @@ _DEFUN (L_shift, (x, x1, i), } int -_DEFUN (hexnan, (sp, fpi, x0), - const char **sp, +hexnan (const char **sp, const FPI *fpi, __ULong *x0) { diff --git a/newlib/libc/stdlib/getenv.c b/newlib/libc/stdlib/getenv.c index 973a547..107376b 100644 --- a/newlib/libc/stdlib/getenv.c +++ b/newlib/libc/stdlib/getenv.c @@ -64,8 +64,7 @@ variables vary from one system to another. */ char * -_DEFUN (_findenv, (name, offset), - register const char *name, +_findenv (register const char *name, int *offset) { return _findenv_r (_REENT, name, offset); @@ -77,8 +76,7 @@ _DEFUN (_findenv, (name, offset), */ char * -_DEFUN (getenv, (name), - const char *name) +getenv (const char *name) { int offset; diff --git a/newlib/libc/stdlib/getenv_r.c b/newlib/libc/stdlib/getenv_r.c index 315d283..aac1136 100644 --- a/newlib/libc/stdlib/getenv_r.c +++ b/newlib/libc/stdlib/getenv_r.c @@ -74,8 +74,7 @@ static char ***p_environ = &environ; */ char * -_DEFUN (_findenv_r, (reent_ptr, name, offset), - struct _reent *reent_ptr, +_findenv_r (struct _reent *reent_ptr, register const char *name, int *offset) { @@ -119,8 +118,7 @@ _DEFUN (_findenv_r, (reent_ptr, name, offset), */ char * -_DEFUN (_getenv_r, (reent_ptr, name), - struct _reent *reent_ptr, +_getenv_r (struct _reent *reent_ptr, const char *name) { int offset; diff --git a/newlib/libc/stdlib/itoa.c b/newlib/libc/stdlib/itoa.c index 25e6c35..7a7daf0 100644 --- a/newlib/libc/stdlib/itoa.c +++ b/newlib/libc/stdlib/itoa.c @@ -30,8 +30,7 @@ No supporting OS subroutine calls are required. #include <stdlib.h> char * -_DEFUN (__itoa, (value, str, base), - int value, +__itoa (int value, char *str, int base) { @@ -60,8 +59,7 @@ _DEFUN (__itoa, (value, str, base), } char * -_DEFUN (itoa, (value, str, base), - int value, +itoa (int value, char *str, int base) { diff --git a/newlib/libc/stdlib/jrand48.c b/newlib/libc/stdlib/jrand48.c index 4f8c12b..185e0da 100644 --- a/newlib/libc/stdlib/jrand48.c +++ b/newlib/libc/stdlib/jrand48.c @@ -14,8 +14,7 @@ #include "rand48.h" long -_DEFUN (_jrand48_r, (r, xseed), - struct _reent *r, +_jrand48_r (struct _reent *r, unsigned short xseed[3]) { __dorand48(r, xseed); @@ -24,8 +23,7 @@ _DEFUN (_jrand48_r, (r, xseed), #ifndef _REENT_ONLY long -_DEFUN (jrand48, (xseed), - unsigned short xseed[3]) +jrand48 (unsigned short xseed[3]) { return _jrand48_r (_REENT, xseed); } diff --git a/newlib/libc/stdlib/l64a.c b/newlib/libc/stdlib/l64a.c index 6078427..45282e3 100644 --- a/newlib/libc/stdlib/l64a.c +++ b/newlib/libc/stdlib/l64a.c @@ -27,15 +27,13 @@ static const char R64_ARRAY[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; char * -_DEFUN (l64a, (value), - long value) +l64a (long value) { return _l64a_r (_REENT, value); } char * -_DEFUN (_l64a_r, (rptr, value), - struct _reent *rptr, +_l64a_r (struct _reent *rptr, long value) { char *ptr; diff --git a/newlib/libc/stdlib/labs.c b/newlib/libc/stdlib/labs.c index 712f56c..f6761d0 100644 --- a/newlib/libc/stdlib/labs.c +++ b/newlib/libc/stdlib/labs.c @@ -33,8 +33,7 @@ No supporting OS subroutine calls are required. #include <stdlib.h> long -_DEFUN (labs, (x), - long x) +labs (long x) { if (x < 0) { diff --git a/newlib/libc/stdlib/lcong48.c b/newlib/libc/stdlib/lcong48.c index a16d49e..78e9e57 100644 --- a/newlib/libc/stdlib/lcong48.c +++ b/newlib/libc/stdlib/lcong48.c @@ -14,8 +14,7 @@ #include "rand48.h" void -_DEFUN (_lcong48_r, (r, p), - struct _reent *r, +_lcong48_r (struct _reent *r, unsigned short p[7]) { _REENT_CHECK_RAND48(r); @@ -30,8 +29,7 @@ _DEFUN (_lcong48_r, (r, p), #ifndef _REENT_ONLY void -_DEFUN (lcong48, (p), - unsigned short p[7]) +lcong48 (unsigned short p[7]) { _lcong48_r (_REENT, p); } diff --git a/newlib/libc/stdlib/ldiv.c b/newlib/libc/stdlib/ldiv.c index 00bca62..294cc86 100644 --- a/newlib/libc/stdlib/ldiv.c +++ b/newlib/libc/stdlib/ldiv.c @@ -82,8 +82,7 @@ No supporting OS subroutines are required. #include <stdlib.h> /* ldiv_t */ ldiv_t -_DEFUN (ldiv, (num, denom), - long num, +ldiv (long num, long denom) { ldiv_t r; diff --git a/newlib/libc/stdlib/llabs.c b/newlib/libc/stdlib/llabs.c index c2a561c..a020dea 100644 --- a/newlib/libc/stdlib/llabs.c +++ b/newlib/libc/stdlib/llabs.c @@ -54,8 +54,7 @@ No supporting OS subroutines are required. #include <stdlib.h> long long -_DEFUN(llabs, (j), - long long j) +llabs (long long j) { return (j < 0 ? -j : j); } diff --git a/newlib/libc/stdlib/lldiv.c b/newlib/libc/stdlib/lldiv.c index 8433e76..2dadf0e 100644 --- a/newlib/libc/stdlib/lldiv.c +++ b/newlib/libc/stdlib/lldiv.c @@ -94,8 +94,7 @@ No supporting OS subroutines are required. * subtract denom from r.rem. */ lldiv_t -_DEFUN (lldiv, (number, denom), - long long numer, long long denom) +lldiv (long long numer, long long denom) { lldiv_t retval; diff --git a/newlib/libc/stdlib/lrand48.c b/newlib/libc/stdlib/lrand48.c index bb3289c..a28284e 100644 --- a/newlib/libc/stdlib/lrand48.c +++ b/newlib/libc/stdlib/lrand48.c @@ -14,8 +14,7 @@ #include "rand48.h" long -_DEFUN (_lrand48_r, (r), - struct _reent *r) +_lrand48_r (struct _reent *r) { _REENT_CHECK_RAND48(r); __dorand48(r, __rand48_seed); diff --git a/newlib/libc/stdlib/malign.c b/newlib/libc/stdlib/malign.c index e7d56bb..480060c 100644 --- a/newlib/libc/stdlib/malign.c +++ b/newlib/libc/stdlib/malign.c @@ -9,8 +9,7 @@ #ifndef _REENT_ONLY void * -_DEFUN (memalign, (align, nbytes), - size_t align, +memalign (size_t align, size_t nbytes) { return _memalign_r (_REENT, align, nbytes); diff --git a/newlib/libc/stdlib/malloc.c b/newlib/libc/stdlib/malloc.c index 5acaa85..f5ac292 100644 --- a/newlib/libc/stdlib/malloc.c +++ b/newlib/libc/stdlib/malloc.c @@ -159,15 +159,13 @@ Supporting OS subroutines required: <<sbrk>>. */ #ifndef _REENT_ONLY void * -_DEFUN (malloc, (nbytes), - size_t nbytes) /* get a block */ +malloc (size_t nbytes) /* get a block */ { return _malloc_r (_REENT, nbytes); } void -_DEFUN (free, (aptr), - void *aptr) +free (void *aptr) { _free_r (_REENT, aptr); } diff --git a/newlib/libc/stdlib/mblen.c b/newlib/libc/stdlib/mblen.c index 3ea91f4..3753d36 100644 --- a/newlib/libc/stdlib/mblen.c +++ b/newlib/libc/stdlib/mblen.c @@ -43,8 +43,7 @@ effects vary with the locale. #include "local.h" int -_DEFUN (mblen, (s, n), - const char *s, +mblen (const char *s, size_t n) { #ifdef _MB_CAPABLE diff --git a/newlib/libc/stdlib/mblen_r.c b/newlib/libc/stdlib/mblen_r.c index 1456cea..ff17370 100644 --- a/newlib/libc/stdlib/mblen_r.c +++ b/newlib/libc/stdlib/mblen_r.c @@ -41,8 +41,7 @@ effects vary with the locale. #include "local.h" int -_DEFUN (_mblen_r, (r, s, n, state), - struct _reent *r, +_mblen_r (struct _reent *r, const char *s, size_t n, mbstate_t *state) diff --git a/newlib/libc/stdlib/mbrtowc.c b/newlib/libc/stdlib/mbrtowc.c index 4ca2143..65284a0 100644 --- a/newlib/libc/stdlib/mbrtowc.c +++ b/newlib/libc/stdlib/mbrtowc.c @@ -8,8 +8,7 @@ #include "local.h" size_t -_DEFUN (_mbrtowc_r, (ptr, pwc, s, n, ps), - struct _reent *ptr, +_mbrtowc_r (struct _reent *ptr, wchar_t *pwc, const char *s, size_t n, @@ -42,8 +41,7 @@ _DEFUN (_mbrtowc_r, (ptr, pwc, s, n, ps), #ifndef _REENT_ONLY size_t -_DEFUN (mbrtowc, (pwc, s, n, ps), - wchar_t *__restrict pwc, +mbrtowc (wchar_t *__restrict pwc, const char *__restrict s, size_t n, mbstate_t *__restrict ps) diff --git a/newlib/libc/stdlib/mbsnrtowcs.c b/newlib/libc/stdlib/mbsnrtowcs.c index 206a062..d3ce250 100644 --- a/newlib/libc/stdlib/mbsnrtowcs.c +++ b/newlib/libc/stdlib/mbsnrtowcs.c @@ -71,8 +71,7 @@ PORTABILITY #include <errno.h> size_t -_DEFUN (_mbsnrtowcs_r, (r, dst, src, nms, len, ps), - struct _reent *r, +_mbsnrtowcs_r (struct _reent *r, wchar_t *dst, const char **src, size_t nms, @@ -137,8 +136,7 @@ _DEFUN (_mbsnrtowcs_r, (r, dst, src, nms, len, ps), #ifndef _REENT_ONLY size_t -_DEFUN (mbsnrtowcs, (dst, src, nms, len, ps), - wchar_t *__restrict dst, +mbsnrtowcs (wchar_t *__restrict dst, const char **__restrict src, size_t nms, size_t len, diff --git a/newlib/libc/stdlib/mbsrtowcs.c b/newlib/libc/stdlib/mbsrtowcs.c index 48d36d0..82589c6 100644 --- a/newlib/libc/stdlib/mbsrtowcs.c +++ b/newlib/libc/stdlib/mbsrtowcs.c @@ -8,8 +8,7 @@ #include <errno.h> size_t -_DEFUN (_mbsrtowcs_r, (r, dst, src, len, ps), - struct _reent *r, +_mbsrtowcs_r (struct _reent *r, wchar_t *dst, const char **src, size_t len, @@ -20,8 +19,7 @@ _DEFUN (_mbsrtowcs_r, (r, dst, src, len, ps), #ifndef _REENT_ONLY size_t -_DEFUN (mbsrtowcs, (dst, src, len, ps), - wchar_t *__restrict dst, +mbsrtowcs (wchar_t *__restrict dst, const char **__restrict src, size_t len, mbstate_t *__restrict ps) diff --git a/newlib/libc/stdlib/mbstowcs.c b/newlib/libc/stdlib/mbstowcs.c index 41ad7b6..253059c 100644 --- a/newlib/libc/stdlib/mbstowcs.c +++ b/newlib/libc/stdlib/mbstowcs.c @@ -47,8 +47,7 @@ effects vary with the locale. #include <wchar.h> size_t -_DEFUN (mbstowcs, (pwcs, s, n), - wchar_t *__restrict pwcs, +mbstowcs (wchar_t *__restrict pwcs, const char *__restrict s, size_t n) { diff --git a/newlib/libc/stdlib/mbstowcs_r.c b/newlib/libc/stdlib/mbstowcs_r.c index 7c95e4a..43aea2c 100644 --- a/newlib/libc/stdlib/mbstowcs_r.c +++ b/newlib/libc/stdlib/mbstowcs_r.c @@ -3,8 +3,7 @@ #include "local.h" size_t -_DEFUN (_mbstowcs_r, (reent, pwcs, s, n, state), - struct _reent *r, +_mbstowcs_r (struct _reent *r, wchar_t *__restrict pwcs, const char *__restrict s, size_t n, diff --git a/newlib/libc/stdlib/mbtowc.c b/newlib/libc/stdlib/mbtowc.c index 182884a..2dc413f 100644 --- a/newlib/libc/stdlib/mbtowc.c +++ b/newlib/libc/stdlib/mbtowc.c @@ -50,8 +50,7 @@ effects vary with the locale. #include "local.h" int -_DEFUN (mbtowc, (pwc, s, n), - wchar_t *__restrict pwc, +mbtowc (wchar_t *__restrict pwc, const char *__restrict s, size_t n) { diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c index cbc534a..920a7ea 100644 --- a/newlib/libc/stdlib/mbtowc_r.c +++ b/newlib/libc/stdlib/mbtowc_r.c @@ -8,8 +8,7 @@ #include "local.h" int -_DEFUN (_mbtowc_r, (r, pwc, s, n, state), - struct _reent *r, +_mbtowc_r (struct _reent *r, wchar_t *__restrict pwc, const char *__restrict s, size_t n, @@ -19,8 +18,7 @@ _DEFUN (_mbtowc_r, (r, pwc, s, n, state), } int -_DEFUN (__ascii_mbtowc, (r, pwc, s, n, state), - struct _reent *r, +__ascii_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, @@ -528,8 +526,7 @@ __cp_mbtowc (int val) #endif /* _MB_EXTENDED_CHARSETS_WINDOWS */ int -_DEFUN (__utf8_mbtowc, (r, pwc, s, n, state), - struct _reent *r, +__utf8_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, @@ -730,8 +727,7 @@ _DEFUN (__utf8_mbtowc, (r, pwc, s, n, state), because the underlying OS requires wchar_t == UTF-16. */ #ifndef __CYGWIN__ int -_DEFUN (__sjis_mbtowc, (r, pwc, s, n, state), - struct _reent *r, +__sjis_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, @@ -787,8 +783,7 @@ _DEFUN (__sjis_mbtowc, (r, pwc, s, n, state), } int -_DEFUN (__eucjp_mbtowc, (r, pwc, s, n, state), - struct _reent *r, +__eucjp_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, @@ -870,8 +865,7 @@ _DEFUN (__eucjp_mbtowc, (r, pwc, s, n, state), } int -_DEFUN (__jis_mbtowc, (r, pwc, s, n, state), - struct _reent *r, +__jis_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, diff --git a/newlib/libc/stdlib/mprec.c b/newlib/libc/stdlib/mprec.c index bd1c691..e433fa8 100644 --- a/newlib/libc/stdlib/mprec.c +++ b/newlib/libc/stdlib/mprec.c @@ -94,7 +94,7 @@ */ _Bigint * -_DEFUN (Balloc, (ptr, k), struct _reent *ptr, int k) +Balloc (struct _reent *ptr, int k) { int x; _Bigint *rv ; @@ -133,7 +133,7 @@ _DEFUN (Balloc, (ptr, k), struct _reent *ptr, int k) } void -_DEFUN (Bfree, (ptr, v), struct _reent *ptr, _Bigint * v) +Bfree (struct _reent *ptr, _Bigint * v) { _REENT_CHECK_MP(ptr); if (v) @@ -144,8 +144,7 @@ _DEFUN (Bfree, (ptr, v), struct _reent *ptr, _Bigint * v) } _Bigint * -_DEFUN (multadd, (ptr, b, m, a), - struct _reent *ptr, +multadd (struct _reent *ptr, _Bigint * b, int m, int a) @@ -191,8 +190,7 @@ _DEFUN (multadd, (ptr, b, m, a), } _Bigint * -_DEFUN (s2b, (ptr, s, nd0, nd, y9), - struct _reent * ptr, +s2b (struct _reent * ptr, const char *s, int nd0, int nd, @@ -231,8 +229,7 @@ _DEFUN (s2b, (ptr, s, nd0, nd, y9), } int -_DEFUN (hi0bits, - (x), register __ULong x) +hi0bits (register __ULong x) { register int k = 0; @@ -266,7 +263,7 @@ _DEFUN (hi0bits, } int -_DEFUN (lo0bits, (y), __ULong *y) +lo0bits (__ULong *y) { register int k; register __ULong x = *y; @@ -316,7 +313,7 @@ _DEFUN (lo0bits, (y), __ULong *y) } _Bigint * -_DEFUN (i2b, (ptr, i), struct _reent * ptr, int i) +i2b (struct _reent * ptr, int i) { _Bigint *b; @@ -327,7 +324,7 @@ _DEFUN (i2b, (ptr, i), struct _reent * ptr, int i) } _Bigint * -_DEFUN (mult, (ptr, a, b), struct _reent * ptr, _Bigint * a, _Bigint * b) +mult (struct _reent * ptr, _Bigint * a, _Bigint * b) { _Bigint *c; int k, wa, wb, wc; @@ -419,8 +416,7 @@ _DEFUN (mult, (ptr, a, b), struct _reent * ptr, _Bigint * a, _Bigint * b) } _Bigint * -_DEFUN (pow5mult, - (ptr, b, k), struct _reent * ptr, _Bigint * b, int k) +pow5mult (struct _reent * ptr, _Bigint * b, int k) { _Bigint *b1, *p5, *p51; int i; @@ -459,7 +455,7 @@ _DEFUN (pow5mult, } _Bigint * -_DEFUN (lshift, (ptr, b, k), struct _reent * ptr, _Bigint * b, int k) +lshift (struct _reent * ptr, _Bigint * b, int k) { int i, k1, n, n1; _Bigint *b1; @@ -519,7 +515,7 @@ _DEFUN (lshift, (ptr, b, k), struct _reent * ptr, _Bigint * b, int k) } int -_DEFUN (cmp, (a, b), _Bigint * a, _Bigint * b) +cmp (_Bigint * a, _Bigint * b) { __ULong *xa, *xa0, *xb, *xb0; int i, j; @@ -549,7 +545,7 @@ _DEFUN (cmp, (a, b), _Bigint * a, _Bigint * b) } _Bigint * -_DEFUN (diff, (ptr, a, b), struct _reent * ptr, +diff (struct _reent * ptr, _Bigint * a, _Bigint * b) { _Bigint *c; @@ -633,7 +629,7 @@ _DEFUN (diff, (ptr, a, b), struct _reent * ptr, } double -_DEFUN (ulp, (_x), double _x) +ulp (double _x) { union double_union x, a; register __Long L; @@ -679,8 +675,7 @@ _DEFUN (ulp, (_x), double _x) } double -_DEFUN (b2d, (a, e), - _Bigint * a, int *e) +b2d (_Bigint * a, int *e) { __ULong *xa, *xa0, w, y, z; int k; @@ -756,9 +751,7 @@ ret_d: } _Bigint * -_DEFUN (d2b, - (ptr, _d, e, bits), - struct _reent * ptr, +d2b (struct _reent * ptr, double _d, int *e, int *bits) @@ -911,7 +904,7 @@ _DEFUN (d2b, #undef d1 double -_DEFUN (ratio, (a, b), _Bigint * a, _Bigint * b) +ratio (_Bigint * a, _Bigint * b) { union double_union da, db; @@ -976,8 +969,7 @@ const double tinytens[] = double -_DEFUN (_mprec_log10, (dig), - int dig) +_mprec_log10 (int dig) { double v = 1.0; if (dig < 24) @@ -991,8 +983,7 @@ _DEFUN (_mprec_log10, (dig), } void -_DEFUN (copybits, (c, n, b), - __ULong *c, +copybits (__ULong *c, int n, _Bigint *b) { @@ -1020,8 +1011,7 @@ _DEFUN (copybits, (c, n, b), } __ULong -_DEFUN (any_on, (b, k), - _Bigint *b, +any_on (_Bigint *b, int k) { int n, nwds; diff --git a/newlib/libc/stdlib/mrand48.c b/newlib/libc/stdlib/mrand48.c index 62b44ed..bb1e454 100644 --- a/newlib/libc/stdlib/mrand48.c +++ b/newlib/libc/stdlib/mrand48.c @@ -14,8 +14,7 @@ #include "rand48.h" long -_DEFUN (_mrand48_r, (r), - struct _reent *r) +_mrand48_r (struct _reent *r) { _REENT_CHECK_RAND48(r); __dorand48(r, __rand48_seed); diff --git a/newlib/libc/stdlib/msize.c b/newlib/libc/stdlib/msize.c index 8c2b221..108550d 100644 --- a/newlib/libc/stdlib/msize.c +++ b/newlib/libc/stdlib/msize.c @@ -9,8 +9,7 @@ #ifndef _REENT_ONLY size_t -_DEFUN (malloc_usable_size, (ptr), - void *ptr) +malloc_usable_size (void *ptr) { return _malloc_usable_size_r (_REENT, ptr); } diff --git a/newlib/libc/stdlib/mstats.c b/newlib/libc/stdlib/mstats.c index 92f9fb7..85c20f1 100644 --- a/newlib/libc/stdlib/mstats.c +++ b/newlib/libc/stdlib/mstats.c @@ -97,8 +97,7 @@ malloc_stats (void) } int -_DEFUN (mallopt, (p, v), - int p, +mallopt (int p, int v) { return _mallopt_r (_REENT, p, v); @@ -115,8 +114,7 @@ _DEFUN (mallopt, (p, v), malloc_stats. */ void -_DEFUN (_mstats_r, (ptr, s), - struct _reent *ptr, +_mstats_r (struct _reent *ptr, char *s) { _REENT_SMALL_CHECK_INIT(ptr); @@ -126,8 +124,7 @@ _DEFUN (_mstats_r, (ptr, s), #ifndef _REENT_ONLY void -_DEFUN (mstats, (s), - char *s) +mstats (char *s) { _mstats_r (_REENT, s); } diff --git a/newlib/libc/stdlib/mtrim.c b/newlib/libc/stdlib/mtrim.c index 328eb71..bf927fa 100644 --- a/newlib/libc/stdlib/mtrim.c +++ b/newlib/libc/stdlib/mtrim.c @@ -9,8 +9,7 @@ #ifndef _REENT_ONLY int -_DEFUN (malloc_trim, (pad), - size_t pad) +malloc_trim (size_t pad) { return _malloc_trim_r (_REENT, pad); } diff --git a/newlib/libc/stdlib/nrand48.c b/newlib/libc/stdlib/nrand48.c index 43a6d0c..cca0e5f 100644 --- a/newlib/libc/stdlib/nrand48.c +++ b/newlib/libc/stdlib/nrand48.c @@ -14,8 +14,7 @@ #include "rand48.h" long -_DEFUN (_nrand48_r, (r, xseed), - struct _reent *r, +_nrand48_r (struct _reent *r, unsigned short xseed[3]) { __dorand48 (r, xseed); @@ -25,8 +24,7 @@ _DEFUN (_nrand48_r, (r, xseed), #ifndef _REENT_ONLY long -_DEFUN (nrand48, (xseed), - unsigned short xseed[3]) +nrand48 (unsigned short xseed[3]) { return _nrand48_r (_REENT, xseed); } diff --git a/newlib/libc/stdlib/on_exit.c b/newlib/libc/stdlib/on_exit.c index 97d107e..ce6bac6 100644 --- a/newlib/libc/stdlib/on_exit.c +++ b/newlib/libc/stdlib/on_exit.c @@ -66,9 +66,7 @@ const void * const __on_exit_dummy = &__on_exit_args; */ int -_DEFUN (on_exit, - (fn, arg), - void _EXFNPTR(fn, (int, void *)), +on_exit (void _EXFNPTR(fn, (int, void *)), void *arg) { return __register_exitproc (__et_onexit, (void (*)(void)) fn, arg, NULL); diff --git a/newlib/libc/stdlib/putenv.c b/newlib/libc/stdlib/putenv.c index 978f7c5..7a8d7f7 100644 --- a/newlib/libc/stdlib/putenv.c +++ b/newlib/libc/stdlib/putenv.c @@ -23,8 +23,7 @@ #include <string.h> int -_DEFUN (putenv, (str), - char *str) +putenv (char *str) { return _putenv_r (_REENT, str); } diff --git a/newlib/libc/stdlib/putenv_r.c b/newlib/libc/stdlib/putenv_r.c index a780a14..8c23a82 100644 --- a/newlib/libc/stdlib/putenv_r.c +++ b/newlib/libc/stdlib/putenv_r.c @@ -31,8 +31,7 @@ or replaces the environment variable "name" with "value" which is specified by str as "name=value". */ int -_DEFUN (_putenv_r, (reent_ptr, str), - struct _reent *reent_ptr, +_putenv_r (struct _reent *reent_ptr, char *str) { register char *p, *equal; diff --git a/newlib/libc/stdlib/rand.c b/newlib/libc/stdlib/rand.c index e6ef7a1..209cb32 100644 --- a/newlib/libc/stdlib/rand.c +++ b/newlib/libc/stdlib/rand.c @@ -59,7 +59,7 @@ on two different systems. #include <reent.h> void -_DEFUN (srand, (seed), unsigned int seed) +srand (unsigned int seed) { struct _reent *reent = _REENT; diff --git a/newlib/libc/stdlib/rand48.c b/newlib/libc/stdlib/rand48.c index 0fc5cc0..626b3ef 100644 --- a/newlib/libc/stdlib/rand48.c +++ b/newlib/libc/stdlib/rand48.c @@ -130,8 +130,7 @@ No supporting OS subroutines are required. #include "rand48.h" void -_DEFUN (__dorand48, (r, xseed), - struct _reent *r, +__dorand48 (struct _reent *r, unsigned short xseed[3]) { unsigned long accu; diff --git a/newlib/libc/stdlib/rand_r.c b/newlib/libc/stdlib/rand_r.c index 437739e..0670285 100644 --- a/newlib/libc/stdlib/rand_r.c +++ b/newlib/libc/stdlib/rand_r.c @@ -22,7 +22,7 @@ */ int -_DEFUN (rand_r, (seed), unsigned int *seed) +rand_r (unsigned int *seed) { long k; long s = (long)(*seed); diff --git a/newlib/libc/stdlib/random.c b/newlib/libc/stdlib/random.c index b3b0ca3..131dc05 100644 --- a/newlib/libc/stdlib/random.c +++ b/newlib/libc/stdlib/random.c @@ -57,7 +57,7 @@ algorithm as <<rand>>. #include <reent.h> void -_DEFUN (srandom, (seed), unsigned int seed) +srandom (unsigned int seed) { struct _reent *reent = _REENT; diff --git a/newlib/libc/stdlib/realloc.c b/newlib/libc/stdlib/realloc.c index 00a88a5..999e8e0 100644 --- a/newlib/libc/stdlib/realloc.c +++ b/newlib/libc/stdlib/realloc.c @@ -11,8 +11,7 @@ int _dummy_realloc = 1; #ifndef _REENT_ONLY void * -_DEFUN (realloc, (ap, nbytes), - void *ap, +realloc (void *ap, size_t nbytes) { return _realloc_r (_REENT, ap, nbytes); diff --git a/newlib/libc/stdlib/reallocf.c b/newlib/libc/stdlib/reallocf.c index c4aaeae..d62752a 100644 --- a/newlib/libc/stdlib/reallocf.c +++ b/newlib/libc/stdlib/reallocf.c @@ -31,8 +31,7 @@ #include <stdlib.h> void * -_DEFUN (_reallocf_r, (reentptr, ptr, size), - struct _reent *reentptr, +_reallocf_r (struct _reent *reentptr, void *ptr, size_t size) { @@ -46,8 +45,7 @@ _DEFUN (_reallocf_r, (reentptr, ptr, size), #ifndef _REENT_ONLY void * -_DEFUN (reallocf, (ptr, size), - void *ptr, +reallocf (void *ptr, size_t size) { return _reallocf_r(_REENT, ptr, size); diff --git a/newlib/libc/stdlib/rpmatch.c b/newlib/libc/stdlib/rpmatch.c index 93d2c3f..42a3513 100644 --- a/newlib/libc/stdlib/rpmatch.c +++ b/newlib/libc/stdlib/rpmatch.c @@ -59,8 +59,7 @@ No supporting OS subroutines are required. #include <stdlib.h> int -_DEFUN(rpmatch, (response), - const char *response) +rpmatch (const char *response) { regex_t yes, no; int ret; diff --git a/newlib/libc/stdlib/seed48.c b/newlib/libc/stdlib/seed48.c index 5f3ae2e..25f0e50 100644 --- a/newlib/libc/stdlib/seed48.c +++ b/newlib/libc/stdlib/seed48.c @@ -14,8 +14,7 @@ #include "rand48.h" unsigned short * -_DEFUN (_seed48_r, (r, xseed), - struct _reent *r, +_seed48_r (struct _reent *r, unsigned short xseed[3]) { static unsigned short sseed[3]; @@ -36,8 +35,7 @@ _DEFUN (_seed48_r, (r, xseed), #ifndef _REENT_ONLY unsigned short * -_DEFUN (seed48, (xseed), - unsigned short xseed[3]) +seed48 (unsigned short xseed[3]) { return _seed48_r (_REENT, xseed); } diff --git a/newlib/libc/stdlib/setenv.c b/newlib/libc/stdlib/setenv.c index e68e91d..b0c1585 100644 --- a/newlib/libc/stdlib/setenv.c +++ b/newlib/libc/stdlib/setenv.c @@ -32,8 +32,7 @@ extern int _unsetenv_r (struct _reent *, const char *); */ int -_DEFUN (setenv, (name, value, rewrite), - const char *name, +setenv (const char *name, const char *value, int rewrite) { @@ -45,8 +44,7 @@ _DEFUN (setenv, (name, value, rewrite), * Delete environmental variable "name". */ int -_DEFUN (unsetenv, (name), - const char *name) +unsetenv (const char *name) { return _unsetenv_r (_REENT, name); } diff --git a/newlib/libc/stdlib/setenv_r.c b/newlib/libc/stdlib/setenv_r.c index 31d4fc7..f1f8857 100644 --- a/newlib/libc/stdlib/setenv_r.c +++ b/newlib/libc/stdlib/setenv_r.c @@ -49,8 +49,7 @@ extern char *_findenv_r (struct _reent *, const char *, int *); */ int -_DEFUN (_setenv_r, (reent_ptr, name, value, rewrite), - struct _reent *reent_ptr, +_setenv_r (struct _reent *reent_ptr, const char *name, const char *value, int rewrite) @@ -133,8 +132,7 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite), * Delete environmental variable "name". */ int -_DEFUN (_unsetenv_r, (reent_ptr, name), - struct _reent *reent_ptr, +_unsetenv_r (struct _reent *reent_ptr, const char *name) { register char **P; diff --git a/newlib/libc/stdlib/srand48.c b/newlib/libc/stdlib/srand48.c index 1eac2a1..573f620 100644 --- a/newlib/libc/stdlib/srand48.c +++ b/newlib/libc/stdlib/srand48.c @@ -14,8 +14,7 @@ #include "rand48.h" void -_DEFUN (_srand48_r, (r, seed), - struct _reent *r, +_srand48_r (struct _reent *r, long seed) { _REENT_CHECK_RAND48(r); @@ -30,8 +29,7 @@ _DEFUN (_srand48_r, (r, seed), #ifndef _REENT_ONLY void -_DEFUN (srand48, (seed), - long seed) +srand48 (long seed) { _srand48_r (_REENT, seed); } diff --git a/newlib/libc/stdlib/strtod.c b/newlib/libc/stdlib/strtod.c index 1abff4f..402510c 100644 --- a/newlib/libc/stdlib/strtod.c +++ b/newlib/libc/stdlib/strtod.c @@ -174,8 +174,7 @@ static const double tinytens[] = { 1e-16, 1e-32, #ifdef Avoid_Underflow /*{*/ static double -_DEFUN (sulp, (x, scale), - U x, +sulp (U x, int scale) { U u; @@ -197,8 +196,7 @@ _DEFUN (sulp, (x, scale), #ifndef NO_HEX_FP static void -_DEFUN (ULtod, (L, bits, exp, k), - __ULong *L, +ULtod (__ULong *L, __ULong *bits, Long exp, int k) @@ -1252,8 +1250,7 @@ _strtod_l (struct _reent *ptr, const char *__restrict s00, char **__restrict se, } double -_DEFUN (_strtod_r, (ptr, s00, se), - struct _reent *ptr, +_strtod_r (struct _reent *ptr, const char *__restrict s00, char **__restrict se) { @@ -1269,8 +1266,7 @@ strtod_l (const char *__restrict s00, char **__restrict se, locale_t loc) } double -_DEFUN (strtod, (s00, se), - const char *__restrict s00, char **__restrict se) +strtod (const char *__restrict s00, char **__restrict se) { return _strtod_l (_REENT, s00, se, __get_current_locale ()); } @@ -1290,8 +1286,7 @@ strtof_l (const char *__restrict s00, char **__restrict se, locale_t loc) } float -_DEFUN (strtof, (s00, se), - const char *__restrict s00, +strtof (const char *__restrict s00, char **__restrict se) { double val = _strtod_l (_REENT, s00, se, __get_current_locale ()); diff --git a/newlib/libc/stdlib/strtol.c b/newlib/libc/stdlib/strtol.c index a366680..f7572b1 100644 --- a/newlib/libc/stdlib/strtol.c +++ b/newlib/libc/stdlib/strtol.c @@ -212,8 +212,7 @@ _strtol_l (struct _reent *rptr, const char *__restrict nptr, } long -_DEFUN (_strtol_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_strtol_r (struct _reent *rptr, const char *__restrict nptr, char **__restrict endptr, int base) @@ -231,8 +230,7 @@ strtol_l (const char *__restrict s, char **__restrict ptr, int base, } long -_DEFUN (strtol, (s, ptr, base), - const char *__restrict s, +strtol (const char *__restrict s, char **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/strtoll.c b/newlib/libc/stdlib/strtoll.c index 9fc8323..295886e 100644 --- a/newlib/libc/stdlib/strtoll.c +++ b/newlib/libc/stdlib/strtoll.c @@ -214,8 +214,7 @@ _strtoll_l (struct _reent *rptr, const char *__restrict nptr, } long long -_DEFUN (_strtoll_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_strtoll_r (struct _reent *rptr, const char *__restrict nptr, char **__restrict endptr, int base) @@ -233,8 +232,7 @@ strtoll_l (const char *__restrict s, char **__restrict ptr, int base, } long long -_DEFUN (strtoll, (s, ptr, base), - const char *__restrict s, +strtoll (const char *__restrict s, char **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/strtoul.c b/newlib/libc/stdlib/strtoul.c index 5a816da..f2fba37 100644 --- a/newlib/libc/stdlib/strtoul.c +++ b/newlib/libc/stdlib/strtoul.c @@ -191,8 +191,7 @@ _strtoul_l (struct _reent *rptr, const char *__restrict nptr, } unsigned long -_DEFUN (_strtoul_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_strtoul_r (struct _reent *rptr, const char *__restrict nptr, char **__restrict endptr, int base) @@ -210,8 +209,7 @@ strtoul_l (const char *__restrict s, char **__restrict ptr, int base, } unsigned long -_DEFUN (strtoul, (s, ptr, base), - const char *__restrict s, +strtoul (const char *__restrict s, char **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/strtoull.c b/newlib/libc/stdlib/strtoull.c index 0f7c9e3..ce4de6e 100644 --- a/newlib/libc/stdlib/strtoull.c +++ b/newlib/libc/stdlib/strtoull.c @@ -189,8 +189,7 @@ _strtoull_l (struct _reent *rptr, const char *__restrict nptr, } unsigned long long -_DEFUN (_strtoull_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_strtoull_r (struct _reent *rptr, const char *__restrict nptr, char **__restrict endptr, int base) @@ -208,8 +207,7 @@ strtoull_l (const char *__restrict s, char **__restrict ptr, int base, } unsigned long long -_DEFUN (strtoull, (s, ptr, base), - const char *__restrict s, +strtoull (const char *__restrict s, char **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/system.c b/newlib/libc/stdlib/system.c index 0df7d60..34be6cd 100644 --- a/newlib/libc/stdlib/system.c +++ b/newlib/libc/stdlib/system.c @@ -57,8 +57,7 @@ static int _EXFUN(do_system, (struct _reent *ptr, const char *s)); #endif int -_DEFUN(_system_r, (ptr, s), - struct _reent *ptr, +_system_r (struct _reent *ptr, const char *s) { #if defined(HAVE_SYSTEM) @@ -93,8 +92,7 @@ _DEFUN(_system_r, (ptr, s), #ifndef _REENT_ONLY int -_DEFUN(system, (s), - const char *s) +system (const char *s) { return _system_r (_REENT, s); } @@ -110,8 +108,7 @@ extern char **environ; static char ***p_environ = &environ; static int -_DEFUN(do_system, (ptr, s), - struct _reent *ptr, +do_system (struct _reent *ptr, const char *s) { char *argv[4]; @@ -142,8 +139,7 @@ _DEFUN(do_system, (ptr, s), #if defined (__CYGWIN__) static int -_DEFUN(do_system, (ptr, s), - struct _reent *ptr, +do_system (struct _reent *ptr, const char *s) { char *argv[4]; diff --git a/newlib/libc/stdlib/utoa.c b/newlib/libc/stdlib/utoa.c index cc54407..5ef304c 100644 --- a/newlib/libc/stdlib/utoa.c +++ b/newlib/libc/stdlib/utoa.c @@ -28,8 +28,7 @@ No supporting OS subroutine calls are required. #include <stdlib.h> char * -_DEFUN (__utoa, (value, str, base), - unsigned value, +__utoa (unsigned value, char *str, int base) { @@ -67,8 +66,7 @@ _DEFUN (__utoa, (value, str, base), } char * -_DEFUN (utoa, (value, str, base), - unsigned value, +utoa (unsigned value, char *str, int base) { diff --git a/newlib/libc/stdlib/valloc.c b/newlib/libc/stdlib/valloc.c index 83a839e..0253866 100644 --- a/newlib/libc/stdlib/valloc.c +++ b/newlib/libc/stdlib/valloc.c @@ -9,15 +9,13 @@ #ifndef _REENT_ONLY void * -_DEFUN (valloc, (nbytes), - size_t nbytes) +valloc (size_t nbytes) { return _valloc_r (_REENT, nbytes); } void * -_DEFUN (pvalloc, (nbytes), - size_t nbytes) +pvalloc (size_t nbytes) { return _pvalloc_r (_REENT, nbytes); } diff --git a/newlib/libc/stdlib/wcrtomb.c b/newlib/libc/stdlib/wcrtomb.c index 3b6cbd6..97436cb 100644 --- a/newlib/libc/stdlib/wcrtomb.c +++ b/newlib/libc/stdlib/wcrtomb.c @@ -7,8 +7,7 @@ #include "local.h" size_t -_DEFUN (_wcrtomb_r, (ptr, s, wc, ps), - struct _reent *ptr, +_wcrtomb_r (struct _reent *ptr, char *s, wchar_t wc, mbstate_t *ps) @@ -41,8 +40,7 @@ _DEFUN (_wcrtomb_r, (ptr, s, wc, ps), #ifndef _REENT_ONLY size_t -_DEFUN (wcrtomb, (s, wc, ps), - char *__restrict s, +wcrtomb (char *__restrict s, wchar_t wc, mbstate_t *__restrict ps) { diff --git a/newlib/libc/stdlib/wcsnrtombs.c b/newlib/libc/stdlib/wcsnrtombs.c index 3561257..43dd2f3 100644 --- a/newlib/libc/stdlib/wcsnrtombs.c +++ b/newlib/libc/stdlib/wcsnrtombs.c @@ -138,8 +138,7 @@ _wcsnrtombs_l (struct _reent *r, char *dst, const wchar_t **src, size_t nwc, } size_t -_DEFUN (_wcsnrtombs_r, (r, dst, src, nwc, len, ps), - struct _reent *r, +_wcsnrtombs_r (struct _reent *r, char *dst, const wchar_t **src, size_t nwc, @@ -152,8 +151,7 @@ _DEFUN (_wcsnrtombs_r, (r, dst, src, nwc, len, ps), #ifndef _REENT_ONLY size_t -_DEFUN (wcsnrtombs, (dst, src, nwc, len, ps), - char *__restrict dst, +wcsnrtombs (char *__restrict dst, const wchar_t **__restrict src, size_t nwc, size_t len, diff --git a/newlib/libc/stdlib/wcsrtombs.c b/newlib/libc/stdlib/wcsrtombs.c index ac0c9de..dc4807d 100644 --- a/newlib/libc/stdlib/wcsrtombs.c +++ b/newlib/libc/stdlib/wcsrtombs.c @@ -5,8 +5,7 @@ #include <wchar.h> size_t -_DEFUN (_wcsrtombs_r, (r, dst, src, len, ps), - struct _reent *r, +_wcsrtombs_r (struct _reent *r, char *dst, const wchar_t **src, size_t len, @@ -17,8 +16,7 @@ _DEFUN (_wcsrtombs_r, (r, dst, src, len, ps), #ifndef _REENT_ONLY size_t -_DEFUN (wcsrtombs, (dst, src, len, ps), - char *__restrict dst, +wcsrtombs (char *__restrict dst, const wchar_t **__restrict src, size_t len, mbstate_t *__restrict ps) diff --git a/newlib/libc/stdlib/wcstod.c b/newlib/libc/stdlib/wcstod.c index 8a72e6f..9e0d563 100644 --- a/newlib/libc/stdlib/wcstod.c +++ b/newlib/libc/stdlib/wcstod.c @@ -214,8 +214,7 @@ _wcstod_l (struct _reent *ptr, const wchar_t *nptr, wchar_t **endptr, } double -_DEFUN (_wcstod_r, (ptr, nptr, endptr), - struct _reent *ptr, +_wcstod_r (struct _reent *ptr, const wchar_t *nptr, wchar_t **endptr) { @@ -223,8 +222,7 @@ _DEFUN (_wcstod_r, (ptr, nptr, endptr), } float -_DEFUN (_wcstof_r, (ptr, nptr, endptr), - struct _reent *ptr, +_wcstof_r (struct _reent *ptr, const wchar_t *nptr, wchar_t **endptr) { @@ -244,8 +242,7 @@ wcstod_l (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, } double -_DEFUN (wcstod, (nptr, endptr), - const wchar_t *__restrict nptr, wchar_t **__restrict endptr) +wcstod (const wchar_t *__restrict nptr, wchar_t **__restrict endptr) { return _wcstod_l (_REENT, nptr, endptr, __get_current_locale ()); } @@ -266,8 +263,7 @@ wcstof_l (const wchar_t *__restrict nptr, wchar_t **__restrict endptr, } float -_DEFUN (wcstof, (nptr, endptr), - const wchar_t *__restrict nptr, +wcstof (const wchar_t *__restrict nptr, wchar_t **__restrict endptr) { double val = _wcstod_l (_REENT, nptr, endptr, __get_current_locale ()); diff --git a/newlib/libc/stdlib/wcstol.c b/newlib/libc/stdlib/wcstol.c index 324d75e..023a9c4 100644 --- a/newlib/libc/stdlib/wcstol.c +++ b/newlib/libc/stdlib/wcstol.c @@ -213,8 +213,7 @@ _wcstol_l (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, } long -_DEFUN (_wcstol_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_wcstol_r (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, int base) @@ -232,8 +231,7 @@ wcstol_l (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base, } long -_DEFUN (wcstol, (s, ptr, base), - const wchar_t *__restrict s, +wcstol (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/wcstoll.c b/newlib/libc/stdlib/wcstoll.c index 00db2ad..5fe0b29 100644 --- a/newlib/libc/stdlib/wcstoll.c +++ b/newlib/libc/stdlib/wcstoll.c @@ -213,8 +213,7 @@ _wcstoll_l (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, } long long -_DEFUN (_wcstoll_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_wcstoll_r (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, int base) @@ -232,8 +231,7 @@ wcstoll_l (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base, } long long -_DEFUN (wcstoll, (s, ptr, base), - const wchar_t *__restrict s, +wcstoll (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/wcstombs.c b/newlib/libc/stdlib/wcstombs.c index 6df2dac..42be540 100644 --- a/newlib/libc/stdlib/wcstombs.c +++ b/newlib/libc/stdlib/wcstombs.c @@ -48,8 +48,7 @@ effects vary with the locale. #include <wchar.h> size_t -_DEFUN (wcstombs, (s, pwcs, n), - char *__restrict s, +wcstombs (char *__restrict s, const wchar_t *__restrict pwcs, size_t n) { diff --git a/newlib/libc/stdlib/wcstombs_r.c b/newlib/libc/stdlib/wcstombs_r.c index d965dc2..c6a06a3 100644 --- a/newlib/libc/stdlib/wcstombs_r.c +++ b/newlib/libc/stdlib/wcstombs_r.c @@ -3,8 +3,7 @@ #include "local.h" size_t -_DEFUN (_wcstombs_r, (reent, s, pwcs, n, state), - struct _reent *r, +_wcstombs_r (struct _reent *r, char *__restrict s, const wchar_t *__restrict pwcs, size_t n, diff --git a/newlib/libc/stdlib/wcstoul.c b/newlib/libc/stdlib/wcstoul.c index 5c54ec5..8e27965 100644 --- a/newlib/libc/stdlib/wcstoul.c +++ b/newlib/libc/stdlib/wcstoul.c @@ -192,8 +192,7 @@ _wcstoul_l (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, } unsigned long -_DEFUN (_wcstoul_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_wcstoul_r (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, int base) @@ -211,8 +210,7 @@ wcstoul_l (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base, } unsigned long -_DEFUN (wcstoul, (s, ptr, base), - const wchar_t *__restrict s, +wcstoul (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/wcstoull.c b/newlib/libc/stdlib/wcstoull.c index 4724d61..5a37473 100644 --- a/newlib/libc/stdlib/wcstoull.c +++ b/newlib/libc/stdlib/wcstoull.c @@ -208,8 +208,7 @@ _wcstoull_l (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, } unsigned long long -_DEFUN (_wcstoull_r, (rptr, nptr, endptr, base), - struct _reent *rptr, +_wcstoull_r (struct _reent *rptr, const wchar_t *nptr, wchar_t **endptr, int base) @@ -227,8 +226,7 @@ wcstoull_l (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base, } unsigned long long -_DEFUN (wcstoull, (s, ptr, base), - const wchar_t *__restrict s, +wcstoull (const wchar_t *__restrict s, wchar_t **__restrict ptr, int base) { diff --git a/newlib/libc/stdlib/wctomb.c b/newlib/libc/stdlib/wctomb.c index b68a43b..e908d22 100644 --- a/newlib/libc/stdlib/wctomb.c +++ b/newlib/libc/stdlib/wctomb.c @@ -46,8 +46,7 @@ effects vary with the locale. #include "local.h" int -_DEFUN (wctomb, (s, wchar), - char *s, +wctomb (char *s, wchar_t wchar) { #ifdef _MB_CAPABLE diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c index 7c4fac1..b479934 100644 --- a/newlib/libc/stdlib/wctomb_r.c +++ b/newlib/libc/stdlib/wctomb_r.c @@ -7,8 +7,7 @@ #include "local.h" int -_DEFUN (_wctomb_r, (r, s, wchar, state), - struct _reent *r, +_wctomb_r (struct _reent *r, char *s, wchar_t _wchar, mbstate_t *state) @@ -17,8 +16,7 @@ _DEFUN (_wctomb_r, (r, s, wchar, state), } int -_DEFUN (__ascii_wctomb, (r, s, wchar, state), - struct _reent *r, +__ascii_wctomb (struct _reent *r, char *s, wchar_t _wchar, mbstate_t *state) @@ -50,8 +48,7 @@ _DEFUN (__ascii_wctomb, (r, s, wchar, state), #define __state __count int -_DEFUN (__utf8_wctomb, (r, s, wchar, state), - struct _reent *r, +__utf8_wctomb (struct _reent *r, char *s, wchar_t _wchar, mbstate_t *state) @@ -144,8 +141,7 @@ _DEFUN (__utf8_wctomb, (r, s, wchar, state), because the underlying OS requires wchar_t == UTF-16. */ #ifndef __CYGWIN__ int -_DEFUN (__sjis_wctomb, (r, s, wchar, state), - struct _reent *r, +__sjis_wctomb (struct _reent *r, char *s, wchar_t _wchar, mbstate_t *state) @@ -178,8 +174,7 @@ _DEFUN (__sjis_wctomb, (r, s, wchar, state), } int -_DEFUN (__eucjp_wctomb, (r, s, wchar, state), - struct _reent *r, +__eucjp_wctomb (struct _reent *r, char *s, wchar_t _wchar, mbstate_t *state) @@ -218,8 +213,7 @@ _DEFUN (__eucjp_wctomb, (r, s, wchar, state), } int -_DEFUN (__jis_wctomb, (r, s, wchar, state), - struct _reent *r, +__jis_wctomb (struct _reent *r, char *s, wchar_t _wchar, mbstate_t *state) |