mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-02 04:39:35 +00:00
Fix compilation errors on MSVC. Patch by Argiris Kirtzidis!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
247faffb32
commit
a442006f48
@ -29,6 +29,7 @@
|
|||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#else
|
#else
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -175,7 +176,7 @@ MemoryBuffer *MemoryBuffer::getFile(const char *Filename, std::string *ErrStr,
|
|||||||
int64_t FileSize) {
|
int64_t FileSize) {
|
||||||
int OpenFlags = 0;
|
int OpenFlags = 0;
|
||||||
#ifdef O_BINARY
|
#ifdef O_BINARY
|
||||||
Flags |= O_BINARY; // Open input file in binary mode on win32.
|
OpenFlags |= O_BINARY; // Open input file in binary mode on win32.
|
||||||
#endif
|
#endif
|
||||||
int FD = ::open(Filename, O_RDONLY|OpenFlags);
|
int FD = ::open(Filename, O_RDONLY|OpenFlags);
|
||||||
if (FD == -1) {
|
if (FD == -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user