* grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use

_fullpath.
This commit is contained in:
Mario Limonciello 2011-09-29 10:36:55 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent cca7ccd8ff
commit c05de0329b
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-09-29 Mario Limonciello <mario_limonciello@dell.com>
* grub-core/kern/emu/misc.c (canonicalize_file_name) [__MINGW32__]: Use
_fullpath.
2011-09-29 Mario Limonciello <mario_limonciello@dell.com> 2011-09-29 Mario Limonciello <mario_limonciello@dell.com>
Remove extra declaration of sleep for mingw32. Remove extra declaration of sleep for mingw32.

View file

@ -224,7 +224,11 @@ char *
canonicalize_file_name (const char *path) canonicalize_file_name (const char *path)
{ {
char *ret; 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); ret = xmalloc (PATH_MAX);
if (!realpath (path, ret)) if (!realpath (path, ret))
return NULL; return NULL;