pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add bzip3 version 1.2.2 to pkgsrc-wip



Module Name:	pkgsrc-wip
Committed By:	Niclas Rosenvik <youremailsarecrap%gmail.com@localhost>
Pushed By:	nros
Date:		Sun Jan 15 19:00:35 2023 +0100
Changeset:	abf9fe44219417c05b9b5c42db1c1df007d3a0fa

Modified Files:
	Makefile
Added Files:
	bzip3/DESCR
	bzip3/Makefile
	bzip3/PLIST
	bzip3/TODO
	bzip3/distinfo
	bzip3/patches/patch-include_common.h
	bzip3/patches/patch-include_libsais.h

Log Message:
Add bzip3 version 1.2.2 to pkgsrc-wip

A better, faster and stronger spiritual successor to BZip2.
Features higher compression ratios and better performance.
Like its ancestor, BZip3 excels at compressing text or code.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=abf9fe44219417c05b9b5c42db1c1df007d3a0fa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                              |   1 +
 bzip3/DESCR                           |   3 +
 bzip3/Makefile                        |  37 ++++
 bzip3/PLIST                           |  20 ++
 bzip3/TODO                            |   7 +
 bzip3/distinfo                        |   7 +
 bzip3/patches/patch-include_common.h  |  89 +++++++++
 bzip3/patches/patch-include_libsais.h | 334 ++++++++++++++++++++++++++++++++++
 8 files changed, 498 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 22f8d3030c..7227da16ad 100644
--- a/Makefile
+++ b/Makefile
@@ -360,6 +360,7 @@ SUBDIR+=	bup-git
 SUBDIR+=	busybox
 SUBDIR+=	bwa
 SUBDIR+=	byzanz
+SUBDIR+=	bzip3
 SUBDIR+=	c-graph
 SUBDIR+=	c-news
 SUBDIR+=	c2go
diff --git a/bzip3/DESCR b/bzip3/DESCR
new file mode 100644
index 0000000000..7f56a7708d
--- /dev/null
+++ b/bzip3/DESCR
@@ -0,0 +1,3 @@
+A better, faster and stronger spiritual successor to BZip2.
+Features higher compression ratios and better performance.
+Like its ancestor, BZip3 excels at compressing text or code.
diff --git a/bzip3/Makefile b/bzip3/Makefile
new file mode 100644
index 0000000000..f99a45ff8a
--- /dev/null
+++ b/bzip3/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD$
+
+DISTNAME=	bzip3-1.2.2
+CATEGORIES=	archivers
+MASTER_SITES=	${MASTER_SITE_GITHUB:=kspalaiologos/bzip3/releases/download/${PKGVERSION_NOREV}/}
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/kspalaiologos/bzip3/
+COMMENT=	Spiritual successor to BZip2
+LICENSE=	gnu-lgpl-v3 AND apache-2.0
+
+GNU_CONFIGURE=	yes
+USE_LIBTOOL=	yes
+USE_TOOLS+=	pkg-config # configure looks for pkg-comfig
+
+DEPENDS+=	most-[0-9]*:../../misc/most
+
+PKGCONFIG_OVERRIDE+=	bzip3.pc.in
+
+REPLACE_SH+=	bunzip3
+REPLACE_SH+=	bz3cat
+REPLACE_SH+=	bz3grep
+REPLACE_SH+=	bz3less
+REPLACE_SH+=	bz3more
+REPLACE_SH+=	bz3most
+
+# needed in order to comply with the apache license
+# and binary redistribution
+INSTALLATION_DIRS+=	share/doc/${PKGBASE}
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/LICENSE \
+		${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+	${INSTALL_DATA} ${WRKSRC}/libsais-LICENSE \
+		${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/bzip3/PLIST b/bzip3/PLIST
new file mode 100644
index 0000000000..7ed706b341
--- /dev/null
+++ b/bzip3/PLIST
@@ -0,0 +1,20 @@
+@comment $NetBSD$
+bin/bunzip3
+bin/bz3cat
+bin/bz3grep
+bin/bz3less
+bin/bz3more
+bin/bz3most
+bin/bzip3
+include/libbz3.h
+lib/libbzip3.la
+lib/pkgconfig/bzip3.pc
+man/man1/bunzip3.1
+man/man1/bz3cat.1
+man/man1/bz3grep.1
+man/man1/bz3less.1
+man/man1/bz3more.1
+man/man1/bz3most.1
+man/man1/bzip3.1
+share/doc/bzip3/LICENSE
+share/doc/bzip3/libsais-LICENSE
diff --git a/bzip3/TODO b/bzip3/TODO
new file mode 100644
index 0000000000..4c42d498ca
--- /dev/null
+++ b/bzip3/TODO
@@ -0,0 +1,7 @@
+Does not run correctly on big-endian systems.
+crc32 calculation is not correct on be systems
+when trying to decompress a bzip3 file and 
+when trying to compress a file it crashes on
+line 108 in libbzip3.c claiming it can't read
+the in_end variable. This is all happening
+on NetBSD sparc under qemu.
diff --git a/bzip3/distinfo b/bzip3/distinfo
new file mode 100644
index 0000000000..0d5aaf23ec
--- /dev/null
+++ b/bzip3/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+BLAKE2s (bzip3-1.2.2.tar.xz) = 30f6cf255467f3f325c33cef4ed51e59a9ff87b5626e47e89bc890c122ce0abc
+SHA512 (bzip3-1.2.2.tar.xz) = 476876f3949ac285e86625a9a83741308910ddce5b9449c0ca02b41d9c336f759b9702f2ce6b61243f1fde59a9ef8cf926fb2e94911828d5f39e207319bf522d
+Size (bzip3-1.2.2.tar.xz) = 275872 bytes
+SHA1 (patch-include_common.h) = c336c316caa51a51077daa27b7f8ad8f705a7192
+SHA1 (patch-include_libsais.h) = af71664a332de9728cb3f58cdf8611a7f15e07fb
diff --git a/bzip3/patches/patch-include_common.h b/bzip3/patches/patch-include_common.h
new file mode 100644
index 0000000000..6421fc028a
--- /dev/null
+++ b/bzip3/patches/patch-include_common.h
@@ -0,0 +1,89 @@
+$NetBSD$
+
+* Replace the bswap16 funtion with posix htons,
+  the bwap16 function only swaped on little endian
+  systems making it a htons.
+  Fixes build on illumos with gcc 12 and removes
+  bswap16 redefinition warning on NetBSD.
+
+* Remove non-standard #warning directive, we expect c99
+  so restrict is to be available
+
+* Support compilers without prefetch instructions.
+  prefetch is just for cache optimization so it is safe
+  define prefetch and prefetchw to nothing, tested and
+  the same output files as with it.
+
+--- include/common.h.orig	2023-01-10 14:45:22.000000000 +0000
++++ include/common.h
+@@ -25,6 +25,7 @@
+ 
+ #include <inttypes.h>
+ #include <stdint.h>
++#include <arpa/inet.h>
+ 
+ typedef uint8_t u8;
+ typedef uint16_t u16;
+@@ -52,7 +53,6 @@ static void write_neutral_s32(u8 * data,
+     #define RESTRICT __restrict
+ #else
+     #define RESTRICT restrict
+-    #warning Your compiler, configuration or platform might not be supported.
+ #endif
+ 
+ #if defined(__has_builtin)
+@@ -63,14 +63,6 @@ static void write_neutral_s32(u8 * data,
+     #define HAS_BUILTIN_PREFECTCH
+ #endif
+ 
+-#if defined(__has_builtin)
+-    #if __has_builtin(__builtin_bswap16)
+-        #define HAS_BUILTIN_BSWAP16
+-    #endif
+-#elif defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ >= 5))
+-    #define HAS_BUILTIN_BSWAP16
+-#endif
+-
+ #if defined(HAS_BUILTIN_PREFECTCH)
+     #define prefetch(address) __builtin_prefetch((const void *)(address), 0, 0)
+     #define prefetchw(address) __builtin_prefetch((const void *)(address), 1, 0)
+@@ -89,37 +81,8 @@ static void write_neutral_s32(u8 * data,
+     #define prefetch(address) __prefetch2((const void *)(address), 1)
+     #define prefetchw(address) __prefetch2((const void *)(address), 17)
+ #else
+-    #error Your compiler, configuration or platform is not supported.
+-#endif
+-
+-#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
+-    #if defined(_LITTLE_ENDIAN) || (defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN) || \
+-        (defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN) ||                        \
+-        (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && __BYTE_ORDER == __LITTLE_ENDIAN) ||                    \
+-        (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+-        #define __LITTLE_ENDIAN__
+-    #elif defined(_BIG_ENDIAN) || (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) || \
+-        (defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN) ||                       \
+-        (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) && __BYTE_ORDER == __BIG_ENDIAN) ||                   \
+-        (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+-        #define __BIG_ENDIAN__
+-    #elif defined(_WIN32)
+-        #define __LITTLE_ENDIAN__
+-    #endif
+-#endif
+-
+-#if defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
+-    #if defined(HAS_BUILTIN_BSWAP16)
+-        #define bswap16(x) (__builtin_bswap16(x))
+-    #elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+-        #define bswap16(x) (_byteswap_ushort(x))
+-    #else
+-        #define bswap16(x) ((u16)(x >> 8) | (u16)(x << 8))
+-    #endif
+-#elif !defined(__LITTLE_ENDIAN__) && defined(__BIG_ENDIAN__)
+-    #define bswap16(x) (x)
+-#else
+-    #error Your compiler, configuration or platform is not supported.
++    #define prefetch(address)
++    #define prefetchw(address)
+ #endif
+ 
+ #endif
diff --git a/bzip3/patches/patch-include_libsais.h b/bzip3/patches/patch-include_libsais.h
new file mode 100644
index 0000000000..0f0b34e6e8
--- /dev/null
+++ b/bzip3/patches/patch-include_libsais.h
@@ -0,0 +1,334 @@
+$NetBSD$
+
+* Replace the bswap16 funtion with posix htons,
+  the bwap16 function only swaped on little endian
+  systems making it a htons.
+  Fixes build on illumos with gcc 12 and removes
+  bswap16 redefinition warning on NetBSD.
+
+--- include/libsais.h.orig	2023-01-15 12:07:11.797011115 +0000
++++ include/libsais.h
+@@ -4629,7 +4629,7 @@ static void libsais_unbwt_decode_1(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+     }
+ 
+     *i0 = p0;
+@@ -4651,7 +4651,7 @@ static void libsais_unbwt_decode_2(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4659,7 +4659,7 @@ static void libsais_unbwt_decode_2(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = htons(c1);
+     }
+ 
+     *i0 = p0;
+@@ -4683,7 +4683,7 @@ static void libsais_unbwt_decode_3(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4691,7 +4691,7 @@ static void libsais_unbwt_decode_3(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = htons(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4699,7 +4699,7 @@ static void libsais_unbwt_decode_3(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = htons(c2);
+     }
+ 
+     *i0 = p0;
+@@ -4725,7 +4725,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4733,7 +4733,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = htons(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4741,7 +4741,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = htons(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4749,7 +4749,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = htons(c3);
+     }
+ 
+     *i0 = p0;
+@@ -4778,7 +4778,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4786,7 +4786,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = htons(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4794,7 +4794,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = htons(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4802,7 +4802,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = htons(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -4810,7 +4810,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = htons(c4);
+     }
+ 
+     *i0 = p0;
+@@ -4841,7 +4841,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4849,7 +4849,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = htons(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4857,7 +4857,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = htons(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4865,7 +4865,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = htons(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -4873,7 +4873,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = htons(c4);
+         u16 c5 = fastbits[p5 >> shift];
+         if (bucket2[c5] <= p5) {
+             do {
+@@ -4881,7 +4881,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c5] <= p5);
+         }
+         p5 = P[p5];
+-        U5[i] = bswap16(c5);
++        U5[i] = htons(c5);
+     }
+ 
+     *i0 = p0;
+@@ -4914,7 +4914,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4922,7 +4922,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = htons(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4930,7 +4930,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = htons(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4938,7 +4938,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = htons(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -4946,7 +4946,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = htons(c4);
+         u16 c5 = fastbits[p5 >> shift];
+         if (bucket2[c5] <= p5) {
+             do {
+@@ -4954,7 +4954,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c5] <= p5);
+         }
+         p5 = P[p5];
+-        U5[i] = bswap16(c5);
++        U5[i] = htons(c5);
+         u16 c6 = fastbits[p6 >> shift];
+         if (bucket2[c6] <= p6) {
+             do {
+@@ -4962,7 +4962,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c6] <= p6);
+         }
+         p6 = P[p6];
+-        U6[i] = bswap16(c6);
++        U6[i] = htons(c6);
+     }
+ 
+     *i0 = p0;
+@@ -4997,7 +4997,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = htons(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -5005,7 +5005,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = htons(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -5013,7 +5013,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = htons(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -5021,7 +5021,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = htons(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -5029,7 +5029,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = htons(c4);
+         u16 c5 = fastbits[p5 >> shift];
+         if (bucket2[c5] <= p5) {
+             do {
+@@ -5037,7 +5037,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c5] <= p5);
+         }
+         p5 = P[p5];
+-        U5[i] = bswap16(c5);
++        U5[i] = htons(c5);
+         u16 c6 = fastbits[p6 >> shift];
+         if (bucket2[c6] <= p6) {
+             do {
+@@ -5045,7 +5045,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c6] <= p6);
+         }
+         p6 = P[p6];
+-        U6[i] = bswap16(c6);
++        U6[i] = htons(c6);
+         u16 c7 = fastbits[p7 >> shift];
+         if (bucket2[c7] <= p7) {
+             do {
+@@ -5053,7 +5053,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c7] <= p7);
+         }
+         p7 = P[p7];
+-        U7[i] = bswap16(c7);
++        U7[i] = htons(c7);
+     }
+ 
+     *i0 = p0;


Home | Main Index | Thread Index | Old Index