summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-math.h6
-rw-r--r--source/core/stream.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/source/core/slang-math.h b/source/core/slang-math.h
index e57cc68ff..6d6b3e7a1 100644
--- a/source/core/slang-math.h
+++ b/source/core/slang-math.h
@@ -63,7 +63,7 @@ namespace Slang
return isinf(x);
}
- static inline unsigned int Ones32(register unsigned int x)
+ static inline unsigned int Ones32(unsigned int x)
{
/* 32-bit recursive reduction using SWAR...
but first step is mapping 2-bit values
@@ -77,7 +77,7 @@ namespace Slang
return(x & 0x0000003f);
}
- static inline unsigned int Log2Floor(register unsigned int x)
+ static inline unsigned int Log2Floor(unsigned int x)
{
x |= (x >> 1);
x |= (x >> 2);
@@ -87,7 +87,7 @@ namespace Slang
return(Ones32(x >> 1));
}
- static inline unsigned int Log2Ceil(register unsigned int x)
+ static inline unsigned int Log2Ceil(unsigned int x)
{
int y = (x & (x - 1));
y |= -y;
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);