ffi/ffi — pull request #248 by pck (2013-02-09 14:37:40+00:00)
Title: Cygwin support

Hello,

I'm proposing a few changes to improve Cygwin support.

__prefix__

Maybe the prefix shouldn't be "cyg" but "../bin/cyg"?
I'm suggesting "cyg" because it's less surprising.
But when an application calculates an absolute path something like "/usr/local/myprefix/lib/../bin/cygname.dll" would usually be a better result.

When dlopen("path/lib/cygname.dll") fails we could implicitly attempt to load "path/bin/cygname.dll" as a fallback? What do you think?

__dlopen current process__

For me "dlsym(dlopen(0,..),..)" doesn't work as expected. With my RTLD_DEFAULT workaround I can pass the spec examples. But perhaps we should fail?

Regards, Paul