Add a wrapper for fopen. On unix-like systems just pass-through. On

windows use unicode version.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-13 20:36:28 +02:00
parent ae5540d3d4
commit bb338aaf24
27 changed files with 97 additions and 41 deletions

View file

@ -101,7 +101,7 @@ grub_util_read_image (const char *path)
size = grub_util_get_image_size (path);
img = (char *) xmalloc (size);
fp = fopen (path, "rb");
fp = grub_util_fopen (path, "rb");
if (! fp)
grub_util_error (_("cannot open `%s': %s"), path,
strerror (errno));
@ -125,7 +125,7 @@ grub_util_load_image (const char *path, char *buf)
size = grub_util_get_image_size (path);
fp = fopen (path, "rb");
fp = grub_util_fopen (path, "rb");
if (! fp)
grub_util_error (_("cannot open `%s': %s"), path,
strerror (errno));