Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| d640d80f | 2020-09-21 22:31:41 | Merge pull request #79 from rhabacker/cmake-refactoring CMake build system fixes | ||
| 33e2fdc2 | 2020-09-21 22:29:54 | Merge pull request #82 from rhabacker/drop-obsolete-vcproj-files Drop obsolete visual studio related files | ||
| ff6060ba | 2020-09-06 23:13:47 | Drop obsolete visual studio related files These files can be easily recreated with cmake on the fly, which is already used by CI-system. | ||
| faa2ff80 | 2020-09-14 12:21:55 | Makefile: Adjust paths of source files, which are now located in subdirectories | ||
| 218e7785 | 2020-08-25 23:24:25 | Fix cmake warning 'No project() command is present' | ||
| f0ac8495 | 2020-08-25 23:34:19 | Move cmake targets into sub directories | ||
| 5ead6f2d | 2020-08-25 23:31:13 | Update minimum required cmake version to 2.8.11 to simplify code According to https://cmake.org/pipermail/cmake/2013-May/054792.html cmake 2.8.11 was released in 2013, so we can assume that no older version will be used anymore. | ||
| c5a5e6d5 | 2020-09-13 19:35:47 | Merge pull request #81 from ramiropolla/master Relicense to MIT | ||
| d240aff1 | 2020-09-13 19:26:54 | Rephrase configure script copyright notice | ||
| f601b05f | 2020-09-13 19:11:46 | Merge pull request #80 from pali/master Add Travis CI testing | ||
| 4583f267 | 2020-08-30 13:43:50 | Relicense to MIT The licensing note in the configure script has been reworked, similarly to how libvpx did it (they were also based on FFmpeg's configure script and also use a more permissive license). | ||
| 48d16ae0 | 2020-08-26 19:27:28 | Add Travis CI testing | ||
| e5d9fab4 | 2020-08-05 08:50:41 | Merge pull request #76 from pali/master Fix compilation with older environments | ||
| e1d593d9 | 2020-08-04 18:35:01 | Fix compilation with older environments This change should fix following compile error: dlfcn.c: In function 'dlsym': dlfcn.c:374:14: warning: implicit declaration of function 'GetModuleHandleExA' dlfcn.c: undefined reference to `GetModuleHandleExA' Documentation for function GetModuleHandleExA() says: To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later. Fixes: https://github.com/dlfcn-win32/dlfcn-win32/issues/75 | ||
| 0a494c01 | 2020-07-15 08:07:53 | Merge pull request #74 from pali/master Replace VirtualQueryEx() call by GetModuleHandleExA() call | ||
| 8ec5ffef | 2020-07-14 21:14:56 | Replace VirtualQueryEx() call by GetModuleHandleExA() call Usage of VirtualQueryEx() call is needed for retrieving HMODULE of passed function address and it is just an undocumented hack. Based on @rhabacker's tests it is unstable and does not work correctly. https://github.com/dlfcn-win32/dlfcn-win32/pull/72#issuecomment-656581418 So replace VirtualQueryEx() call by standard GetModuleHandleExA() function with special GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS flag which should do the same thing but it is documented and it is working correctly. | ||
| 61ad60f5 | 2020-03-24 16:54:12 | Merge pull request #69 from reborn2266/fix_mmleak fix memory leak in dlsym() | ||
| cea65639 | 2020-03-24 20:05:29 | fix memory leak in dlsym() | ||
| 32be0765 | 2020-02-22 13:54:54 | Merge pull request #68 from pali/master Show "(null)" in error message when passed filname to dlopen() was NULL and error occurred | ||
| 70c5c20a | 2020-02-19 22:39:29 | Show "(null)" in error message when passed filname to dlopen() was NULL and error occurred It does not make sense to pass file variable (which is NULL) to function save_err_ptr_str() which converts its argument to string. We can call directly save_err_str() with string value. Also it is highly unexpected that GetModuleHandle(NULL) call fails. | ||
| 974b39c7 | 2019-10-13 09:43:21 | Merge pull request #67 from pali/master Add test which check that dlopen() can open same files as open() | ||
| ab246dbf | 2019-09-12 16:37:03 | Add test which check that dlopen() can open same files as open() This ensures that dlopen() expects filenames encoded in same codepage as WinAPI's open() function. | ||
| 07ef52a5 | 2019-09-01 14:35:56 | Merge pull request #65 from pali/master Update documentation in dlfcn.h, specially for RTLD_LAZY | ||
| 5d576e6d | 2019-08-29 21:07:32 | Update documentation in dlfcn.h, specially for RTLD_LAZY | ||
| e7fef1b5 | 2019-08-23 10:19:56 | Merge pull request #63 from pali/master Makefile: Fix building both static and shared library at the same time | ||
| 2b342400 | 2019-08-22 23:36:22 | Makefile: Fix building both static and shared library at the same time Static library libdl.a must be build without -DSHARED flag for obvious reason. So -DSHARED cannot be in global CFLAGS. Define also two separate test targets: test.exe for shared library and test-static.exe for static library. | ||
| 1dfd103a | 2019-08-22 23:05:54 | Merge pull request #62 from pali/master Reduce memory usage by 64K | ||
| 588b5782 | 2019-08-22 17:25:11 | Reduce memory usage by 64K One buffer for error message is enough. | ||
| 7f1a5e55 | 2019-08-21 10:48:49 | Merge pull request #59 from pali/master Fix compile warnings | ||
| ff302674 | 2019-07-26 18:21:30 | Fix more gcc warnings ISO C90 forbids mixed declarations and code ISO C++ forbids converting a string constant to 'char*' | ||
| 2bb5f487 | 2019-07-25 20:34:46 | Fix gcc warning: ISO C forbids return between function pointer and void * Instead of using compiler specific pragma to disable particular warning, rewrite code which cast from function pointer to data pointer according to POSIX dlopen() documentation. This also fix compile warning under MSVC. According to the ISO C standard, casting between function pointers and 'void *', as done above, produces undefined results. POSIX.1-2003 and POSIX.1-2008 accepted this state of affairs and proposed the following workaround: *(void **) (&cosine) = dlsym(handle, "cos"); This (clumsy) cast conforms with the ISO C standard and will avoid any compiler warnings. | ||
| 403b240f | 2019-07-25 20:34:28 | Fix gcc warning: comparison between signed and unsigned integer expressions GetTempPathA() returns DWORD (32/64bit unsigned integer) and not int (32 signed integer). | ||
| 39ff58c2 | 2019-07-25 20:32:53 | Do not include intrin.h file Include file intrin.h is not needed for compiling dlfcn.c as _ReturnAddress intrinsic is defined in dlfcn.c manually. Moreover _ReturnAddress is available only as an intrinsic, there is no function implementation. So even including intrin.h file does not provide function variant for _ReturnAddress. More important, include file intrin.h is not available in older Windows Driver Kit 7.1.0. So removing usage of intrin.h file makes compilation of dlfcn-win32 also under these older WDK versions. | ||
| e476c014 | 2019-07-25 16:59:14 | Merge pull request #58 from pali/master Correctly process malloc() error in dlsym() | ||
| 242b94ac | 2019-07-24 23:06:57 | Correctly process malloc() error in dlsym() malloc() may fail, so propagate this error to caller. | ||
| 4e17b083 | 2019-07-23 18:00:04 | Merge pull request #55 from pali/master Turn off GUI error messages around LoadLibraryA also in test | ||
| 5c2ec8f9 | 2019-06-11 00:54:38 | Turn off GUI error messages around LoadLibraryA also in test Otherwise running test show GUI error messages which needs to be closed. | ||
| 11ff86bf | 2019-06-11 00:19:48 | Merge pull request #54 from pali/master Correctly process and indicate errors | ||
| e646c9ab | 2019-05-23 20:24:17 | Add test for non-library file | ||
| 27319bfc | 2019-05-23 20:24:12 | Add tests for non-existent file and file with too long name | ||
| f6f6dd2d | 2019-05-23 20:24:05 | Test that dlerror() returns non-NULL error for failed calls | ||
| 207311ce | 2019-05-23 20:23:58 | Correctly process and indicate error when file name is too long | ||
| 44589dba | 2019-05-23 20:23:50 | Correctly process malloc() error in local_add() malloc() may fail, so propagate this error to caller of dlopen(). | ||
| 4fe419ca | 2019-05-23 20:23:33 | Correctly process and indicate error in dlsym() function Function save_err_str() checks for error by GetLastError() call. So ensure that last error is always set when error occurs. | ||
| a5c0031e | 2019-05-23 20:22:44 | Correctly process and indicate error from LoadLibraryExA() function Function save_err_str() checks for error by GetLastError() call. Calling EnumProcessModules() may change or reset it. So call save_err_str() immediately after LoadLibraryExA(). | ||
| 1488731c | 2019-05-21 18:55:39 | Merge pull request #52 from pali/master Call FormatMessage() with FORMAT_MESSAGE_IGNORE_INSERTS | ||
| 9ce1ba6f | 2019-05-21 00:35:11 | Call FormatMessage() with FORMAT_MESSAGE_IGNORE_INSERTS Documentation says: In particular, it is unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS. | ||
| 0fc1d9de | 2019-05-20 23:41:19 | Merge pull request #51 from pali/master Load Psapi.dll at runtime, this avoids linking caveat | ||
| f3da31d7 | 2019-05-06 21:47:33 | Load Psapi.dll at runtime, this avoids linking caveat | ||
| 84295c9a | 2019-05-06 21:02:00 | Merge pull request #50 from pali/master Simplify UNICODE build | ||
| e0a58321 | 2019-04-25 20:01:34 | Test also UNICODE builds on AppVeyor CI | ||
| 83add392 | 2019-04-25 19:36:57 | Simplify implementation of save_err_str() Check return value of FormatMessageA() function and remove copy_string() function as it is not needed. | ||
| d9d49f2d | 2019-04-25 19:26:23 | Remove ifdef hack for snprintf() Old version of MSVC does not support snprintf() function and sprintf_s() is not replacement for C99 snprintf(). As the only usage of snprintf() is to format void* pointer we can use sprintf() with enough long buffer. | ||
| 04bbf248 | 2019-04-25 18:18:31 | Simplify code around #ifdef UNICODE The whole dlfcn.h API works with char* (ANSI) strings. For WINAPI UNICODE builds it is still possible to call WINAPI ANSI functions with -A suffix. E.g. LoadLibraryExA() instead of LoadLibraryEx() or FormatMessageA() instead of FormatMessage(). This simplify whole implementation when compiling with UNICODE support as there is no need to do conversion from wchar_t to char and vice-versa. | ||
| 278c782a | 2019-02-14 14:57:29 | Merge pull request #44 from pali/master Fix resolving global symbols and implement RTLD_DEFAULT and RTLD_NEXT | ||
| 63d7bda4 | 2019-01-29 22:57:04 | Implement support for dlsym() with RTLD_DEFAULT and RTLD_NEXT dlsym() with RTLD_DEFAULT handle behaves in same way like with global handle returned by dlopen() with NULL file name. dlsym() with RTLD_NEXT handle search for next loaded module which provides specified symbol. "Next" means module which in EnumProcessModules() result after the module which called dlsym(). To get caller function of dlsym() use _ReturnAddress() intrinsic. To get module where is caller function use the fact that HMODULE is the same value as the module's base address. When compiling under gcc, defines _ReturnAddress() macro via gcc's builtin as it does not provide MSC's specific _ReturnAddress() intrinsic. Added tests demonstrate that both RTLD_DEFAULT and RTLD_NEXT are working as expected. | ||
| 29c46a54 | 2019-01-29 22:38:42 | Fix resolving global symbols when LoadLibrary() is called after dlopen() Usage of first_automatic_object cache is wrong. This cache is filled by all loaded DLL files (either implicitly or explicitly with LoadLibrary() call) by EnumProcessModules() call at first usage of dlopen(). So dlsym() can resolve global symbols only if they were loaded prior to dlopen() call. Any future usage of LoadLibrary() does not include newly loaded DLLs into first_automatic_object cache. To fix this problem, first_automatic_object cache is fully removed and EnumProcessModules() call is issued directly in dlsym() call. As EnumProcessModules() returns all DLLs, included those which were loaded by dlopen() with RTLD_LOCAL, it may break RTLD_LOCAL support. To address this problem switch linked-list of all loaded DLLs with RTLD_GLOBAL to linked-list of all loaded DLLs with RTLD_LOCAL flag. And then skip modules from EnumProcessModules() which are in linked-list. Also in WinAPI all DLLs loaded by LoadLibrary() behaves like RTLD_GLOBAL. So above change is compatible with this behavior. There may be another problem. Before retrieving HMODULE for DLL filename (which is done by LoadLibrary()), it is not possible to detect if DLL was already loaded by RTLD_LOCAL or not. And after calling LoadLibrary() it is not possible to know if DLL was loaded either by dlsym() with RTLD_LOCAL or by LoadLibrary() (which is equivalent to RTLD_GLOBAL). To address this problem, compare number of loaded modules (counted by EnumProcessModules()) before and after LoadLibrary() called from dlsym(). If number does not change it means that DLL was already loaded. So based on this result either add or remove HMODULE from linked-list of RTLD_LOCAL modules. Added test demonstrate usage of: global = dlopen(NULL, RTLD_GLOBAL); /* global handle */ LoadLibrary("library.dll"); /* this provides function */ function = dlsym(global, "function"); /* resolve function from library.dll */ | ||
| 1530bed6 | 2019-02-14 08:37:16 | Merge pull request #48 from dlfcn-win32/appveyor-mingw-take-two Add MinGW and MinGW-w64 builds to AppVeyor (take 2) | ||
| 23d77533 | 2019-02-11 00:31:22 | Add MinGW and MinGW-w64 tests to AppVeyor | ||
| f1acf5d2 | 2018-03-08 09:20:45 | Merge pull request #41 from jddurand/master #include <stdlib.h> | ||
| d26298df | 2018-01-17 10:02:39 | #include <stdlib.h> | ||
| f1edc335 | 2017-09-27 18:36:26 | Merge pull request #40 from dlfcn-win32/document-cmake-usage Document how to use the library when using CMake | ||
| b30b758e | 2017-08-24 21:50:51 | Mention the possibility of defining CMAKE_DL_LIBS | ||
| de4a39d3 | 2017-08-24 21:43:59 | Document how to use the library when using CMake | ||
| 2d03bf63 | 2017-05-04 20:14:12 | Merge pull request #39 from dlfcn-win32/traversaro-patch-2 [README] Fix AppVeyor badge | ||
| 7c60c2d3 | 2017-05-04 13:20:27 | [README] Fix AppVeyor badge | ||
| ef7e412d | 2017-05-04 13:12:09 | Merge pull request #38 from dlfcn-win32/appveyor-test-vs2017 [appveyor] Test the library using Visual Studio 15 2017 | ||
| 49606058 | 2017-05-04 13:12:01 | Merge pull request #36 from dlfcn-win32/fix-dlerror Fix bug in dlerror second consecutive call | ||
| 96e723b7 | 2017-05-01 11:57:32 | [appveyor] Test the library using Visual Studio 15 See https://www.appveyor.com/docs/build-environment/ for the logic behind the option used. | ||
| 5bcd8c53 | 2017-05-01 11:03:01 | Fix bug in dlerror second consecutive call According to the specs, a second consecutive call to dlerror should always return NULL . This was the case in dlfcn-win32 before https://github.com/dlfcn-win32/dlfcn-win32/pull/20 introduce a regression that caused dlerror to crash on the second consecutive call. In this commit the issue is fixed as suggested in https://github.com/dlfcn-win32/dlfcn-win32/issues/34 and a regression test has been added. | ||
| 18195b17 | 2017-04-09 17:51:35 | Merge pull request #30 from Kamekameha/appveyor-fix Minor AppVeyor configuration cleanup | ||
| 8e853e00 | 2017-03-16 04:32:53 | Minor AppVeyor configuration cleanup | ||
| 69bd6d5c | 2017-03-19 17:06:28 | [readme] Update AppVeyor badge | ||
| e37edf0e | 2017-03-10 00:02:02 | Merge pull request #29 from traversaro/add-appveyor Fix tests in Visual Studio 2015 and add AppVeyor support | ||
| d22f7719 | 2017-03-05 16:48:00 | Add testing of CMake exported targets | ||
| e32762ce | 2017-03-05 16:30:10 | Add AppVeyor badge | ||
| bf146adb | 2017-02-22 00:23:40 | Add appveyor support | ||
| 540fa7a4 | 2017-03-05 16:16:16 | Fix tests in Visual Studio 2015 For checking the loading of symbols from the global handle, the printf symbol was loaded, but since Visual Studio 2015 printf is defined as a inline function. To fix this, the test has been modified to load the symbol of the fwrite function. | ||
| ad70f0eb | 2017-03-05 09:50:55 | Merge pull request #27 from traversaro/add-cmake-config-file Add CMake code to export a CMake config file | ||
| bd4eebdb | 2016-12-27 12:13:39 | Add CMake code to export a CMake config file | ||
| e19bf076 | 2016-07-25 13:49:13 | configure: put test.{c,dll} to current directory (#26) instead of /tmp/ to avoid races when building for multiple targets. Add test files to .gitignore and `make clean`. | ||
| 00d5cd18 | 2016-03-23 02:20:15 | Merge pull request #25 from xantares/patch-1 Removed wine detection | ||
| 604fd008 | 2016-03-23 09:43:39 | Removed wine detection It can be set canonically by using CMAKE_CROSSCOMPILIING_EMULATOR variable | ||
| 7cea745e | 2015-08-06 14:33:43 | Merge pull request #20 from robertwgh/unicode Added support for unicode character set. | ||
| aa1401bf | 2015-04-09 03:30:39 | Added support for unicode character set. | ||
| e419539b | 2015-04-06 18:48:30 | Update README.md Fixes #18. | ||
| 98cc37be | 2015-03-15 19:07:44 | Add my copyright Not that I care⦠| ||
| c5501073 | 2015-03-15 17:32:10 | Warning control in MSVC | ||
| 50f42865 | 2015-03-15 17:26:46 | Revert "Use level 4 warnings for Visual Studio" This reverts commit 77a6dfd8c588a64300ea380bf32256da3b93f1ef. | ||
| f5e9a16f | 2015-03-15 17:21:34 | Use SHARED macro to handle DLL export (Originally the SHARED macro is created not to handle this case, but it seems like it works fine for this purpose as well.) Closes #12. | ||
| 54740be1 | 2015-03-15 17:16:40 | Merge branch 'global-loaded-mods' Closes #9. | ||
| dd4254a3 | 2014-10-08 15:50:21 | Add linked modules to a separate global list Fixes #2. | ||
| 5ea707ad | 2015-03-15 16:35:22 | Define SHARED when building shared library | ||
| c421b701 | 2015-03-15 16:09:44 | Check for memory leak when _DEBUG is defined | ||
| 77a6dfd8 | 2015-03-15 15:55:52 | Use level 4 warnings for Visual Studio | ||
| ce706da1 | 2015-03-11 22:38:54 | Merge pull request #10 from xantares/patch-5 set CMAKE_BUILD_TYPE default | ||
| 473386e3 | 2015-03-12 06:37:29 | set CMAKE_BUILD_TYPE default it's used to set release flags | ||
| 081924ee | 2015-03-11 20:16:05 | Add static **configurations** | ||
| efa69675 | 2015-03-11 20:15:49 | Revert "Add a static solution" This reverts commit 22dd588b852abd5a8de6cd09aa5c876883435ecd. | ||
| 22dd588b | 2015-03-11 20:12:53 | Add a static solution |