File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 22
22
# pragma once
23
23
#endif
24
24
25
+ #include < boost/config.hpp>
26
+
25
27
# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \
26
28
!defined(_STLPORT_VERSION) && !defined(__QNX__)
27
29
/* */
28
30
# define BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS
31
+
32
+ #if defined(BOOST_MSVC) && BOOST_MSVC >= 1900
33
+ #define BOOST_IOSTREAMS_FPOSOFF (fp ) ((long long )(fp))
34
+ #else
35
+ #define BOOST_IOSTREAMS_FPOSOFF (fp ) _FPOSOFF(fp)
36
+ #endif
37
+
29
38
# endif
30
39
31
40
#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ inline stream_offset position_to_offset(std::streampos pos) { return pos; }
75
75
// Dinkumware version. The value of _Myoff cannot be extracted directly, but can
76
76
// be calculated as the difference between the result of converting the
77
77
// std::fpos to a std::streamoff and the result of converting the member _Fpos
78
- // to a long. The latter operation is accomplished with the macro _FPOSOFF,
78
+ // to a long. The latter operation is accomplished with the macro BOOST_IOSTREAMS_FPOSOFF,
79
79
// which works correctly on platforms where std::fpos_t is an integral type and
80
80
// platforms where it is a struct
81
81
@@ -85,7 +85,7 @@ inline stream_offset fpos_t_to_offset(std::fpos_t pos)
85
85
# if defined(_POSIX_) || (_INTEGRAL_MAX_BITS >= 64) || defined(__IBMCPP__)
86
86
return pos;
87
87
# else
88
- return _FPOSOFF (pos);
88
+ return BOOST_IOSTREAMS_FPOSOFF (pos);
89
89
# endif
90
90
}
91
91
@@ -104,7 +104,7 @@ inline stream_offset position_to_offset(std::streampos pos)
104
104
return fpos_t_to_offset (streampos_to_fpos_t (pos)) +
105
105
static_cast <stream_offset>(
106
106
static_cast <std::streamoff>(pos) -
107
- _FPOSOFF (streampos_to_fpos_t (pos))
107
+ BOOST_IOSTREAMS_FPOSOFF (streampos_to_fpos_t (pos))
108
108
);
109
109
}
110
110
You can’t perform that action at this time.
0 commit comments