Use local swap16/swap32 functions instead of the defines from endian.h
The local functions take a pointer to an integer, not an integer, so the endian.h macros aren't a proper replacement. This fixes the build with clang 15.
This commit is contained in:
parent
83bff15553
commit
39445012cc
|
@ -1,6 +1,7 @@
|
|||
COMMENT= extract valid data from within an Excel spreadsheet
|
||||
PROJECT = freexl
|
||||
DISTNAME= ${PROJECT}-1.0.6
|
||||
REVISION= 0
|
||||
CATEGORIES= converters geo
|
||||
SHARED_LIBS= freexl 0.1 #2.0
|
||||
|
||||
|
|
|
@ -1,28 +1,21 @@
|
|||
--- src/freexl.c.orig Tue Jul 14 09:45:23 2015
|
||||
+++ src/freexl.c Fri Jul 24 15:51:11 2015
|
||||
Avoid conflict with swap16/swap32 defines from endian.h
|
||||
|
||||
Index: src/freexl.c
|
||||
--- src/freexl.c.orig
|
||||
+++ src/freexl.c
|
||||
@@ -108,6 +108,7 @@ lround (double num)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifndef swap16
|
||||
+#undef swap16
|
||||
static void
|
||||
swap16 (biff_word16 * word)
|
||||
{
|
||||
@@ -116,7 +117,9 @@ swap16 (biff_word16 * word)
|
||||
word->bytes[0] = word->bytes[1];
|
||||
@@ -117,6 +118,7 @@ swap16 (biff_word16 * word)
|
||||
word->bytes[1] = save;
|
||||
}
|
||||
+#endif
|
||||
|
||||
+#ifndef swap32
|
||||
+#undef swap32
|
||||
static void
|
||||
swap32 (biff_word32 * word)
|
||||
{
|
||||
@@ -129,6 +132,7 @@ swap32 (biff_word32 * word)
|
||||
word->bytes[2] = save1;
|
||||
word->bytes[3] = save0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void
|
||||
swap_float (biff_float * word)
|
||||
|
|
Loading…
Reference in New Issue