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.

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