Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Tests / RunCMake / showIncludes.c
1 #if defined(_MSC_VER) && _MSC_VER >= 1928
2 #  pragma warning(disable : 5105) /* macro expansion warning in windows.h */
3 #endif
4 #include <windows.h>
5
6 #include <stdio.h>
7
8 int main()
9 {
10   /* 'cl /showIncludes' encodes output in the console output code page.  */
11   unsigned int cp = GetConsoleOutputCP();
12   printf("Console output code page: %u\n", cp);
13   printf("Console input code page: %u\n", GetConsoleCP());
14   printf("ANSI code page: %u\n", GetACP());
15   printf("OEM code page: %u\n", GetOEMCP());
16
17   if (cp == 54936 || cp == 936) {
18     /* VSLANG=2052 */
19     printf("\xd7\xa2\xd2\xe2: "
20            "\xb0\xfc\xba\xac\xce\xc4\xbc\xfe:\n");
21     return 0;
22   }
23
24   if (cp == 65001) {
25     /* VSLANG=2052  */
26     printf("\xe6\xb3\xa8\xe6\x84\x8f: "
27            "\xe5\x8c\x85\xe5\x90\xab\xe6\x96\x87\xe4\xbb\xb6:\n");
28     return 0;
29   }
30
31   fprintf(stderr, "No example showIncludes for console's output code page.\n");
32   return 1;
33 }