ruby-changes:48062
From: nobu <ko1@a...>
Date: Fri, 13 Oct 2017 17:29:57 +0900 (JST)
Subject: [ruby-changes:48062] nobu:r60176 (trunk): defines.h: warn EXTERN
nobu 2017-10-13 17:29:52 +0900 (Fri, 13 Oct 2017) New Revision: 60176 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60176 Log: defines.h: warn EXTERN * include/ruby/defines.h (EXTERN): warn as deprecated. Modified files: trunk/include/ruby/defines.h Index: include/ruby/defines.h =================================================================== --- include/ruby/defines.h (revision 60175) +++ include/ruby/defines.h (revision 60176) @@ -268,7 +268,16 @@ void xfree(void*); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L268 #endif #ifndef EXTERN -#define EXTERN RUBY_EXTERN /* deprecated */ +# if defined __GNUC__ +# define EXTERN _Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); \ + RUBY_EXTERN +# elif defined _MSC_VER +# define EXTERN __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: "\ + "EXTERN is deprecated, use RUBY_EXTERN instead")); \ + RUBY_EXTERN +# else +# define EXTERN <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->-> +# endif #endif #ifndef RUBY_MBCHAR_MAXSIZE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/