From 1c163430e347227e7445eaeb7a2bbed21bfebebc Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 25 Oct 2007 23:45:44 +0000 Subject: [PATCH] Fixes global namespace pollution from Ruby\'s win32.h git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10044 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/ruby/rubyhead.swg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/ruby/rubyhead.swg b/Lib/ruby/rubyhead.swg index 435e8cd3e..f0eed4748 100644 --- a/Lib/ruby/rubyhead.swg +++ b/Lib/ruby/rubyhead.swg @@ -1,5 +1,14 @@ #include +/* Remove global macros defined in Ruby's win32.h */ +#ifdef write +# undef write +#endif +#ifdef read +# undef read +#endif + + /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ #ifndef NUM2LL #define NUM2LL(x) NUM2LONG((x))