{
n = wstat_symlink_aware(wp, (struct _stat *)stp);
vim_free(wp);
- if (n >= 0)
+ if (n >= 0 || g_PlatformId == VER_PLATFORM_WIN32_NT)
return n;
/* Retry with non-wide function (for Windows 98). Can't use
* GetLastError() here and it's unclear what errno gets set to if
{
n = _wchdir(p);
vim_free(p);
- if (n == 0)
- return 0;
+ if (n == 0 || g_PlatformId == VER_PLATFORM_WIN32_NT)
+ return n;
/* Retry with non-wide function (for Windows 98). */
}
}
shortcut_errorw:
vim_free(p);
- if (hr == S_OK)
- goto shortcut_end;
+ goto shortcut_end;
}
}
/* Retry with non-wide function (for Windows 98). */
return OK;
}
}
+ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+ return FAIL;
/* Retry with non-wide function (for Windows 98). */
}
#endif
return;
}
}
+ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+ return;
/* Retry with non-wide function (for Windows 98). */
}
#endif
return OK;
}
}
+ else if (GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+ return FAIL;
/* Retry with non-wide function (for Windows 98). */
}
#endif
{
n = _wchmod(p, perm);
vim_free(p);
- if (n == -1 && GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
+ if (n == -1 && g_PlatformId == VER_PLATFORM_WIN32_NT)
return FAIL;
/* Retry with non-wide function (for Windows 98). */
}
{
f = _wopen(wn, flags, mode);
vim_free(wn);
- if (f >= 0)
+ if (f >= 0 || g_PlatformId == VER_PLATFORM_WIN32_NT)
return f;
/* Retry with non-wide function (for Windows 98). Can't use
* GetLastError() here and it's unclear what errno gets set to if
_set_fmode(oldMode);
# endif
- if (f != NULL)
+ if (f != NULL || g_PlatformId == VER_PLATFORM_WIN32_NT)
return f;
/* Retry with non-wide function (for Windows 98). Can't use
* GetLastError() here and it's unclear what errno gets set to if