- ruby-1.8.4-64bit-pack.patch: backport patch to fix unpack(l) not working

on 64bit arch and integer overflow on template w. (#189350)
- updated License tag to be more comfortable, and with a pointer to get
    more details, like Python package does. (#179933)
This commit is contained in:
Akira TAGOH 2006-04-20 09:52:09 +00:00
parent ea33ea129d
commit 63eb84af23
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff -ruN ruby-1.8.4.orig/pack.c ruby-1.8.4/pack.c
--- ruby-1.8.4.orig/pack.c 2005-10-13 23:30:49.000000000 +0900
+++ ruby-1.8.4/pack.c 2006-04-20 13:50:25.000000000 +0900
@@ -347,11 +347,11 @@
return 0; /* not reached */
}
-#if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32
+#if SIZEOF_LONG == SIZE32
# define EXTEND32(x)
#else
/* invariant in modulo 1<<31 */
-# define EXTEND32(x) do {if (!natint) {(x) = (I32)(((1<<31)-1-(x))^~(~0<<31));}} while(0)
+# define EXTEND32(x) do { if (!natint) {(x) = (((1L<<31)-1-(x))^~(~0L<<31));}} while(0)
#endif
#if SIZEOF_SHORT == SIZE16
# define EXTEND16(x)
@@ -1951,7 +1951,7 @@
case 'w':
{
unsigned long ul = 0;
- unsigned long ulmask = 0xfeL << ((sizeof(unsigned long) - 1) * 8);
+ unsigned long ulmask = 0xfeUL << ((sizeof(unsigned long) - 1UL) * 8UL);
while (len > 0 && s < send) {
ul <<= 7;

View File

@ -6,7 +6,7 @@
Name: ruby Name: ruby
Version: 1.8.4 Version: 1.8.4
Release: 4.fc6.2 Release: 4.fc6.2
License: Distributable License: Ruby License/GPL - see COPYING
URL: http://www.ruby-lang.org/ URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs
@ -28,6 +28,7 @@ Patch3: ruby-rubyprefix.patch
Patch4: ruby-deprecated-search-path.patch Patch4: ruby-deprecated-search-path.patch
Patch5: ruby-multilib.patch Patch5: ruby-multilib.patch
Patch6: ruby-tcltk-multilib.patch Patch6: ruby-tcltk-multilib.patch
Patch7: ruby-1.8.4-64bit-pack.patch
Summary: An interpreter of object-oriented scripting language Summary: An interpreter of object-oriented scripting language
Group: Development/Languages Group: Development/Languages
@ -142,6 +143,7 @@ pushd %{name}-%{version}
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1
%endif %endif
popd popd
@ -440,6 +442,10 @@ rm -rf tmp-ruby-docs
- ruby-deprecated-search-path.patch: added the deprecated installation paths - ruby-deprecated-search-path.patch: added the deprecated installation paths
to the search path for the backward compatibility. to the search path for the backward compatibility.
- added a Provides: ruby(abi) to ruby-libs. - added a Provides: ruby(abi) to ruby-libs.
- ruby-1.8.4-64bit-pack.patch: backport patch to fix unpack("l") not working
on 64bit arch and integer overflow on template "w". (#189350)
- updated License tag to be more comfortable, and with a pointer to get more
details, like Python package does. (#179933)
* Wed Apr 19 2006 Akira TAGOH <tagoh@redhat.com> * Wed Apr 19 2006 Akira TAGOH <tagoh@redhat.com>
- ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby - ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby