| 1 |
Please review changes against upstream code using SCM, |
| 2 |
see the Vcs-* tags in debian/control for its location. |
| 3 |
|
| 4 |
--- libbsd-arc4random-perl-1.50.orig/Makefile.PL |
| 5 |
+++ libbsd-arc4random-perl-1.50/Makefile.PL |
| 6 |
@@ -1,4 +1,4 @@ |
| 7 |
-# $MirOS: contrib/hosted/tg/code/BSD::arc4random/Makefile.PL,v 1.6 2011/06/05 22:59:04 tg Exp $ |
| 8 |
+# $MirOS: contrib/hosted/tg/code/BSD::arc4random/Makefile.PL,v 1.7 2011/06/06 12:20:25 tg Exp $ |
| 9 |
#- |
| 10 |
# Copyright (c) 2008, 2009, 2011 |
| 11 |
# Thorsten Glaser <[email protected]> |
| 12 |
@@ -22,10 +22,10 @@ use 5.000; |
| 13 |
use ExtUtils::MakeMaker; |
| 14 |
|
| 15 |
# configuration, set to auto or manual |
| 16 |
-my $cfg = 'auto'; |
| 17 |
+my $cfg = 'manual'; |
| 18 |
# override these values if manual mode |
| 19 |
-my $libs = ''; |
| 20 |
-my $defs = '-DHAVE_ARC4RANDOM_PUSHB=1'; |
| 21 |
+my $libs = '-lbsd'; |
| 22 |
+my $defs = '-DHAVE_ARC4RANDOM_PUSHB=0 -DNEED_ARC4RANDOM_DECL'; |
| 23 |
my $incs = ''; |
| 24 |
my $objs = ''; |
| 25 |
# do not override below for auto mode |
| 26 |
@@ -40,14 +40,16 @@ if ($cfg eq 'auto') { |
| 27 |
if (($^O eq 'gnu') || |
| 28 |
($^O eq 'gnukfreebsd') || |
| 29 |
($^O eq 'linux')) { |
| 30 |
+ # libbsd has no consistent header |
| 31 |
+ # containing the needed prototypes |
| 32 |
+ # so we always use our own protos |
| 33 |
+ $defs .= ' -DNEED_ARC4RANDOM_DECL'; |
| 34 |
# Debian GNU/HURD, GNU/kFreeBSD, GNU/Linux |
| 35 |
# either use libbsd (lenny and up): |
| 36 |
- #$incs = '-include /usr/include/bsd/bsd.h'; |
| 37 |
#$libs = '-lbsd'; |
| 38 |
# or use the contributed arc4random.c file |
| 39 |
$objs = 'arc4random.o'; |
| 40 |
$defs .= ' -DHAVE_SYS_SYSCTL_H=0 -DHAVE_STDINT_H=1'; |
| 41 |
- $defs .= ' -DNEED_ARC4RANDOM_DECL'; |
| 42 |
} |
| 43 |
if (($^O eq 'cygwin') || ($^O eq 'MSWin32') || |
| 44 |
($^O eq 'irix') || |
| 45 |
--- libbsd-arc4random-perl-1.50.orig/arc4rnd_xs.c |
| 46 |
+++ libbsd-arc4random-perl-1.50/arc4rnd_xs.c |
| 47 |
@@ -1,5 +1,5 @@ |
| 48 |
/*- |
| 49 |
- * Copyright (c) 2008, 2009 |
| 50 |
+ * Copyright (c) 2008, 2009, 2011 |
| 51 |
* Thorsten Glaser <[email protected]> |
| 52 |
* |
| 53 |
* Provided that these terms and disclaimer and all copyright notices |
| 54 |
@@ -48,7 +48,7 @@ |
| 55 |
#define __RCSID(x) __IDSTRING(rcsid,x) |
| 56 |
#endif |
| 57 |
|
| 58 |
-__RCSID("$MirOS: contrib/hosted/tg/code/BSD::arc4random/arc4rnd_xs.c,v 1.5 2009/10/10 22:43:53 tg Exp $"); |
| 59 |
+__RCSID("$MirOS: contrib/hosted/tg/code/BSD::arc4random/arc4rnd_xs.c,v 1.6 2011/06/06 12:20:26 tg Exp $"); |
| 60 |
|
| 61 |
#ifdef REDEF_USCORETYPES |
| 62 |
#define u_int32_t uint32_t |
| 63 |
@@ -57,6 +57,7 @@ __RCSID("$MirOS: contrib/hosted/tg/code/ |
| 64 |
#ifdef NEED_ARC4RANDOM_DECL |
| 65 |
u_int32_t arc4random(void); |
| 66 |
void arc4random_addrandom(u_char *, int); |
| 67 |
+void arc4random_stir(void); |
| 68 |
#endif |
| 69 |
|
| 70 |
XS(XS_BSD__arc4random_arc4random_xs); |
| 71 |
@@ -109,6 +110,11 @@ XS(XS_BSD__arc4random_arc4random_addrand |
| 72 |
#endif |
| 73 |
|
| 74 |
#if HAVE_ARC4RANDOM_PUSHB |
| 75 |
+ |
| 76 |
+#ifdef NEED_ARC4RANDOM_DECL |
| 77 |
+uint32_t arc4random_pushb(const void *, size_t); |
| 78 |
+#endif |
| 79 |
+ |
| 80 |
XS(XS_BSD__arc4random_arc4random_pushb_xs); |
| 81 |
XS(XS_BSD__arc4random_arc4random_pushb_xs) |
| 82 |
{ |