diff options
| author | ruki <[email protected]> | 2023-01-19 23:10:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-19 23:10:59 +0800 |
| commit | 17978855ebb374e21593129b52d3266db7715eb5 (patch) | |
| tree | 53007c261308d814fe0e71cb59a4fb3a5899ce4c /core/src/xmake | |
| parent | ee77e47e83627f067653515c711398f76f13cee8 (diff) | |
improve syserror
Diffstat (limited to 'core/src/xmake')
| -rw-r--r-- | core/src/xmake/os/strerror.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/os/syserror.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/src/xmake/os/strerror.c b/core/src/xmake/os/strerror.c index 09663daff..7f0b5e3bb 100644 --- a/core/src/xmake/os/strerror.c +++ b/core/src/xmake/os/strerror.c @@ -52,9 +52,11 @@ tb_int_t xm_os_strerror(lua_State* lua) case TB_STATE_SYSERROR_NOT_PERM: strerr = "Permission denied"; break; +#if ((TB_VERSION_MAJOR * 100) + (TB_VERSION_MINOR * 10) + TB_VERSION_ALTER) >= 173 case TB_STATE_SYSERROR_NOT_ACCESS: strerr = "Not access because it is busy"; break; +#endif case TB_STATE_SYSERROR_NOT_FILEDIR: strerr = "No such file or directory"; break; diff --git a/core/src/xmake/os/syserror.c b/core/src/xmake/os/syserror.c index 1ab6afb23..0aded427f 100644 --- a/core/src/xmake/os/syserror.c +++ b/core/src/xmake/os/syserror.c @@ -45,7 +45,9 @@ tb_int_t xm_os_syserror(lua_State* lua) { case TB_STATE_SYSERROR_NOT_PERM: err = 1; break; case TB_STATE_SYSERROR_NOT_FILEDIR: err = 2; break; +#if ((TB_VERSION_MAJOR * 100) + (TB_VERSION_MINOR * 10) + TB_VERSION_ALTER) >= 173 case TB_STATE_SYSERROR_NOT_ACCESS: err = 3; break; +#endif case TB_STATE_SYSERROR_UNKNOWN_ERROR: err = -1; break; } lua_pushinteger(lua, err); |
