Skip to content

Commit 5ec7110

Browse files
Berrysoftgitster
authored andcommitted
cmake: remove (_)UNICODE def on Windows in CMakeLists.txt
`UNICODE` and `_UNICODE` are not required when building git on Windows. Actually, they should not be predefined at all. There're 2 evidences that `(_)UNICODE` is supposed to be nonexist: compat/win32/trace2_win32_process_info.c:83: It uses jw_array_string which accepts pe32.szExeFile as const char*. t/helper/test-drop-caches.c:16: Calling to GetCurrentDirectory with Buffer as char*. The autotools build system never defines `UNICODE` and `_UNICODE` and builds on Windows well. Signed-off-by: Yuyi Wang <[email protected]> Acked-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8043151 commit 5ec7110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
270270
_CONSOLE DETECT_MSYS_TTY STRIP_EXTENSION=".exe" NO_SYMLINK_HEAD UNRELIABLE_FSTAT
271271
NOGDI OBJECT_CREATION_MODE=1 __USE_MINGW_ANSI_STDIO=0
272272
USE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP
273-
UNICODE _UNICODE HAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)
273+
HAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)
274274
list(APPEND compat_SOURCES
275275
compat/mingw.c
276276
compat/winansi.c

0 commit comments

Comments
 (0)