From: Pekka Riikonen Date: Fri, 29 Dec 2006 19:38:11 +0000 (+0000) Subject: Symbian compilation fixes. X-Git-Tag: 1.2.beta1~523 X-Git-Url: http://git.silc.fi/gitweb/?a=commitdiff_plain;h=cf21209b9866f826f566ebd10059661446f8b702;p=crypto.git Symbian compilation fixes. --- diff --git a/lib/contrib/getopti.c b/lib/contrib/getopti.c index 8e601568..9cd7a21a 100644 --- a/lib/contrib/getopti.c +++ b/lib/contrib/getopti.c @@ -1,7 +1,7 @@ /* Our own convenience getopt. Public Domain. */ #include "silc.h" -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN #if !defined(HAVE_GETOPT) && !defined(HAVE_GETOPT_H) int opterr = 1; int optind = 1; @@ -67,4 +67,4 @@ int getopt(int argc, char * const *argv, const char *optstring) return c; } #endif /* !HAVE_GETOPT && !HAVE_GETOPT_H */ -#endif /* !SILC_EPOC */ +#endif /* !SILC_SYMBIAN */ diff --git a/lib/contrib/getopti.h b/lib/contrib/getopti.h index 449e4b55..aeec6a29 100644 --- a/lib/contrib/getopti.h +++ b/lib/contrib/getopti.h @@ -1,7 +1,7 @@ #ifndef GETOPTI_H #define GETOPTI_H -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN #if !defined(HAVE_GETOPT) && !defined(HAVE_GETOPT_H) /* Our own convenience getopt. */ extern int opterr; @@ -10,6 +10,6 @@ extern int optopt; extern char *optarg; int getopt(int argc, char * const *argv, const char *optstring); #endif /* !HAVE_GETOPT && !HAVE_GETOPT_H */ -#endif /* !SILC_EPOC */ +#endif /* !SILC_SYMBIAN */ #endif /* GETOPTI_H */ diff --git a/lib/silccrypt/sha256.c b/lib/silccrypt/sha256.c index 389787ab..089aa87f 100644 --- a/lib/silccrypt/sha256.c +++ b/lib/silccrypt/sha256.c @@ -58,12 +58,12 @@ static inline unsigned RORc(unsigned word, int i) } #else -#define RORc(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsignedlong)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) &0xFFFFFFFFUL) +#define RORc(x, y) ( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | ((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) &0xFFFFFFFFUL) #endif /* _MSC_VER */ /* Various logical functions */ #define Ch(x,y,z) (z ^ (x & (y ^ z))) -#define Maj(x,y,z) (((x | y) & z) | (x & y)) +#define Maj(x,y,z) (((x | y) & z) | (x & y)) #define S(x, n) RORc((x),(n)) #define R(x, n) (((x)&0xFFFFFFFFUL)>>(n)) #define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22)) @@ -89,7 +89,7 @@ int sha256_compress(SilcUInt32 *state, unsigned char *buf) /* fill W[16..63] */ for (i = 16; i < 64; i++) { W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]; - } + } /* Compress */ #define RND(a,b,c,d,e,f,g,h,i,ki) \ @@ -162,8 +162,8 @@ int sha256_compress(SilcUInt32 *state, unsigned char *buf) RND(S[3],S[4],S[5],S[6],S[7],S[0],S[1],S[2],61,0xa4506ceb); RND(S[2],S[3],S[4],S[5],S[6],S[7],S[0],S[1],62,0xbef9a3f7); RND(S[1],S[2],S[3],S[4],S[5],S[6],S[7],S[0],63,0xc67178f2); - -#undef RND + +#undef RND /* feedback */ for (i = 0; i < 8; i++) { @@ -212,7 +212,7 @@ int sha256_process(sha256_state * md, const unsigned char *in, if (md->curlen > block_size) return FALSE; - while (inlen > 0) { + while (inlen > 0) { if (md->curlen == 0 && inlen >= block_size) { if ((err = sha256_compress(md->state, (unsigned char *)in)) != TRUE) return err; @@ -220,7 +220,7 @@ int sha256_process(sha256_state * md, const unsigned char *in, in += block_size; inlen -= block_size; } else { - n = MIN(inlen, (block_size - md->curlen)); + n = MIN(inlen, (block_size - md->curlen)); memcpy(md->buf + md->curlen, in, (size_t)n); md->curlen += n; in += n; diff --git a/lib/silccrypt/silccipher.c b/lib/silccrypt/silccipher.c index 0aea2dc0..c5b0c4ae 100644 --- a/lib/silccrypt/silccipher.c +++ b/lib/silccrypt/silccipher.c @@ -28,10 +28,10 @@ struct SilcCipherStruct { unsigned char iv[SILC_CIPHER_MAX_IV_SIZE]; }; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN /* Dynamically registered list of ciphers. */ SilcDList silc_cipher_list = NULL; -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ /* Macro to define cipher to cipher list */ #define SILC_CIPHER_API_DEF(name, cipher, keylen, blocklen, ivlen, mode) \ @@ -79,7 +79,7 @@ const SilcCipherObject silc_default_ciphers[] = SilcBool silc_cipher_register(const SilcCipherObject *cipher) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcCipherObject *new; SILC_LOG_DEBUG(("Registering new cipher `%s'", cipher->name)); @@ -110,7 +110,7 @@ SilcBool silc_cipher_register(const SilcCipherObject *cipher) silc_cipher_list = silc_dlist_init(); silc_dlist_add(silc_cipher_list, new); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -118,7 +118,7 @@ SilcBool silc_cipher_register(const SilcCipherObject *cipher) SilcBool silc_cipher_unregister(SilcCipherObject *cipher) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcCipherObject *entry; SILC_LOG_DEBUG(("Unregistering cipher")); @@ -142,7 +142,7 @@ SilcBool silc_cipher_unregister(SilcCipherObject *cipher) } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -152,19 +152,19 @@ SilcBool silc_cipher_unregister(SilcCipherObject *cipher) SilcBool silc_cipher_register_default(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN int i; for (i = 0; silc_default_ciphers[i].name; i++) silc_cipher_register(&(silc_default_ciphers[i])); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } SilcBool silc_cipher_unregister_all(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcCipherObject *entry; if (!silc_cipher_list) @@ -176,7 +176,7 @@ SilcBool silc_cipher_unregister_all(void) if (!silc_cipher_list) break; } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -191,7 +191,7 @@ SilcBool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher) SILC_LOG_DEBUG(("Allocating new cipher object")); -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_cipher_list) { silc_dlist_start(silc_cipher_list); while ((entry = silc_dlist_get(silc_cipher_list)) != SILC_LIST_END) { @@ -210,7 +210,7 @@ SilcBool silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher) } } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ if (entry) { *new_cipher = silc_calloc(1, sizeof(**new_cipher)); @@ -236,7 +236,7 @@ void silc_cipher_free(SilcCipher cipher) SilcBool silc_cipher_is_supported(const unsigned char *name) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcCipherObject *entry; if (silc_cipher_list) { @@ -253,7 +253,7 @@ SilcBool silc_cipher_is_supported(const unsigned char *name) if (!strcmp(silc_default_ciphers[i].name, name)) return TRUE; } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -265,7 +265,7 @@ char *silc_cipher_get_supported(void) char *list = NULL; int len = 0; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_cipher_list) { silc_dlist_start(silc_cipher_list); while ((entry = silc_dlist_get(silc_cipher_list)) != SILC_LIST_END) { @@ -292,7 +292,7 @@ char *silc_cipher_get_supported(void) len++; } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ list[len - 1] = 0; diff --git a/lib/silccrypt/silchash.c b/lib/silccrypt/silchash.c index 721b81d5..bf8cde8f 100644 --- a/lib/silccrypt/silchash.c +++ b/lib/silccrypt/silchash.c @@ -30,10 +30,10 @@ struct SilcHashStruct { void *context; }; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN /* List of dynamically registered hash functions. */ SilcDList silc_hash_list = NULL; -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ /* Default hash functions for silc_hash_register_default(). */ const SilcHashObject silc_default_hash[] = @@ -53,7 +53,7 @@ const SilcHashObject silc_default_hash[] = SilcBool silc_hash_register(const SilcHashObject *hash) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHashObject *new; SILC_LOG_DEBUG(("Registering new hash function `%s'", hash->name)); @@ -89,7 +89,7 @@ SilcBool silc_hash_register(const SilcHashObject *hash) silc_hash_list = silc_dlist_init(); silc_dlist_add(silc_hash_list, new); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -97,7 +97,7 @@ SilcBool silc_hash_register(const SilcHashObject *hash) SilcBool silc_hash_unregister(SilcHashObject *hash) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHashObject *entry; SILC_LOG_DEBUG(("Unregistering hash function")); @@ -121,7 +121,7 @@ SilcBool silc_hash_unregister(SilcHashObject *hash) } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -131,19 +131,19 @@ SilcBool silc_hash_unregister(SilcHashObject *hash) SilcBool silc_hash_register_default(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN int i; for (i = 0; silc_default_hash[i].name; i++) silc_hash_register(&(silc_default_hash[i])); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } SilcBool silc_hash_unregister_all(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHashObject *entry; if (!silc_hash_list) @@ -155,7 +155,7 @@ SilcBool silc_hash_unregister_all(void) if (!silc_hash_list) break; } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -168,7 +168,7 @@ SilcBool silc_hash_alloc(const unsigned char *name, SilcHash *new_hash) SILC_LOG_DEBUG(("Allocating new hash object")); -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_hash_list) { silc_dlist_start(silc_hash_list); while ((entry = silc_dlist_get(silc_hash_list)) != SILC_LIST_END) { @@ -187,7 +187,7 @@ SilcBool silc_hash_alloc(const unsigned char *name, SilcHash *new_hash) } } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ if (entry) { *new_hash = silc_calloc(1, sizeof(**new_hash)); @@ -240,7 +240,7 @@ const char *silc_hash_get_name(SilcHash hash) SilcBool silc_hash_is_supported(const unsigned char *name) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHashObject *entry; if (silc_hash_list) { @@ -257,7 +257,7 @@ SilcBool silc_hash_is_supported(const unsigned char *name) if (!strcmp(silc_default_hash[i].name, name)) return TRUE; } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -269,7 +269,7 @@ char *silc_hash_get_supported(void) char *list = NULL; int len = 0; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_hash_list) { silc_dlist_start(silc_hash_list); while ((entry = silc_dlist_get(silc_hash_list)) != SILC_LIST_END) { @@ -296,7 +296,7 @@ char *silc_hash_get_supported(void) len++; } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ list[len - 1] = 0; diff --git a/lib/silccrypt/silchmac.c b/lib/silccrypt/silchmac.c index 8b81dfc3..1e9380db 100644 --- a/lib/silccrypt/silchmac.c +++ b/lib/silccrypt/silchmac.c @@ -31,10 +31,10 @@ struct SilcHmacStruct { unsigned int allocated_hash : 1; /* TRUE if the hash was allocated */ }; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN /* List of dynamically registered HMACs. */ SilcDList silc_hmac_list = NULL; -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ /* Default hmacs for silc_hmac_register_default(). */ const SilcHmacObject silc_default_hmacs[] = @@ -86,7 +86,7 @@ static void silc_hmac_init_internal(SilcHmac hmac, unsigned char *key, SilcBool silc_hmac_register(const SilcHmacObject *hmac) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHmacObject *new; SILC_LOG_DEBUG(("Registering new HMAC `%s'", hmac->name)); @@ -112,7 +112,7 @@ SilcBool silc_hmac_register(const SilcHmacObject *hmac) silc_hmac_list = silc_dlist_init(); silc_dlist_add(silc_hmac_list, new); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -120,7 +120,7 @@ SilcBool silc_hmac_register(const SilcHmacObject *hmac) SilcBool silc_hmac_unregister(SilcHmacObject *hmac) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHmacObject *entry; SILC_LOG_DEBUG(("Unregistering HMAC")); @@ -144,7 +144,7 @@ SilcBool silc_hmac_unregister(SilcHmacObject *hmac) } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -154,19 +154,19 @@ SilcBool silc_hmac_unregister(SilcHmacObject *hmac) SilcBool silc_hmac_register_default(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN int i; for (i = 0; silc_default_hmacs[i].name; i++) silc_hmac_register(&(silc_default_hmacs[i])); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } SilcBool silc_hmac_unregister_all(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHmacObject *entry; if (!silc_hmac_list) @@ -178,7 +178,7 @@ SilcBool silc_hmac_unregister_all(void) if (!silc_hmac_list) break; } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -218,7 +218,7 @@ SilcBool silc_hmac_alloc(const char *name, SilcHash hash, SilcHmac *new_hmac) (*new_hmac)->hash = hash; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_hmac_list) { SilcHmacObject *entry; silc_dlist_start(silc_hmac_list); @@ -240,7 +240,7 @@ SilcBool silc_hmac_alloc(const char *name, SilcHash hash, SilcHmac *new_hmac) } } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ silc_free(*new_hmac); *new_hmac = NULL; @@ -289,7 +289,7 @@ const char *silc_hmac_get_name(SilcHmac hmac) SilcBool silc_hmac_is_supported(const char *name) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcHmacObject *entry; if (!name) @@ -309,7 +309,7 @@ SilcBool silc_hmac_is_supported(const char *name) if (!strcmp(silc_default_hmacs[i].name, name)) return TRUE; } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -321,7 +321,7 @@ char *silc_hmac_get_supported() char *list = NULL; int len = 0; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_hmac_list) { silc_dlist_start(silc_hmac_list); while ((entry = silc_dlist_get(silc_hmac_list)) != SILC_LIST_END) { @@ -348,7 +348,7 @@ char *silc_hmac_get_supported() len++; } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ list[len - 1] = 0; diff --git a/lib/silccrypt/silcpkcs.c b/lib/silccrypt/silcpkcs.c index ebf8bbda..4665c160 100644 --- a/lib/silccrypt/silcpkcs.c +++ b/lib/silccrypt/silcpkcs.c @@ -22,7 +22,7 @@ #include "silcpk_i.h" #include "silcpkcs1_i.h" -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN /* Dynamically registered list of PKCS. */ SilcDList silc_pkcs_list = NULL; SilcDList silc_pkcs_alg_list = NULL; @@ -31,7 +31,7 @@ SilcDList silc_pkcs_alg_list = NULL; #else #define SILC_PKCS_LIST TRUE #define SILC_PKCS_ALG_LIST TRUE -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ /* Static list of PKCS for silc_pkcs_register_default(). */ const SilcPKCSObject silc_default_pkcs[] = @@ -125,7 +125,7 @@ const SilcPKCSAlgorithm silc_default_pkcs_alg[] = SilcBool silc_pkcs_register(const SilcPKCSObject *pkcs) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcPKCSObject *newpkcs; SILC_LOG_DEBUG(("Registering new PKCS")); @@ -150,7 +150,7 @@ SilcBool silc_pkcs_register(const SilcPKCSObject *pkcs) silc_pkcs_list = silc_dlist_init(); silc_dlist_add(silc_pkcs_list, newpkcs); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -158,7 +158,7 @@ SilcBool silc_pkcs_register(const SilcPKCSObject *pkcs) SilcBool silc_pkcs_unregister(SilcPKCSObject *pkcs) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcPKCSObject *entry; SILC_LOG_DEBUG(("Unregistering PKCS")); @@ -181,7 +181,7 @@ SilcBool silc_pkcs_unregister(SilcPKCSObject *pkcs) } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -189,7 +189,7 @@ SilcBool silc_pkcs_unregister(SilcPKCSObject *pkcs) SilcBool silc_pkcs_algorithm_register(const SilcPKCSAlgorithm *pkcs) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcPKCSAlgorithm *newalg; SILC_LOG_DEBUG(("Registering new PKCS algorithm %s", @@ -229,7 +229,7 @@ SilcBool silc_pkcs_algorithm_register(const SilcPKCSAlgorithm *pkcs) silc_pkcs_alg_list = silc_dlist_init(); silc_dlist_add(silc_pkcs_alg_list, newalg); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -237,7 +237,7 @@ SilcBool silc_pkcs_algorithm_register(const SilcPKCSAlgorithm *pkcs) SilcBool silc_pkcs_algorithm_unregister(SilcPKCSAlgorithm *pkcs) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcPKCSAlgorithm*entry; SILC_LOG_DEBUG(("Unregistering PKCS algorithm")); @@ -263,7 +263,7 @@ SilcBool silc_pkcs_algorithm_unregister(SilcPKCSAlgorithm *pkcs) } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return FALSE; } @@ -271,7 +271,7 @@ SilcBool silc_pkcs_algorithm_unregister(SilcPKCSAlgorithm *pkcs) SilcBool silc_pkcs_register_default(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN int i; for (i = 0; silc_default_pkcs[i].type; i++) @@ -280,13 +280,13 @@ SilcBool silc_pkcs_register_default(void) for (i = 0; silc_default_pkcs_alg[i].name; i++) silc_pkcs_algorithm_register(&(silc_default_pkcs_alg[i])); -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } SilcBool silc_pkcs_unregister_all(void) { -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN SilcPKCSObject *entry; SilcPKCSAlgorithm *alg; @@ -308,7 +308,7 @@ SilcBool silc_pkcs_unregister_all(void) } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return TRUE; } @@ -320,7 +320,7 @@ char *silc_pkcs_get_supported(void) char *list = NULL; int len = 0; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_pkcs_alg_list) { silc_dlist_start(silc_pkcs_alg_list); while ((entry = silc_dlist_get(silc_pkcs_alg_list)) != SILC_LIST_END) { @@ -351,7 +351,7 @@ char *silc_pkcs_get_supported(void) len++; } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ list[len - 1] = 0; @@ -364,7 +364,7 @@ const SilcPKCSObject *silc_pkcs_find_pkcs(SilcPKCSType type) { SilcPKCSObject *entry; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_pkcs_list) { silc_dlist_start(silc_pkcs_list); while ((entry = silc_dlist_get(silc_pkcs_list)) != SILC_LIST_END) { @@ -375,13 +375,13 @@ const SilcPKCSObject *silc_pkcs_find_pkcs(SilcPKCSType type) #else { int i; - for (i = 0; silc_default_pkcs[i].name; i++) { + for (i = 0; silc_default_pkcs[i].type; i++) { entry = (SilcPKCSObject *)&(silc_default_pkcs[i]); if (entry->type == type) return (const SilcPKCSObject *)entry; } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return NULL; } @@ -393,7 +393,7 @@ const SilcPKCSAlgorithm *silc_pkcs_find_algorithm(const char *algorithm, { SilcPKCSAlgorithm *entry; -#ifndef SILC_EPOC +#ifndef SILC_SYMBIAN if (silc_pkcs_alg_list) { silc_dlist_start(silc_pkcs_alg_list); while ((entry = silc_dlist_get(silc_pkcs_alg_list)) != SILC_LIST_END) { @@ -412,7 +412,7 @@ const SilcPKCSAlgorithm *silc_pkcs_find_algorithm(const char *algorithm, return (const SilcPKCSAlgorithm *)entry; } } -#endif /* SILC_EPOC */ +#endif /* SILC_SYMBIAN */ return NULL; } diff --git a/lib/silccrypt/silcrng.c b/lib/silccrypt/silcrng.c index 9538289b..224e33a2 100644 --- a/lib/silccrypt/silcrng.c +++ b/lib/silccrypt/silcrng.c @@ -303,8 +303,8 @@ static void silc_rng_get_soft_noise(SilcRng rng) silc_rng_xor(rng, (r.ru_nsignals << 16), pos++); silc_rng_xor(rng, (r.ru_nvcsw + r.ru_nivcsw), pos++); silc_rng_xor(rng, (r.ru_nvcsw ^ r.ru_nivcsw), pos++); -#endif /* SILC_SYMBIAN */ -#endif +#endif /* SILC_SYMBIAN */ +#endif /* HAVE_GETRUSAGE */ #ifdef SILC_RNG_DEBUG SILC_LOG_HEXDUMP(("pool"), rng->pool, sizeof(rng->pool)); diff --git a/lib/silccrypt/twofish.c b/lib/silccrypt/twofish.c index 103c27c1..ced96d3d 100644 --- a/lib/silccrypt/twofish.c +++ b/lib/silccrypt/twofish.c @@ -443,7 +443,7 @@ u4byte mds_rem(u4byte p0, u4byte p1) } return p1; -}; +} /* initialise the key schedule from the user supplied key */