Closed GoogleCodeExporter closed 8 years ago
Thanks. This looks clear and well defined.
I'm aware that <byteswap.h> is not always present on target platforms.
This dependancy must be used with a bit of caution.
Original comment by yann.col...@gmail.com
on 10 Jun 2012 at 2:05
Yes. My patch with <byteswap.h> not works on my mac with gcc version 4.2.1
(Apple Inc. build 5666) (dot 3).
Here i saw comment with __builtin_bswapX is only available from GCC-4.3
http://stackoverflow.com/questions/105252/how-do-i-convert-between-big-endian-an
d-little-endian-values-in-c
On that case patch can be very simple
Index: lz4demo.c
===================================================================
--- lz4demo.c (revision 67)
+++ lz4demo.c (working copy)
@@ -57,7 +57,7 @@
#if defined(_MSC_VER) // Visual Studio
#define swap32 _byteswap_ulong
-#elif GCC_VERSION >= 402
+#elif GCC_VERSION >= 430
#define swap32 __builtin_bswap32
#else
static inline unsigned int swap32(unsigned int x) {
Original comment by Pervushi...@gmail.com
on 15 Jun 2012 at 8:56
Simple and straightforward. Issue is corrected into r68. Thanks for
notification !
Original comment by yann.col...@gmail.com
on 16 Jun 2012 at 12:06
Original issue reported on code.google.com by
Pervushi...@gmail.com
on 9 Jun 2012 at 8:10