From c1dfc39706c7781aeb0cc06a9223464793a33d73 Mon Sep 17 00:00:00 2001 From: Larry-Hu Date: Wed, 27 Jun 2018 21:21:31 -0700 Subject: [PATCH] Remove call to nonexistent member seekpos() of std::fpos in VS 2017 version 15.8 or later --- src/osgPlugins/osga/OSGA_Archive.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/osgPlugins/osga/OSGA_Archive.cpp b/src/osgPlugins/osga/OSGA_Archive.cpp index cc81adf34..b9f518a58 100644 --- a/src/osgPlugins/osga/OSGA_Archive.cpp +++ b/src/osgPlugins/osga/OSGA_Archive.cpp @@ -70,10 +70,12 @@ inline std::streampos STREAM_POS( const OSGA_Archive::pos_type pos ) inline OSGA_Archive::pos_type ARCHIVE_POS( const std::streampos & pos ) { -#if defined(_CPPLIB_VER)//newer Dinkumware(eg: one included with VC++ 2003,2005) - fpos_t position = pos.seekpos(); +#if (defined(_CPPLIB_VER) && defined(_MSC_VER) && _MSC_VER > 1914) // VC++ 2017 version 15.8 or later + fpos_t position = pos; +#elif (defined(_CPPLIB_VER) && defined(_MSC_VER)) // Dinkumware (eg: one included with VC++ 2003, 2005...) + fpos_t position = pos.seekpos(); #else // older Dinkumware (eg: one included in Win Server 2003 Platform SDK ) - fpos_t position = pos.get_fpos_t(); + fpos_t position = pos.get_fpos_t(); #endif std::streamoff offset = pos.operator std::streamoff( ) - _FPOSOFF( position );