<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dlfcn-win32/src, branch variousimprovements2025</title>
<subtitle>A mirror of https://github.com/dlfcn-win32/dlfcn-win32.git
</subtitle>
<id>https://git.lua4.win/dlfcn-win32/atom?h=variousimprovements2025</id>
<link rel='self' href='https://git.lua4.win/dlfcn-win32/atom?h=variousimprovements2025'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/'/>
<updated>2025-04-28T12:49:51+00:00</updated>
<entry>
<title>Replace CRT's strlen() and memcpy() by open coded variants</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-29T14:52:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=3e9bfa7d9dd0e8f4a846d45261df1dcb838b60d8'/>
<id>urn:sha1:3e9bfa7d9dd0e8f4a846d45261df1dcb838b60d8</id>
<content type='text'>
After this change there is no usage of of CRT library function. This allows
to build CRT-neutral variant of libdl.dll library, which can be used in any
application.
</content>
</entry>
<entry>
<title>Replace CRT's malloc() and free() by WinAPI's LocalAlloc() and LocalFree() in release mode</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-22T00:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=f87cc876be9b450d3491a174b8c673d918ec5daf'/>
<id>urn:sha1:f87cc876be9b450d3491a174b8c673d918ec5daf</id>
<content type='text'>
In debug mode is still used malloc() and free() for as part of memory leak
testing done by _CRTDBG_MAP_ALLOC and _CrtDumpMemoryLeaks() in test.c.

This change allows to wrap CRT's malloc() via dlsym's RTLD_NEXT.

See #112
</content>
</entry>
<entry>
<title>Fix includes</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-22T00:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=8c28ff3b85f87ae9cb645fed9ec2d146b3059e7a'/>
<id>urn:sha1:8c28ff3b85f87ae9cb645fed9ec2d146b3059e7a</id>
<content type='text'>
* Remove unused include stdio.h
* Add used include string.h
* Add reason comments for includes
</content>
</entry>
<entry>
<title>Do not cast between function pointer and data pointer when not required</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-09-16T21:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=e0520e25643b51e69aa78e5944cdf2853323b06a'/>
<id>urn:sha1:e0520e25643b51e69aa78e5944cdf2853323b06a</id>
<content type='text'>
This is undefined in C and also C++. Both gcc and msvc allows to cast
between two incompatible function pointers without triggering warnings
transitionally via void(*)(void) function pointer. Replace transitional
LPVOID cast by void(*)(void) cast.
</content>
</entry>
<entry>
<title>Fix compile warning: comparison of integer expressions of different signedness: ‘int’ and ‘DWORD’ {aka ‘long unsigned int’}</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-29T14:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=5a4d701248f88fb1a6f66932c58d73e74dfadbd9'/>
<id>urn:sha1:5a4d701248f88fb1a6f66932c58d73e74dfadbd9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix compile warning C4244: '=' : conversion from 'int' to 'char', possible loss of data</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-29T16:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=34238cbb5aabda6f1d9a605cc6ef06a1d831bd25'/>
<id>urn:sha1:34238cbb5aabda6f1d9a605cc6ef06a1d831bd25</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix C++ compile error C2065: '_ReturnAddress' : undeclared identifier</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-29T17:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=e3568d86334b67111d4a0458ad46abbb82f53f22'/>
<id>urn:sha1:e3568d86334b67111d4a0458ad46abbb82f53f22</id>
<content type='text'>
It follows compile warning C4164: '_ReturnAddress' : intrinsic function not declared
Declaration can be included also via intrin.h header file.
</content>
</entry>
<entry>
<title>Fix C++ compile error C2065: '_alloca' : undeclared identifier</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-29T15:37:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=94faff301f529c72a52aa564f8e6829120133d12'/>
<id>urn:sha1:94faff301f529c72a52aa564f8e6829120133d12</id>
<content type='text'>
When compiling in C++ mode, it is required to have C declaration for
_alloca. Declaration can be included also via malloc.h header file.
</content>
</entry>
<entry>
<title>Fix gcc compile errors in C++ mode</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-03-29T15:00:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=4fd808d661d88a2ab4ae1dc768f2c8ff0841c8a1'/>
<id>urn:sha1:4fd808d661d88a2ab4ae1dc768f2c8ff0841c8a1</id>
<content type='text'>
Add missing casts which are required in C++.
</content>
</entry>
<entry>
<title>Fix is_valid_address() function</title>
<updated>2025-04-28T12:49:51+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali.rohar@gmail.com</email>
</author>
<published>2024-02-26T21:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/dlfcn-win32/commit/?id=9a2d78ac8768d5623107dc49c091e186354b6efb'/>
<id>urn:sha1:9a2d78ac8768d5623107dc49c091e186354b6efb</id>
<content type='text'>
Returned structure is valid only if the function return value is same as
the size of the structure. So check for the correct size, not just for the
non-zero size.

"AllocationProtect" member contains the initial protection, valid at the
time when VirtualAlloc() was called. "Protect" member contains the current
protection of the requested address, valid at the time when VirtualQuery()
was called. So is_valid_address() function has to check "Protect" member,
not the "AllocationProtect".

If "State" member is MEM_FREE or MEM_RESERVE then "Protect" member is
undefined. So check "State" member before "Protect" member.
</content>
</entry>
</feed>
