Kaydet (Commit) f761b005 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

MacOSX 10.6 does not like id as a variable name

Change-Id: Id1029f777e4f1d03ce7d3fb85ced38deeefca619
üst 1bf008c6
...@@ -113,7 +113,7 @@ static sal_Bool __rtl_random_initPool (RandomPool_Impl *pImpl) ...@@ -113,7 +113,7 @@ static sal_Bool __rtl_random_initPool (RandomPool_Impl *pImpl)
pImpl->m_hDigest = rtl_digest_create (RTL_RANDOM_DIGEST); pImpl->m_hDigest = rtl_digest_create (RTL_RANDOM_DIGEST);
if (pImpl->m_hDigest) if (pImpl->m_hDigest)
{ {
oslThreadIdentifier id; oslThreadIdentifier tid;
TimeValue tv; TimeValue tv;
RandomData_Impl rd; RandomData_Impl rd;
double seed; double seed;
...@@ -124,21 +124,21 @@ static sal_Bool __rtl_random_initPool (RandomPool_Impl *pImpl) ...@@ -124,21 +124,21 @@ static sal_Bool __rtl_random_initPool (RandomPool_Impl *pImpl)
*/ */
/* /*
__rtl_random_seedPool (pImpl, (sal_uInt8*)&id, sizeof(id)); __rtl_random_seedPool (pImpl, (sal_uInt8*)&tid, sizeof(tid));
__rtl_random_seedPool (pImpl, (sal_uInt8*)&tv, sizeof(tv)); __rtl_random_seedPool (pImpl, (sal_uInt8*)&tv, sizeof(tv));
__rtl_random_seedPool (pImpl, (sal_uInt8*)&rd, sizeof(rd)); __rtl_random_seedPool (pImpl, (sal_uInt8*)&rd, sizeof(rd));
*/ */
id = osl::Thread::getCurrentIdentifier(); tid = osl::Thread::getCurrentIdentifier();
id = RTL_RANDOM_RNG_2(RTL_RANDOM_RNG_1(id)); tid = RTL_RANDOM_RNG_2(RTL_RANDOM_RNG_1(tid));
__rtl_random_seedPool (pImpl, (sal_uInt8*)&id, sizeof(id)); __rtl_random_seedPool (pImpl, (sal_uInt8*)&tid, sizeof(tid));
osl_getSystemTime (&tv); osl_getSystemTime (&tv);
tv.Seconds = RTL_RANDOM_RNG_2(tv.Seconds); tv.Seconds = RTL_RANDOM_RNG_2(tv.Seconds);
tv.Nanosec = RTL_RANDOM_RNG_2(tv.Nanosec); tv.Nanosec = RTL_RANDOM_RNG_2(tv.Nanosec);
__rtl_random_seedPool (pImpl, (sal_uInt8*)&tv, sizeof(tv)); __rtl_random_seedPool (pImpl, (sal_uInt8*)&tv, sizeof(tv));
rd.m_nX = (sal_Int16)(((id >> 1) << 1) + 1); rd.m_nX = (sal_Int16)(((tid >> 1) << 1) + 1);
rd.m_nY = (sal_Int16)(((tv.Seconds >> 1) << 1) + 1); rd.m_nY = (sal_Int16)(((tv.Seconds >> 1) << 1) + 1);
rd.m_nZ = (sal_Int16)(((tv.Nanosec >> 1) << 1) + 1); rd.m_nZ = (sal_Int16)(((tv.Nanosec >> 1) << 1) + 1);
__rtl_random_seedPool (pImpl, (sal_uInt8*)&rd, sizeof(rd)); __rtl_random_seedPool (pImpl, (sal_uInt8*)&rd, sizeof(rd));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment