[postgresql-plruby/f16] Reflected a name change of and/or bit operand functions in Postgresql
Jan Horak
hhorak at fedoraproject.org
Wed Mar 21 09:26:03 UTC 2012
commit 9d31c34a6bf99025431c40cfb4eddf35185da0ef
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date: Wed Mar 21 08:40:55 2012 +0100
Reflected a name change of and/or bit operand functions in Postgresql
postgresql-plruby-bitopers.patch | 33 +++++++++++++++++++++++++++++++++
postgresql-plruby.spec | 8 +++++++-
2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/postgresql-plruby-bitopers.patch b/postgresql-plruby-bitopers.patch
new file mode 100644
index 0000000..095a369
--- /dev/null
+++ b/postgresql-plruby-bitopers.patch
@@ -0,0 +1,33 @@
+diff -up plruby-0.5.3/src/conversions/bitstring/plruby_bitstring.c.debug plruby-0.5.3/src/conversions/bitstring/plruby_bitstring.c
+--- plruby-0.5.3/src/conversions/bitstring/plruby_bitstring.c.debug 2007-12-26 11:26:13.000000000 +0100
++++ plruby-0.5.3/src/conversions/bitstring/plruby_bitstring.c 2012-02-15 17:16:50.098551806 +0100
+@@ -195,8 +195,8 @@ name_(VALUE obj, VALUE a)
+ }
+
+ BIT_OPERATOR(pl_bit_add, bitcat);
+-BIT_OPERATOR(pl_bit_and, bitand);
+-BIT_OPERATOR(pl_bit_or, bitor);
++BIT_OPERATOR(pl_bit_and, bit_and);
++BIT_OPERATOR(pl_bit_or, bit_or);
+ BIT_OPERATOR(pl_bit_xor, bitxor);
+
+ static VALUE
+diff -up plruby-0.5.3/src/plruby.h.debug plruby-0.5.3/src/plruby.h
+--- plruby-0.5.3/src/plruby.h.debug 2007-12-26 16:58:02.000000000 +0100
++++ plruby-0.5.3/src/plruby.h 2012-02-15 17:17:32.650551398 +0100
+@@ -316,4 +318,15 @@ extern VALUE plruby_define_void_class _(
+ #define CStringGD(a_) CStringGetDatum(a_)
+ #define TupleGD(a_,b_) TupleGetDatum((a_),(b_))
+
++// PostgreSQL 9.1.1 has renamed C functions bitor and bitand to bit_or
++// and bit_and, because the former names conflicted with C++ keywords.
++// The following aliases will fix this if needed.
++
++#if !defined(bit_and) && defined(bitand)
++#define bit_and(a_) bitand(a_)
++#endif
++
++#if !defined(bit_or) && defined(bitor)
++#define bit_or(a_) bitor(a_)
++#endif
+
diff --git a/postgresql-plruby.spec b/postgresql-plruby.spec
index b9be3a0..2718e9e 100644
--- a/postgresql-plruby.spec
+++ b/postgresql-plruby.spec
@@ -4,7 +4,7 @@
Summary: PostgreSQL Ruby Procedural Language
Name: postgresql-%{sname}
Version: 0.5.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Source0: ftp://moulon.inra.fr/pub/ruby/%{sname}-%{version}.tar.gz
License: Ruby or GPL+
Group: Applications/Databases
@@ -13,6 +13,8 @@ Url: http://raa.ruby-lang.org/project/pl-ruby/
BuildRequires: ruby >= 1.8 ruby-devel >= 1.8 postgresql-devel >= 8.1
Requires: postgresql-libs, ruby(abi) = 1.8
+Patch0: postgresql-plruby-bitopers.patch
+
%description
PL/Ruby is a loadable procedural language for the PostgreSQL database
system that enable the Ruby language to create functions and trigger
@@ -28,6 +30,7 @@ Documentation for plruby.
%prep
%setup -q -n %{sname}-%{version}
+%patch0 -p1 -b .biopers
unset FILE
for f in %{_includedir}/pg_config_*.h
@@ -64,6 +67,9 @@ rm -rf %{buildroot}
%doc docs/plruby.rb
%changelog
+* Wed Mar 21 2012 Honza Horak <hhorak at redhat.com> - 0.5.3-5
+- Reflected a name change of and/or bit operand functions in Postgresql
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list