+2013-12-14 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/osdep/windows/hostdisk.c: Fix cygwin compilation.
+
2013-12-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/osdep/windows/blocklist.c: Add missing cast in printf
#include <winioctl.h>
#include <wincrypt.h>
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>
+#endif
+
#if SIZEOF_TCHAR == 1
LPTSTR
TCHAR *ptr;
HCRYPTPROV hCryptProv;
grub_uint8_t rnd[5];
- const size_t sz = sizeof (rnd) * GRUB_CHAR_BIT / 5;
int i;
GetTempPath (ARRAY_SIZE (rt) - 100, rt);
#else
+void
+grub_util_file_sync (FILE *f)
+{
+ fflush (f);
+ if (!allow_fd_syncs)
+ return;
+ fsync (fileno (f));
+}
+
FILE *
grub_util_fopen (const char *path, const char *mode)
{
{
struct stat st;
- if (lstat (destnew, &st) == -1)
+ if (lstat (path, &st) == -1)
return 1;
return (!S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode));
}