Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=7ff42c5eae19882f93d5bce7baab2885e97d9592
commit 7ff42c5eae19882f93d5bce7baab2885e97d9592 Author: CSÃCSY László <boo...@frugalware.org> Date: Thu Jul 21 21:39:25 2011 +0200 memcached-1.4.6-1-x86_64 version bump diff --git a/source/network-extra/memcached/FrugalBuild b/source/network-extra/memcached/FrugalBuild index 8b49fa1..e0ede54 100644 --- a/source/network-extra/memcached/FrugalBuild +++ b/source/network-extra/memcached/FrugalBuild @@ -2,8 +2,8 @@ # Maintainer: CSÉCSY László <boo...@frugalware.org> pkgname=memcached -pkgver=1.4.5 -pkgrel=2 +pkgver=1.4.6 +pkgrel=1 pkgdesc="A high-performance, distributed memory object caching system." url="http://www.danga.com/memcached/" depends=('libevent>=2.0.10') @@ -11,12 +11,11 @@ groups=('network-extra') archs=('i686' 'x86_64') up2date="lynx -dump http://memcached.org/ | grep ' v' | sed 's/.*v\(.*\)/\1/'" source=(http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.gz \ - memcached rc.memcached fix-type-punning-issues.patch) + memcached rc.memcached) backup=(etc/sysconfig/memcached) -sha1sums=('c7d6517764b82d23ae2de76b56c2494343c53f02' \ +sha1sums=('56c9cc0f7d234e90bb7b6459e0eda864b05021a7' \ 'a870f1229b48f0de9ce73143d34d7be89f405a62' \ - '38e9794f2f9addc5b25d118b1d370f663c4b9f95' \ - '96115fbfc709b0edae8c31a191f424a0f284c654') + '38e9794f2f9addc5b25d118b1d370f663c4b9f95') build() { Fbuild diff --git a/source/network-extra/memcached/fix-type-punning-issues.patch b/source/network-extra/memcached/fix-type-punning-issues.patch deleted file mode 100644 index 60bb941..0000000 --- a/source/network-extra/memcached/fix-type-punning-issues.patch +++ /dev/null @@ -1,73 +0,0 @@ -commit df15887584f0025e7b188e408dd3c9f638d68518 -Author: Dan McGee <d...@archlinux.org> -Date: Tue Nov 2 18:43:00 2010 -0500 - - Fix type-punning issues exposed with GCC 4.5.1 - - The errors below are due to pointer magic that isn't allowed if following C - strict-aliasing rules: - - memcached.c: In function âcomplete_incr_binâ: - memcached.c:1023:16: error: dereferencing type-punned pointer will break - strict-aliasing rules - memcached.c:1044:13: error: dereferencing type-punned pointer will break - strict-aliasing rules - memcached.c:1061:17: error: dereferencing type-punned pointer will break - strict-aliasing rules - - Fix this by introducing a union type that allows access to the uint64_t - member as necessary, but doesn't add any additional length to the structure. - The size remains the same before and after; the only difference is explict - casts are now refactored into union member accesses and all compilers should - be happy. - - Signed-off-by: Dan McGee <d...@archlinux.org> - -diff --git a/memcached.h b/memcached.h -index 4a7295b..74a6592 100644 ---- a/memcached.h -+++ b/memcached.h -@@ -77,18 +77,22 @@ - #define TAIL_REPAIR_TIME (3 * 3600) - - /* warning: don't use these macros with a function, as it evals its arg twice */ --#define ITEM_get_cas(i) ((uint64_t)(((i)->it_flags & ITEM_CAS) ? \ -- *(uint64_t*)&((i)->end[0]) : 0x0)) --#define ITEM_set_cas(i,v) { if ((i)->it_flags & ITEM_CAS) { \ -- *(uint64_t*)&((i)->end[0]) = v; } } -+#define ITEM_get_cas(i) (((i)->it_flags & ITEM_CAS) ? \ -+ (i)->data->cas : (uint64_t)0) - --#define ITEM_key(item) (((char*)&((item)->end[0])) \ -+#define ITEM_set_cas(i,v) { \ -+ if ((i)->it_flags & ITEM_CAS) { \ -+ (i)->data->cas = v; \ -+ } \ -+} -+ -+#define ITEM_key(item) (((char*)&((item)->data)) \ - + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) - --#define ITEM_suffix(item) ((char*) &((item)->end[0]) + (item)->nkey + 1 \ -+#define ITEM_suffix(item) ((char*) &((item)->data) + (item)->nkey + 1 \ - + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) - --#define ITEM_data(item) ((char*) &((item)->end[0]) + (item)->nkey + 1 \ -+#define ITEM_data(item) ((char*) &((item)->data) + (item)->nkey + 1 \ - + (item)->nsuffix \ - + (((item)->it_flags & ITEM_CAS) ? sizeof(uint64_t) : 0)) - -@@ -302,7 +306,12 @@ typedef struct _stritem { - uint8_t it_flags; /* ITEM_* above */ - uint8_t slabs_clsid;/* which slab class we're in */ - uint8_t nkey; /* key length, w/terminating null and padding */ -- void * end[]; -+ /* this odd type prevents type-punning issues when we do -+ * the little shuffle to save space when not using CAS. */ -+ union { -+ uint64_t cas; -+ char end; -+ } data[]; - /* if it_flags & ITEM_CAS we have 8 bytes CAS */ - /* then null-terminated key */ - /* then " flags length\r\n" (no terminating null) */
_______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git