Patrick Rapin wrote:
This doesn't work on Cygwin, because library file names are different
from Linux.
On this platform, you have to provide the full path name.
Looking at clib_extname in lj_clib.c, we see that ffi.load tries to
open libXXX.dylib on MacOS or libXXX.so on other Posix platforms.
But on Cygwin, the libraries are named cygXXX.dll (and are placed in
/bin directory), like /bin/cygz.dll
So to support that platform, CLIB_SOEXT must me defined to ".dll", and
the test for the "lib" prefix must be adapted to the "cyg" prefix.
But that'd foil any attempt to load (true) Windows DLLs, no?
And I bet most programs ported to Cygwin have to use a mixture of
POSIX and Windows functionality.
Anyway, Cygwin is a mess. MinGW works just fine and is almost
always the better choice. Ok, so I'll take a tested patch, but
only if it doesn't cause any other regressions.
--Mike