From c05de0329b198bed24e8b8e120877958d9a8cead Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Thu, 29 Sep 2011 10:36:55 +0200 Subject: [PATCH] * grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use _fullpath. --- ChangeLog | 5 +++++ grub-core/kern/emu/misc.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6e4aac746..bc5508d32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-29 Mario Limonciello + + * grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use + _fullpath. + 2011-09-29 Mario Limonciello Remove extra declaration of sleep for mingw32. diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c index 737f5f1a9..6f5ea9fb9 100644 --- a/grub-core/kern/emu/misc.c +++ b/grub-core/kern/emu/misc.c @@ -224,7 +224,11 @@ char * canonicalize_file_name (const char *path) { char *ret; -#ifdef PATH_MAX +#ifdef __MINGW32__ + ret = xmalloc (PATH_MAX); + if (!_fullpath (ret, path, PATH_MAX)) + return NULL; +#elif defined (PATH_MAX) ret = xmalloc (PATH_MAX); if (!realpath (path, ret)) return NULL;