diff options
Diffstat (limited to 'common/d3des.c')
-rw-r--r-- | common/d3des.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/d3des.c b/common/d3des.c index db999a5..12ccf62 100644 --- a/common/d3des.c +++ b/common/d3des.c @@ -28,12 +28,20 @@ #include "d3des.h" +#if defined(__GNUC__) +#define TLS __thread +#elif defined(_MSC_VER) +#define TLS __declspec(thread) +#else +#define TLS +#endif + static void scrunch(unsigned char *, unsigned long *); static void unscrun(unsigned long *, unsigned char *); static void desfunc(unsigned long *, unsigned long *); static void cookey(unsigned long *); -static unsigned long KnL[32] = { 0L }; +static TLS unsigned long KnL[32] = { 0L }; /* static unsigned long KnR[32] = { 0L }; static unsigned long Kn3[32] = { 0L }; |