Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows support: Use pg_config_os.h to include port/win32.h if needed
We previously had the hardcoded macOS ("darwin") contents for this file, which is unnecessary and incorrect. Instead keep this file empty in all cases except on Windows, where we include port/win32.h (just like Postgres itself does), since it is actually necessary for our use case. Different from Postgres itself we undef PGDLLIMPORT and PGDLLEXPORT, since they are not needed for pg_query, and PGDLLIMPORT conflicts with the thread local attribute. Additionally, we workaround a Windows-specific problem with sigsetjmp defines when using clang whilst __MINGW64__ is defined (which can happen on MSYS2-based environments).
- Loading branch information