From cda9c3b1a712715209a3f4ba155c1425898334cb Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 22 Oct 2018 07:45:09 -0700 Subject: Osx build fixes (#681) * Remove 'register' qualifiers. These will be illegal come c++17 and give a warning on OSX. * Add UNREACHABLE_RETURNs to silence compiler warnings. * Make FileStream::GetPosition() compile on OSX (w.r.t. the linux build, I believe that strictly-speaking, fpos64_t is specified as an opaque type and the cast to an Int64 is not necessarily well-defined.) * Avoid an inadvertent trigraph. --- source/core/stream.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/core/stream.cpp') diff --git a/source/core/stream.cpp b/source/core/stream.cpp index f78e5af83..b705b13a1 100644 --- a/source/core/stream.cpp +++ b/source/core/stream.cpp @@ -134,6 +134,8 @@ namespace Slang fpos_t pos; fgetpos(handle, &pos); return pos; +#elif defined(__APPLE__) + return ftell(handle); #else fpos64_t pos; fgetpos64(handle, &pos); -- cgit v1.2.3