-/* for X, this isn't used except for testing when SecurityServer when
- * Yarrow is not running. So let's strip it down so we don't have
- * to link against CarbonCore.
- */
-#define BARE_BONES_SEED 1
-#if BARE_BONES_SEED
-
-#include <sys/types.h>
-
-extern int getpid();
-
-unsigned createRandomSeed()
-{
- time_t curTime;
- unsigned thisPid;
-
- time(&curTime);
- thisPid = (unsigned)getpid();
-
- return (unsigned)curTime ^ (unsigned)thisPid;
-}
-
-#else /* BARE_BONES_SEED */
-
-#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/Timer.h>
-#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/LowMem.h>
-
-// this is mighty pitiful anyway...
-unsigned createRandomSeed()
-{
- UnsignedWide curTime;
- //unsigned ticks; /* use 16 bits */
- unsigned rtnHi;
- unsigned rtnLo;
-
- /* FIXME - need a way to distinguish OS9x from Carbon. Carbon
- * doesn't have LMGetTicks(). */
-
- Microseconds(&curTime); /* low 16 bits are pretty good */
-
- // Carbon hack
- // rtnHi = LMGetTicks();
- rtnHi = 0x5a5aa5a5;
- rtnLo = curTime.lo & 0xffff;
- return (rtnHi ^ rtnLo);
-}
-#endif /* BARE_BONES_SEED */
-