]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/seekable.h
Use #ifdef _WIN32 rather than WIN32
[libs/core.git] / source / io / seekable.h
index 9522311f55b32ae2f75bd2f62f9e233a3f28a6fd..f0170b40f5af126de2c641431d7a2033cc1f1415 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MSP_IO_SEEKABLE_H_
 #define MSP_IO_SEEKABLE_H_
 
+#include <stdexcept>
+#include <msp/core/inttypes.h>
 #include "base.h"
 
 namespace Msp {
@@ -8,11 +10,7 @@ namespace IO {
 
 class Handle;
 
-#ifdef MSVC
-typedef __int64 SeekOffset;
-#else
-typedef long long SeekOffset;
-#endif
+typedef Int64 SeekOffset;
 
 enum SeekType
 {
@@ -22,6 +20,14 @@ enum SeekType
 };
 
 
+class bad_seek: public std::runtime_error
+{
+public:
+       bad_seek(SeekOffset, SeekType);
+       virtual ~bad_seek() throw() { }
+};
+
+
 class Seekable: public Base
 {
 protected: