diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-12-13 09:38:50 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-12-13 09:38:50 +0000 |
commit | c6e0073a42fff96c559f712897e837120704247f (patch) | |
tree | 9d5ce6526071b748da9f9dfc5df821e3e7f59960 /usr.bin/calendar/events.c | |
parent | ab5711797d0b0beede72e87aab3cc88fc8b5f2de (diff) |
Fix WITHOUT_ICONV build
There was an unprotected use of nl_langinfo() to determine the order of
day vs. month in the generated output.
When building without ICONV support, the order will be: month, day.
Notes
Notes:
svn path=/head/; revision=368606
Diffstat (limited to 'usr.bin/calendar/events.c')
-rw-r--r-- | usr.bin/calendar/events.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/calendar/events.c b/usr.bin/calendar/events.c index 1df2357fb959..1dee2fd74771 100644 --- a/usr.bin/calendar/events.c +++ b/usr.bin/calendar/events.c @@ -202,9 +202,13 @@ event_print_all(FILE *fp) struct event *e; struct tm tm; char dbuf[80]; +#ifdef WITH_ICONV static int d_first; d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); +#else +#define d_first 0 +#endif while (walkthrough_dates(&e) != 0) { if (e) { |