diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2017-12-04 06:43:30 +0300 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2018-01-17 20:47:26 +0300 |
commit | 9087163804df8af6dc2ec1f675a2341c25f7795f (patch) | |
tree | 86fcb38236347d0e97a16c957e41dca597b8e8a8 /newlib/libc/time | |
parent | 44276afe2a0365d655425702205604640829668d (diff) |
ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/time')
-rw-r--r-- | newlib/libc/time/asctime.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/asctime_r.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/ctime.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/ctime_r.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/difftime.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/gmtime.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/gmtime_r.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/lcltime.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/lcltime_r.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/mktime.c | 6 | ||||
-rw-r--r-- | newlib/libc/time/strftime.c | 6 | ||||
-rw-r--r-- | newlib/libc/time/time.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/tzcalc_limits.c | 3 | ||||
-rw-r--r-- | newlib/libc/time/tzset_r.c | 6 |
14 files changed, 17 insertions, 34 deletions
diff --git a/newlib/libc/time/asctime.c b/newlib/libc/time/asctime.c index cbecd94f1..9aa26c3dc 100644 --- a/newlib/libc/time/asctime.c +++ b/newlib/libc/time/asctime.c @@ -48,8 +48,7 @@ ANSI C requires <<asctime>>. #ifndef _REENT_ONLY char * -_DEFUN (asctime, (tim_p), - const struct tm *tim_p) +asctime (const struct tm *tim_p) { struct _reent *reent = _REENT; diff --git a/newlib/libc/time/asctime_r.c b/newlib/libc/time/asctime_r.c index 93e3fc27f..3e0864fc8 100644 --- a/newlib/libc/time/asctime_r.c +++ b/newlib/libc/time/asctime_r.c @@ -6,8 +6,7 @@ #include <time.h> char * -_DEFUN (asctime_r, (tim_p, result), - const struct tm *__restrict tim_p, +asctime_r (const struct tm *__restrict tim_p, char *__restrict result) { static const char day_name[7][3] = { diff --git a/newlib/libc/time/ctime.c b/newlib/libc/time/ctime.c index f0592f469..58826a6d8 100644 --- a/newlib/libc/time/ctime.c +++ b/newlib/libc/time/ctime.c @@ -37,8 +37,7 @@ ANSI C requires <<ctime>>. #ifndef _REENT_ONLY char * -_DEFUN (ctime, (tim_p), - const time_t * tim_p) +ctime (const time_t * tim_p) { return asctime (localtime (tim_p)); } diff --git a/newlib/libc/time/ctime_r.c b/newlib/libc/time/ctime_r.c index 4ab0ba77d..63aee3890 100644 --- a/newlib/libc/time/ctime_r.c +++ b/newlib/libc/time/ctime_r.c @@ -5,8 +5,7 @@ #include <time.h> char * -_DEFUN (ctime_r, (tim_p, result), - const time_t * tim_p, +ctime_r (const time_t * tim_p, char * result) { diff --git a/newlib/libc/time/difftime.c b/newlib/libc/time/difftime.c index 363eb6482..52ab9d84f 100644 --- a/newlib/libc/time/difftime.c +++ b/newlib/libc/time/difftime.c @@ -30,8 +30,7 @@ in all implementations. #include <time.h> double -_DEFUN (difftime, (tim1, tim2), - time_t tim1, +difftime (time_t tim1, time_t tim2) { return (double)(tim1 - tim2); diff --git a/newlib/libc/time/gmtime.c b/newlib/libc/time/gmtime.c index e74a16157..08e011129 100644 --- a/newlib/libc/time/gmtime.c +++ b/newlib/libc/time/gmtime.c @@ -50,8 +50,7 @@ ANSI C requires <<gmtime>>. #ifndef _REENT_ONLY struct tm * -_DEFUN (gmtime, (tim_p), - const time_t * tim_p) +gmtime (const time_t * tim_p) { struct _reent *reent = _REENT; diff --git a/newlib/libc/time/gmtime_r.c b/newlib/libc/time/gmtime_r.c index dcc5dd166..8bf9ee52d 100644 --- a/newlib/libc/time/gmtime_r.c +++ b/newlib/libc/time/gmtime_r.c @@ -46,8 +46,7 @@ #define YEARS_PER_ERA 400 struct tm * -_DEFUN (gmtime_r, (tim_p, res), - const time_t *__restrict tim_p, +gmtime_r (const time_t *__restrict tim_p, struct tm *__restrict res) { long days, rem; diff --git a/newlib/libc/time/lcltime.c b/newlib/libc/time/lcltime.c index 493df80d1..ded98c57a 100644 --- a/newlib/libc/time/lcltime.c +++ b/newlib/libc/time/lcltime.c @@ -43,8 +43,7 @@ ANSI C requires <<localtime>>. #ifndef _REENT_ONLY struct tm * -_DEFUN (localtime, (tim_p), - const time_t * tim_p) +localtime (const time_t * tim_p) { struct _reent *reent = _REENT; diff --git a/newlib/libc/time/lcltime_r.c b/newlib/libc/time/lcltime_r.c index 3eba498c3..9b9126bcc 100644 --- a/newlib/libc/time/lcltime_r.c +++ b/newlib/libc/time/lcltime_r.c @@ -16,8 +16,7 @@ #include "local.h" struct tm * -_DEFUN (localtime_r, (tim_p, res), - const time_t *__restrict tim_p, +localtime_r (const time_t *__restrict tim_p, struct tm *__restrict res) { long offset; diff --git a/newlib/libc/time/mktime.c b/newlib/libc/time/mktime.c index 1f0d9ba27..9bcef3268 100644 --- a/newlib/libc/time/mktime.c +++ b/newlib/libc/time/mktime.c @@ -62,8 +62,7 @@ static const int _DAYS_BEFORE_MONTH[12] = #define _DAYS_IN_YEAR(year) (_ISLEAP(year) ? 366 : 365) static void -_DEFUN(validate_structure, (tim_p), - struct tm *tim_p) +validate_structure (struct tm *tim_p) { div_t res; int days_in_feb = 28; @@ -149,8 +148,7 @@ _DEFUN(validate_structure, (tim_p), } time_t -_DEFUN(mktime, (tim_p), - struct tm *tim_p) +mktime (struct tm *tim_p) { time_t tim = 0; long days = 0; diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c index 4ed84fb23..3e5e268bc 100644 --- a/newlib/libc/time/strftime.c +++ b/newlib/libc/time/strftime.c @@ -348,8 +348,7 @@ static const int dname_len[7] = -1, 0, or 1 as the adjustment to add to the year for the ISO week numbering used in "%g%G%V", avoiding overflow. */ static int -_DEFUN (iso_year_adjust, (tim_p), - const struct tm *tim_p) +iso_year_adjust (const struct tm *tim_p) { /* Account for fact that tm_year==0 is year 1900. */ int leap = isleap (tim_p->tm_year + (YEAR_BASE @@ -1431,8 +1430,7 @@ recurse: } size_t -_DEFUN (strftime, (s, maxsize, format, tim_p), - CHAR *__restrict s, +strftime (CHAR *__restrict s, size_t maxsize, const CHAR *__restrict format, const struct tm *__restrict tim_p) diff --git a/newlib/libc/time/time.c b/newlib/libc/time/time.c index e0c3a8e74..93e061b83 100644 --- a/newlib/libc/time/time.c +++ b/newlib/libc/time/time.c @@ -33,8 +33,7 @@ Supporting OS subroutine required: Some implementations require #include <sys/time.h> time_t -_DEFUN (time, (t), - time_t * t) +time (time_t * t) { struct timeval now; diff --git a/newlib/libc/time/tzcalc_limits.c b/newlib/libc/time/tzcalc_limits.c index fe785058d..e0ea6549c 100644 --- a/newlib/libc/time/tzcalc_limits.c +++ b/newlib/libc/time/tzcalc_limits.c @@ -11,8 +11,7 @@ #include "local.h" int -_DEFUN (__tzcalc_limits, (year), - int year) +__tzcalc_limits (int year) { int days, year_days, years; int i, j; diff --git a/newlib/libc/time/tzset_r.c b/newlib/libc/time/tzset_r.c index 211ddc8af..9e0cf834b 100644 --- a/newlib/libc/time/tzset_r.c +++ b/newlib/libc/time/tzset_r.c @@ -14,8 +14,7 @@ static char __tzname_dst[11]; static char *prev_tzenv = NULL; void -_DEFUN (_tzset_unlocked_r, (reent_ptr), - struct _reent *reent_ptr) +_tzset_unlocked_r (struct _reent *reent_ptr) { char *tzenv; unsigned short hh, mm, ss, m, w, d; @@ -184,8 +183,7 @@ _DEFUN (_tzset_unlocked_r, (reent_ptr), } void -_DEFUN (_tzset_r, (reent_ptr), - struct _reent *reent_ptr) +_tzset_r (struct _reent *reent_ptr) { TZ_LOCK; _tzset_unlocked_r (reent_ptr); |