# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_util-linux.patch # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- diff -Nur util-linux-2.11q.orig/misc-utils/cal.c util-linux-2.11q/misc-utils/cal.c --- util-linux-2.11q.orig/misc-utils/cal.c Sat Mar 9 00:00:28 2002 +++ util-linux-2.11q/misc-utils/cal.c Mon May 6 01:17:30 2002 @@ -68,11 +68,9 @@ #include "nls.h" #include "../defines.h" -#ifdef HAVE_langinfo_h -# include -#else + # include /* libc4 only */ -#endif + #include "widechar.h" @@ -309,11 +307,7 @@ wcscpy(j_day_headings_wc,L""); #endif -#ifdef HAVE_langinfo_h -# define weekday(wd) nl_langinfo(ABDAY_1+wd) -#else # define weekday(wd) _time_info->abbrev_wkday[wd] -#endif for(i = 0 ; i < 7 ; i++ ) { wd = (i + week1stday) % 7; @@ -343,11 +337,7 @@ #undef weekday for (i = 0; i < 12; i++) { -#ifdef HAVE_langinfo_h - full_month[i] = nl_langinfo(MON_1+i); -#else full_month[i] = _time_info->full_month[i]; -#endif } } diff -Nur util-linux-2.11q.orig/lib/localeinfo.h util-linux-2.11q/lib/localeinfo.h --- util-linux-2.11q.orig/lib/localeinfo.h Thu Jan 1 01:00:00 1970 +++ util-linux-2.11q/lib/localeinfo.h Mon May 6 01:03:39 2002 @@ -0,0 +1,13 @@ +#ifndef __LOCALEINFO_H__ +#define __LOCALEINFO_H__ + +struct _time_info_t { + const char *abbrev_wkday[8]; + const char *full_wkday[8]; + const char *abbrev_month[12]; + const char *full_month[12]; +}; + +extern struct _time_info_t* _time_info; + +#endif diff -Nur util-linux-2.11q.orig/lib/localeinfo.c util-linux-2.11q/lib/localeinfo.c --- util-linux-2.11q.orig/lib/localeinfo.c Thu Jan 1 01:00:00 1970 +++ util-linux-2.11q/lib/localeinfo.c Mon May 6 01:03:39 2002 @@ -0,0 +1,14 @@ +#include "localeinfo.h" + +const struct _time_info_t _time_info_c = { + { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }, + { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", + "Saturday" }, + { "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }, + { "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December" }, +}; + + +struct _time_info_t* _time_info=&_time_info_c; --- ./lib/Makefile~ Sat Nov 2 13:51:26 2002 +++ ./lib/Makefile Sat Feb 15 12:01:59 2003 @@ -1,7 +1,7 @@ include ../make_include include ../MCONFIG -all: err.o my_reboot.o setproctitle.o env.o carefulputc.o xstrncpy.o md5.o +all: err.o my_reboot.o setproctitle.o env.o carefulputc.o xstrncpy.o md5.o localeinfo.o err.o: err.c @@ -16,6 +16,8 @@ xstrncpy.o: xstrncpy.h md5.o: md5.c md5.h + +localeinfo.o: localeinfo.h .PHONY: clean clean: --- ./misc-utils/Makefile~ Sat Feb 15 12:33:23 2003 +++ ./misc-utils/Makefile Sat Feb 15 12:34:05 2003 @@ -77,8 +77,8 @@ # Rules for everything else -cal.o: $(LIB)/errs.h -cal: cal.o $(ERR_O) +cal.o: $(LIB)/errs.h $(LIB)/localeinfo.h +cal: cal.o $(ERR_O) $(LIB)/localeinfo.o chkdupexe: chkdupexe.pl ddate: ddate.o kill: kill.o procs.o diff -Nur util-linux-2.11q.orig/misc-utils/whereis.c util-linux-2.11q/misc-utils/whereis.c --- util-linux-2.11q.orig/misc-utils/whereis.c Thu Mar 15 11:09:58 2001 +++ util-linux-2.11q/misc-utils/whereis.c Mon May 6 01:03:39 2002 @@ -38,7 +38,7 @@ */ #include -#include +#include #include #include #include @@ -317,7 +317,7 @@ void findin(char *dir, char *cp) { DIR *dirp; - struct direct *dp; + struct dirent *dp; char *d, *dd; int l; char dirbuf[1024]; diff -Nur util-linux-2.11q.orig/mount/mk_loop_h util-linux-2.11q/mount/mk_loop_h --- util-linux-2.11q.orig/mount/mk_loop_h Sat Oct 30 02:15:18 1999 +++ util-linux-2.11q/mount/mk_loop_h Mon May 6 01:03:39 2002 @@ -5,6 +5,9 @@ rm -f loop.h +echo '#include ' >> loop.h +exit 0 + # Since 1.3.79 there is an include file # that defines __kernel_dev_t. # (The file itself appeared in 1.3.78, but there it defined __dev_t.) diff -Nur util-linux-2.11q.orig/mount/mount.c util-linux-2.11q/mount/mount.c --- util-linux-2.11q.orig/mount/mount.c Mon May 6 01:51:49 2002 +++ util-linux-2.11q/mount/mount.c Mon May 6 01:40:20 2002 @@ -1087,11 +1087,11 @@ /* make the node a nice absolute path name */ if (node[0] && node[0]!='/') { - char *thisdir=get_current_dir_name(); + char *thisdir=getcwd((char *) NULL, 0); char *oldnode=node; if (chdir(node) == 0) { /* we will never free this variable ... */ - node=get_current_dir_name(); + node=getcwd((char *) NULL, 0); chdir(thisdir); if (verbose) printf("mount: change '%s' to '%s'\n",oldnode,node); } diff -Nur util-linux-2.11q.orig/text-utils/column.c util-linux-2.11q/text-utils/column.c --- util-linux-2.11q.orig/text-utils/column.c Sat Mar 9 00:05:21 2002 +++ util-linux-2.11q/text-utils/column.c Mon May 6 01:03:39 2002 @@ -47,6 +47,7 @@ #include #include #include +#include #include "errs.h" #include "nls.h" diff -Nur util-linux-2.11q.orig/text-utils/display.c util-linux-2.11q/text-utils/display.c --- util-linux-2.11q.orig/text-utils/display.c Sat Mar 9 00:05:39 2002 +++ util-linux-2.11q/text-utils/display.c Mon May 6 01:50:02 2002 @@ -58,7 +58,7 @@ switch(pr->flags) { case F_ADDRESS: - (void)printf(pr->fmt, (quad_t)address); + (void)printf(pr->fmt, (long long)address); break; case F_BPAD: (void)printf(pr->fmt, ""); @@ -93,19 +93,19 @@ switch(pr->bcnt) { case 1: - (void)printf(pr->fmt, (quad_t)*bp); + (void)printf(pr->fmt, (long long)*bp); break; case 2: memmove(&sval, bp, sizeof(sval)); - (void)printf(pr->fmt, (quad_t)sval); + (void)printf(pr->fmt, (long long)sval); break; case 4: memmove(&ival, bp, sizeof(ival)); - (void)printf(pr->fmt, (quad_t)ival); + (void)printf(pr->fmt, (long long)ival); break; case 8: memmove(&Lval, bp, sizeof(Lval)); - (void)printf(pr->fmt, (quad_t)Lval); + (void)printf(pr->fmt, (long long)Lval); break; } break; @@ -130,19 +130,19 @@ switch(pr->bcnt) { case 1: - (void)printf(pr->fmt, (u_quad_t)*bp); + (void)printf(pr->fmt, (unsigned long long)*bp); break; case 2: memmove(&sval, bp, sizeof(sval)); - (void)printf(pr->fmt, (u_quad_t)sval); + (void)printf(pr->fmt, (unsigned long long)sval); break; case 4: memmove(&ival, bp, sizeof(ival)); - (void)printf(pr->fmt, (u_quad_t)ival); + (void)printf(pr->fmt, (unsigned long long)ival); break; case 8: memmove(&Lval, bp, sizeof(Lval)); - (void)printf(pr->fmt, (u_quad_t)Lval); + (void)printf(pr->fmt, (unsigned long long)Lval); break; } break; @@ -211,7 +211,7 @@ for (pr = endfu->nextpr; pr; pr = pr->nextpr) switch(pr->flags) { case F_ADDRESS: - (void)printf(pr->fmt, (quad_t)eaddress); + (void)printf(pr->fmt, (long long)eaddress); break; case F_TEXT: (void)printf("%s", pr->fmt); --- util-linux-2.11z/text-utils/more.c~ Thu Sep 4 12:05:49 2003 +++ util-linux-2.11z/text-utils/more.c Thu Sep 4 12:07:38 2003 @@ -53,7 +53,6 @@ #include #include #include -#include #include #include "xstrncpy.h" #include "nls.h" @@ -554,9 +553,9 @@ if (fread(twobytes, 2, 1, f) == 1) { switch(twobytes[0] + (twobytes[1]<<8)) { - case OMAGIC: /* 0407 */ - case NMAGIC: /* 0410 */ - case ZMAGIC: /* 0413 */ + case 0407: /* OMAGIC */ + case 0410: /* NMAGIC */ + case 0413: /* ZMAGIC */ case 0405: case 0411: case 0177545: diff -Nur util-linux-2.11u.orig/fdisk/cfdisk.c util-linux-2.11u/fdisk/cfdisk.c --- util-linux-2.11u.orig/fdisk/cfdisk.c 2002-05-09 01:51:47.000000000 +0000 +++ util-linux-2.11u/fdisk/cfdisk.c 2002-09-17 22:01:08.000000000 +0000 @@ -326,7 +326,7 @@ int logical = 0; int logical_sectors[MAXIMUM_PARTS]; -__sighandler_t old_SIGINT, old_SIGTERM; +sighandler_t old_SIGINT, old_SIGTERM; int arrow_cursor = FALSE; int display_units = MEGABYTES; diff -Nur util-linux-2.11u.orig/text-utils/pg.c util-linux-2.11u/text-utils/pg.c --- util-linux-2.11u.orig/text-utils/pg.c 2002-07-07 05:29:12.000000000 +0000 +++ util-linux-2.11u/text-utils/pg.c 2002-09-17 22:01:08.000000000 +0000 @@ -46,7 +46,7 @@ #ifndef TIOCGWINSZ #include #endif -#include +#include #include #include #include @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include --- util-linux-2.11z/disk-utils/raw.c.orig 2003-09-20 05:04:21.000000000 +0200 +++ util-linux-2.11z/disk-utils/raw.c 2003-09-20 05:04:28.000000000 +0200 @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include --- util-linux-2.11z/disk-utils/mkfs.cramfs.c.orig 2003-09-20 05:06:32.000000000 +0200 +++ util-linux-2.11z/disk-utils/mkfs.cramfs.c 2003-09-20 05:06:50.000000000 +0200 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include