[med-svn] r3388 - in trunk/packages/plink/trunk/debian: . patches

Andreas Tille tille at alioth.debian.org
Sun May 17 15:56:49 UTC 2009


Author: tille
Date: 2009-05-17 15:56:49 +0000 (Sun, 17 May 2009)
New Revision: 3388

Added:
   trunk/packages/plink/trunk/debian/patches/30_endiandetection.patch
Modified:
   trunk/packages/plink/trunk/debian/changelog
Log:
edian detection patch


Modified: trunk/packages/plink/trunk/debian/changelog
===================================================================
--- trunk/packages/plink/trunk/debian/changelog	2009-05-17 15:02:50 UTC (rev 3387)
+++ trunk/packages/plink/trunk/debian/changelog	2009-05-17 15:56:49 UTC (rev 3388)
@@ -1,3 +1,11 @@
+plink (1.06-2) unstable; urgency=low
+
+  * Fallback to endian.h if all else fails on 64bit machines
+   (Thanks to Peter Green <plugwash at p10link.net> for the patch)
+   Closes: #528659
+
+ -- Andreas Tille <tille at debian.org>  Sat, 16 May 2009 21:19:32 +0200
+
 plink (1.06-1) unstable; urgency=low
 
   * New upstream version

Added: trunk/packages/plink/trunk/debian/patches/30_endiandetection.patch
===================================================================
--- trunk/packages/plink/trunk/debian/patches/30_endiandetection.patch	                        (rev 0)
+++ trunk/packages/plink/trunk/debian/patches/30_endiandetection.patch	2009-05-17 15:56:49 UTC (rev 3388)
@@ -0,0 +1,24 @@
+Index: plink-1.06/Rsrv.h
+===================================================================
+--- plink-1.06.orig/Rsrv.h	2009-05-15 03:35:29.000000000 +0100
++++ plink-1.06/Rsrv.h	2009-05-15 03:35:41.000000000 +0100
+@@ -313,7 +313,18 @@
+ #define __BIG_ENDIAN__ 1
+ #define SWAPEND 1
+ #elif ! defined Win32 /* Windows is little-endian is most cases, anywhere else we're stuck */
+-#error "Cannot determine endianness. Make sure config.h is included or __{BIG|LITTLE}_ENDIAN__ is defined ."
++  //try endian.h before we finally bail out
++  #include <endian.h>
++  #if __BYTE_ORDER == __LITTLE_ENDIAN
++    #warning using little endian based on information from endian.h
++    #define __LITTLE_ENDIAN__ 1
++  #elif __BYTE_ORDER == __BIG_ENDIAN
++    #warning using big endian based on information from endian.h
++    #define __BIG_ENDIAN__ 1
++    #define SWAPEND 1
++  #else    
++    #error "Cannot determine endianness. Make sure config.h is included or __{BIG|LITTLE}_ENDIAN__ is defined ."
++  #endif    
+ #endif
+ 
+ /* FIXME: all the mess below needs more efficient implementation - the current one is so messy to work around alignment problems on some platforms like Sun and HP 9000 */




More information about the debian-med-commit mailing list