- apply upstream fix for big endians

epel9
Dan Horák 12 years ago
parent ad0579b39b
commit dc473d9197

@ -0,0 +1,55 @@
From b8aa93ce30d11d091b339bff0e10ddf3a8d08daf Mon Sep 17 00:00:00 2001
From: Hideyuki Tanaka <tanaka.hideyuki@gmail.com>
Date: Thu, 26 Jan 2012 16:38:27 +0900
Subject: [PATCH] fix decode on bigendian systems
---
msgpack/sysdep.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/msgpack/sysdep.h b/src/msgpack/sysdep.h
index 0a99de9..4fedbd8 100644
--- a/src/msgpack/sysdep.h
+++ b/src/msgpack/sysdep.h
@@ -153,24 +153,24 @@ typedef unsigned int _msgpack_atomic_counter_t;
#define _msgpack_be64(x) (x)
#define _msgpack_load16(cast, from) ((cast)( \
- (((uint16_t)((uint8_t*)from)[1]) << 8) | \
- (((uint16_t)((uint8_t*)from)[0]) ) ))
+ (((uint16_t)((uint8_t*)from)[0]) << 8) | \
+ (((uint16_t)((uint8_t*)from)[1]) ) ))
#define _msgpack_load32(cast, from) ((cast)( \
- (((uint32_t)((uint8_t*)from)[3]) << 24) | \
- (((uint32_t)((uint8_t*)from)[2]) << 16) | \
- (((uint32_t)((uint8_t*)from)[1]) << 8) | \
- (((uint32_t)((uint8_t*)from)[0]) ) ))
+ (((uint32_t)((uint8_t*)from)[0]) << 24) | \
+ (((uint32_t)((uint8_t*)from)[1]) << 16) | \
+ (((uint32_t)((uint8_t*)from)[2]) << 8) | \
+ (((uint32_t)((uint8_t*)from)[3]) ) ))
#define _msgpack_load64(cast, from) ((cast)( \
- (((uint64_t)((uint8_t*)from)[7]) << 56) | \
- (((uint64_t)((uint8_t*)from)[6]) << 48) | \
- (((uint64_t)((uint8_t*)from)[5]) << 40) | \
- (((uint64_t)((uint8_t*)from)[4]) << 32) | \
- (((uint64_t)((uint8_t*)from)[3]) << 24) | \
- (((uint64_t)((uint8_t*)from)[2]) << 16) | \
- (((uint64_t)((uint8_t*)from)[1]) << 8) | \
- (((uint64_t)((uint8_t*)from)[0]) ) ))
+ (((uint64_t)((uint8_t*)from)[0]) << 56) | \
+ (((uint64_t)((uint8_t*)from)[1]) << 48) | \
+ (((uint64_t)((uint8_t*)from)[2]) << 40) | \
+ (((uint64_t)((uint8_t*)from)[3]) << 32) | \
+ (((uint64_t)((uint8_t*)from)[4]) << 24) | \
+ (((uint64_t)((uint8_t*)from)[5]) << 16) | \
+ (((uint64_t)((uint8_t*)from)[6]) << 8) | \
+ (((uint64_t)((uint8_t*)from)[7]) ) ))
#endif
--
1.8.1.4

@ -1,6 +1,6 @@
Name: msgpack
Version: 0.5.7
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Binary-based efficient object serialization library
Group: System Environment/Libraries
@ -8,6 +8,7 @@ License: ASL 2.0
URL: http://msgpack.org
Source0: http://msgpack.org/releases/cpp/%{name}-%{version}.tar.gz
Patch0: msgpack-gtest-implicit-dso.patch
Patch1: msgpack-fix-decode-on-bigendian-systems.patch
# for regenerating configure
BuildRequires: libtool
@ -33,6 +34,7 @@ Libraries and header files for %{name}
%prep
%setup -q
%patch0 -p1 -b .gtest-implicit-dso
%patch1 -p1 -b .big-endian
%build
@ -65,6 +67,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f '{}' ';'
%changelog
* Tue Aug 27 2013 Dan Horák <dan[at]danny.cz> - 0.5.7-5
- apply upstream fix for big endians
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

Loading…
Cancel
Save