You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/11/20 23:59:22 UTC
svn commit: r1543980 - in /subversion/trunk:
build/generator/gen_win_dependencies.py
subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h
Author: rhuijben
Date: Wed Nov 20 22:59:22 2013
New Revision: 1543980
URL: http://svn.apache.org/r1543980
Log:
On Windows: Fix compilation against perl 5.18, which somehow thinks that
Visual C++ support gnu's/mingw's __inline__.
* build/generator/gen_win_dependencies.py
(_find_perl): Add a forced include when using perl 5.18 or later.
* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
(includes): Include swigutil_pl__pre_perl.h directly.
* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h
New file.
Added:
subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h (with props)
Modified:
subversion/trunk/build/generator/gen_win_dependencies.py
subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1543980&r1=1543979&r2=1543980&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Wed Nov 20 22:59:22 2013
@@ -880,8 +880,8 @@ class GenDependenciesBase(gen_base.Gener
line = fp.readline()
if line:
perl_version = line.strip()
- perlv = perl_version.split('.')
- perl_lib = 'perl%s%s.lib' % (perlv[0], perlv[1])
+ perl_ver = perl_version.split('.')
+ perl_lib = 'perl%s%s.lib' % (perl_ver[0], perl_ver[1])
else:
return
@@ -892,8 +892,15 @@ class GenDependenciesBase(gen_base.Gener
finally:
fp.close()
+ perl_ver = tuple(map(int, perl_ver))
+ forced_includes = []
+
+ if perl_ver >= (5, 18, 0):
+ forced_includes.append('swigutil_pl__pre_perl.h')
+
self._libraries['perl'] = SVNCommonLibrary('perl', inc_dir, lib_dir,
- perl_lib, perl_version)
+ perl_lib, perl_version,
+ forced_includes=forced_includes)
def _find_ruby(self, show_warnings):
"Find the right Ruby library name to link swig bindings with"
Modified: subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1543980&r1=1543979&r2=1543980&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Wed Nov 20 22:59:22 2013
@@ -25,6 +25,9 @@
#include <apr_general.h>
#include <apr_portable.h>
+/* Windows hack: Allow overriding some <perl.h> defaults */
+#include "swigutil_pl__pre_perl.h"
+
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
Added: subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h?rev=1543980&view=auto
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h (added)
+++ subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h Wed Nov 20 22:59:22 2013
@@ -0,0 +1,33 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#ifndef SVN_SWIG_SWIGUTIL_PL__PRE_PERL_H
+#define SVN_SWIG_SWIGUTIL_PL__PRE_PERL_H
+
+/* Ruby 5.8 somehow expects Visual C++ to be gcc compatible for __inline__.
+ Add a #define to make the default headers happy and avoid an insane
+ number of warnings */
+
+#ifdef _MSC_VER
+#define __inline__ __inline
+#endif
+
+#endif
Propchange: subversion/trunk/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl__pre_perl.h
------------------------------------------------------------------------------
svn:eol-style = native