{"thread":{"id":"57917","subject":"[PATCH] Remove (_)UNICODE def on Windows in CMakeLists.txt","startedAt":"2022-05-24T12:57:08Z","lastAt":"2022-05-25T10:17:49Z","messageCount":4,"participants":["Yuyi Wang via GitGitGadget","Johannes Schindelin","Yuyi Wang"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"455897","messageId":"pull.1269.git.git.1653397021384.gitgitgadget@gmail.com","threadId":"57917","inReplyTo":null,"subject":"[PATCH] Remove (_)UNICODE def on Windows in CMakeLists.txt","fromName":"Yuyi Wang via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-05-24T12:57:01Z","receivedAt":"2022-05-24T12:57:08Z","isPatch":true,"sender":{"key":"strawberry_str@hotmail.com","avatar":"https://avatars.githubusercontent.com/u/37586447?v=4"},"body":"From: Yuyi Wang <Strawberry_Str@hotmail.com>\n\n`UNICODE` and `_UNICODE` are not required when building git on Windows.\nActually, they should not be predefined at all.\n\nThere're 2 evidences that `(_)UNICODE` is supposed to be nonexist:\n\ncompat/win32/trace2_win32_process_info.c:83: It uses jw_array_string\nwhich accepts pe32.szExeFile as const char*.\n\nt/helper/test-drop-caches.c:16: Calling to GetCurrentDirectory with\nBuffer as char*.\n\nThe autotools build system never defines `UNICODE` and `_UNICODE` and\nbuilds on Windows well.\n\nSigned-off-by: Yuyi Wang <Strawberry_Str@hotmail.com>\n---\n    Remove (_)UNICODE def on Windows in CMakeLists.txt\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1269%2FBerrysoft%2Fcmake%2Fwincompat-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1269/Berrysoft/cmake/wincompat-v1\nPull-Request: https://github.com/git/git/pull/1269\n\n contrib/buildsystems/CMakeLists.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 185f56f414f..d52d973ab0d 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -260,7 +260,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL \"Windows\")\n \t\t\t\t_CONSOLE DETECT_MSYS_TTY STRIP_EXTENSION=\".exe\"  NO_SYMLINK_HEAD UNRELIABLE_FSTAT\n \t\t\t\tNOGDI OBJECT_CREATION_MODE=1 __USE_MINGW_ANSI_STDIO=0\n \t\t\t\tUSE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP\n-\t\t\t\tUNICODE _UNICODE HAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)\n+\t\t\t\tHAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)\n \tlist(APPEND compat_SOURCES\n \t\tcompat/mingw.c\n \t\tcompat/winansi.c\n\nbase-commit: 7a3eb286977746bc09a5de7682df0e5a7085e17c\n-- \ngitgitgadget\n"},{"id":"455922","messageId":"nycvar.QRO.7.76.6.2205242046470.352@tvgsbejvaqbjf.bet","threadId":"57917","inReplyTo":"pull.1269.git.git.1653397021384.gitgitgadget@gmail.com","subject":"Re: [PATCH] Remove (_)UNICODE def on Windows in CMakeLists.txt","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2022-05-24T18:54:13Z","receivedAt":"2022-05-24T18:54:24Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 24 May 2022, Yuyi Wang via GitGitGadget wrote:\n\n> From: Yuyi Wang <Strawberry_Str@hotmail.com>\n>\n> `UNICODE` and `_UNICODE` are not required when building git on Windows.\n> Actually, they should not be predefined at all.\n>\n> There're 2 evidences that `(_)UNICODE` is supposed to be nonexist:\n>\n> compat/win32/trace2_win32_process_info.c:83: It uses jw_array_string\n> which accepts pe32.szExeFile as const char*.\n>\n> t/helper/test-drop-caches.c:16: Calling to GetCurrentDirectory with\n> Buffer as char*.\n>\n> The autotools build system never defines `UNICODE` and `_UNICODE` and\n> builds on Windows well.\n\nIt _is_ true that we make a point of using the `*W()` suffix explicitly to\nensure that we use the Unicode variants of the Win32 API functions.\n\nAnd it is also true that we do not explicitly define `UNICODE` in\n`config.mak.uname`.\n\nTherefore this patch is:\n\nAcked-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nCiao,\nDscho\n\nP.S.: Please note that the Git mailing list silently drops all mails from\n@hotmail.com addresses, as far as I remember. Therefore, if you reply, it\nmay never reach the list.\n\n>\n> Signed-off-by: Yuyi Wang <Strawberry_Str@hotmail.com>\n> ---\n>     Remove (_)UNICODE def on Windows in CMakeLists.txt\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1269%2FBerrysoft%2Fcmake%2Fwincompat-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1269/Berrysoft/cmake/wincompat-v1\n> Pull-Request: https://github.com/git/git/pull/1269\n>\n>  contrib/buildsystems/CMakeLists.txt | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\n> index 185f56f414f..d52d973ab0d 100644\n> --- a/contrib/buildsystems/CMakeLists.txt\n> +++ b/contrib/buildsystems/CMakeLists.txt\n> @@ -260,7 +260,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL \"Windows\")\n>  \t\t\t\t_CONSOLE DETECT_MSYS_TTY STRIP_EXTENSION=\".exe\"  NO_SYMLINK_HEAD UNRELIABLE_FSTAT\n>  \t\t\t\tNOGDI OBJECT_CREATION_MODE=1 __USE_MINGW_ANSI_STDIO=0\n>  \t\t\t\tUSE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP\n> -\t\t\t\tUNICODE _UNICODE HAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)\n> +\t\t\t\tHAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)\n>  \tlist(APPEND compat_SOURCES\n>  \t\tcompat/mingw.c\n>  \t\tcompat/winansi.c\n>\n> base-commit: 7a3eb286977746bc09a5de7682df0e5a7085e17c\n> --\n> gitgitgadget\n>\n>\n"},{"id":"455929","messageId":"OSYP286MB0262561439C0C7F0265A749FF8D79@OSYP286MB0262.JPNP286.PROD.OUTLOOK.COM","threadId":"57917","inReplyTo":"nycvar.QRO.7.76.6.2205242046470.352@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] Remove (_)UNICODE def on Windows in CMakeLists.txt","fromName":"Yuyi Wang","fromEmail":"strawberry_str@hotmail.com","sentAt":"2022-05-24T19:09:03Z","receivedAt":"2022-05-24T19:09:43Z","isPatch":true,"sender":{"key":"strawberry_str@hotmail.com","avatar":"https://avatars.githubusercontent.com/u/37586447?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n\n> P.S.: Please note that the Git mailing list silently drops all mails from\n> @hotmail.com addresses, as far as I remember. Therefore, if you reply, it\n> may never reach the list.\n\nThanks for your remind! However, it seems that my reply reaches the list\nsuccessfully with hotmail address.\n"},{"id":"456039","messageId":"nycvar.QRO.7.76.6.2205251216510.352@tvgsbejvaqbjf.bet","threadId":"57917","inReplyTo":"OSYP286MB0262561439C0C7F0265A749FF8D79@OSYP286MB0262.JPNP286.PROD.OUTLOOK.COM","subject":"Re: [PATCH] Remove (_)UNICODE def on Windows in CMakeLists.txt","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2022-05-25T10:17:41Z","receivedAt":"2022-05-25T10:17:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 25 May 2022, Yuyi Wang wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>\n> > P.S.: Please note that the Git mailing list silently drops all mails from\n> > @hotmail.com addresses, as far as I remember. Therefore, if you reply, it\n> > may never reach the list.\n>\n> Thanks for your remind! However, it seems that my reply reaches the list\n> successfully with hotmail address.\n\nOh, that's good news! I am glad that this was fixed.\n\nThanks,\nDscho\n"}]}