head 1.2; access; symbols pkgsrc-2017Q3:1.1.0.20 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.16 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.14 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.12 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.10 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.8 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.6 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.4 pkgsrc-2015Q4-base:1.1 pkgsrc-2015Q3:1.1.0.2 pkgsrc-2015Q3-base:1.1; locks; strict; comment @// @; 1.2 date 2017.10.27.17.48.30; author ryoon; state dead; branches; next 1.1; commitid 5JxkMLJMGh5nuIcA; 1.1 date 2015.07.13.17.49.26; author ryoon; state Exp; branches; next ; commitid HyfUVpjAnbPWo9ty; desc @@ 1.2 log @Remove thunderbird{24,31,38} @ text @$NetBSD: patch-mozilla_xpcom_base_nsUUIDGenerator.cpp,v 1.1 2015/07/13 17:49:26 ryoon Exp $ --- mozilla/xpcom/base/nsUUIDGenerator.cpp.orig 2014-07-18 00:05:57.000000000 +0000 +++ mozilla/xpcom/base/nsUUIDGenerator.cpp @@@@ -15,6 +15,10 @@@@ #include "nsUUIDGenerator.h" +#ifdef ANDROID +extern "C" NS_EXPORT void arc4random_buf(void *, size_t); +#endif + using namespace mozilla; NS_IMPL_ISUPPORTS(nsUUIDGenerator, nsIUUIDGenerator) @@@@ -34,7 +38,7 @@@@ nsUUIDGenerator::Init() // We're a service, so we're guaranteed that Init() is not going // to be reentered while we're inside Init(). -#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID) +#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM) /* initialize random number generator using NSPR random noise */ unsigned int seed; @@@@ -67,7 +71,7 @@@@ nsUUIDGenerator::Init() return NS_ERROR_FAILURE; #endif -#endif /* non XP_WIN and non XP_MACOSX */ +#endif /* non XP_WIN and non XP_MACOSX and non ARC4RANDOM */ return NS_OK; } @@@@ -114,13 +118,16 @@@@ nsUUIDGenerator::GenerateUUIDInPlace(nsI * back to it; instead, we use the value returned when we called * initstate, since older glibc's have broken setstate() return values */ -#ifndef ANDROID +#ifndef HAVE_ARC4RANDOM setstate(mState); #endif +#ifdef HAVE_ARC4RANDOM_BUF + arc4random_buf(id, sizeof(nsID)); +#else /* HAVE_ARC4RANDOM_BUF */ size_t bytesLeft = sizeof(nsID); while (bytesLeft > 0) { -#ifdef ANDROID +#ifdef HAVE_ARC4RANDOM long rval = arc4random(); const size_t mRBytes = 4; #else @@@@ -141,6 +148,7 @@@@ nsUUIDGenerator::GenerateUUIDInPlace(nsI bytesLeft -= toWrite; } +#endif /* HAVE_ARC4RANDOM_BUF */ /* Put in the version */ id->m2 &= 0x0fff; @@@@ -150,7 +158,7 @@@@ nsUUIDGenerator::GenerateUUIDInPlace(nsI id->m3[0] &= 0x3f; id->m3[0] |= 0x80; -#ifndef ANDROID +#ifndef HAVE_ARC4RANDOM /* Restore the previous RNG state */ setstate(mSavedState); #endif @ 1.1 log @Import thunderbird31-31.7.0 as mail/thunderbird31. Mozilla Thunderbird is a redesign of the Mozilla mail component. The goal is to produce a cross platform stand alone mail application using the XUL user interface language. This version tracks 31 ESR. @ text @d1 1 a1 1 $NetBSD: patch-mozilla_xpcom_base_nsUUIDGenerator.cpp,v 1.1 2014/07/27 20:05:00 ryoon Exp $ @