mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
tweaks for windows compile
This commit is contained in:
parent
463b29c4e8
commit
86533709d4
@ -6,6 +6,8 @@
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
template <typename T>
|
||||
size_t write(const T* ptr, size_t num = 1) {
|
||||
this->write((char*)ptr, num * sizeof(T));
|
||||
std::ostream::write((char*)ptr, num * sizeof(T));
|
||||
// fail() seems to be correct here. Failure to write should abort.
|
||||
ABORT_IF(fail(), "Error writing to file '{}'", file_.string());
|
||||
return num * sizeof(T);
|
||||
|
Loading…
Reference in New Issue
Block a user