~ubuntu-branches/ubuntu/utopic/zziplib/utopic

« back to all changes in this revision

Viewing changes to debian/patches/01-fetch.patch

  • Committer: Bazaar Package Importer
  • Author(s): LIU Qi
  • Date: 2009-07-12 14:37:46 UTC
  • mfrom: (1.2.1 upstream) (6.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090712143746-5xyh6dt4l0cdv1l0
Tags: 0.13.56-1
* New Upstream Version
  - update debian/man3.patch
  - remove msvc8/zip.exe and msvc7/pkzip.exe
* Upgrade the standard version to 3.8.2
* Add the vcs information to debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -uNrBb a/zzip/fetch.c b/zzip/fetch.c
2
 
--- a/zzip/fetch.c      2008-04-05 17:56:49.000000000 +0100
3
 
+++ b/zzip/fetch.c      2008-04-05 17:56:44.000000000 +0100
4
 
@@ -16,17 +16,6 @@
5
 
 
6
 
 #include <zzip/fetch.h>
7
 
 
8
 
-#if defined ZZIP_WORDS_BIGENDIAN && \
9
 
-   defined bswap_16 && defined bswap_32 && defined bswap_64
10
 
-# define __ZZIP_GET16(__p)                        bswap_16(*(uint16_t*)(__p))
11
 
-# define __ZZIP_GET32(__p)                        bswap_32(*(uint32_t*)(__p))
12
 
-# define __ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = bswap_16((uint16_t)(__x)))
13
 
-# define __ZZIP_SET32(__p,__x) (*(uint32_t*)(__p) = bswap_32((uint32_t)(__x)))
14
 
-# define __ZZIP_GET64(__p)                    bswap_64(*(zzip_off64_t*)(__p))
15
 
-# define __ZZIP_SET64(__p,__x) \
16
 
-                     (*(zzip_off64_t*)(__p) = bswap_64((zzip_off64_t)(__x)))
17
 
-#endif
18
 
-
19
 
 /* ------------------------- fetch helpers --------------------------------- */
20
 
 
21
 
 /**
22
 
diff -up a/zzip/fetch.h b/zzip/fetch.h
23
 
--- a/zzip/fetch.h      2008-03-23 07:41:26.000000000 +1100
24
 
+++ b/zzip/fetch.h      2009-03-23 21:28:05.000000000 +1100
25
 
@@ -23,35 +23,12 @@ extern void     __zzip_set16(zzip_byte_t
26
 
 extern uint64_t __zzip_get64(zzip_byte_t * s) __zzip_attribute__((const));
27
 
 extern void     __zzip_set64(zzip_byte_t * s, uint64_t v);
28
 
 
29
 
-#ifdef ZZIP_WORDS_BIGENDIAN
30
 
-# if defined bswap_16 && defined bswap_32 && defined bswap_64 /* i.e. linux */
31
 
-# ifndef ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED
32
 
-# define _ZZIP_USE_BSWAP
33
 
-# endif
34
 
-# endif
35
 
-# ifdef _ZZIP_USE_BSWAP
36
 
-# define ZZIP_GET16(__p)                        bswap_16(*(uint16_t*)(__p))
37
 
-# define ZZIP_GET32(__p)                        bswap_32(*(uint32_t*)(__p))
38
 
-# define ZZIP_GET64(__p)                        bswap_64(*(uint64_t*)(__p))
39
 
-# define ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = bswap_16((uint16_t)(__x)))
40
 
-# define ZZIP_SET32(__p,__x) (*(uint32_t*)(__p) = bswap_32((uint32_t)(__x)))
41
 
-# define ZZIP_SET64(__p,__x) (*(uint64_t*)(__p) = bswap_64((uint64_t)(__x)))
42
 
-# else
43
 
 # define ZZIP_GET64(__p)     (__zzip_get64((__p)))
44
 
 # define ZZIP_GET32(__p)     (__zzip_get32((__p)))
45
 
 # define ZZIP_GET16(__p)     (__zzip_get16((__p)))
46
 
 # define ZZIP_SET64(__p,__x) (__zzip_set64((__p),(__x)))
47
 
 # define ZZIP_SET32(__p,__x) (__zzip_set32((__p),(__x)))
48
 
 # define ZZIP_SET16(__p,__x) (__zzip_set16((__p),(__x)))
49
 
-# endif
50
 
-#else /* little endian is the original zip format byteorder */
51
 
-# define ZZIP_GET16(__p)     (*(uint16_t*)(__p))
52
 
-# define ZZIP_GET32(__p)     (*(uint32_t*)(__p))
53
 
-# define ZZIP_GET64(__p)     (*(uint64_t*)(__p))
54
 
-# define ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = (uint16_t)(__x))
55
 
-# define ZZIP_SET32(__p,__x) (*(uint32_t*)(__p) = (uint32_t)(__x))
56
 
-# define ZZIP_SET64(__p,__x) (*(uint64_t*)(__p) = (uint64_t)(__x))
57
 
-#endif
58
 
 
59
 
 /* ..................... bitcorrect physical access .................... */
60