Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 265792 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/lib/getuint32.h (-4 / +12 lines)
Lines 1-12 Link Here
1
#ifndef _SD_GET_UINT32_H_
1
#ifndef _SD_GET_UINT32_H_
2
#define _SD_GET_UINT32_H_
2
#define _SD_GET_UINT32_H_
3
#if defined(ARM) || defined(__sparc__)
4
#include <string.h>
5
#endif
3
6
4
#ifdef ARM
7
#if defined(ARM) || defined(__sparc__)
5
static inline guint32 get_uint32(const gchar *addr)
8
static inline guint32 get_uint32(const gchar *addr)
6
{
9
{
7
	guint32 result;
10
	if (((addr - (char *)0) & 3) == 0) {
8
	memcpy(&result, addr, sizeof(guint32));
11
		/* already aligned properly */
9
	return result;
12
		return *reinterpret_cast<const guint32 *>(addr);
13
	} else {
14
		guint32 result;
15
		memcpy(&result, addr, sizeof(guint32));
16
		return result;
17
	}
10
}
18
}
11
#else
19
#else
12
#define get_uint32(x) *reinterpret_cast<const guint32 *>(x)
20
#define get_uint32(x) *reinterpret_cast<const guint32 *>(x)
(-)a/src/lib/stddict.cpp (+5 lines)
Lines 358-363 MapFile* cache_file::get_cache_loadfile(const gchar *filename, const std::string Link Here
358
358
359
bool cache_file::load_cache(const std::string& url, const std::string& saveurl, CollateFunctions cltfunc, glong filedatasize)
359
bool cache_file::load_cache(const std::string& url, const std::string& saveurl, CollateFunctions cltfunc, glong filedatasize)
360
{
360
{
361
#if defined(ARM) || defined(__sparc__)
362
	/* XXX: remove this after cache loading has been fixed to align the
363
	 * loaded data */
364
	return false;
365
#endif
361
	std::string oftfilename;
366
	std::string oftfilename;
362
	if (cachefiletype == CacheFileType_oft)
367
	if (cachefiletype == CacheFileType_oft)
363
		oftfilename=saveurl+".oft";
368
		oftfilename=saveurl+".oft";

Return to bug 265792