Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-arch/unace/files: unace-1.2b-64bit-fmt.patch unace-1.2b-aliasing.patch
Date: Thu, 28 Mar 2013 03:07:41
Message-Id: 20130328030737.86D612171D@flycatcher.gentoo.org
1 vapier 13/03/28 03:07:37
2
3 Added: unace-1.2b-64bit-fmt.patch
4 unace-1.2b-aliasing.patch
5 Log:
6 Clean up build a bit and use Debian patches.
7
8 (Portage version: 2.2.0_alpha169/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
9
10 Revision Changes Path
11 1.1 app-arch/unace/files/unace-1.2b-64bit-fmt.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-arch/unace/files/unace-1.2b-64bit-fmt.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-arch/unace/files/unace-1.2b-64bit-fmt.patch?rev=1.1&content-type=text/plain
15
16 Index: unace-1.2b-64bit-fmt.patch
17 ===================================================================
18 --- unace/unace.c
19 +++ unace/unace.c
20 @@ -516,7 +516,7 @@
21 tpsize+= fhead.PSIZE;
22 }
23 if (!f_err)
24 - printf("%02u.%02u.%02u|%02u:%02u|%c%c%9lu|%9lu|%4u%%|%c%s\n",
25 + printf("%02u.%02u.%02u|%02u:%02u|%c%c%9u|%9u|%4u%%|%c%s\n",
26 ts_day (ti), ts_month(ti), ts_year(ti)%100,
27 ts_hour(ti), ts_min (ti),
28 fhead.HEAD_FLAGS & ACE_SP_BEF ? '<' : ' ',
29 @@ -529,7 +529,7 @@
30 }
31 if (!f_err)
32 {
33 - printf("\n %9lu|%9lu|%4u%%| %u file%s",
34 + printf("\n %9u|%9u|%4u%%| %u file%s",
35 psize,
36 size,
37 percentage(psize, size),
38
39
40
41 1.1 app-arch/unace/files/unace-1.2b-aliasing.patch
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-arch/unace/files/unace-1.2b-aliasing.patch?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-arch/unace/files/unace-1.2b-aliasing.patch?rev=1.1&content-type=text/plain
45
46 Index: unace-1.2b-aliasing.patch
47 ===================================================================
48 --- a/portable.h
49 +++ b/portable.h
50 @@ -79,11 +79,13 @@
51
52 #else /* HI_LO_BYTE_ORDER */
53
54 -#define BUFP2WORD(p) *(UWORD*)((p+=2)-2)
55 -#define BUFP2LONG(p) *(ULONG*)((p+=4)-4)
56 +#define _MAGIC_UNION(type, p) ({ union { UCHAR *_c; type *_u; } _x = { ._c = (p) }; *_x._u; })
57
58 -#define BUF2WORD(p) (*(UWORD*)p)
59 -#define BUF2LONG(p) (*(ULONG*)p)
60 +#define BUFP2WORD(p) _MAGIC_UNION(UWORD, ((p+=2)-2))
61 +#define BUFP2LONG(p) _MAGIC_UNION(ULONG, ((p+=4)-4))
62 +
63 +#define BUF2WORD(p) _MAGIC_UNION(UWORD, p)
64 +#define BUF2LONG(p) _MAGIC_UNION(ULONG, p)
65
66 #endif /* !HI_LO_BYTE_ORDER */