diff --git a/scripts/pg_config_overrides.h b/scripts/pg_config_overrides.h index be33bcba..f5d09ed5 100644 --- a/scripts/pg_config_overrides.h +++ b/scripts/pg_config_overrides.h @@ -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 diff --git a/src/postgres/include/pg_config.h b/src/postgres/include/pg_config.h index e44578b1..66e2d4a3 100644 --- a/src/postgres/include/pg_config.h +++ b/src/postgres/include/pg_config.h @@ -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