summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author Justin Kerk <dopefishjustin@gmail.com>2019-08-08 14:23:12 +0000
committer Justin Kerk <dopefishjustin@gmail.com>2019-08-08 14:23:12 +0000
commit490709a6c1513da1365db30cd661c6b40a7fa008 (patch)
tree43bd36c739b2d386263fc5fd15971fe4056b591f /src/osd
parent2e2ee0ee6a5aeed9a3dc512797ad020c309a7f0d (diff)
Fix build in newer Emscripten versions (nw)
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/modules/file/posixdir.cpp2
-rw-r--r--src/osd/modules/file/posixfile.cpp6
-rw-r--r--src/osd/modules/file/posixptty.cpp2
-rw-r--r--src/osd/sdl/sdlprefix.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/osd/modules/file/posixdir.cpp b/src/osd/modules/file/posixdir.cpp
index be18239ebf5..2a755a513fe 100644
--- a/src/osd/modules/file/posixdir.cpp
+++ b/src/osd/modules/file/posixdir.cpp
@@ -68,7 +68,7 @@ constexpr char PATHSEPCH = '\\';
constexpr char PATHSEPCH = '/';
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(EMSCRIPTEN) || defined(__ANDROID__) || defined(WIN32) || defined(SDLMAME_NO64BITIO)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__) || defined(WIN32) || defined(SDLMAME_NO64BITIO)
using sdl_dirent = struct dirent;
using sdl_stat = struct stat;
#define sdl_readdir readdir
diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp
index 832b6810db4..8c78d28cbd5 100644
--- a/src/osd/modules/file/posixfile.cpp
+++ b/src/osd/modules/file/posixfile.cpp
@@ -93,7 +93,7 @@ public:
{
ssize_t result;
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(EMSCRIPTEN) || defined(__ANDROID__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__)
result = ::pread(m_fd, buffer, size_t(count), off_t(std::make_unsigned_t<off_t>(offset)));
#elif defined(WIN32) || defined(SDLMAME_NO64BITIO)
if (lseek(m_fd, off_t(std::make_unsigned_t<off_t>(offset)), SEEK_SET) < 0)
@@ -114,7 +114,7 @@ public:
{
ssize_t result;
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(EMSCRIPTEN) || defined(__ANDROID__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__)
result = ::pwrite(m_fd, buffer, size_t(count), off_t(std::make_unsigned_t<off_t>(offset)));
#elif defined(WIN32) || defined(SDLMAME_NO64BITIO)
if (lseek(m_fd, off_t(std::make_unsigned_t<off_t>(offset)), SEEK_SET) < 0)
@@ -135,7 +135,7 @@ public:
{
int result;
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(EMSCRIPTEN) || defined(WIN32) || defined(SDLMAME_NO64BITIO) || defined(__ANDROID__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(WIN32) || defined(SDLMAME_NO64BITIO) || defined(__ANDROID__)
result = ::ftruncate(m_fd, off_t(std::make_unsigned_t<off_t>(offset)));
#else
result = ::ftruncate64(m_fd, off64_t(offset));
diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp
index 4a4bc9d8db9..00aab42cf44 100644
--- a/src/osd/modules/file/posixptty.cpp
+++ b/src/osd/modules/file/posixptty.cpp
@@ -25,7 +25,7 @@
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
#include <termios.h>
#include <util.h>
-#elif defined(__linux__) || defined(EMSCRIPTEN)
+#elif defined(__linux__) || defined(__EMSCRIPTEN__)
#include <pty.h>
#elif defined(__HAIKU__)
#include <bsd/pty.h>
diff --git a/src/osd/sdl/sdlprefix.h b/src/osd/sdl/sdlprefix.h
index 79f6c81f4dd..0678b3ddba5 100644
--- a/src/osd/sdl/sdlprefix.h
+++ b/src/osd/sdl/sdlprefix.h
@@ -63,7 +63,7 @@
#define SDLMAME_NO64BITIO 1
#endif
-#if defined(EMSCRIPTEN)
+#if defined(__EMSCRIPTEN__)
#define SDLMAME_EMSCRIPTEN 1
#define SDLMAME_NO64BITIO 1
struct _IO_FILE {}; //_IO_FILE is an opaque type in the emscripten libc which makes clang cranky