lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.11k stars 252 forks source link

How to specify 64 bit JNI build on Solaris (JVM runs 64 bit) #90

Closed cndcourt closed 7 years ago

cndcourt commented 8 years ago

Hi I can build the lz4-java.jar on Solaris and get the SO. But it is built by default - 32 BIT. I'm not very ANT knowledgeable. but the compiler option is "-m64". Can someone help with the Ant build.xml directive?

Thanks folks! Right now we are just using javaSafeInstance()

cndcourt commented 7 years ago

Hey! This worked - but I have no idea how the source change would be made. In the lz4.c file I added a test for the Solaris 64 bit support: _LP64

if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \

|| defined(64BIT) || defined(__mips64) || defined(_LP64) \ <--- ADDED THIS

define LZ4_ARCH64 1

else

define LZ4_ARCH64 0

odaira commented 7 years ago

I applied the proposed change to lz4.c. Thanks!