Implement a filelength function for GCC.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1847 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
bbahnsen
2006-10-26 18:14:11 +00:00
parent cbee1e7407
commit fec7633848
3 changed files with 12 additions and 8 deletions

View File

@@ -1617,15 +1617,7 @@ Returns:
//
// Get the file size
//
#ifdef __GNUC__
{
struct stat stat_buf;
fstat(fileno(NewFile), &stat_buf);
FileSize = stat_buf.st_size;
}
#else
FileSize = _filelength (fileno (NewFile));
#endif
//
// Read the file into a buffer