mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

337 lines
9.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_util-linux.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. diff -Nur util-linux-2.11q.orig/misc-utils/cal.c util-linux-2.11q/misc-utils/cal.c
  20. --- util-linux-2.11q.orig/misc-utils/cal.c Sat Mar 9 00:00:28 2002
  21. +++ util-linux-2.11q/misc-utils/cal.c Mon May 6 01:17:30 2002
  22. @@ -68,11 +68,9 @@
  23. #include "nls.h"
  24. #include "../defines.h"
  25. -#ifdef HAVE_langinfo_h
  26. -# include <langinfo.h>
  27. -#else
  28. +
  29. # include <localeinfo.h> /* libc4 only */
  30. -#endif
  31. +
  32. #include "widechar.h"
  33. @@ -309,11 +307,7 @@
  34. wcscpy(j_day_headings_wc,L"");
  35. #endif
  36. -#ifdef HAVE_langinfo_h
  37. -# define weekday(wd) nl_langinfo(ABDAY_1+wd)
  38. -#else
  39. # define weekday(wd) _time_info->abbrev_wkday[wd]
  40. -#endif
  41. for(i = 0 ; i < 7 ; i++ ) {
  42. wd = (i + week1stday) % 7;
  43. @@ -343,11 +337,7 @@
  44. #undef weekday
  45. for (i = 0; i < 12; i++) {
  46. -#ifdef HAVE_langinfo_h
  47. - full_month[i] = nl_langinfo(MON_1+i);
  48. -#else
  49. full_month[i] = _time_info->full_month[i];
  50. -#endif
  51. }
  52. }
  53. diff -Nur util-linux-2.11q.orig/lib/localeinfo.h util-linux-2.11q/lib/localeinfo.h
  54. --- util-linux-2.11q.orig/lib/localeinfo.h Thu Jan 1 01:00:00 1970
  55. +++ util-linux-2.11q/lib/localeinfo.h Mon May 6 01:03:39 2002
  56. @@ -0,0 +1,13 @@
  57. +#ifndef __LOCALEINFO_H__
  58. +#define __LOCALEINFO_H__
  59. +
  60. +struct _time_info_t {
  61. + const char *abbrev_wkday[8];
  62. + const char *full_wkday[8];
  63. + const char *abbrev_month[12];
  64. + const char *full_month[12];
  65. +};
  66. +
  67. +extern struct _time_info_t* _time_info;
  68. +
  69. +#endif
  70. diff -Nur util-linux-2.11q.orig/lib/localeinfo.c util-linux-2.11q/lib/localeinfo.c
  71. --- util-linux-2.11q.orig/lib/localeinfo.c Thu Jan 1 01:00:00 1970
  72. +++ util-linux-2.11q/lib/localeinfo.c Mon May 6 01:03:39 2002
  73. @@ -0,0 +1,14 @@
  74. +#include "localeinfo.h"
  75. +
  76. +const struct _time_info_t _time_info_c = {
  77. + { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" },
  78. + { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
  79. + "Saturday" },
  80. + { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
  81. + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" },
  82. + { "January", "February", "March", "April", "May", "June",
  83. + "July", "August", "September", "October", "November", "December" },
  84. +};
  85. +
  86. +
  87. +struct _time_info_t* _time_info=&_time_info_c;
  88. --- ./lib/Makefile~ Sat Nov 2 13:51:26 2002
  89. +++ ./lib/Makefile Sat Feb 15 12:01:59 2003
  90. @@ -1,7 +1,7 @@
  91. include ../make_include
  92. include ../MCONFIG
  93. -all: err.o my_reboot.o setproctitle.o env.o carefulputc.o xstrncpy.o md5.o
  94. +all: err.o my_reboot.o setproctitle.o env.o carefulputc.o xstrncpy.o md5.o localeinfo.o
  95. err.o: err.c
  96. @@ -16,6 +16,8 @@
  97. xstrncpy.o: xstrncpy.h
  98. md5.o: md5.c md5.h
  99. +
  100. +localeinfo.o: localeinfo.h
  101. .PHONY: clean
  102. clean:
  103. --- ./misc-utils/Makefile~ Sat Feb 15 12:33:23 2003
  104. +++ ./misc-utils/Makefile Sat Feb 15 12:34:05 2003
  105. @@ -77,8 +77,8 @@
  106. # Rules for everything else
  107. -cal.o: $(LIB)/errs.h
  108. -cal: cal.o $(ERR_O)
  109. +cal.o: $(LIB)/errs.h $(LIB)/localeinfo.h
  110. +cal: cal.o $(ERR_O) $(LIB)/localeinfo.o
  111. chkdupexe: chkdupexe.pl
  112. ddate: ddate.o
  113. kill: kill.o procs.o
  114. diff -Nur util-linux-2.11q.orig/misc-utils/whereis.c util-linux-2.11q/misc-utils/whereis.c
  115. --- util-linux-2.11q.orig/misc-utils/whereis.c Thu Mar 15 11:09:58 2001
  116. +++ util-linux-2.11q/misc-utils/whereis.c Mon May 6 01:03:39 2002
  117. @@ -38,7 +38,7 @@
  118. */
  119. #include <sys/param.h>
  120. -#include <sys/dir.h>
  121. +#include <dirent.h>
  122. #include <sys/stat.h>
  123. #include <stdio.h>
  124. #include <stdlib.h>
  125. @@ -317,7 +317,7 @@
  126. void
  127. findin(char *dir, char *cp) {
  128. DIR *dirp;
  129. - struct direct *dp;
  130. + struct dirent *dp;
  131. char *d, *dd;
  132. int l;
  133. char dirbuf[1024];
  134. diff -Nur util-linux-2.11q.orig/mount/mk_loop_h util-linux-2.11q/mount/mk_loop_h
  135. --- util-linux-2.11q.orig/mount/mk_loop_h Sat Oct 30 02:15:18 1999
  136. +++ util-linux-2.11q/mount/mk_loop_h Mon May 6 01:03:39 2002
  137. @@ -5,6 +5,9 @@
  138. rm -f loop.h
  139. +echo '#include <linux/loop.h>' >> loop.h
  140. +exit 0
  141. +
  142. # Since 1.3.79 there is an include file <asm/posix_types.h>
  143. # that defines __kernel_dev_t.
  144. # (The file itself appeared in 1.3.78, but there it defined __dev_t.)
  145. diff -Nur util-linux-2.11q.orig/mount/mount.c util-linux-2.11q/mount/mount.c
  146. --- util-linux-2.11q.orig/mount/mount.c Mon May 6 01:51:49 2002
  147. +++ util-linux-2.11q/mount/mount.c Mon May 6 01:40:20 2002
  148. @@ -1087,11 +1087,11 @@
  149. /* make the node a nice absolute path name */
  150. if (node[0] && node[0]!='/') {
  151. - char *thisdir=get_current_dir_name();
  152. + char *thisdir=getcwd((char *) NULL, 0);
  153. char *oldnode=node;
  154. if (chdir(node) == 0) {
  155. /* we will never free this variable ... */
  156. - node=get_current_dir_name();
  157. + node=getcwd((char *) NULL, 0);
  158. chdir(thisdir);
  159. if (verbose) printf("mount: change '%s' to '%s'\n",oldnode,node);
  160. }
  161. diff -Nur util-linux-2.11q.orig/text-utils/column.c util-linux-2.11q/text-utils/column.c
  162. --- util-linux-2.11q.orig/text-utils/column.c Sat Mar 9 00:05:21 2002
  163. +++ util-linux-2.11q/text-utils/column.c Mon May 6 01:03:39 2002
  164. @@ -47,6 +47,7 @@
  165. #include <unistd.h>
  166. #include <stdlib.h>
  167. #include <string.h>
  168. +#include <termios.h>
  169. #include "errs.h"
  170. #include "nls.h"
  171. diff -Nur util-linux-2.11q.orig/text-utils/display.c util-linux-2.11q/text-utils/display.c
  172. --- util-linux-2.11q.orig/text-utils/display.c Sat Mar 9 00:05:39 2002
  173. +++ util-linux-2.11q/text-utils/display.c Mon May 6 01:50:02 2002
  174. @@ -58,7 +58,7 @@
  175. switch(pr->flags) {
  176. case F_ADDRESS:
  177. - (void)printf(pr->fmt, (quad_t)address);
  178. + (void)printf(pr->fmt, (long long)address);
  179. break;
  180. case F_BPAD:
  181. (void)printf(pr->fmt, "");
  182. @@ -93,19 +93,19 @@
  183. switch(pr->bcnt) {
  184. case 1:
  185. - (void)printf(pr->fmt, (quad_t)*bp);
  186. + (void)printf(pr->fmt, (long long)*bp);
  187. break;
  188. case 2:
  189. memmove(&sval, bp, sizeof(sval));
  190. - (void)printf(pr->fmt, (quad_t)sval);
  191. + (void)printf(pr->fmt, (long long)sval);
  192. break;
  193. case 4:
  194. memmove(&ival, bp, sizeof(ival));
  195. - (void)printf(pr->fmt, (quad_t)ival);
  196. + (void)printf(pr->fmt, (long long)ival);
  197. break;
  198. case 8:
  199. memmove(&Lval, bp, sizeof(Lval));
  200. - (void)printf(pr->fmt, (quad_t)Lval);
  201. + (void)printf(pr->fmt, (long long)Lval);
  202. break;
  203. }
  204. break;
  205. @@ -130,19 +130,19 @@
  206. switch(pr->bcnt) {
  207. case 1:
  208. - (void)printf(pr->fmt, (u_quad_t)*bp);
  209. + (void)printf(pr->fmt, (unsigned long long)*bp);
  210. break;
  211. case 2:
  212. memmove(&sval, bp, sizeof(sval));
  213. - (void)printf(pr->fmt, (u_quad_t)sval);
  214. + (void)printf(pr->fmt, (unsigned long long)sval);
  215. break;
  216. case 4:
  217. memmove(&ival, bp, sizeof(ival));
  218. - (void)printf(pr->fmt, (u_quad_t)ival);
  219. + (void)printf(pr->fmt, (unsigned long long)ival);
  220. break;
  221. case 8:
  222. memmove(&Lval, bp, sizeof(Lval));
  223. - (void)printf(pr->fmt, (u_quad_t)Lval);
  224. + (void)printf(pr->fmt, (unsigned long long)Lval);
  225. break;
  226. }
  227. break;
  228. @@ -211,7 +211,7 @@
  229. for (pr = endfu->nextpr; pr; pr = pr->nextpr)
  230. switch(pr->flags) {
  231. case F_ADDRESS:
  232. - (void)printf(pr->fmt, (quad_t)eaddress);
  233. + (void)printf(pr->fmt, (long long)eaddress);
  234. break;
  235. case F_TEXT:
  236. (void)printf("%s", pr->fmt);
  237. --- util-linux-2.11z/text-utils/more.c~ Thu Sep 4 12:05:49 2003
  238. +++ util-linux-2.11z/text-utils/more.c Thu Sep 4 12:07:38 2003
  239. @@ -53,7 +53,6 @@
  240. #include <sys/stat.h>
  241. #include <sys/file.h>
  242. #include <sys/wait.h>
  243. -#include <a.out.h>
  244. #include <locale.h>
  245. #include "xstrncpy.h"
  246. #include "nls.h"
  247. @@ -554,9 +553,9 @@
  248. if (fread(twobytes, 2, 1, f) == 1) {
  249. switch(twobytes[0] + (twobytes[1]<<8)) {
  250. - case OMAGIC: /* 0407 */
  251. - case NMAGIC: /* 0410 */
  252. - case ZMAGIC: /* 0413 */
  253. + case 0407: /* OMAGIC */
  254. + case 0410: /* NMAGIC */
  255. + case 0413: /* ZMAGIC */
  256. case 0405:
  257. case 0411:
  258. case 0177545:
  259. diff -Nur util-linux-2.11u.orig/fdisk/cfdisk.c util-linux-2.11u/fdisk/cfdisk.c
  260. --- util-linux-2.11u.orig/fdisk/cfdisk.c 2002-05-09 01:51:47.000000000 +0000
  261. +++ util-linux-2.11u/fdisk/cfdisk.c 2002-09-17 22:01:08.000000000 +0000
  262. @@ -326,7 +326,7 @@
  263. int logical = 0;
  264. int logical_sectors[MAXIMUM_PARTS];
  265. -__sighandler_t old_SIGINT, old_SIGTERM;
  266. +sighandler_t old_SIGINT, old_SIGTERM;
  267. int arrow_cursor = FALSE;
  268. int display_units = MEGABYTES;
  269. diff -Nur util-linux-2.11u.orig/text-utils/pg.c util-linux-2.11u/text-utils/pg.c
  270. --- util-linux-2.11u.orig/text-utils/pg.c 2002-07-07 05:29:12.000000000 +0000
  271. +++ util-linux-2.11u/text-utils/pg.c 2002-09-17 22:01:08.000000000 +0000
  272. @@ -46,7 +46,7 @@
  273. #ifndef TIOCGWINSZ
  274. #include <sys/ioctl.h>
  275. #endif
  276. -#include <sys/termios.h>
  277. +#include <termios.h>
  278. #include <fcntl.h>
  279. #include <regex.h>
  280. #include <stdio.h>
  281. @@ -59,7 +59,6 @@
  282. #include <signal.h>
  283. #include <setjmp.h>
  284. #include <locale.h>
  285. -#include <nl_types.h>
  286. #include <libgen.h>
  287. #include <curses.h>
  288. #include <term.h>
  289. --- util-linux-2.11z/disk-utils/raw.c.orig 2003-09-20 05:04:21.000000000 +0200
  290. +++ util-linux-2.11z/disk-utils/raw.c 2003-09-20 05:04:28.000000000 +0200
  291. @@ -15,7 +15,7 @@
  292. #include <unistd.h>
  293. #include <errno.h>
  294. #include <string.h>
  295. -#include <sys/fcntl.h>
  296. +#include <fcntl.h>
  297. #include <sys/stat.h>
  298. #include <sys/ioctl.h>
  299. #include <sys/sysmacros.h>
  300. --- util-linux-2.11z/disk-utils/mkfs.cramfs.c.orig 2003-09-20 05:06:32.000000000 +0200
  301. +++ util-linux-2.11z/disk-utils/mkfs.cramfs.c 2003-09-20 05:06:50.000000000 +0200
  302. @@ -28,7 +28,7 @@
  303. #include <sys/stat.h>
  304. #include <unistd.h>
  305. #include <sys/mman.h>
  306. -#include <sys/fcntl.h>
  307. +#include <fcntl.h>
  308. #include <dirent.h>
  309. #include <stdlib.h>
  310. #include <errno.h>