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:
15
src/chage.c
15
src/chage.c
@@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user