[postgresql-plruby] Reflected a name change of and/or bit operand functions in Postgresql
Jan Horak
hhorak at fedoraproject.org
Wed Mar 21 07:48:48 UTC 2012
commit a6985e86baa663df55af9318c76837ae61251bb9
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 | 4 ++++
2 files changed, 37 insertions(+), 0 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 d485036..d6a1bcd 100644
--- a/postgresql-plruby.spec
+++ b/postgresql-plruby.spec
@@ -12,6 +12,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.9.1
+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
@@ -27,6 +29,7 @@ Documentation for plruby.
%prep
%setup -q -n %{sname}-%{version}
+%patch0 -p1 -b .biopers
unset FILE
for f in %{_includedir}/pg_config_*.h
@@ -65,6 +68,7 @@ rm -rf %{buildroot}
%changelog
* Wed Mar 21 2012 Honza Horak <hhorak at redhat.com> - 0.5.3-6
- Packaging changes for new ruby-1.9
+- Reflected a name change of and/or bit operand functions in Postgresql
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list