perl-net.patch 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. Index: Net-IRC-0.79/Makefile.PL
  2. --- Net-IRC-0.79/Makefile.PL.orig 2009-12-23 18:05:52.000000000 +0100
  3. +++ Net-IRC-0.79/Makefile.PL 2010-12-19 13:16:21.000000000 +0100
  4. @@ -4,29 +4,6 @@
  5. # the contents of the Makefile that is written.
  6. exit 0 if $ENV{AUTOMATED_TESTING};
  7. -my $ok = 'I acknowledge that Net::IRC is unsupported and I wish to proceed.';
  8. -my $warning = <<WILLROBINSON;
  9. ---------------------------------------------------------------------------------
  10. -********************************************************************************
  11. -DANGER, WILL ROBINSON! DANGER!
  12. -
  13. -This module has been deprecated, abandoned, and is no longer supported. It has
  14. -not seen active development in five years, and its original author has moved on.
  15. -We *STRONGLY* recommend you port your code to either Bot::BasicBot or
  16. -POE::Component::IRC. Please feel free to stop by irc.freenode.net/#perl for help
  17. -making this transition. Or, if you insist on proceeding, please type the
  18. -following line exactly as is and then press Enter:
  19. -
  20. -$ok
  21. -********************************************************************************
  22. ---------------------------------------------------------------------------------
  23. -WILLROBINSON
  24. -
  25. --t STDIN or die $warning;
  26. -warn $warning;
  27. -chomp(my $acceptance = <STDIN>);
  28. -die "Refusing to install due to lack of confirmation" unless $acceptance eq $ok;
  29. -
  30. WriteMakefile(
  31. 'NAME' => 'Net::IRC',
  32. Index: Net-Packet-3.27/Makefile.PL
  33. --- Net-Packet-3.27/Makefile.PL.orig 2009-11-09 18:58:29.000000000 +0100
  34. +++ Net-Packet-3.27/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
  35. @@ -15,7 +15,6 @@
  36. Time::HiRes => 0,
  37. Net::IPv6Addr => 0,
  38. Net::IPv4Addr => 0,
  39. - Socket6 => 0,
  40. Bit::Vector => 0,
  41. },
  42. ABSTRACT_FROM => 'lib/Net/Packet.pm',
  43. Index: Net-Patricia-1.15/libpatricia/patricia.c
  44. --- Net-Patricia-1.15/libpatricia/patricia.c.orig 2009-04-19 06:28:15.000000000 +0200
  45. +++ Net-Patricia-1.15/libpatricia/patricia.c 2010-12-19 13:15:40.000000000 +0100
  46. @@ -38,24 +38,24 @@
  47. /* prefix_tochar
  48. * convert prefix information to bytes
  49. */
  50. -u_char *
  51. +unsigned char *
  52. prefix_tochar (prefix_t * prefix)
  53. {
  54. if (prefix == NULL)
  55. return (NULL);
  56. - return ((u_char *) & prefix->add.sin);
  57. + return ((unsigned char *) & prefix->add.sin);
  58. }
  59. int
  60. -comp_with_mask (void *addr, void *dest, u_int mask)
  61. +comp_with_mask (void *addr, void *dest, unsigned int mask)
  62. {
  63. if ( /* mask/8 == 0 || */ memcmp (addr, dest, mask / 8) == 0) {
  64. int n = mask / 8;
  65. int m = ((-1) << (8 - (mask % 8)));
  66. - if (mask % 8 == 0 || (((u_char *)addr)[n] & m) == (((u_char *)dest)[n] & m))
  67. + if (mask % 8 == 0 || (((unsigned char *)addr)[n] & m) == (((unsigned char *)dest)[n] & m))
  68. return (1);
  69. }
  70. return (0);
  71. @@ -70,7 +70,7 @@
  72. int
  73. inet_pton (int af, const char *src, void *dst)
  74. {
  75. - u_long result;
  76. + unsigned long result;
  77. if (af == AF_INET) {
  78. result = inet_addr(src);
  79. @@ -104,7 +104,7 @@
  80. {
  81. if (af == AF_INET) {
  82. int i, c, val;
  83. - u_char xp[4] = {0, 0, 0, 0};
  84. + unsigned char xp[4] = {0, 0, 0, 0};
  85. for (i = 0; ; i++) {
  86. c = *src++;
  87. @@ -153,7 +153,7 @@
  88. struct buffer {
  89. char buffs[16][48+5];
  90. - u_int i;
  91. + unsigned int i;
  92. } *buffp;
  93. # if 0
  94. @@ -172,7 +172,7 @@
  95. buff = buffp->buffs[buffp->i++%16];
  96. }
  97. if (prefix->family == AF_INET) {
  98. - u_char *a;
  99. + unsigned char *a;
  100. assert (prefix->bitlen <= 32);
  101. a = prefix_touchar (prefix);
  102. if (with_len) {
  103. @@ -272,7 +272,7 @@
  104. prefix_t *
  105. ascii2prefix (int family, char *string)
  106. {
  107. - u_long bitlen, maxbitlen = 0;
  108. + unsigned long bitlen, maxbitlen = 0;
  109. char *cp;
  110. struct in_addr sin;
  111. #ifdef HAVE_IPV6
  112. @@ -491,8 +491,8 @@
  113. patricia_search_exact (patricia_tree_t *patricia, prefix_t *prefix)
  114. {
  115. patricia_node_t *node;
  116. - u_char *addr;
  117. - u_int bitlen;
  118. + unsigned char *addr;
  119. + unsigned int bitlen;
  120. assert (patricia);
  121. assert (prefix);
  122. @@ -563,8 +563,8 @@
  123. {
  124. patricia_node_t *node;
  125. patricia_node_t *stack[PATRICIA_MAXBITS + 1];
  126. - u_char *addr;
  127. - u_int bitlen;
  128. + unsigned char *addr;
  129. + unsigned int bitlen;
  130. int cnt = 0;
  131. assert (patricia);
  132. @@ -662,8 +662,8 @@
  133. patricia_lookup (patricia_tree_t *patricia, prefix_t *prefix)
  134. {
  135. patricia_node_t *node, *new_node, *parent, *glue;
  136. - u_char *addr, *test_addr;
  137. - u_int bitlen, check_bit, differ_bit;
  138. + unsigned char *addr, *test_addr;
  139. + unsigned int bitlen, check_bit, differ_bit;
  140. int i, j, r;
  141. assert (patricia);
  142. Index: Net-Patricia-1.15/libpatricia/patricia.h
  143. --- Net-Patricia-1.15/libpatricia/patricia.h.orig 2009-04-19 06:28:15.000000000 +0200
  144. +++ Net-Patricia-1.15/libpatricia/patricia.h 2010-12-19 13:15:40.000000000 +0100
  145. @@ -15,10 +15,10 @@
  146. #ifndef _PATRICIA_H
  147. #define _PATRICIA_H
  148. -/* typedef unsigned int u_int; */
  149. +/* typedef unsigned int unsigned int; */
  150. typedef void (*void_fn_t)();
  151. /* { from defs.h */
  152. -#define prefix_touchar(prefix) ((u_char *)&(prefix)->add.sin)
  153. +#define prefix_touchar(prefix) ((unsigned char *)&(prefix)->add.sin)
  154. #define MAXLINE 1024
  155. #define BIT_TEST(f, b) ((f) & (b))
  156. /* } */
  157. @@ -40,15 +40,15 @@
  158. /* { from mrt.h */
  159. typedef struct _prefix4_t {
  160. - u_short family; /* AF_INET | AF_INET6 */
  161. - u_short bitlen; /* same as mask? */
  162. + unsigned short family; /* AF_INET | AF_INET6 */
  163. + unsigned short bitlen; /* same as mask? */
  164. int ref_count; /* reference count */
  165. struct in_addr sin;
  166. } prefix4_t;
  167. typedef struct _prefix_t {
  168. - u_short family; /* AF_INET | AF_INET6 */
  169. - u_short bitlen; /* same as mask? */
  170. + unsigned short family; /* AF_INET | AF_INET6 */
  171. + unsigned short bitlen; /* same as mask? */
  172. int ref_count; /* reference count */
  173. union {
  174. struct in_addr sin;
  175. @@ -61,7 +61,7 @@
  176. /* } */
  177. typedef struct _patricia_node_t {
  178. - u_int bit; /* flag if this node used */
  179. + unsigned int bit; /* flag if this node used */
  180. prefix_t *prefix; /* who we are in patricia tree */
  181. struct _patricia_node_t *l, *r; /* left and right children */
  182. struct _patricia_node_t *parent;/* may be used */
  183. @@ -71,7 +71,7 @@
  184. typedef struct _patricia_tree_t {
  185. patricia_node_t *head;
  186. - u_int maxbits; /* for IP, 32 bit addresses */
  187. + unsigned int maxbits; /* for IP, 32 bit addresses */
  188. int num_active_node; /* for debug purpose */
  189. } patricia_tree_t;
  190. Index: Net-Pcap-0.16/Makefile.PL
  191. --- Net-Pcap-0.16/Makefile.PL.orig 2007-12-24 00:06:15.000000000 +0100
  192. +++ Net-Pcap-0.16/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
  193. @@ -23,7 +23,8 @@
  194. }
  195. else {
  196. $options{CCFLAGS} = '-Wall -Wwrite-strings' if $Config{ccname} eq 'gcc' and $] >= 5.006;
  197. - $options{LIBS} = '-lpcap';
  198. + $options{INC} = '-I/openpkg/include';
  199. + $options{LIBS} = '-L/openpkg/lib -lpcap';
  200. }
  201. for my $arg (@ARGV) {
  202. Index: Net-Pcap-0.16/Pcap.xs
  203. --- Net-Pcap-0.16/Pcap.xs.orig 2008-01-01 05:22:22.000000000 +0100
  204. +++ Net-Pcap-0.16/Pcap.xs 2010-12-19 13:15:40.000000000 +0100
  205. @@ -33,7 +33,7 @@
  206. #define NEED_sv_2pv_nolen 1
  207. #include "ppport.h"
  208. -#include <pcap.h>
  209. +#include "pcap.h"
  210. #ifdef _CYGWIN
  211. #include <Win32-Extensions.h>
  212. Index: Net-RabbitMQ-0.0.4/Makefile.PL
  213. --- Net-RabbitMQ-0.0.4/Makefile.PL.orig 2009-11-12 21:15:45.000000000 +0100
  214. +++ Net-RabbitMQ-0.0.4/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
  215. @@ -2,12 +2,16 @@
  216. use ExtUtils::MakeMaker 5.16 ;
  217. use Config ;
  218. -my @parts = qw/api connection debug framing mem socket table/;
  219. -my $cfiles = join(' ', map { "librabbitmq/amqp_$_.c" } @parts);
  220. -
  221. WriteMakefile(
  222. NAME => 'Net::RabbitMQ',
  223. VERSION_FROM => 'RabbitMQ.pm',
  224. - OBJECT => "RabbitMQ.o $cfiles",
  225. + 'MYEXTLIB' => 'librabbitmq/librabbitmq$(LIB_EXT)',
  226. + OBJECT => "RabbitMQ.o",
  227. );
  228. +sub MY::postamble {
  229. +'
  230. +$(MYEXTLIB): librabbitmq/Makefile
  231. + cd librabbitmq && $(MAKE) $(PASTHRU)
  232. +';
  233. +}
  234. Index: Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL
  235. --- Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL.orig 2010-12-19 13:15:40.000000000 +0100
  236. +++ Net-RabbitMQ-0.0.4/librabbitmq/Makefile.PL 2010-12-19 13:15:40.000000000 +0100
  237. @@ -0,0 +1,22 @@
  238. +
  239. +use ExtUtils::MakeMaker;
  240. +
  241. +$Verbose = 1;
  242. +
  243. +WriteMakefile(
  244. + NAME => 'Net::RabbitMQ::librabbitmq',
  245. + SKIP => [ qw(all static static_lib dynamic dynamic_lib test) ],
  246. + clean => { 'FILES' => 'librabbitmq$(LIB_EXT)' },
  247. +);
  248. +
  249. +sub MY::top_targets {
  250. +'
  251. +all :: static
  252. +test ::
  253. +static :: librabbitmq$(LIB_EXT)
  254. +librabbitmq$(LIB_EXT): $(O_FILES)
  255. + $(AR) cr librabbitmq$(LIB_EXT) $(O_FILES)
  256. + $(RANLIB) librabbitmq$(LIB_EXT)
  257. +
  258. +';
  259. +}
  260. Index: Net-RabbitMQ-0.0.4/librabbitmq/amqp.h
  261. --- Net-RabbitMQ-0.0.4/librabbitmq/amqp.h.orig 2009-12-19 08:59:44.000000000 +0100
  262. +++ Net-RabbitMQ-0.0.4/librabbitmq/amqp.h 2010-12-19 13:15:40.000000000 +0100
  263. @@ -5,6 +5,9 @@
  264. extern "C" {
  265. #endif
  266. +#include <sys/types.h>
  267. +#include <unistd.h>
  268. +
  269. typedef int amqp_boolean_t;
  270. typedef uint32_t amqp_method_number_t;
  271. typedef uint32_t amqp_flags_t;
  272. Index: Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h
  273. --- Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h.orig 2009-11-12 21:15:45.000000000 +0100
  274. +++ Net-RabbitMQ-0.0.4/librabbitmq/amqp_config.h 2010-12-19 13:15:40.000000000 +0100
  275. @@ -1,2 +1,3 @@
  276. +#undef VERSION
  277. #define VERSION "0.0.1"