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

@ -55,6 +55,10 @@
#include "progname.h"
#endif
#ifdef GRUB_BUILD
#define grub_util_fopen fopen
#endif
#define GRUB_FONT_DEFAULT_SIZE 16
#define GRUB_FONT_RANGE_BLOCK 1024
@ -785,7 +789,7 @@ write_font_pf2 (struct grub_font_info *font_info, char *output_file)
int offset;
struct grub_glyph_info *cur;
file = fopen (output_file, "wb");
file = grub_util_fopen (output_file, "wb");
if (! file)
grub_util_error (_("cannot write to `%s': %s"), output_file,
strerror (errno));