Merge branch 'fix-fileutils-test-windows' into 'master'

glib/tests/fileutils.c: Fix stdio Wrapper Test on Windows

See merge request GNOME/glib!931
This commit is contained in:
Philip Withnall
2019-06-19 08:44:39 +00:00

View File

@@ -37,6 +37,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <utime.h> #include <utime.h>
#define G_TEST_DIR_MODE 0555
#endif #endif
#include <fcntl.h> #include <fcntl.h>
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
@@ -49,6 +51,8 @@
#ifndef F_OK #ifndef F_OK
#define F_OK 0 #define F_OK 0
#endif #endif
#define G_TEST_DIR_MODE (S_IWRITE | S_IREAD)
#endif #endif
#define S G_DIR_SEPARATOR_S #define S G_DIR_SEPARATOR_S
@@ -936,7 +940,7 @@ test_stdio_wrappers (void)
g_free (cwd); g_free (cwd);
g_free (path); g_free (path);
ret = g_creat ("test-creat", 0555); ret = g_creat ("test-creat", G_TEST_DIR_MODE);
g_close (ret, &error); g_close (ret, &error);
g_assert_no_error (error); g_assert_no_error (error);