)]}'
{
  "commit": "1ec7fa221644b6d02a617a47f6e80f5069cdc893",
  "tree": "5c089acf6c5678afcafc2473274a8131a7a48c64",
  "parents": [
    "2ec078517ab136c15c6e4c8e3363b39093d58c7d"
  ],
  "author": {
    "name": "LIU Hao",
    "email": "lh_mouse@126.com",
    "time": "Wed Feb 28 23:03:58 2024 +0800"
  },
  "committer": {
    "name": "LIU Hao",
    "email": "lh_mouse@126.com",
    "time": "Sun Mar 03 14:39:47 2024 +0800"
  },
  "message": "headers: Move some macros about deprecated functions from \u0027strsafe.h\u0027 into \u0027dontuse.h\u0027\n\nSince Windows SDK 8.0, `STRSAFE_NO_DEPRECATE` no longer has an effect. It\u0027s\nstill defined by some headers, but the check in \u0027strsafe.h\u0027 has been removed.\nThose macros that match POSIX names have been moved to \u0027dontuse.h\u0027, so we do\nthe same.\n\nPreviously, inclusion of \u003cstrsafe.h\u003e before \u003cwindows.h\u003e could cause errors like\n\n   In file included from C:/msys64/mingw64/include/windows.h:70,\n                    from test.c:2:\n   C:/msys64/mingw64/include/winbase.h:1499:37: error: expected identifier or \u0027(\u0027 before \u0027LPSTR\u0027\n    1499 |   WINBASEAPI LPSTR WINAPI lstrcpyA (LPSTR lpString1, LPCSTR lpString2);\n         |                                     ^~~~~\n\nbecause the semicolon in the macro `lstrcpyA` affects not only invocations, but\nalso declarations. Those semicolons have been removed since Windows SDK 8.0, so\nwe remove them as well. This allows including \u0027strsafe.h\u0027 before \u0027windows.h\u0027.\n\nThe macro `DEPRECATE_SUPPORTED` controls how deprecated functions are to be\ndeprecated. In Microsoft headers, existence of it deprecates those functions\nwith `#pragma deprecated`, and absense of it exposes macros which rename them\nto non-existent ones, so any use of them results in errors such as\n\n   ccYRG0RL.o:test.c:(.text+0x1c): undefined reference to `strcpy_instead_use_StringCbCopyA_or_StringCchCopyA\u0027\n   collect2.exe: error: ld returned 1 exit status\n\nTo match the behavior of Windows SDK, we define those renaming macros only if\n`DEPRECATE_SUPPORTED` isn\u0027t defined, like in \u0027pathcch.h\u0027. Unfortunately, GCC\ndoes not support `#pragma deprecated`, so no warning will be issued if\n`DEPRECATE_SUPPORTED` is defined by including \u0027winnt.h\u0027 or \u0027windows.h\u0027 before\n\u0027strsafe.h\u0027. This may be improved in the future.\n\nReported-by: Julian Waters \u003ctanksherman27@gmail.com\u003e\nSigned-off-by: LIU Hao \u003clh_mouse@126.com\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ac6497c95b25cd1b67a44fef2f17300e4da05ff0",
      "new_mode": 33188,
      "new_path": "mingw-w64-headers/include/dontuse.h"
    },
    {
      "type": "modify",
      "old_id": "173c1ea035daf72cf1e7cf9845ee810084184295",
      "old_mode": 33188,
      "old_path": "mingw-w64-headers/include/strsafe.h",
      "new_id": "5923612c9e961f3aa0b698358bbb2a2a5a33a732",
      "new_mode": 33188,
      "new_path": "mingw-w64-headers/include/strsafe.h"
    }
  ]
}
