Peter Breitenlohner wrote: > (2) fixed locally, no patch > > On my system the week starts with Saturday. For some strange reason I get > (from GNU libc 2.3.6, i686) > (int)(intptr_t)nl_langinfo(_NL_TIME_WEEK_1STDAY) = 19971130 > *nl_langinfo(_NL_TIME_FIRST_WEEKDAY)) = 7 > and consequently > weekstart = 6 (Sat). > > This has the effect that 'cal 9 1752' yields a segmentation fault whereas > 'cal -j 9 1752' prints garbage. > > The proper code should make absolutely sure that 0<=weekstart<=6 (no matter > what results from nl_langinfo), otherwise the next patch may fail as well. > > My solution is to disable the piece of code computing a locale dependent > value for weekstart. What is your locale? Perhaps you can check the latest glibc settings for your locale and log a change request if they're incorrect. $ LANG=de_DE.utf8 ./cal 9 1752 September 1752 Mo Di Mi Do Fr Sa So 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 cheers, Pádraig. -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html