[#4745] Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...>

Having taken upon me the task to provide a Windows build for

24 messages 2005/04/20
[#4746] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Austin Ziegler <halostatue@...> 2005/04/20

On 4/20/05, Erik Huelsmann <ehuels@gmail.com> wrote:

[#4747] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/20

Hi Austin,

[#4762] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — nobu.nokada@... 2005/04/24

Hi,

[#4783] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/25

On 4/24/05, nobu.nokada@softhome.net <nobu.nokada@softhome.net> wrote:

[#4787] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — nobu.nokada@... 2005/04/25

Hi,

[#4794] Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings — Erik Huelsmann <ehuels@...> 2005/04/25

> > > Ruby is just using AC_TYPE_UID_T. So, using typedef for them,

[#4751] Illegal regexp causes segfault — Andrew Walrond <andrew@...>

irb(main):058:0> a = /\[([^]]*)\]/

13 messages 2005/04/22

Re: Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings

From: Kouhei Sutou <kou@...>
Date: 2005-04-22 01:24:03 UTC
List: ruby-core #4750
Hi,

In <aea328ab0504200722376b8b94@mail.gmail.com>
  "Win32: Ruby & APR; build problems for Ruby Subversion SWIG bindings" on Wed, 20 Apr 2005 23:23:14 +0900,
  Erik Huelsmann <ehuels@gmail.com> wrote:

> Having taken upon me the task to provide a Windows build for
> Subversion, I run into a problem with the Ruby SWIG bindings. The
> problem is with APR and Ruby Win32 header files though.
> 
> Windows does not define pid_t, gid_t or uid_t in any of the system
> headers. Both APR and Ruby *do* define these 3 types:

Does this patch solve the problem?

--
kou

Attachments (1)

svn-pid_t.diff (1.42 KB, text/x-diff)
Index: subversion/bindings/swig/core.i
===================================================================
--- subversion/bindings/swig/core.i	(revision 14394)
+++ subversion/bindings/swig/core.i	(working copy)
@@ -27,6 +27,11 @@
 %include typemaps.i
 
 %{
+#ifdef RUBY_WIN32_H
+#undef UIDTYPE
+#undef GIDTYPE
+#undef pid_t
+#endif
 #include <apr.h>
 #include <apr_general.h>
 
Index: subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
===================================================================
--- subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h	(revision 14394)
+++ subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h	(working copy)
@@ -1,15 +1,15 @@
 #ifndef SVN_SWIG_SWIGUTIL_RB_H
 #define SVN_SWIG_SWIGUTIL_RB_H
 
-#include <ruby.h>
-#include <regex.h>
-
 #include <apr.h>
 #include <apr_pools.h>
 #include <apr_hash.h>
 #include <apr_portable.h>
 #include <apr_file_io.h>
 
+#include <ruby.h>
+#include <regex.h>
+
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_delta.h"
Index: subversion/bindings/swig/svn_client.i
===================================================================
--- subversion/bindings/swig/svn_client.i	(revision 14394)
+++ subversion/bindings/swig/svn_client.i	(working copy)
@@ -312,6 +312,12 @@
 
 #ifdef SWIGRUBY
 %runtime %{
+  #ifdef RUBY_WIN32_H
+  #undef UIDTYPE
+  #undef GIDTYPE
+  #undef pid_t
+  #endif
+  
   #include <apr.h>
   #include <apr_pools.h>
 

In This Thread