aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix helper function MyEnumProcessModules()Pali Rohár2021-02-031-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call SetErrorMode(SEM_FAILCRITICALERRORS) prior opening Psapi.dll library to avoid GUI error messages. Close Psapi.dll library via FreeLibrary() if symbol was not retrieved to prevent possible memory leaks. Try to get K32EnumProcessModules symbol from Kernel32.dll library as it is preferred way how to call EnumProcessModules() on Windows 7 and newer versions. If retrieving EnumProcessModules symbol failed with both methods then do not try it again on next MyEnumProcessModules() function call.
| * Avoid calling SetLastError() and GetLastError() internallyPali Rohár2021-02-031-22/+17
| | | | | | | | | | | | There is no need for propagating internal errors via SetLastError() and GetLastError() calls. Just use additional argument for save_err_str() function. Also dlfcn API is POSIX and does not use GetLastError().
| * Move hCurrentProc variable to scope where is usedPali Rohár2021-02-031-2/+3
| |
| * Fix some style issuesPali Rohár2021-02-032-14/+14
|/
* Merge pull request #94 from pali/dladdrSilvio Traversaro2021-02-034-65/+69
|\ | | | | dladdr() - Retrieve symbol name and address from export table
| * Remove duplicate checks for NULL pointersPali Rohár2021-01-291-4/+1
| | | | | | | | is_valid_address() already rejects NULL addresses, so there is no need to check address for NULL.
| * Remove code for finding symbol name in import tablePali Rohár2021-01-291-53/+6
| | | | | | | | | | | | It is not required as import table can use only symbols which are exported and therefore are in export table. So if symbol is not found in export table it cannot be in import table.
| * Function dladdr() now retrieve symbol name and symbol address from both ↵Pali Rohár2021-01-274-43/+97
|/ | | | | | export and import tables dladdr tests for Windows now should always pass like on other systems.
* Merge pull request #72 from rhabacker/masterSilvio Traversaro2021-01-259-44/+531
|\ | | | | Add function dladdr()
| * CI: Add static building for cmakeRalf Habacker2021-01-172-23/+70
| |
| * cmake: add support to build test-dladdr on unix like osRalf Habacker2021-01-172-12/+22
| | | | | | | | This is used to obtain test result references.
| * Add function dladdr() and associated test application test-dladdrRalf Habacker2021-01-176-9/+439
|/
* Merge pull request #93 from rhabacker/travis-cmake-supportSilvio Traversaro2020-12-221-0/+11
|\ | | | | Add cmake build support to travis CI
| * Add cmake build support to travis CIRalf Habacker2020-12-221-0/+11
|/
* Merge pull request #90 from pali/masterSilvio Traversaro2020-12-131-6/+13
|\ | | | | Rewrite function save_err_ptr_str() to not use sprintf()
| * Rewrite function save_err_ptr_str() to not use sprintf()Pali Rohár2020-12-131-6/+13
|/ | | | | | | | sprintf() is marked by MSVC as unsafe and suppressing compile warning does not work. It is still generated on AppVeyor. So rewrite code for converting pointer number to string via open coded for-loop and do not use unsafe sprintf() function anymore. New code correctly handles both 32bit and 64bit variants and does not use any #ifdef _MSC_VER anymore.
* Merge pull request #89 from pali/masterSilvio Traversaro2020-12-131-0/+1
|\ | | | | Add _CRT_SECURE_NO_WARNINGS for test.c to disable MSVC deprecation warnings
| * Add _CRT_SECURE_NO_WARNINGS for test.c to disable MSVC deprecation warningsPali Rohár2020-12-131-0/+1
|/
* Merge pull request #88 from pali/masterSilvio Traversaro2020-12-132-3/+14
|\ | | | | Run Travis tests also under i586-mingw32msvc-gcc compiler
| * ci-build.sh: Move install_prefix to cmake place where it is usedPali Rohár2020-12-121-3/+1
| |
| * Run Travis tests also under i586-mingw32msvc-gcc compilerPali Rohár2020-12-121-0/+13
|/ | | | | | Beware that i586-mingw32msvc-gcc is sometimes just a symlink to i686-w64-mingw32-gcc. Real i586-mingw32msvc-gcc compiler is available in mingw32 package only in dist trusty.
* Merge pull request #85 from rhabacker/cmake-wine-supportSilvio Traversaro2020-11-265-6/+125
|\ | | | | Add support to use wine to run cross compiled tests for cmake
| * cmake: Keep warning in sync with Makefile based build systemRalf Habacker2020-11-091-0/+6
| |
| * Add cmake building support to Travis CIRalf Habacker2020-11-093-4/+56
| | | | | | | | | | | | To make it easier to extend the CI support and to be able to execute the contained tests locally, a dedicated shell script tools/ci_build.sh was added to execute the tests.
| * cmake: add option ENABLE_WINE to enable support for running cross compiled ↵Ralf Habacker2020-11-093-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | tests with wine For details about the ENABLE_WINE option, which support three modes AUTO|ON|OFF see the documentation of cmake macro check_auto_option(). A custom path for the wine executable can be specified by adding -DWINE_EXECUTABLE=<path> to the cmake command line. The cmake related macros were copied from https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/cmake/modules/Macros.cmake
| * cmake: separate targets in tests subdir for reasier readingRalf Habacker2020-11-091-0/+4
| |
| * cmake: Let make target 'test' be accessable from topmost build directoryRalf Habacker2020-11-092-2/+2
| | | | | | | | | | | | The cmake command enable_testing() must be placed in the topmost CMakeLists.txt so that the make target 'test' is available in the topmost build directory.
| * cmake: place all generated binaries into one placeRalf Habacker2020-11-022-1/+5
| | | | | | | | | | This is required for running test applications, because by default cmake places binaries into the associated subdir.
* | Merge pull request #86 from pali/masterSilvio Traversaro2020-11-081-97/+97
|\ \ | |/ |/| Change order of variables in appveyor build matrix
| * Change order of variables in appveyor build matrixPali Rohár2020-11-041-97/+97
|/ | | | | | | | | This change no function effect as it changes only order of defined variables. The only visible change is on appveyor web where variables are printed in other as they are defined. If list of variables is too long, variables defined later are hidden on the web interface. Variable APPVEYOR_BUILD_WORKER_IMAGE was moved to the end of list as it is less important to know as variable GENERATOR (defines which compiler is used).
* Merge pull request #79 from rhabacker/cmake-refactoringSilvio Traversaro2020-09-2111-75/+74
|\ | | | | CMake build system fixes
| * Makefile: Adjust paths of source files, which are now located in subdirectoriesRalf Habacker2020-09-141-10/+10
| |
| * Fix cmake warning 'No project() command is present'Ralf Habacker2020-09-141-0/+1
| |
| * Move cmake targets into sub directoriesRalf Habacker2020-09-1410-59/+62
| |
| * Update minimum required cmake version to 2.8.11 to simplify codeRalf Habacker2020-09-141-30/+25
| | | | | | | | | | | | 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.
* | Merge pull request #82 from rhabacker/drop-obsolete-vcproj-filesSilvio Traversaro2020-09-217-875/+0
|\ \ | |/ |/| Drop obsolete visual studio related files
| * Drop obsolete visual studio related filesRalf Habacker2020-09-147-875/+0
|/ | | | | These files can be easily recreated with cmake on the fly, which is already used by CI-system.
* Merge pull request #81 from ramiropolla/masterSilvio Traversaro2020-09-139-600/+127
|\ | | | | Relicense to MIT
| * Rephrase configure script copyright noticeSilvio Traversaro2020-09-131-1/+5
| |
| * Relicense to MITRamiro Polla2020-08-309-600/+123
| | | | | | | | | | | | 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).
* | Merge pull request #80 from pali/masterSilvio Traversaro2020-09-131-0/+16
|\ \ | |/ |/| Add Travis CI testing
| * Add Travis CI testingPali Rohár2020-08-261-0/+16
|/
* Merge pull request #76 from pali/masterSilvio Traversaro2020-08-051-0/+3
|\ | | | | Fix compilation with older environments
| * Fix compilation with older environmentsPali Rohár2020-08-041-0/+3
|/ | | | | | | | | | | | | | 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
* Merge pull request #74 from pali/masterSilvio Traversaro2020-07-151-16/+2
|\ | | | | Replace VirtualQueryEx() call by GetModuleHandleExA() call
| * Replace VirtualQueryEx() call by GetModuleHandleExA() callPali Rohár2020-07-141-16/+2
|/ | | | | | | | | | | | 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.
* Merge pull request #69 from reborn2266/fix_mmleakSilvio Traversaro2020-03-241-0/+3
|\ | | | | fix memory leak in dlsym()
| * fix memory leak in dlsym()Mars Cheng2020-03-241-0/+3
|/
* Merge pull request #68 from pali/masterSilvio Traversaro2020-02-221-1/+1
|\ | | | | Show "(null)" in error message when passed filname to dlopen() was NULL and error occurred
| * Show "(null)" in error message when passed filname to dlopen() was NULL and ↵Pali Rohár2020-02-191-1/+1
|/ | | | | | | | | | 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.