headers: Use _UCRT to signal whether the UCRT is used

This can be used both by defining it externally, for setting
__MSVCRT_VERSION__ to the right value, or by checking if _UCRT is
defined.

Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-headers/crt/_mingw.h.in b/mingw-w64-headers/crt/_mingw.h.in
index 7e80a24..d026da3 100644
--- a/mingw-w64-headers/crt/_mingw.h.in
+++ b/mingw-w64-headers/crt/_mingw.h.in
@@ -222,7 +222,11 @@
 
 #ifndef __MSVCRT_VERSION__
 /*  High byte is the major version, low byte is the minor. */
-# define __MSVCRT_VERSION__ @DEFAULT_MSVCRT_VERSION@
+# ifndef _UCRT
+#  define __MSVCRT_VERSION__ @DEFAULT_MSVCRT_VERSION@
+# else
+#  define __MSVCRT_VERSION__ 0x1400
+# endif
 #endif
 
 
diff --git a/mingw-w64-headers/crt/corecrt.h b/mingw-w64-headers/crt/corecrt.h
index 44d32d6..e7078d6 100644
--- a/mingw-w64-headers/crt/corecrt.h
+++ b/mingw-w64-headers/crt/corecrt.h
@@ -15,6 +15,10 @@
 #pragma pack(push,_CRT_PACKING)
 #endif
 
+#if !defined(_UCRT) && (__MSVCRT_VERSION__ >= 0x1400)
+#define _UCRT
+#endif
+
 #ifdef __ERRCODE_DEFINED_MS
 /* #define __ERRCODE_DEFINED_MS */
 typedef int errcode;