)]}'
{
  "commit": "fd242b3ae428b52e458a0fcc87917404038f6b51",
  "tree": "fc8f4c2e7e56463fb77c2f46a1d947685398305e",
  "parents": [
    "6bddd5f9f1e7e7c4a6057dfe79f2d32d8b34697f"
  ],
  "author": {
    "name": "Pali Rohár",
    "email": "pali.rohar@gmail.com",
    "time": "Sun Jun 02 14:59:03 2024 +0200"
  },
  "committer": {
    "name": "Martin Storsjö",
    "email": "martin@martin.st",
    "time": "Mon Jun 03 14:19:19 2024 +0300"
  },
  "message": "crt: crtdll.dll and msvcrt10.dll: Fix linking of the WinMain() function\n\nWinMain() entry point provided by the application is called by mingw-w64\nstartup code, more precisely by function main() from crtexewin.c file.\n\nmingw-w64 startup code in file crtexewin.c calls _ismbblead() function.\nFunction _ismbblead() is not available in some versions of crtdll.dll\nand is completely missing in msvcrt10.dll library.\n\nVersion of crtdll.dll library stored in its PE resource directory is not\nmeaningful as two different libraries, one with _ismbblead symbol and one\nwithout _ismbblead symbol has same version.\n\nSeems that there are MBCS aware crtdll.dll versions with _ismbblead symbol\nand versions which are not MBCS aware without _ismbblead symbol.\n\nAll checked msvcrt10.dll files do not have _ismbblead symbols, so\nmsvcrt10.dll is not MBCS awre.\n\nFor msvcrt10.dll import library provides simple dummy _ismbblead() function\nwhich always returns false to satisfy mingw-w64 startup file crtexewin.c.\n\nFor crtdll.dll import library provides _ismbblead() wrapper function and\ndisable the real function in the def file to prevent symbol conflicts. The\nwrapper function via GetProcAddress() checks if the real crtdll.dll\nprovides _ismbblead() function. If real function exists then it is called.\nIf not then wrapper function returns false like the msvcrt10.dll one.\n\nThis fixes linking WinMain() entry point with msvcrt10.dll.\n\n  ld: /usr/local/lib/libmingw32.a(lib32_libmingw32_a-crtexewin.o): in function `main\u0027:\n  mingw-w64/mingw-w64-crt/crt/crtexewin.c:43: undefined reference to `_ismbblead\u0027\n  collect2: error: ld returned 1 exit status\n\nAnd fixes runtime error about missing _ismbblead symbol with some versions of crtdll.dll.\n\n  Entry Point Not Found\n  The procedure entry point _ismbblead could not be located in the\n  dynamic link library CRTDLL.dll.\n\nSigned-off-by: Martin Storsjö \u003cmartin@martin.st\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "21fc94605207280666c1a8e62c8af56f8f1bb882",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/Makefile.am",
      "new_id": "6b9f5f7b0f770397968a6f6139c493e4af39914f",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/Makefile.am"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4854c43bf20d89e13c1fd813da97fe8052c16ec3",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/crt/crtdll_ismbblead.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e38fe439d1c2f34a8814354cd3ae5f9e9a7a9da8",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/crt/msvcrt10_ismbblead.c"
    },
    {
      "type": "modify",
      "old_id": "57e722b9d22a8284289527c670600d12779051cc",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/lib32/crtdll.def.in",
      "new_id": "068a285ccebd06f131e267f31bde2777adcd8e42",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/lib32/crtdll.def.in"
    }
  ]
}
