Bug #314
offenGwenhywfar 5.12.0 fails to build on macOS
Beschreibung
In file included from /Users/john/Development/Gnucash-git-11-arm64/src/gwenhywfar-5.12.0/src/msgio/msg.c:22:
../../gwenhywfar5/gwenhywfar/endianfns.h:43:12: fatal error: 'endian.h' file not found
43 | # include <endian.h>
| ^~~~~~~~
Because on macOS it's <machine/endian.h>. But that's not good enough because macOS doesn't provide the functions you want from it. With the include patched:
/Users/john/Development/Gnucash-git-11-arm64/src/gwenhywfar-5.12.0/src/msgio/msg.c:227:12: error: call to undeclared function 'htole64'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
227 | *ptr=GWEN_ENDIAN_HTOLE64(v);
| ^
../../gwenhywfar5/gwenhywfar/endianfns.h:55:34: note: expanded from macro 'GWEN_ENDIAN_HTOLE64'
55 | # define GWEN_ENDIAN_HTOLE64(x) htole64(x)
| ^
/Users/john/Development/Gnucash-git-11-arm64/src/gwenhywfar-5.12.0/src/msgio/msg.c:248:12: error: call to undeclared function 'htole32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
248 | *ptr=GWEN_ENDIAN_HTOLE32(v);
| ^
../../gwenhywfar5/gwenhywfar/endianfns.h:52:34: note: expanded from macro 'GWEN_ENDIAN_HTOLE32'
52 | # define GWEN_ENDIAN_HTOLE32(x) htole32(x)
| ^
/Users/john/Development/Gnucash-git-11-arm64/src/gwenhywfar-5.12.0/src/msgio/msg.c:269:12: error: call to undeclared function 'htole16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
269 | *ptr=GWEN_ENDIAN_HTOLE16(v);
| ^
../../gwenhywfar5/gwenhywfar/endianfns.h:49:34: note: expanded from macro 'GWEN_ENDIAN_HTOLE16'
49 | # define GWEN_ENDIAN_HTOLE16(x) htole16(x)
| ^
/Users/john/Development/Gnucash-git-11-arm64/src/gwenhywfar-5.12.0/src/msgio/msg.c:595:14: error: call to undeclared function 'le64toh'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
595 | return GWEN_ENDIAN_LE64TOH(*ptr);
| ^
../../gwenhywfar5/gwenhywfar/endianfns.h:54:34: note: expanded from macro 'GWEN_ENDIAN_LE64TOH'
54 | # define GWEN_ENDIAN_LE64TOH(x) le64toh(x)
| ^
/Users/john/Development/Gnucash-git-11-arm64/src/gwenhywfar-5.12.0/src/msgio/msg.c:609:14: error: call to undeclared function 'le32toh'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
609 | return GWEN_ENDIAN_LE32TOH(*ptr);
| ^
../../gwenhywfar5/gwenhywfar/endianfns.h:51:34: note: expanded from macro 'GWEN_ENDIAN_LE32TOH'
51 | # define GWEN_ENDIAN_LE32TOH(x) le32toh(x)
| ^
/Users/john/Development/Gnucash-git-11-arm64/src/gwenhywfar-5.12.0/src/msgio/msg.c:623:14: error: call to undeclared function 'le16toh'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
623 | return GWEN_ENDIAN_LE16TOH(*ptr);
| ^
../../gwenhywfar5/gwenhywfar/endianfns.h:48:34: note: expanded from macro 'GWEN_ENDIAN_LE16TOH'
/*