Skip to content

Commit

Permalink
Handle clang on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lfittl committed Jan 1, 2024
1 parent a118862 commit 7611f08
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion scripts/pg_config_overrides.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,14 @@
#undef USE_SYSV_SHARED_MEMORY
#define USE_WIN32_SEMAPHORES 1
#define USE_WIN32_SHARED_MEMORY 1
#if defined(__clang__)
#define PG_PRINTF_ATTRIBUTE printf
#elif defined(__MINGW32__) || defined(__MINGW64__) || defined(__MSYS__) || defined(__CYGWIN__)
#define PG_PRINTF_ATTRIBUTE gnu_printf
#else
#undef PG_PRINTF_ATTRIBUTE
#endif
#if defined(__MINGW32__) || defined(__MINGW64__) || defined(__MSYS__) || defined(__CYGWIN__)
#define PG_PRINTF_ATTRIBUTE gnu_printf
#undef HAVE_MBSTOWCS_L
#undef HAVE_WCSTOMBS_L
#define HAVE_CRTDEFS_H 1
Expand Down
7 changes: 6 additions & 1 deletion src/postgres/include/pg_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,14 @@
#undef USE_SYSV_SHARED_MEMORY
#define USE_WIN32_SEMAPHORES 1
#define USE_WIN32_SHARED_MEMORY 1
#if defined(__clang__)
#define PG_PRINTF_ATTRIBUTE printf
#elif defined(__MINGW32__) || defined(__MINGW64__) || defined(__MSYS__) || defined(__CYGWIN__)
#define PG_PRINTF_ATTRIBUTE gnu_printf
#else
#undef PG_PRINTF_ATTRIBUTE
#endif
#if defined(__MINGW32__) || defined(__MINGW64__) || defined(__MSYS__) || defined(__CYGWIN__)
#define PG_PRINTF_ATTRIBUTE gnu_printf
#undef HAVE_MBSTOWCS_L
#undef HAVE_WCSTOMBS_L
#define HAVE_CRTDEFS_H 1
Expand Down

0 comments on commit 7611f08

Please sign in to comment.