Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin compatibility issues #242

Open
Lastique opened this issue Dec 16, 2024 · 0 comments
Open

Cygwin compatibility issues #242

Lastique opened this issue Dec 16, 2024 · 0 comments

Comments

@Lastique
Copy link
Member

Lastique commented Dec 16, 2024

Compiling Boost.Log with inter-process utilities (using Boost.Interprocess internally) on Cygwin fails, see here and here:

In file included from ./boost/interprocess/errors.hpp:40:0,
                 from ./boost/interprocess/exceptions.hpp:24,
                 from libs/log/src/posix/ipc_reliable_message_queue.cpp:51:
./boost/interprocess/detail/win32_api.hpp: In function 'int boost::interprocess::winapi::release_semaphore(void*, long int, long int*)':
./boost/interprocess/detail/win32_api.hpp:778:61: error: cannot convert 'long int*' to 'LPLONG {aka int*}' for argument '3' to 'WINBOOL ReleaseSemaphore(HANDLE, LONG, LPLONG)'
 {  return ReleaseSemaphore(handle, release_count, prev_count); }
                                                             ^
./boost/interprocess/detail/win32_api.hpp: In function 'bool boost::interprocess::winapi::virtual_protect(void*, std::size_t, long unsigned int, long unsigned int&)':
./boost/interprocess/detail/win32_api.hpp:860:101: error: cannot convert 'long unsigned int*' to 'boost::winapi::PDWORD_ {aka unsigned int*}' for argument '4' to 'boost::winapi::BOOL_ boost::ipwinapiext::VirtualProtect(boost::winapi::LPVOID_, boost::winapi::SIZE_T_, boost::winapi::DWORD_, boost::winapi::PDWORD_)'
 {  return 0 != boost::ipwinapiext::VirtualProtect(base_addr, numbytes, flNewProtect, &lpflOldProtect); }
                                                                                                     ^
./boost/interprocess/detail/win32_api.hpp: In function 'bool boost::interprocess::winapi::write_file(void*, const void*, long unsigned int, long unsigned int*, boost::interprocess::winapi::interprocess_overlapped*)':
./boost/interprocess/detail/win32_api.hpp:905:95: error: cannot convert 'long unsigned int*' to 'boost::winapi::LPDWORD_ {aka unsigned int*}' for argument '4' to 'boost::winapi::BOOL_ boost::winapi::WriteFile(boost::winapi::HANDLE_, boost::winapi::LPCVOID_, boost::winapi::DWORD_, boost::winapi::LPDWORD_, boost::winapi::OVERLAPPED_*)'
 {  return 0 != boost::winapi::WriteFile(hnd, buffer, bytes_to_write, bytes_written, overlapped);  }
                                                                                               ^
./boost/interprocess/detail/win32_api.hpp: In function 'bool boost::interprocess::winapi::read_file(void*, void*, long unsigned int, long unsigned int*, boost::interprocess::winapi::interprocess_overlapped*)':
./boost/interprocess/detail/win32_api.hpp:908:90: error: cannot convert 'long unsigned int*' to 'boost::winapi::LPDWORD_ {aka unsigned int*}' for argument '4' to 'boost::winapi::BOOL_ boost::winapi::ReadFile(boost::winapi::HANDLE_, boost::winapi::LPVOID_, boost::winapi::DWORD_, boost::winapi::LPDWORD_, boost::winapi::OVERLAPPED_*)'
 {  return 0 != boost::winapi::ReadFile(hnd, buffer, bytes_to_read, bytes_read, overlapped);  }
                                                                                          ^
./boost/interprocess/detail/win32_api.hpp: In function 'long int boost::interprocess::winapi::reg_query_value_ex(boost::interprocess::winapi::hkey, const char*, long unsigned int*, long unsigned int*, unsigned char*, long unsigned int*)':
./boost/interprocess/detail/win32_api.hpp:952:103: error: cannot convert 'long unsigned int*' to 'boost::winapi::DWORD_* {aka unsigned int*}' for argument '3' to 'boost::ipwinapiext::LSTATUS boost::ipwinapiext::RegQueryValueExA(boost::ipwinapiext::HKEY_, const char*, boost::winapi::DWORD_*, boost::winapi::DWORD_*, boost::winapi::BYTE_*, boost::winapi::DWORD_*)'
 {  return boost::ipwinapiext::RegQueryValueExA(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData); }
                                                                                                       ^
./boost/interprocess/detail/win32_api.hpp: In function 'long int boost::interprocess::winapi::reg_query_value_ex(boost::interprocess::winapi::hkey, const wchar_t*, long unsigned int*, long unsigned int*, unsigned char*, long unsigned int*)':
./boost/interprocess/detail/win32_api.hpp:955:103: error: cannot convert 'long unsigned int*' to 'boost::winapi::DWORD_* {aka unsigned int*}' for argument '3' to 'boost::ipwinapiext::LSTATUS boost::ipwinapiext::RegQueryValueExW(boost::ipwinapiext::HKEY_, const wchar_t*, boost::winapi::DWORD_*, boost::winapi::DWORD_*, boost::winapi::BYTE_*, boost::winapi::DWORD_*)'
 {  return boost::ipwinapiext::RegQueryValueExW(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData); }
                                                                                                       ^

Cygwin has LP64 ABI where long is 64-bit, not 32-bit like on native Windows. See here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant