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