]> granicus.if.org Git - zziplib/commitdiff
honor aligned-access check during configure time
authorGuido Draheim <guidod@gmx.de>
Sat, 22 Mar 2008 20:50:46 +0000 (20:50 +0000)
committerGuido Draheim <guidod@gmx.de>
Sat, 22 Mar 2008 20:50:46 +0000 (20:50 +0000)
ChangeLog
configure.ac
zzip/fetch.h
zzip/memdisk.c

index 2128262ac93508dfaea28b4192e8f8f2376ed9e8..f3974660b3f7e55f3bf429e6a2288c93fcd86d6e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-22  guidod  <guidod@pc3>
+
+       * zzip/fetch.h: honor ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED for the Linux bswap
+       optimization. See also 443880@bugs.debian "SIGBUS on Sparc".
+
 2008-03-03  guidod  <guidod@pc3>
 
        * TODO: update to recent problems. Need to check my mail stack next time.
index 1e9521f38a0f3b65f827ab7d70acef1926864e74..4149bead25fe7cf026dd16131d761735c951308e 100644 (file)
@@ -1,7 +1,7 @@
 AC_INIT(zziplib.spec)
 AC_PREREQ(2.49)
 AC_COPYRIGHT([Guido Draheim <guido@gmx.de> for ZZipLib.SF.net])
-AC_REVISION($Revision: 1.9 $)
+AC_REVISION($Revision: 1.10 $)
 AC_CONFIG_AUX_DIR(uses)
 # =======================================================================
 AC_CANONICAL_SYSTEM
@@ -9,8 +9,8 @@ dnl AM_ENABLE_MULTILIB([Makefile],[$host])
 AX_ENABLE_BUILDDIR_UNAME
 AC_SET_DEFAULT_PATHS_SYSTEM
 # -----------------------------------------------------------------------
-AC_ARG_ENABLE(thread-safe,AC_HELP_STRING(
-   [--disable-thread-safe],[disable thread-safe libtool option])
+AC_ARG_ENABLE([thread-safe],
+AC_HELP_STRING([--disable-thread-safe],[disable thread-safe libtool option])
    ,,[ enable_thread_safe="yes"])
 THREAD_SAFE=""
 test "$enable_thread_safe" = "yes" && THREAD_SAFE="-thread-safe"
index e2c5e9b6a018c3d9e74679810ba3505c85cab6ee..860260a946b73409acf0a1f5c5fdcbe2278d8636 100644 (file)
@@ -25,6 +25,11 @@ extern void     __zzip_set64(zzip_byte_t * s, uint64_t v);
 
 #ifdef ZZIP_WORDS_BIGENDIAN
 # if defined bswap_16 && defined bswap_32 && defined bswap_64 /* i.e. linux */
+# ifndef ZZIP_HAVE_ALIGNED_ACCESS_REQUIRED
+# define _ZZIP_USE_BSWAP
+# endif
+# endif
+# ifdef _ZZIP_USE_BSWAP
 # define ZZIP_GET16(__p)                        bswap_16(*(uint16_t*)(__p))
 # define ZZIP_GET32(__p)                        bswap_32(*(uint32_t*)(__p))
 # define ZZIP_GET64(__p)                        bswap_64(*(uint64_t*)(__p))
index eba4fdb2e6a78701fca3a15aa6d447dab0bca3c5..b3bd709762fe499b8c12ccffbe632994511d295b 100644 (file)
@@ -63,10 +63,10 @@ typedef struct _zzip_extra_zip64
 
 /*forward*/
 
-zzip__new__ static ZZIP_MEM_ENTRY *zzip_mem_entry_new(ZZIP_DISK * disk,
-                                                      ZZIP_DISK_ENTRY * entry);
-zzip__new__ static void zzip_mem_entry_free(ZZIP_MEM_ENTRY *
-                                            _zzip_restrict item);
+static zzip__new__ ZZIP_MEM_ENTRY *
+zzip_mem_entry_new(ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry);
+static void 
+zzip_mem_entry_free(ZZIP_MEM_ENTRY * _zzip_restrict item);
 
 zzip__new__ ZZIP_MEM_DISK *
 zzip_mem_disk_new(void)