fixes needed for MSVC (VS2013) compilation
Brought to you by:
noxorc
The following patch is needed to allow compilation of the library using Microsoft Visual Studio. Please see the patch comment for details of the errors and warnings addressed.
An example of the gnu-efi library, being used as a git submodule for the compilation and testing of UEFI applications, can be found at https://github.com/pbatard/uefi-simple
I would greatly appreciate if this could be applied to gnu-efi as it would make developing UEFI applications using gratis tools, such as Visual Studio 2013 Community Edition, a lot more simpler and user friendly on Windows.
Thanks.
I will start to review your patch.
Thanks.
Since I have moved to using gnu-efi + Visual Studio to build EFI drivers (https://github.com/pbatard/efifs), and found the need for additional changes, please find an updated version of the patch.
The redefinition of EFI_DRIVER_ENTRY_POINT(), which was added for all intel architectures, is needed because the existing definition uses attribute() which is a pure GNU extension, and I think it makes more sense to use the /ENTRY option of the MSVC linker to specify the entry point.
I also replaced _MSC_VER -> _MSC_EXTENSIONS in previous sections, to be consistent with the rest of gnu-efi. I also checked that the MSVC compiler seems to be happy mixing 64 and 32 bit operands for shift/mult/div, when compiling 32 bit code (math.c _asm calls removal).
Hello Pete,
I have reviewed, tested and released your patch. (git, download).
Version 3.0.1.