)]}'
{
  "commit": "fc934554263ce9de070f7691129e7f1fbf15ca4a",
  "tree": "e9adf8af6d643cf3782ba2777591b2a954cdecd2",
  "parents": [
    "d6c41f9c9258ec893c4fb73f6cfa52841ce23363"
  ],
  "author": {
    "name": "Pali Rohár",
    "email": "pali.rohar@gmail.com",
    "time": "Fri Dec 19 17:38:13 2025 +0100"
  },
  "committer": {
    "name": "LIU Hao",
    "email": "lh_mouse@126.com",
    "time": "Sun Feb 15 16:19:38 2026 +0800"
  },
  "message": "crt: Fix fstat() to signal overflow and return correct type for directories\n\nmsvcrt _fstat function is broken and for directory fd it returns S_ISREG\ntype. 32-bit pre-msvcr110 _fstat does not properly signal size overflow.\nUCRT seems to work correctly.\n\nAdd mingw-w64 fstat wrappers around msvcrt _fstat functions which change\nS_IFMT to S_IFDIR if winapi filehandle has FILE_ATTRIBUTE_DIRECTORY\nattribute set. Provide wrapper for all 4 fstat size_t/time_t variants.\nFor 32-bit pre-msvcr110 builds, adds similar workaround like for existing\nmingw-w64 stat functions.\n\nCurrently our mingw-w64 header files defines non-underscore fstat and\nfstat64 functions as __MINGW_ASM_CALL redirects to underscore _fstat32,\n_fstat32i64, _fstat64i32, _fstat64 functions based on _FILE_OFFSET_BITS and\n_TIME_BITS macros. So every one of these 4 functions needs its own fixup\nwrapper. This change introduce 4 new non-underscore symbols fstat32,\nfstat32i64, fstat64i32, fstat64 which provides necessary fixup and to which\nmingw-w64 sys/stat.h header file redirects existing fstat and fstat64\nfunctions. UCRT does not need any fixup, so new symbols are added as\naliases in def files.\n\nCo-authored-by: LIU Hao \u003clh_mouse@126.com\u003e\nSigned-off-by: LIU Hao \u003clh_mouse@126.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e10cfe12efdeffc1f32ad22744607e9eed698b2b",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/Makefile.am",
      "new_id": "c266b332cc36fceffd875d03726d36e48558c813",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/Makefile.am"
    },
    {
      "type": "modify",
      "old_id": "8f9ee2e09c4695edace2ef5489d524fb83a75ed4",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/def-include/crt-aliases.def.in",
      "new_id": "2b88b699c0fc5d1c150c6d3eb04dae98275fd24a",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/def-include/crt-aliases.def.in"
    },
    {
      "type": "modify",
      "old_id": "a0665a3a3d3112ae808b50bf7d9ef57d039df6bc",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def.in",
      "new_id": "bdaa9bcd8dc5cb45cdfe08e34ffb24b11ebe2ba0",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/lib-common/api-ms-win-crt-filesystem-l1-1-0.def.in"
    },
    {
      "type": "modify",
      "old_id": "500d076e41cba1c08da382650417c88b64e2479d",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/lib-common/msvcrt.def.in",
      "new_id": "0a76606e555556449658be39b620e66183bc30f5",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/lib-common/msvcrt.def.in"
    },
    {
      "type": "modify",
      "old_id": "2fe5b1e9c34202f3d4876027af4229f9c72a2c44",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/misc/crtdll_fstat.c",
      "new_id": "5441e322f38c31f3204e0dd144ed981163badc1d",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/misc/crtdll_fstat.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "724b9607657d255b3bd6de6a784e8324f7c68e0e",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/__mingw_fix_fstat_finish.c"
    },
    {
      "type": "modify",
      "old_id": "909606204b4d4fd39a96feb099621509ab930090",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/__mingw_fix_stat.h",
      "new_id": "1317dbffe2e8e0c6f95321859eaa07ac29dbace7",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/__mingw_fix_stat.h"
    },
    {
      "type": "modify",
      "old_id": "28c5d73c1f55e5968931cf34a89f1557094a620f",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/_fstat64.c",
      "new_id": "9386dd909c71b8927a491d0d197e2aa75c60be36",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/_fstat64.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8ba257de481a37f68168fa9638519a3a285c0622",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/fstat32i64.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "442409c34dd660f8023524a9218fd040c11ab0c6",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/fstat64.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "dfc57b2c425368fe3d6701bb2532c47d2bf0ccee",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110plus_fstat32.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7b1482818c04a9075c7b1400da016fba85894df4",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110plus_fstat64i32.c"
    },
    {
      "type": "modify",
      "old_id": "c31527fb1914a113f12313688c3024e000552c89",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110plus_stat32.c",
      "new_id": "f936ef9fc90810296c46dce54756aa26c0cea5c9",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110plus_stat32.c"
    },
    {
      "type": "modify",
      "old_id": "7df90a00178ddd466594c1f82acc8613bbba70d6",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110plus_stat64i32.c",
      "new_id": "89c3e050dda00f93a60297daf25f1eaaffb0d3dc",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110plus_stat64i32.c"
    },
    {
      "type": "modify",
      "old_id": "15f55cd8b9bd08bd77aa0d75b6e838167940b9a1",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110plus_wstat32.c",
      "new_id": "50e183cfb9ab50935095432648cb06ddd730ecf4",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110plus_wstat32.c"
    },
    {
      "type": "modify",
      "old_id": "c2f1e32cf33656477e01a6029a16708e0b245a48",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110plus_wstat64i32.c",
      "new_id": "caf5ca79719a20e733008613de64cb8fb1516088",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110plus_wstat64i32.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "cbc6dbbddae9287743b8aa55292bccfaec1c70fc",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110pre_fstat32.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "6ca74be64d966fc7dbc57f8470bd5df32fb52634",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110pre_fstat64i32.c"
    },
    {
      "type": "modify",
      "old_id": "0d58f7b17b360bd3ffd37f118d29cd90e7624001",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110pre_stat32.c",
      "new_id": "196c2de4f0cbba634b073877104e041e7c0b6123",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110pre_stat32.c"
    },
    {
      "type": "modify",
      "old_id": "b2b037aea0c1a3d374dd39cb5b78b0fb1c19ba72",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110pre_stat64i32.c",
      "new_id": "2a6cc9afd79d6717c2e23e529de1e31237cf2428",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110pre_stat64i32.c"
    },
    {
      "type": "modify",
      "old_id": "b4af68e2be727133a4e56a093c66f03f0ac37746",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110pre_wstat32.c",
      "new_id": "b9848ffff1d0b455c04268c36f087747f6fa0927",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110pre_wstat32.c"
    },
    {
      "type": "modify",
      "old_id": "9a5561203cd07fe078493c18af3a3b3fcf2bd6bb",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c",
      "new_id": "a7611bfe0c11ee3a1893cdc6e3328d548cf34ab6",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c"
    },
    {
      "type": "modify",
      "old_id": "0e85bd57d39f350e74c167fdc09df8cd4b8fbe49",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/testcases/t_fstat.c",
      "new_id": "0622b9e4ad5c3a93cb76565c344730b87df301fe",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/testcases/t_fstat.c"
    },
    {
      "type": "modify",
      "old_id": "5d2e6dfaf0316f82427a9d924832a75b378afdf4",
      "old_mode": 33188,
      "old_path": "mingw-w64-headers/crt/sys/stat.h",
      "new_id": "347f66eef77b92316548a5b64aa826269597ebb1",
      "new_mode": 33188,
      "new_path": "mingw-w64-headers/crt/sys/stat.h"
    }
  ]
}
