mosesdecoder/util/unistd.hh
Jeroen Vermeulen 8a3ae2fd5c Portability and include fixes.
Add <cstdlib> include for srand()/rand(), and <unistd.h> for open() etc.
Include <unistd.h> on Windows if using MinGW.  Disable MeteorScorer on
Windows, since it doesn't have fork() and pipe().
2015-04-10 12:54:34 +07:00

23 lines
330 B
C++

#ifndef UTIL_UNISTD_H
#define UTIL_UNISTD_H
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
// Windows doesn't define <unistd.h>
//
// So we define what we need here instead:
//
#define STDIN_FILENO=0
#define STDOUT_FILENO=1
#else // Huzzah for POSIX!
#include <unistd.h>
#endif
#endif // UTIL_UNISTD_H