Remove HAVE_STRFTIME ifdefs

strftime(3) has been in standard C since C89.  It is also in
POSIX.1-2001, and in SVr4 (see strftime(3) and strftime(3p)).
We can assume that this function is always available.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar
2021-12-27 20:50:06 +01:00
parent 92bd73c657
commit 3e602b58a2
6 changed files with 2 additions and 61 deletions

View File

@@ -244,7 +244,6 @@ static int new_fields (void)
static void print_date (time_t date)
{
#ifdef HAVE_STRFTIME
struct tm *tp;
char buf[80];
char format[80];
@@ -263,20 +262,6 @@ static void print_date (time_t date)
(void) strftime (buf, sizeof buf, format, tp);
(void) puts (buf);
}
#else
struct tm *tp;
char *cp = NULL;
tp = gmtime (&date);
if (NULL != tp) {
cp = asctime (tp);
}
if (NULL != cp) {
(void) printf ("%6.6s, %4.4s\n", cp + 4, cp + 20);
} else {
(void) printf ("time_t: %lu\n", date);
}
#endif
}
/*