Fix compile error on Windows. Don't use _waccess_s since it seems to be unavailable in MingW32.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2154 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2008-01-09 15:40:22 +00:00
parent 9f151a3c1c
commit 0f9433d088
3 changed files with 5 additions and 4 deletions

View File

@ -9,6 +9,9 @@
* src/msgwindow.c:
Add workaround for display problem in Message window:
Truncate displayed string at 1024 bytes if it is longer.
* src/utils.c, src/win32.v:
Fix compile error on Windows.
Don't use _waccess_s since it seems to be unavailable in MingW32.
2008-01-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -741,10 +741,9 @@ gint utils_is_file_writeable(const gchar *locale_filename)
ret = errno;
else
ret = 0;
#endif
g_free(file);
return ret;
#endif
}

View File

@ -561,7 +561,7 @@ gint win32_check_write_permission(const gchar *dir)
{
static wchar_t w_dir[512];
MultiByteToWideChar(CP_UTF8, 0, dir, -1, w_dir, sizeof w_dir);
if (_waccess_s(w_dir, R_OK | W_OK) != 0)
if (_waccess(w_dir, R_OK | W_OK) != 0)
return errno;
else
return 0;
@ -630,7 +630,6 @@ static void debug_setup_console()
fp = _fdopen(hConHandle, "w");
*stderr = *fp;
setvbuf(stderr, NULL, _IONBF, 0);
}