diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-01 13:38:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-01 13:38:59 +0000 |
commit | 5f225f311463683f58ef4a7e8bd560bfdbe57804 (patch) | |
tree | f6323a6e25688244e76f5aa6f0a7b0018703994c /missing | |
parent | a94201243ec3436304f5f1fae160e996470af51d (diff) | |
download | ruby-5f225f311463683f58ef4a7e8bd560bfdbe57804.tar.gz |
crypt.c: unused functions
* missing/crypt.c: suppress unused non-reentrant functions, by
macro USE_NONREENTRANT_CRYPT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r-- | missing/crypt.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/missing/crypt.c b/missing/crypt.c index d55937865f..8ffe9c7108 100644 --- a/missing/crypt.c +++ b/missing/crypt.c @@ -347,7 +347,7 @@ STATIC void init_perm(C_block perm[64/CHUNKBITS][1<<CHUNKBITS], unsigned char p[ #define init_des() ((void)0) #endif -static const C_block constdatablock; /* encryption constant */ +static const C_block constdatablock = {}; /* encryption constant */ #define KS (data->KS) #define cryptresult (data->cryptresult) @@ -356,8 +356,11 @@ static const C_block constdatablock; /* encryption constant */ static void des_setkey_r(const unsigned char *key, struct crypt_data *data); static void des_cipher_r(const unsigned char *in, unsigned char *out, long salt, int num_iter, struct crypt_data *data); +#ifdef USE_NONREENTRANT_CRYPT static struct crypt_data default_crypt_data; +#endif +#ifdef USE_NONREENTRANT_CRYPT /* * Return a pointer to static data consisting of the "setting" * followed by an encryption produced by the "key" and "setting". @@ -367,6 +370,7 @@ crypt(const char *key, const char *setting) { return crypt_r(key, setting, &default_crypt_data); } +#endif /* * Return a pointer to data consisting of the "setting" followed by an @@ -780,11 +784,13 @@ init_perm(C_block perm[64/CHUNKBITS][1<<CHUNKBITS], /* * "setkey" routine (for backwards compatibility) */ +#ifdef USE_NONREENTRANT_CRYPT void setkey(const char *key) { setkey_r(key, &default_crypt_data); } +#endif void setkey_r(const char *key, struct crypt_data *data) @@ -806,11 +812,13 @@ setkey_r(const char *key, struct crypt_data *data) /* * "encrypt" routine (for backwards compatibility) */ +#ifdef USE_NONREENTRANT_CRYPT void encrypt(char *block, int flag) { encrypt_r(block, flag, &default_crypt_data); } +#endif void encrypt_r(char *block, int flag, struct crypt_data *data) |