From f1b4824c865b228039d84b2605b2e7e4f34cddeb Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 21 Jun 2013 16:54:37 +0000 Subject: packages: clean up the package folder Signed-off-by: John Crispin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37007 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/utils/util-linux/patches/000-compile.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/utils/util-linux/patches/000-compile.patch (limited to 'package/utils/util-linux/patches/000-compile.patch') diff --git a/package/utils/util-linux/patches/000-compile.patch b/package/utils/util-linux/patches/000-compile.patch new file mode 100644 index 0000000000..b7cc18b40c --- /dev/null +++ b/package/utils/util-linux/patches/000-compile.patch @@ -0,0 +1,44 @@ +--- a/misc-utils/cal.c ++++ b/misc-utils/cal.c +@@ -291,41 +291,6 @@ main(int argc, char **argv) { + } + #endif + +-/* +- * The traditional Unix cal utility starts the week at Sunday, +- * while ISO 8601 starts at Monday. We read the start day from +- * the locale database, which can be overridden with the +- * -s (Sunday) or -m (Monday) options. +- */ +-#if HAVE_DECL__NL_TIME_WEEK_1STDAY +- /* +- * You need to use 2 locale variables to get the first day of the week. +- * This is needed to support first_weekday=2 and first_workday=1 for +- * the rare case where working days span across 2 weeks. +- * This shell script shows the combinations and calculations involved: +- * +- * for LANG in en_US ru_RU fr_FR csb_PL POSIX; do +- * printf "%s:\t%s + %s -1 = " $LANG $(locale week-1stday first_weekday) +- * date -d"$(locale week-1stday) +$(($(locale first_weekday)-1))day" +%w +- * done +- * +- * en_US: 19971130 + 1 -1 = 0 #0 = sunday +- * ru_RU: 19971130 + 2 -1 = 1 +- * fr_FR: 19971201 + 1 -1 = 1 +- * csb_PL: 19971201 + 2 -1 = 2 +- * POSIX: 19971201 + 7 -1 = 0 +- */ +- { +- int wfd; +- union { unsigned int word; char *string; } val; +- val.string = nl_langinfo(_NL_TIME_WEEK_1STDAY); +- +- wfd = val.word; +- wfd = day_in_week(wfd % 100, (wfd / 100) % 100, wfd / (100 * 100)); +- weekstart = (wfd + *nl_langinfo(_NL_TIME_FIRST_WEEKDAY) - 1) % 7; +- } +-#endif +- + yflag = 0; + while ((ch = getopt_long(argc, argv, "13mjsyVh", longopts, NULL)) != -1) + switch(ch) { -- cgit v1.2.3