[email protected] wrote in fltk.commit: > Author: matt > Date: 2010-01-24 03:45:36 -0800 (Sun, 24 Jan 2010) > New Revision: 7030 > Log: > Without knowing Cygwin, this seems to make more sense to me?!
... > -#ifdef WIN32 > +#if defined(WIN32) && !defined(__CYGWIN__) > HMODULE dl = LoadLibrary(filename); > #else > void * dl = dlopen(filename, RTLD_LAZY); Yep, that's okay. In fact both would work, as long as they are used consistently - it obviously depends on the potential usage of "dl" later in the code. And it is even possible that both would return the same result (see below). Explanation: Besides Cygwin being a runtime/development environment for the user, if FLTK is configured with --enable-cygwin, then and only then the macro __CYGWIN__ will be defined, and this provides the Cygwin POSIX layer to the application programmer (e.g. dlopen) and makes the application depend on cygwin1.dll. However, it does not remove the possibility to use the native Windows functions like LoadLibrary() - in fact some or most of the Cygwin functions are wrappers to the native functions. I hope that was short enough and helpful. <OT> BTW.: I think that we should check some of the #ifdef's in src/fl_utf.c and maybe some more for similar issues. When I looked at the code recently, I decided to replace _WIN32 with WIN32 and _not_ to use "&& !defined(__CYGWIN__)", because there is also GetACP() involved, and Cygwin might use another locale environment in the font and character handling, but that's drifting too far away now... </OT> I'm looking forward to test the new plugin features, and I can do it with and w/o Cygwin, but I'm afraid I need a working example to understand how that all should work... For now I can confirm that both versions (before and after) compile and link fine w/ and w/o Cygwin. Albrecht P.S. Glad to see you active again :-) _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
