From ccdf3f11628947b28ec3d490227961019f99ad32 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 Aug 2008 06:58:10 +0000 Subject: [PATCH] * lib/mkmf.rb (init_mkmf): add include/ruby/backward to $INCFLAGS. * include/ruby/backward/{st,util}.h: added for backward compatibility. [ruby-dev:35811] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ include/ruby/backward/st.h | 6 ++++++ include/ruby/backward/util.h | 6 ++++++ lib/mkmf.rb | 4 +++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 include/ruby/backward/st.h create mode 100644 include/ruby/backward/util.h diff --git a/ChangeLog b/ChangeLog index 20f5eda9bd..716c26fe2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Aug 17 15:58:08 2008 Nobuyoshi Nakada + + * lib/mkmf.rb (init_mkmf): add include/ruby/backward to $INCFLAGS. + + * include/ruby/backward/{st,util}.h: added for backward compatibility. + [ruby-dev:35811] + Sun Aug 17 13:40:04 2008 Tanaka Akira * transcode.c (econv_primitive_putback): new method. diff --git a/include/ruby/backward/st.h b/include/ruby/backward/st.h new file mode 100644 index 0000000000..514128e616 --- /dev/null +++ b/include/ruby/backward/st.h @@ -0,0 +1,6 @@ +#if defined __GNUC__ +#warning use "ruby/st.h" instead of bare "st.h" +#elif defined _MSC_VER || defined __BORLANDC__ +#pragma message("warning: use \"ruby/st.h\" instead of bare \"st.h\"") +#endif +#include "ruby/st.h" diff --git a/include/ruby/backward/util.h b/include/ruby/backward/util.h new file mode 100644 index 0000000000..6b47940ddc --- /dev/null +++ b/include/ruby/backward/util.h @@ -0,0 +1,6 @@ +#if defined __GNUC__ +#warning use "ruby/util.h" instead of bare "util.h" +#elif defined _MSC_VER || defined __BORLANDC__ +#pragma message("warning: use \"ruby/util.h\" instead of bare \"util.h\"") +#endif +#include "ruby/util.h" diff --git a/lib/mkmf.rb b/lib/mkmf.rb index df8861a71e..c4b5b59c54 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1757,7 +1757,9 @@ def init_mkmf(config = CONFIG) $ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup - $INCFLAGS = "-I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir)" + $INCFLAGS = "-I$(arch_hdrdir)" + $INCFLAGS << " -I$(hdrdir)/ruby/backward" unless $extmk + $INCFLAGS << " -I$(hdrdir) -I$(srcdir)" $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup $LIBEXT = config['LIBEXT'].dup $OBJEXT = config["OBJEXT"].dup