eglibc-cross.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h eglibc-2.11.1/libc/sunrpc/rpc/types.h
  2. --- eglibc-2.11.1.orig/libc/sunrpc/rpc/types.h 2010-02-24 08:09:59.000000000 +0100
  3. +++ eglibc-2.11.1/libc/sunrpc/rpc/types.h 2010-03-22 18:30:14.944408497 +0100
  4. @@ -68,6 +68,7 @@
  5. #include <sys/types.h>
  6. #endif
  7. +#if !defined(_CROSS_RPCGEN_)
  8. #ifndef __u_char_defined
  9. typedef __u_char u_char;
  10. typedef __u_short u_short;
  11. @@ -83,6 +84,7 @@
  12. typedef __caddr_t caddr_t;
  13. # define __daddr_t_defined
  14. #endif
  15. +#endif
  16. #include <sys/time.h>
  17. #include <sys/param.h>
  18. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c eglibc-2.11.1/libc/sunrpc/rpc_clntout.c
  19. --- eglibc-2.11.1.orig/libc/sunrpc/rpc_clntout.c 2010-02-24 08:10:01.000000000 +0100
  20. +++ eglibc-2.11.1/libc/sunrpc/rpc_clntout.c 2010-03-22 18:30:38.973160151 +0100
  21. @@ -31,7 +31,7 @@
  22. */
  23. #include <stdio.h>
  24. #include <string.h>
  25. -#include <rpc/types.h>
  26. +#include "rpc/types.h"
  27. #include "rpc_parse.h"
  28. #include "rpc_util.h"
  29. #include "proto.h"
  30. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c eglibc-2.11.1/libc/sunrpc/rpc_scan.c
  31. --- eglibc-2.11.1.orig/libc/sunrpc/rpc_scan.c 2010-02-24 08:10:00.000000000 +0100
  32. +++ eglibc-2.11.1/libc/sunrpc/rpc_scan.c 2010-03-22 18:31:16.146907097 +0100
  33. @@ -36,7 +36,11 @@
  34. #include <stdio.h>
  35. #include <ctype.h>
  36. #include <string.h>
  37. +#ifdef _CROSS_RPCGEN_
  38. +#define gettext(X) (X)
  39. +#else
  40. #include <libintl.h>
  41. +#endif
  42. #include "rpc_scan.h"
  43. #include "rpc_parse.h"
  44. #include "rpc_util.h"
  45. diff -Nur eglibc-2.11.1.orig/libc/timezone/Makefile eglibc-2.11.1/libc/timezone/Makefile
  46. --- eglibc-2.11.1.orig/libc/timezone/Makefile 2010-02-24 08:09:02.000000000 +0100
  47. +++ eglibc-2.11.1/libc/timezone/Makefile 2010-03-22 18:50:04.134408513 +0100
  48. @@ -69,10 +69,11 @@
  49. $(addprefix $(inst_zonedir)/, \
  50. $(posixrules-file)))
  51. -install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
  52. - $(zonenames:%=posix/%) \
  53. - $(zonenames:%=right/%)) \
  54. - $(installed-localtime-file) $(installed-posixrules-file)
  55. +install-others =
  56. +#install-others = $(addprefix $(inst_zonedir)/,$(zonenames) \
  57. +# $(zonenames:%=posix/%) \
  58. +# $(zonenames:%=right/%)) \
  59. +# $(installed-localtime-file) $(installed-posixrules-file)
  60. ifeq ($(have-ksh),yes)
  61. install-others += $(inst_zonedir)/iso3166.tab $(inst_zonedir)/zone.tab
  62. @@ -181,8 +182,9 @@
  63. $(objpfx)zic: $(addprefix $(objpfx), $(zic-objs))
  64. $(addprefix $(objpfx)cross-,$(zic-objs)): $(objpfx)cross-%.o: %.c
  65. - gcc $< -c $(OUTPUT_OPTION) $(CFLAGS-$*.c) $(CPPFLAGS-$*) \
  66. - -DCROSS_ZIC $(compile-mkdep-flags)
  67. + gcc $< -c $(OUTPUT_OPTION) \
  68. + $(filter-out -DHAVE_GETTEXT,$(CFLAGS-$*.c)) \
  69. + $(CPPFLAGS-$*) -DCROSS_ZIC $(compile-mkdep-flags)
  70. $(objpfx)cross-zic: $(addprefix $(objpfx)cross-,$(zic-objs))
  71. gcc $(addprefix $(objpfx)cross-,$(zic-objs)) -o $@
  72. diff -Nur eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c eglibc-2.11.1/libc/sunrpc/rpc_main.c
  73. --- eglibc-2.11.1.orig/libc/sunrpc/rpc_main.c 2010-02-24 08:10:00.000000000 +0100
  74. +++ eglibc-2.11.1/libc/sunrpc/rpc_main.c 2010-06-20 13:32:42.000000000 +0200
  75. @@ -37,7 +37,11 @@
  76. #include <stdio.h>
  77. #include <string.h>
  78. #include <unistd.h>
  79. +#ifdef _CROSS_RPCGEN_
  80. +#define gettext(X) (X)
  81. +#else
  82. #include <libintl.h>
  83. +#endif
  84. #include <ctype.h>
  85. #include <sys/types.h>
  86. #include <sys/param.h>
  87. @@ -996,10 +1000,12 @@
  88. abort ();
  89. temp = rindex (cmd->infile, '.');
  90. cp = stpcpy (mkfilename, "Makefile.");
  91. - if (temp != NULL)
  92. - *((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
  93. - else
  94. + if (temp != NULL) {
  95. + strncpy (cp, cmd->infile, temp - cmd->infile);
  96. + cp[temp - cmd->infile - 1] = '\0';
  97. + } else {
  98. stpcpy (cp, cmd->infile);
  99. + }
  100. }
  101. else