diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-15 08:13:30 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-15 08:13:30 -0300 |
commit | f54a1182494db9bababccfa83692630bec51ca95 (patch) | |
tree | 2c9b96009bfea8eef82d21e14a61f7306827f917 /extra/yassl/taocrypt/src/random.cpp | |
parent | 508522e5f74270ebdca94cfa0b0159ee36d2678f (diff) | |
download | mariadb-git-f54a1182494db9bababccfa83692630bec51ca95.tar.gz |
WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
Diffstat (limited to 'extra/yassl/taocrypt/src/random.cpp')
-rw-r--r-- | extra/yassl/taocrypt/src/random.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/extra/yassl/taocrypt/src/random.cpp b/extra/yassl/taocrypt/src/random.cpp index 2bbc0a85e8b..729421fc71d 100644 --- a/extra/yassl/taocrypt/src/random.cpp +++ b/extra/yassl/taocrypt/src/random.cpp @@ -92,67 +92,6 @@ void OS_Seed::GenerateSeed(byte* output, word32 sz) } -#elif defined(__NETWARE__) - -/* The OS_Seed implementation for Netware */ - -#include <nks/thread.h> -#include <nks/plat.h> - -// Loop on high resulution Read Time Stamp Counter -static void NetwareSeed(byte* output, word32 sz) -{ - word32 tscResult; - - for (word32 i = 0; i < sz; i += sizeof(tscResult)) { - #if defined(__GNUC__) - asm volatile("rdtsc" : "=A" (tscResult)); - #else - #ifdef __MWERKS__ - asm { - #else - __asm { - #endif - rdtsc - mov tscResult, eax - } - #endif - - memcpy(output, &tscResult, sizeof(tscResult)); - output += sizeof(tscResult); - - NXThreadYield(); // induce more variance - } -} - - -OS_Seed::OS_Seed() -{ -} - - -OS_Seed::~OS_Seed() -{ -} - - -void OS_Seed::GenerateSeed(byte* output, word32 sz) -{ - /* - Try to use NXSeedRandom as it will generate a strong - seed using the onboard 82802 chip - - As it's not always supported, fallback to default - implementation if an error is returned - */ - - if (NXSeedRandom(sz, output) != 0) - { - NetwareSeed(output, sz); - } -} - - #else /* The default OS_Seed implementation */ |