On Mon, Nov 15, 2010 at 09:03:09AM -0300, Davidlohr Bueso wrote: > From: Davidlohr Bueso <dave@xxxxxxx> > cal: fix langinfo build break > > When HAVE_LANGINFO_H is not defined we break the compilation in cal.c > > CC cal.o > cal.c: In function âheaders_initâ: > cal.c:432: error: â_time_infoâ undeclared (first use in this function) > cal.c:432: error: (Each undeclared identifier is reported only once > cal.c:432: error: for each function it appears in.) > make: *** [cal.o] Error 1 > > The '_time_info' structure is no where to be found other than in headers_init(): The _time_info was defined by libc in <localeinfo.h> many many years ago. It's obsolete legacy now. Good catch. > -# define weekday(wd) _time_info->abbrev_wkday[wd] > + char *weekday[] = { "Sun", "Mon", "Tue", "Wed", "Thu", > + "Fri", "Sat" }; > + > + char *month[] = { "January", "Febuary", "March", "April", "May", > + "June", "July", "August", "September", "October", > + "November", "December" }; > +# define weekday(wd) weekday[wd] > + > #endif Hmm... It would be better to add nl_langinfo() with hardcoded default values to lib/ and use this private implementation if the standard nl_langinfo() is not available. I'll prepare a patch. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- 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