in reply to Re: rand and srand across builds and platforms?
in thread rand and srand across builds and platforms?

Is OSX POSIX(-complient?)


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.

Replies are listed 'Best First'.
Re^3: rand and srand across builds and platforms?
by Fletch (Bishop) on Mar 08, 2005 at 18:06 UTC

    OS X is basically Mach with a FreeBSD userland, so pretty much so yes.

      Which as you are getting different values from those on Linux builds scotches the "compatible across POSIX platforms" idea.


      Examine what is said, not who speaks.
      Silence betokens consent.
      Love the truth but pardon error.

        Yeah, looks to be. On a whim I checked on an x86 FreeBSD 5 box and got the same numbers I got on OS X. So it looks to be definitely tied to the libc underneath. You might could get by with stubbing out a hash of the n values you're expecting for different values of $^X . . . .