mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* marshal.c (w_symbol, w_object): get rid of warnings.
* re.c (rb_memsearch): ditto. * time.c (time_dump): ditto. * ext/extmk.rb (extmake): not continue making when extconf.rb failed. * ext/openssl/extconf.rb: check __VA_ARGS__ macro more precisely. * ext/openssl/ossl.h: remove version.h dependency. * ext/openssl/ruby_missing.h: ditto. * lib/mkmf.rb (pkg_config): use --libs output except with only-L for other options. [ruby-list:38099] * lib/mkmf.rb (create_makefile): separate rule for static library from shared object. * win32/Makefile.sub, bcc32/Makefile.sub, wince/Makefile.sub: define exec_prefix and libdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
32df87feab
commit
8695612caf
13 changed files with 92 additions and 93 deletions
|
@ -79,15 +79,12 @@ have_func("BN_mod_sub")
|
|||
have_func("BN_rand_range")
|
||||
have_func("BN_pseudo_rand_range")
|
||||
have_func("CONF_get1_default_config_file")
|
||||
if try_cpp("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n int x(){FOO(1,2);}\n")
|
||||
if try_cpp("#define FOO(a, ...) foo(a, ##__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n")
|
||||
$defs.push("-DHAVE_VA_ARGS_MACRO")
|
||||
end
|
||||
have_header("openssl/ocsp.h")
|
||||
have_struct_member("EVP_CIPHER_CTX", "flags", "openssl/evp.h")
|
||||
|
||||
message "=== Checking for Ruby features... ===\n"
|
||||
have_func("rb_obj_init_copy", "ruby.h")
|
||||
|
||||
message "=== Checking done. ===\n"
|
||||
$distcleanfiles << "GNUmakefile" << "dep"
|
||||
create_makefile("openssl")
|
||||
|
|
|
@ -16,15 +16,13 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/*
|
||||
* Check the Ruby version and OpenSSL
|
||||
* Check the OpenSSL version
|
||||
* The only supported are:
|
||||
* Ruby >= 1.7.2
|
||||
* OpenSSL >= 0.9.7
|
||||
*/
|
||||
#include <version.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
#if defined(NT) || defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
# define OpenFile WINAPI_OpenFile
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
@ -40,7 +38,7 @@ extern "C" {
|
|||
# define OSSL_OCSP_ENABLED
|
||||
# include <openssl/ocsp.h>
|
||||
#endif
|
||||
#if defined(NT) || defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
# undef OpenFile
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,60 +11,10 @@
|
|||
#if !defined(_OSSL_RUBY_MISSING_H_)
|
||||
#define _OSS_RUBY_MISSING_H_
|
||||
|
||||
#if !defined(StringValue)
|
||||
# define StringValue(v) \
|
||||
if (TYPE(v) != T_STRING) v = rb_str_to_str(v)
|
||||
#endif
|
||||
#define DEFINE_ALLOC_WRAPPER(func)
|
||||
|
||||
#if !defined(StringValuePtr)
|
||||
# define StringValuePtr(v) \
|
||||
RSTRING((TYPE(v) == T_STRING) ? (v) : rb_str_to_str(v))->ptr
|
||||
#endif
|
||||
|
||||
#if !defined(SafeStringValue)
|
||||
# define SafeStringValue(v) do {\
|
||||
StringValue(v);\
|
||||
rb_check_safe_str(v);\
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#if RUBY_VERSION_CODE < 180
|
||||
# define rb_cstr_to_inum(a,b,c) \
|
||||
rb_cstr2inum(a,b)
|
||||
# define rb_check_frozen(obj) \
|
||||
if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj))
|
||||
# define rb_obj_classname(obj) \
|
||||
rb_class2name(CLASS_OF(obj))
|
||||
#endif
|
||||
|
||||
#if HAVE_RB_DEFINE_ALLOC_FUNC
|
||||
# define DEFINE_ALLOC_WRAPPER(func)
|
||||
#else
|
||||
# define DEFINE_ALLOC_WRAPPER(func) \
|
||||
static VALUE \
|
||||
func##_wrapper(int argc, VALUE *argv, VALUE klass) \
|
||||
{ \
|
||||
VALUE obj; \
|
||||
\
|
||||
obj = func(klass); \
|
||||
\
|
||||
rb_obj_call_init(obj, argc, argv); \
|
||||
\
|
||||
return obj; \
|
||||
}
|
||||
# define rb_define_alloc_func(klass, func) \
|
||||
rb_define_singleton_method(klass, "new", func##_wrapper, -1)
|
||||
#endif
|
||||
|
||||
#if RUBY_VERSION_CODE >= 180
|
||||
# if !defined(HAVE_RB_OBJ_INIT_COPY)
|
||||
# define rb_define_copy_func(klass, func) \
|
||||
rb_define_method(klass, "copy_object", func, 1)
|
||||
# else
|
||||
# define rb_define_copy_func(klass, func) \
|
||||
#define rb_define_copy_func(klass, func) \
|
||||
rb_define_method(klass, "initialize_copy", func, 1)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _OSS_RUBY_MISSING_H_ */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue