mirror of
https://github.com/corda/corda.git
synced 2025-02-10 12:51:37 +00:00
fix embed.cpp build for 64-bit Windows
This commit is contained in:
parent
36eee724c9
commit
844520a402
@ -17,8 +17,14 @@
|
||||
|
||||
#include "embed.h"
|
||||
|
||||
extern "C" const uint8_t binary_loader_start[];
|
||||
extern "C" const uint8_t binary_loader_end[];
|
||||
#ifdef __x86_64__
|
||||
# define BINARY_LOADER(x) _binary_loader_##x
|
||||
#else
|
||||
# define BINARY_LOADER(x) binary_loader_##x
|
||||
#endif
|
||||
|
||||
extern "C" const uint8_t BINARY_LOADER(start)[];
|
||||
extern "C" const uint8_t BINARY_LOADER(end)[];
|
||||
|
||||
__declspec(noreturn)
|
||||
void printUsage(const wchar_t* executableName)
|
||||
@ -31,8 +37,8 @@ void writeDestinationFile(const wchar_t* filename)
|
||||
{
|
||||
if(FILE* file = _wfopen(filename, L"wb"))
|
||||
{
|
||||
size_t count = binary_loader_end - binary_loader_start;
|
||||
if(count == fwrite(binary_loader_start, sizeof(binary_loader_start[0]), count, file))
|
||||
size_t count = BINARY_LOADER(end) - BINARY_LOADER(start);
|
||||
if(count == fwrite(BINARY_LOADER(start), sizeof(BINARY_LOADER(start)[0]), count, file))
|
||||
{
|
||||
fclose(file);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user