diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | onion_base32.c | 4 | ||||
-rw-r--r-- | onion_base32.h | 2 | ||||
-rw-r--r-- | sand-leek.c | 8 |
4 files changed, 8 insertions, 8 deletions
@@ -1,4 +1,4 @@ -CFLAGS += -Wall -Wextra -O2 +CFLAGS += -Wall -Wextra -O2 -mssse3 LDFLAGS += -lssl -lcrypto -lpthread all: sand-leek diff --git a/onion_base32.c b/onion_base32.c index 041ac3e..78753ab 100644 --- a/onion_base32.c +++ b/onion_base32.c @@ -35,7 +35,7 @@ onion_base32(char output[16], unsigned char sum[20]) { } } -#ifdef SSSE3_ONION_BASE32 +#ifdef __SSSE3__ #include <tmmintrin.h> /* A slightly-parallel base32 algorithm using SSSE3 @@ -99,4 +99,4 @@ onion_base32_ssse3(char output[16], unsigned char sum[20]) { _mm_storeu_si128((__m128i*)output, l|n); } -#endif /* ifdef SSSE3_ONION_BASE32 */ +#endif /* ifdef __SSSE3__ */ diff --git a/onion_base32.h b/onion_base32.h index 9377915..c196dea 100644 --- a/onion_base32.h +++ b/onion_base32.h @@ -1,6 +1,6 @@ int check_base32(char *); void onion_base32(char [16], unsigned char (*)); -#ifdef SSSE3_ONION_BASE32 +#ifdef __SSSE3__ void onion_base32_ssse3(char [16], unsigned char (*)); #endif diff --git a/sand-leek.c b/sand-leek.c index 8554960..160987b 100644 --- a/sand-leek.c +++ b/sand-leek.c @@ -92,7 +92,7 @@ key_update_d(RSA *rsa_key) { void* work(void *arg) { char onion[17]; -#ifdef SSSE3_ONION_BASE32 +#ifdef __SSSE3__ char check_onion[17]; /* buffer for onion address used in sanity check */ #endif unsigned char sha[20]; @@ -157,7 +157,7 @@ work(void *arg) { SHA1_Update(&working_sha_c, &e_big_endian, EXPONENT_SIZE_BYTES); SHA1_Final((unsigned char*)&sha, &working_sha_c); -#ifdef SSSE3_ONION_BASE32 +#ifdef __SSSE3__ onion_base32_ssse3(onion, sha); #else onion_base32(onion, sha); @@ -174,7 +174,7 @@ work(void *arg) { goto STOP; } if(strncmp(onion, search, search_len) == 0) { -#ifdef SSSE3_ONION_BASE32 +#ifdef __SSSE3__ /* sanity check: my SSE algorithm is still experimental, so * check it with old trusty */ onion_base32(check_onion, sha); @@ -271,7 +271,7 @@ monitor_progress(unsigned long volatile *khashes, int thread_count) { void show_version(void) { -#ifdef SSSE3_ONION_BASE32 +#ifdef __SSSE3__ # define EXTENSIONS "SSSE3 Base32 Algorithm" #else # define EXTENSIONS "None" |