headers: Fix the declaration of _vscprintf

Previously, the ifdefs were misplaced, leading to this function not
being declared at all if building with __USE_MINGW_ANSI_STDIO=1.

If targeting ucrtbase.dll, we always need to rely on the
__stdio_common_vsprintf implementation, since _vscprintf doesn't
exist in ucrtbase.dll, regardless of the state of the
__USE_MINGW_ANSI_STDIO define.

Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
index d7208e9..7365994 100644
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -809,12 +809,6 @@
     __builtin_va_end(ap);
     return ret;
   }
-
-  __mingw_ovr
-  int __cdecl _vscprintf(const char * __restrict__ _Format,va_list _ArgList)
-  {
-    return __stdio_common_vsprintf(UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR, NULL, 0, _Format, NULL, _ArgList);
-  }
 #ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
@@ -864,8 +858,16 @@
 #ifdef __GNUC__
 #pragma GCC diagnostic pop
 #endif
-#endif
+#endif /* __MSVCRT_VERSION__ >= 0x1400 */
+#endif /* __USE_MINGW_ANSI_STDIO */
 
+#if __MSVCRT_VERSION__ >= 0x1400
+  __mingw_ovr
+  int __cdecl _vscprintf(const char * __restrict__ _Format,va_list _ArgList)
+  {
+    return __stdio_common_vsprintf(UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR, NULL, 0, _Format, NULL, _ArgList);
+  }
+#else
   _CRTIMP int __cdecl _vscprintf(const char * __restrict__ _Format,va_list _ArgList);
 #endif /* __MSVCRT_VERSION__ >= 0x1400 */