From: "H.Yamamoto" Date: 2005-02-08T15:37:27+09:00 Subject: [ruby-dev:25657] Re: process to merge ruby-dl2 山本です。 動作確認はしてませんが、bcc32も同じコードでコンパイルできるようです。 Index: cfunc.c =================================================================== RCS file: /src/ruby/ext/dl/cfunc.c,v retrieving revision 1.2 diff -u -w -b -p -r1.2 cfunc.c --- cfunc.c 6 Feb 2005 18:07:10 -0000 1.2 +++ cfunc.c 7 Feb 2005 03:58:13 -0000 @@ -225,7 +225,7 @@ rb_dlcfunc_inspect(VALUE self) #if defined(__GNUC__) # define DECL_FUNC(f,ret,args,calltype) ret (__attribute__((calltype)) *f)(args) /* # define DECL_FUNC(f,ret,args,calltype) ret (*f)(args) */ -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) || defined(__BORLANDC__) # define DECL_FUNC(f,ret,args,calltype) ret (__##calltype *f)(args) #else # error "unsupported compiler." Index: dl.c =================================================================== RCS file: /src/ruby/ext/dl/dl.c,v retrieving revision 1.27 diff -u -w -b -p -r1.27 dl.c --- dl.c 6 Feb 2005 18:07:10 -0000 1.27 +++ dl.c 7 Feb 2005 03:58:57 -0000 @@ -62,7 +62,7 @@ rb_dl_value2ptr(VALUE self, VALUE val) # define MIDST_DECL_STDCALL # define POST_DECL_CDECL # define POST_DECL_STDCALL -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) || defined(__BORLANDC__) # define PRE_DECL_CDECL # define PRE_DECL_STDCALL # define MIDST_DECL_CDECL __cdecl