Re: svn commit: r368606 - head/usr.bin/calendar

2020-12-13 Thread Stefan Esser



Am 13.12.20 um 12:13 schrieb Yuri Pankov:

Stefan Eßer wrote:

Author: se
Date: Sun Dec 13 09:38:50 2020
New Revision: 368606
URL: https://svnweb.freebsd.org/changeset/base/368606

Log:
   Fix WITHOUT_ICONV build
   There was an unprotected use of nl_langinfo() to determine the 
order of

   day vs. month in the generated output.


That's strange, nl_langinfo() is standard and its visibility should not 
(and does not?) depend on WITH/WITHOUT_ICONV.  May be just move 
langinfo.h include outside of "#ifdef WITH_ICONV" block?


Yes, you are perfectly right ...

I had noticed that WITHOUT_ICONV lead to a problem due to the missing 
prototype, but I had not seen that this was due to the include of

langinfo.h being conditional on WITH_ICONV.

I'll revert this commit and move the include of langinfo.h out of the
conditional block, as suggested by you.

Thanks for pointing this out!

Best regards, STefan



OpenPGP_signature
Description: OpenPGP digital signature


Re: svn commit: r368606 - head/usr.bin/calendar

2020-12-13 Thread Yuri Pankov

Stefan Eßer wrote:

Author: se
Date: Sun Dec 13 09:38:50 2020
New Revision: 368606
URL: https://svnweb.freebsd.org/changeset/base/368606

Log:
   Fix WITHOUT_ICONV build
   
   There was an unprotected use of nl_langinfo() to determine the order of

   day vs. month in the generated output.


That's strange, nl_langinfo() is standard and its visibility should not 
(and does not?) depend on WITH/WITHOUT_ICONV.  May be just move 
langinfo.h include outside of "#ifdef WITH_ICONV" block?



   When building without ICONV support, the order will be: month, day.

Modified:
   head/usr.bin/calendar/events.c

Modified: head/usr.bin/calendar/events.c
==
--- head/usr.bin/calendar/events.c  Sun Dec 13 05:34:14 2020
(r368605)
+++ head/usr.bin/calendar/events.c  Sun Dec 13 09:38:50 2020
(r368606)
@@ -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
+#defined_first 0
+#endif
  
  	while (walkthrough_dates() != 0) {

if (e) {



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"