From 63eb84af23740e7a77ef1c430d44465cbbfbf04d Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 20 Apr 2006 09:52:09 +0000 Subject: [PATCH] - 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) --- ruby-1.8.4-64bit-pack.patch | 26 ++++++++++++++++++++++++++ ruby.spec | 8 +++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.4-64bit-pack.patch diff --git a/ruby-1.8.4-64bit-pack.patch b/ruby-1.8.4-64bit-pack.patch new file mode 100644 index 0000000..a0ccbee --- /dev/null +++ b/ruby-1.8.4-64bit-pack.patch @@ -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; diff --git a/ruby.spec b/ruby.spec index 42796db..aa577e0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -6,7 +6,7 @@ Name: ruby Version: 1.8.4 Release: 4.fc6.2 -License: Distributable +License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ 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 @@ -28,6 +28,7 @@ Patch3: ruby-rubyprefix.patch Patch4: ruby-deprecated-search-path.patch Patch5: ruby-multilib.patch Patch6: ruby-tcltk-multilib.patch +Patch7: ruby-1.8.4-64bit-pack.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -142,6 +143,7 @@ pushd %{name}-%{version} %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %endif popd @@ -440,6 +442,10 @@ rm -rf tmp-ruby-docs - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. - 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 - ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby