ruby-changes:11305
From: akr <ko1@a...>
Date: Thu, 12 Mar 2009 22:44:53 +0900 (JST)
Subject: [ruby-changes:11305] Ruby:r22918 (trunk): * ext/openssl: suppress warnings.
akr 2009-03-12 22:44:37 +0900 (Thu, 12 Mar 2009) New Revision: 22918 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22918 Log: * ext/openssl: suppress warnings. * ext/openssl/ossl.h (OSSL_Debug): don't use gcc extention for variadic macro. Modified files: trunk/ChangeLog trunk/ext/openssl/extconf.rb trunk/ext/openssl/ossl.h trunk/ext/openssl/ossl_bn.c trunk/ext/openssl/ossl_config.c trunk/ext/openssl/ossl_pkey_dh.c trunk/ext/openssl/ossl_pkey_dsa.c trunk/ext/openssl/ossl_pkey_rsa.c Index: ChangeLog =================================================================== --- ChangeLog (revision 22917) +++ ChangeLog (revision 22918) @@ -1,3 +1,10 @@ +Thu Mar 12 22:41:41 2009 Tanaka Akira <akr@f...> + + * ext/openssl: suppress warnings. + + * ext/openssl/ossl.h (OSSL_Debug): don't use gcc extention for + variadic macro. + Thu Mar 12 22:29:36 2009 NAKAMURA Usaku <usa@r...> * win32/Makefile.sub (WARNFLAGS): warning 4996 is only in VC++8 or Index: ext/openssl/ossl_pkey_dsa.c =================================================================== --- ext/openssl/ossl_pkey_dsa.c (revision 22917) +++ ext/openssl/ossl_pkey_dsa.c (revision 22918) @@ -433,11 +433,11 @@ return Qfalse; } -OSSL_PKEY_BN(dsa, p); -OSSL_PKEY_BN(dsa, q); -OSSL_PKEY_BN(dsa, g); -OSSL_PKEY_BN(dsa, pub_key); -OSSL_PKEY_BN(dsa, priv_key); +OSSL_PKEY_BN(dsa, p) +OSSL_PKEY_BN(dsa, q) +OSSL_PKEY_BN(dsa, g) +OSSL_PKEY_BN(dsa, pub_key) +OSSL_PKEY_BN(dsa, priv_key) /* * INIT Index: ext/openssl/ossl_config.c =================================================================== --- ext/openssl/ossl_config.c (revision 22917) +++ ext/openssl/ossl_config.c (revision 22918) @@ -300,7 +300,7 @@ rb_ary_push(ary, rb_str_new2(cv->section)); } -static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE*, VALUE); +static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE*, VALUE) static VALUE ossl_config_get_sections(VALUE self) @@ -338,7 +338,7 @@ rb_str_cat2(str, "\n"); } -static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE*, VALUE); +static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE*, VALUE) static VALUE dump_conf(CONF *conf) @@ -382,7 +382,7 @@ } } -static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE*, void*); +static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE*, void*) static VALUE ossl_config_each(VALUE self) Index: ext/openssl/ossl_pkey_rsa.c =================================================================== --- ext/openssl/ossl_pkey_rsa.c (revision 22917) +++ ext/openssl/ossl_pkey_rsa.c (revision 22918) @@ -519,14 +519,14 @@ } */ -OSSL_PKEY_BN(rsa, n); -OSSL_PKEY_BN(rsa, e); -OSSL_PKEY_BN(rsa, d); -OSSL_PKEY_BN(rsa, p); -OSSL_PKEY_BN(rsa, q); -OSSL_PKEY_BN(rsa, dmp1); -OSSL_PKEY_BN(rsa, dmq1); -OSSL_PKEY_BN(rsa, iqmp); +OSSL_PKEY_BN(rsa, n) +OSSL_PKEY_BN(rsa, e) +OSSL_PKEY_BN(rsa, d) +OSSL_PKEY_BN(rsa, p) +OSSL_PKEY_BN(rsa, q) +OSSL_PKEY_BN(rsa, dmp1) +OSSL_PKEY_BN(rsa, dmq1) +OSSL_PKEY_BN(rsa, iqmp) /* * INIT Index: ext/openssl/ossl.h =================================================================== --- ext/openssl/ossl.h (revision 22917) +++ ext/openssl/ossl.h (revision 22918) @@ -163,10 +163,10 @@ extern VALUE dOSSL; #if defined(HAVE_VA_ARGS_MACRO) -#define OSSL_Debug(fmt, ...) do { \ +#define OSSL_Debug(...) do { \ if (dOSSL == Qtrue) { \ fprintf(stderr, "OSSL_DEBUG: "); \ - fprintf(stderr, fmt, ##__VA_ARGS__); \ + fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, " [%s:%d]\n", __FILE__, __LINE__); \ } \ } while (0) Index: ext/openssl/ossl_bn.c =================================================================== --- ext/openssl/ossl_bn.c (revision 22917) +++ ext/openssl/ossl_bn.c (revision 22918) @@ -272,9 +272,9 @@ } \ return Qfalse; \ } -BIGNUM_BOOL1(is_zero); -BIGNUM_BOOL1(is_one); -BIGNUM_BOOL1(is_odd); +BIGNUM_BOOL1(is_zero) +BIGNUM_BOOL1(is_one) +BIGNUM_BOOL1(is_odd) #define BIGNUM_1c(func) \ /* \ @@ -298,7 +298,7 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_1c(sqr); +BIGNUM_1c(sqr) #define BIGNUM_2(func) \ /* \ @@ -322,8 +322,8 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_2(add); -BIGNUM_2(sub); +BIGNUM_2(add) +BIGNUM_2(sub) #define BIGNUM_2c(func) \ /* \ @@ -347,12 +347,12 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_2c(mul); -BIGNUM_2c(mod); -BIGNUM_2c(exp); -BIGNUM_2c(gcd); -BIGNUM_2c(mod_sqr); -BIGNUM_2c(mod_inverse); +BIGNUM_2c(mul) +BIGNUM_2c(mod) +BIGNUM_2c(exp) +BIGNUM_2c(gcd) +BIGNUM_2c(mod_sqr) +BIGNUM_2c(mod_inverse) /* * call-seq: @@ -407,10 +407,10 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_3c(mod_add); -BIGNUM_3c(mod_sub); -BIGNUM_3c(mod_mul); -BIGNUM_3c(mod_exp); +BIGNUM_3c(mod_add) +BIGNUM_3c(mod_sub) +BIGNUM_3c(mod_mul) +BIGNUM_3c(mod_exp) #define BIGNUM_BIT(func) \ /* \ @@ -428,9 +428,9 @@ } \ return self; \ } -BIGNUM_BIT(set_bit); -BIGNUM_BIT(clear_bit); -BIGNUM_BIT(mask_bits); +BIGNUM_BIT(set_bit) +BIGNUM_BIT(clear_bit) +BIGNUM_BIT(mask_bits) /* * call-seq: @@ -474,8 +474,8 @@ WrapBN(CLASS_OF(self), obj, result); \ return obj; \ } -BIGNUM_SHIFT(lshift); -BIGNUM_SHIFT(rshift); +BIGNUM_SHIFT(lshift) +BIGNUM_SHIFT(rshift) #define BIGNUM_SELF_SHIFT(func) \ /* \ @@ -494,8 +494,8 @@ ossl_raise(eBNError, NULL); \ return self; \ } -BIGNUM_SELF_SHIFT(lshift); -BIGNUM_SELF_SHIFT(rshift); +BIGNUM_SELF_SHIFT(lshift) +BIGNUM_SELF_SHIFT(rshift) #define BIGNUM_RAND(func) \ /* \ @@ -528,8 +528,8 @@ WrapBN(klass, obj, result); \ return obj; \ } -BIGNUM_RAND(rand); -BIGNUM_RAND(pseudo_rand); +BIGNUM_RAND(rand) +BIGNUM_RAND(pseudo_rand) #define BIGNUM_RAND_RANGE(func) \ /* \ @@ -552,8 +552,8 @@ WrapBN(klass, obj, result); \ return obj; \ } -BIGNUM_RAND_RANGE(rand); -BIGNUM_RAND_RANGE(pseudo_rand); +BIGNUM_RAND_RANGE(rand) +BIGNUM_RAND_RANGE(pseudo_rand) /* * call-seq: @@ -608,8 +608,8 @@ GetBN(self, bn); \ return INT2FIX(BN_##func(bn)); \ } -BIGNUM_NUM(num_bytes); -BIGNUM_NUM(num_bits); +BIGNUM_NUM(num_bytes) +BIGNUM_NUM(num_bits) static VALUE ossl_bn_copy(VALUE self, VALUE other) @@ -642,8 +642,8 @@ GetBN(self, bn1); \ return INT2FIX(BN_##func(bn1, bn2)); \ } -BIGNUM_CMP(cmp); -BIGNUM_CMP(ucmp); +BIGNUM_CMP(cmp) +BIGNUM_CMP(ucmp) static VALUE ossl_bn_eql(VALUE self, VALUE other) Index: ext/openssl/ossl_pkey_dh.c =================================================================== --- ext/openssl/ossl_pkey_dh.c (revision 22917) +++ ext/openssl/ossl_pkey_dh.c (revision 22918) @@ -415,10 +415,10 @@ return str; } -OSSL_PKEY_BN(dh, p); -OSSL_PKEY_BN(dh, g); -OSSL_PKEY_BN(dh, pub_key); -OSSL_PKEY_BN(dh, priv_key); +OSSL_PKEY_BN(dh, p) +OSSL_PKEY_BN(dh, g) +OSSL_PKEY_BN(dh, pub_key) +OSSL_PKEY_BN(dh, priv_key) /* * -----BEGIN DH PARAMETERS----- Index: ext/openssl/extconf.rb =================================================================== --- ext/openssl/extconf.rb (revision 22917) +++ ext/openssl/extconf.rb (revision 22918) @@ -99,7 +99,7 @@ unless have_func("SSL_set_tlsext_host_name", ['openssl/ssl.h']) have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TLSEXT_HOST_NAME") end -if try_compile("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n") +if try_compile("#define FOO(...) foo(__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n") $defs.push("-DHAVE_VA_ARGS_MACRO") end if have_header("openssl/engine.h") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/