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.

279 lines
8.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. --- ./mount/Makefile~ Tue Nov 26 09:53:59 2002
  165. +++ ./mount/Makefile Sat Feb 15 12:40:33 2003
  166. @@ -45,11 +45,11 @@
  167. mount: mount.o fstab.o sundries.o realpath.o mntent.o version.o \
  168. mount_guess_fstype.o get_label_uuid.o mount_by_label.o getusername.o \
  169. $(LIB)/setproctitle.o $(LIB)/env.o $(NFS_OBJS) $(LO_OBJS)
  170. - $(LINK) $^ -o $@
  171. + $(LINK) $^ -o $@ -lrpc
  172. umount: umount.o fstab.o sundries.o realpath.o mntent.o getusername.o \
  173. get_label_uuid.o version.o $(LIB)/env.o $(LO_OBJS)
  174. - $(LINK) $^ -o $@
  175. + $(LINK) $^ -o $@ -lrpc
  176. swapon: swapon.o version.o
  177. $(LINK) $^ -o $@
  178. diff -Nur util-linux-2.11q.orig/text-utils/column.c util-linux-2.11q/text-utils/column.c
  179. --- util-linux-2.11q.orig/text-utils/column.c Sat Mar 9 00:05:21 2002
  180. +++ util-linux-2.11q/text-utils/column.c Mon May 6 01:03:39 2002
  181. @@ -47,6 +47,7 @@
  182. #include <unistd.h>
  183. #include <stdlib.h>
  184. #include <string.h>
  185. +#include <termios.h>
  186. #include "errs.h"
  187. #include "nls.h"
  188. diff -Nur util-linux-2.11q.orig/text-utils/display.c util-linux-2.11q/text-utils/display.c
  189. --- util-linux-2.11q.orig/text-utils/display.c Sat Mar 9 00:05:39 2002
  190. +++ util-linux-2.11q/text-utils/display.c Mon May 6 01:50:02 2002
  191. @@ -58,7 +58,7 @@
  192. switch(pr->flags) {
  193. case F_ADDRESS:
  194. - (void)printf(pr->fmt, (quad_t)address);
  195. + (void)printf(pr->fmt, (long long)address);
  196. break;
  197. case F_BPAD:
  198. (void)printf(pr->fmt, "");
  199. @@ -93,19 +93,19 @@
  200. switch(pr->bcnt) {
  201. case 1:
  202. - (void)printf(pr->fmt, (quad_t)*bp);
  203. + (void)printf(pr->fmt, (long long)*bp);
  204. break;
  205. case 2:
  206. memmove(&sval, bp, sizeof(sval));
  207. - (void)printf(pr->fmt, (quad_t)sval);
  208. + (void)printf(pr->fmt, (long long)sval);
  209. break;
  210. case 4:
  211. memmove(&ival, bp, sizeof(ival));
  212. - (void)printf(pr->fmt, (quad_t)ival);
  213. + (void)printf(pr->fmt, (long long)ival);
  214. break;
  215. case 8:
  216. memmove(&Lval, bp, sizeof(Lval));
  217. - (void)printf(pr->fmt, (quad_t)Lval);
  218. + (void)printf(pr->fmt, (long long)Lval);
  219. break;
  220. }
  221. break;
  222. @@ -130,19 +130,19 @@
  223. switch(pr->bcnt) {
  224. case 1:
  225. - (void)printf(pr->fmt, (u_quad_t)*bp);
  226. + (void)printf(pr->fmt, (unsigned long long)*bp);
  227. break;
  228. case 2:
  229. memmove(&sval, bp, sizeof(sval));
  230. - (void)printf(pr->fmt, (u_quad_t)sval);
  231. + (void)printf(pr->fmt, (unsigned long long)sval);
  232. break;
  233. case 4:
  234. memmove(&ival, bp, sizeof(ival));
  235. - (void)printf(pr->fmt, (u_quad_t)ival);
  236. + (void)printf(pr->fmt, (unsigned long long)ival);
  237. break;
  238. case 8:
  239. memmove(&Lval, bp, sizeof(Lval));
  240. - (void)printf(pr->fmt, (u_quad_t)Lval);
  241. + (void)printf(pr->fmt, (unsigned long long)Lval);
  242. break;
  243. }
  244. break;
  245. @@ -211,7 +211,7 @@
  246. for (pr = endfu->nextpr; pr; pr = pr->nextpr)
  247. switch(pr->flags) {
  248. case F_ADDRESS:
  249. - (void)printf(pr->fmt, (quad_t)eaddress);
  250. + (void)printf(pr->fmt, (long long)eaddress);
  251. break;
  252. case F_TEXT:
  253. (void)printf("%s", pr->fmt);