Ignore:
Timestamp:
Dec 29, 2008, 9:37:00 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-29 Cameron Zwarich <[email protected]>

Reviewed by Oliver Hunt and Sam Weinig.

Bug 23029: REGRESSION (r39337): jsfunfuzz generates identical test files
<https://bugs.webkit.org/show_bug.cgi?id=23029>
<rdar://problem/6469185>

The unification of random number generation in r39337 resulted in random()
being initialized on Darwin, but rand() actually being used. Fix this by
making randomNumber() use random() instead of rand() on Darwin.

  • wtf/RandomNumber.cpp: (WTF::randomNumber):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/RandomNumber.cpp

    r39432 r39507  
    5050
    5151    return static_cast<double>(u) / (static_cast<double>(UINT_MAX) + 1.0);
     52#elif PLATFORM(DARWIN)
     53    return static_cast<double>(random()) / (static_cast<double>(RAND_MAX) + 1.0);
    5254#else
    5355    return static_cast<double>(rand()) / (static_cast<double>(RAND_MAX) + 1.0);
Note: See TracChangeset for help on using the changeset viewer.