diff options
Diffstat (limited to 'src/strftime.c')
| -rw-r--r-- | src/strftime.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/strftime.c b/src/strftime.c index 90b21471904..7ab41f091c2 100644 --- a/src/strftime.c +++ b/src/strftime.c | |||
| @@ -377,14 +377,6 @@ static char const month_name[][10] = | |||
| 377 | 377 | ||
| 378 | #ifdef emacs | 378 | #ifdef emacs |
| 379 | # define my_strftime emacs_strftime | 379 | # define my_strftime emacs_strftime |
| 380 | /* Emacs 20.2 uses `-Dstrftime=emacs_strftime' when compiling, | ||
| 381 | because that's how strftime used to be configured. | ||
| 382 | Undo this, since it gets in the way of accessing the underlying strftime, | ||
| 383 | which is needed for things like %Ec in Solaris. | ||
| 384 | The following two lines can be removed once Emacs stops compiling with | ||
| 385 | `-Dstrftime=emacs_strftime'. */ | ||
| 386 | # undef strftime | ||
| 387 | size_t strftime __P ((char *, size_t, const char *, const struct tm *)); | ||
| 388 | #else | 380 | #else |
| 389 | # define my_strftime strftime | 381 | # define my_strftime strftime |
| 390 | #endif | 382 | #endif |
| @@ -1175,14 +1167,14 @@ my_strftime (s, maxsize, format, tp) | |||
| 1175 | valid time_t value. Check whether an error really | 1167 | valid time_t value. Check whether an error really |
| 1176 | occurred. */ | 1168 | occurred. */ |
| 1177 | struct tm tm; | 1169 | struct tm tm; |
| 1178 | localtime_r (<, &tm); | 1170 | |
| 1179 | 1171 | if (! localtime_r (<, &tm) | |
| 1180 | if ((ltm.tm_sec ^ tm.tm_sec) | 1172 | || ((ltm.tm_sec ^ tm.tm_sec) |
| 1181 | | (ltm.tm_min ^ tm.tm_min) | 1173 | | (ltm.tm_min ^ tm.tm_min) |
| 1182 | | (ltm.tm_hour ^ tm.tm_hour) | 1174 | | (ltm.tm_hour ^ tm.tm_hour) |
| 1183 | | (ltm.tm_mday ^ tm.tm_mday) | 1175 | | (ltm.tm_mday ^ tm.tm_mday) |
| 1184 | | (ltm.tm_mon ^ tm.tm_mon) | 1176 | | (ltm.tm_mon ^ tm.tm_mon) |
| 1185 | | (ltm.tm_year ^ tm.tm_year)) | 1177 | | (ltm.tm_year ^ tm.tm_year))) |
| 1186 | break; | 1178 | break; |
| 1187 | } | 1179 | } |
| 1188 | 1180 | ||