summaryrefslogtreecommitdiffstats
path: root/source/core/stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/stream.cpp')
-rw-r--r--source/core/stream.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/core/stream.cpp b/source/core/stream.cpp
index b705b13a1..949ce718c 100644
--- a/source/core/stream.cpp
+++ b/source/core/stream.cpp
@@ -91,9 +91,9 @@ namespace Slang
default:
break;
}
- int shFlag;
#ifdef _WIN32
- switch (share)
+ int shFlag = _SH_DENYRW;
+ switch (share)
{
case Slang::FileShare::None:
shFlag = _SH_DENYRW;
@@ -130,13 +130,13 @@ namespace Slang
}
Int64 FileStream::GetPosition()
{
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
fpos_t pos;
fgetpos(handle, &pos);
return pos;
#elif defined(__APPLE__)
return ftell(handle);
-#else
+#else
fpos64_t pos;
fgetpos64(handle, &pos);
return *(Int64*)(&pos);