Closed textbrowser closed 9 years ago
GitHub is misinterpreting underscores.
underscoreunderscoreAPPLEunderscoreunderscore
And on a Windows 7 machine.
src/poly.c:679:9: warning: implicit declaration of function 'htole64' [-Wimplicit-function-declaration]
a64[i] = htole64(a64[i]);
^
gcc -g -O2 -Wall -Wextra -Wno-unused-parameter -shared -o libntru.dll src/bitstring.o src/encparams.o src/hash.o src/idxgen.o src/key.o src/mgf.o src/ntru.o src/poly.o src/rand.o src/arith.o src/sha1.o src/sha2.o -lws2_32 -ladvapi32
src/poly.o: In function ntru_to_arr_64': D:\datawin\spoton7git\spot-on\libNTRU/src/poly.c:679: undefined reference to
htole64'
collect2.exe: error: ld returned 1 exit status
Yeah, MinGW doesn't have htole64(), either. I pushed a fix. Thanks for reporting this!
@textbrowser see the code tab on this page for how to paste code correctly in github comments / issues.
Thank you for the link.
Please apply the following changes to poly.c.
--- a/libNTRU/src/poly.c +++ b/libNTRU/src/poly.c @@ -8,6 +8,11 @@
include "err.h"
include "arith.h"
+#ifdef APPLE +#include <libkern/OSByteOrder.h> +#define htole64(x) OSSwapHostToLittleInt64(x) +#endif +
define NTRU_SPARSE_THRESH 20