This commit is contained in:
parent
85034d2992
commit
eba84a32ca
38
byteswap.diff
Normal file
38
byteswap.diff
Normal file
@ -0,0 +1,38 @@
|
||||
--- libgphoto2_port/m4/gp-byteorder.m4
|
||||
+++ libgphoto2_port/m4/gp-byteorder.m4
|
||||
@@ -322,12 +322,12 @@ EOF
|
||||
/* Non-optimized but portable macros */
|
||||
#define be16atoh(x) ((uint16_t)(((x)[0]<<8)|(x)[1]))
|
||||
#define be32atoh(x) ((uint32_t)(((x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3]))
|
||||
-#define be64atoh(x) ((uint64_t)(((x)[0]<<56)|((x)[1]<<48)|((x)[2]<<40)| \\
|
||||
- ((x)[3]<<32)|((x)[4]<<24)|((x)[5]<<16)|((x)[6]<<8)|(x)[7]))
|
||||
+#define be64atoh(x) ((((uint64_t)(x)[0]<<56)|((uint64_t)(x)[1]<<48)|((uint64_t)(x)[2]<<40)| \\
|
||||
+ ((uint64_t)(x)[3]<<32)|((x)[4]<<24)|((x)[5]<<16)|((x)[6]<<8)|(x)[7]))
|
||||
#define le16atoh(x) ((uint16_t)(((x)[1]<<8)|(x)[0]))
|
||||
#define le32atoh(x) ((uint32_t)(((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
|
||||
-#define le64atoh(x) ((uint64_t)(((x)[7]<<56)|((x)[6]<<48)|((x)[5]<<40)| \\
|
||||
- ((x)[4]<<32)|((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
|
||||
+#define le64atoh(x) ((((uint64_t)(x)[7]<<56)|((uint64_t)(x)[6]<<48)|((uint64_t)(x)[5]<<40)| \\
|
||||
+ ((uint64_t)(x)[4]<<32)|((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
|
||||
|
||||
#define htobe16a(a,x) (a)[0]=(uint8_t)((x)>>8), (a)[1]=(uint8_t)(x)
|
||||
#define htobe32a(a,x) (a)[0]=(uint8_t)((x)>>24), (a)[1]=(uint8_t)((x)>>16), \\
|
||||
--- m4m/gp-byteorder.m4
|
||||
+++ m4m/gp-byteorder.m4
|
||||
@@ -322,12 +322,12 @@ EOF
|
||||
/* Non-optimized but portable macros */
|
||||
#define be16atoh(x) ((uint16_t)(((x)[0]<<8)|(x)[1]))
|
||||
#define be32atoh(x) ((uint32_t)(((x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3]))
|
||||
-#define be64atoh(x) ((uint64_t)(((x)[0]<<56)|((x)[1]<<48)|((x)[2]<<40)| \\
|
||||
- ((x)[3]<<32)|((x)[4]<<24)|((x)[5]<<16)|((x)[6]<<8)|(x)[7]))
|
||||
+#define be64atoh(x) ((((uint64_t)(x)[0]<<56)|((uint64_t)(x)[1]<<48)|((uint64_t)(x)[2]<<40)| \\
|
||||
+ ((uint64_t)(x)[3]<<32)|((x)[4]<<24)|((x)[5]<<16)|((x)[6]<<8)|(x)[7]))
|
||||
#define le16atoh(x) ((uint16_t)(((x)[1]<<8)|(x)[0]))
|
||||
#define le32atoh(x) ((uint32_t)(((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
|
||||
-#define le64atoh(x) ((uint64_t)(((x)[7]<<56)|((x)[6]<<48)|((x)[5]<<40)| \\
|
||||
- ((x)[4]<<32)|((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
|
||||
+#define le64atoh(x) ((((uint64_t)(x)[7]<<56)|((uint64_t)(x)[6]<<48)|((uint64_t)(x)[5]<<40)| \\
|
||||
+ ((uint64_t)(x)[4]<<32)|((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
|
||||
|
||||
#define htobe16a(a,x) (a)[0]=(uint8_t)((x)>>8), (a)[1]=(uint8_t)(x)
|
||||
#define htobe32a(a,x) (a)[0]=(uint8_t)((x)>>24), (a)[1]=(uint8_t)((x)>>16), \\
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 17 18:57:08 CEST 2008 - schwab@suse.de
|
||||
|
||||
- Fix byteswap macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 13 23:34:02 CEST 2008 - meissner@suse.de
|
||||
|
||||
|
@ -19,9 +19,10 @@ License: LGPL v2.1 or later
|
||||
Group: Hardware/Camera
|
||||
Summary: A Digital Camera Library
|
||||
Version: 2.4.2
|
||||
Release: 1
|
||||
Release: 3
|
||||
Source0: libgphoto2-%{version}.tar.bz2
|
||||
Patch0: conf.diff
|
||||
Patch1: byteswap.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: %{name}-lang = %{version}
|
||||
|
||||
@ -141,6 +142,7 @@ Authors:
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
|
||||
%build
|
||||
%{?suse_update_config:%{suse_update_config -f . libgphoto2_port}}
|
||||
@ -226,6 +228,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Thu Jul 17 2008 schwab@suse.de
|
||||
- Fix byteswap macros.
|
||||
* Mon Jul 14 2008 meissner@suse.de
|
||||
- upgraded to 2.4.2 stable release
|
||||
- more ids, more bugfixes backmerged
|
||||
|
Loading…
Reference in New Issue
Block a user