- Cast `&t` to `LPCPROPSHEETPAGEW` in `CreatePropertySheetPageW` to fix incompatible pointer type error.
- Use `SendMessageW` instead of custom `SendMsg` for `WM_GETFONT` to avoid truncating the `LRESULT` down to a 32-bit `UINT` before casting to `HFONT`, which previously triggered a `-Wint-to-pointer-cast` warning on 64-bit builds.
- Cast `&srcData` and `&data` (type `UCHAR**`) to `void**` in `CreateDIBSection` calls to resolve incompatible pointer type errors.
Changed the types of `read_size` and `ret_size` from `UINT` to `DWORD` across several functions (`SuOpenAdapter`, `SuEnumAdapters`, `SuGetAdapterList`, and `SuInitEx`) in `SeLowUser.c` to resolve compiler warnings (`-Wincompatible-pointer-types`). The Windows API functions `DeviceIoControl` and `ReadFile` expect an `LPDWORD` (a pointer to an `unsigned long`) for their returned byte count parameters, whereas `UINT` maps to `unsigned int`.
Changed the type of `retsize` from `UINT` to `DWORD` in `Proto_Win7.c` to resolve a compiler warning (`-Wincompatible-pointer-types`). The Windows API function `WriteFile` expects an `LPDWORD` (a pointer to an `unsigned long`) for its `lpNumberOfBytesWritten` parameter, whereas `UINT` maps to `unsigned int`.
Changed the type of `size` from `UINT` to `ULONG` in `BridgeWin32.c` to resolve a compiler warning (`-Wincompatible-pointer-types`). The `PacketGetAdapterNames` function expects a `PULONG` (a pointer to an `unsigned long`) for its second parameter, whereas `UINT` maps to `unsigned int`.
Changed the type of `read_size` from `UINT` to `DWORD` in `Win32.c` to resolve a compiler warning (`-Wincompatible-pointer-types`). The Windows API function `ReadFile` expects an `LPDWORD` (a pointer to an `unsigned long`) for the `lpNumberOfBytesRead` parameter, while `UINT` maps to `unsigned int`.
configure picks the CPack generator by probing for an rpm executable: if
present it selects RPM, otherwise it falls through to DEB. macOS has neither,
so it selects DEB, which is not a meaningful package format there.
Add a Darwin branch selecting TGZ, which always works. An explicit
CPACK_GENERATOR in the environment still takes precedence, so anyone wanting
productbuild or DragNDrop can ask for it.
This only affects 'make package'; ordinary builds never read CPACK_GENERATOR,
which is why macOS CI is unaffected.
The Darwin branch of the cpu_features selection reads:
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "^(arm64|x86_64)")
The second condition tests CMAKE_SYSTEM_NAME, which is "Darwin" inside this
branch and so never matches ^(arm64|x86_64), where it plainly means
CMAKE_SYSTEM_PROCESSOR. The NOT is therefore always true, and the branch the
comment says we "should not reach" is the one always taken. The FreeBSD
branch three lines above gets this right.
The effect is currently masked -- macOS has no sys/auxv.h, so the
HAVE_SYS_AUXV branch already defines SKIP_CPU_FEATURES first -- but the
condition is still wrong and should behave as written if that check ever
changes.
On macOS, configure exports a hardcoded OPENSSL_ROOT_DIR of
/usr/local/opt/openssl/. That is the Homebrew prefix on Intel Macs; on Apple
Silicon Homebrew installs to /opt/homebrew, so the directory does not exist.
Nothing is broken today: CMake's FindOpenSSL treats OPENSSL_ROOT_DIR as a
hint rather than an exclusive search path, so it ignores the dead directory
and finds OpenSSL anyway. The problem is the log line, which confidently
names a path that exists on no Apple Silicon machine and sends anyone
debugging an OpenSSL pickup down a false trail.
Ask brew for the real prefix, preferring openssl@3 and falling back to
openssl, and keep the previous value as a last resort so behaviour is
unchanged where Homebrew is absent.
Explicitly cast the `UINT *` pointer to `(volatile LONG *)` before passing it to `InterlockedIncrement` and `InterlockedDecrement` in `src/Mayaqua/Win32.c`.
This resolves a build error where passing a `UINT *` (unsigned int *) was flagged as an incompatible pointer type, because the APIs expect a `volatile LONG *` (volatile long *).
Change the type of the `thread_id` variable from `DWORD` to `UINT` in `src/Mayaqua/Win32.c`.
This resolves a build error where passing `&thread_id` to `_beginthreadex` was flagged as an incompatible pointer type, because the function expects a pointer to an `unsigned int` rather than a pointer to an `unsigned long` (`DWORD`).
Change the type of the `retsize` variable from `UINT` to `DWORD` in both `Win32SetFolderCompressW` and `Win32SetFolderCompress` in `src/Mayaqua/Win32.c`.
This resolves a build error where passing `&retsize` to `DeviceIoControl` was flagged as an incompatible pointer type, because the API expects an `LPDWORD` (pointer to `unsigned long`) rather than a pointer to `unsigned int`.
Explicitly cast the `IP_ADAPTER_ADDRESSES_XP *` pointer to `PIP_ADAPTER_ADDRESSES` when calling `GetAdaptersAddresses` in `src/Mayaqua/Network.c`.
This resolves build errors with modern Windows SDKs (e.g., 10.0.26100.0) where `PIP_ADAPTER_ADDRESSES` resolves to `IP_ADAPTER_ADDRESSES_LH *`, which compilers like Clang flag as an incompatible pointer type.