Boost logo

Boost :

Subject: Re: [boost] Boost should not be saying "_FPOSOFF"
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-09-19 08:18:40


On 9/2/2016 2:06 PM, Billy O'Neal (VC LIBS) wrote:
> Hello, Boost folks. :)
>
>
> I tried to remove this undocumented internal macro from our STL because we used it in only one place, but this broke Boost:
>
>
> #define _FPOSOFF(fp) ((long long)(fp))
>
>
> ...patience...
> ...found 722 targets...
> ...updating 18 targets...
> common.mkdir build\boost\bin.v2\libs
> common.mkdir build\boost\bin.v2\libs\iostreams
> common.mkdir build\boost\bin.v2\libs\iostreams\build
> common.mkdir build\boost\bin.v2\libs\iostreams\build\msvc-99
> common.mkdir build\boost\bin.v2\libs\iostreams\build\msvc-99\debug
> common.mkdir build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static
> common.mkdir build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi
> compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi\file_descriptor.obj
> file_descriptor.cpp
> d:\src\vc\wcfb01\qa\vc\FE\3rdpartycomp\boost_1_60_0\boost/iostreams/positioning.hpp(107): error C3861: '_FPOSOFF': identifier not found
> libs\iostreams\src\file_descriptor.cpp(265): warning C4244: 'argument': conversion from 'std::streamsize' to 'DWORD', possible loss of data
> libs\iostreams\src\file_descriptor.cpp(289): warning C4244: 'argument': conversion from 'std::streamsize' to 'DWORD', possible loss of data
>
> cl /Zm800 -nologo @"build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi\file_descriptor.obj.rsp"
>
> ...failed compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi\file_descriptor.obj...
> compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi\mapped_file.obj
> mapped_file.cpp
> d:\src\vc\wcfb01\qa\vc\FE\3rdpartycomp\boost_1_60_0\boost/iostreams/positioning.hpp(107): error C3861: '_FPOSOFF': identifier not found
> libs\iostreams\src\mapped_file.cpp(59): warning C4244: 'return': conversion from 'const boost::iostreams::stream_offset' to '::size_t', possible loss of data
> libs\iostreams\src\mapped_file.cpp(325): warning C4244: 'argument': conversion from 'boost::iostreams::stream_offset' to 'SIZE_T', possible loss of data
>
> cl /Zm800 -nologo @"build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi\mapped_file.obj.rsp"
>
> ...failed compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi\mapped_file.obj...
> ...skipped <pbuild\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi>libboost_iostreams-vc-mt-gd-1_60.lib for lack of <pbuild\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi>file_descriptor.obj...
> ...skipped <pstage\lib>libboost_iostreams-vc-mt-gd-1_60.lib for lack of <pbuild\boost\bin.v2\libs\iostreams\build\msvc-99\debug\link-static\threading-multi>libboost_iostreams-vc-mt-gd-1_60.lib...
> common.mkdir build\boost\bin.v2\libs\iostreams\build\msvc-99\release
> common.mkdir build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static
> common.mkdir build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi
> compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi\file_descriptor.obj
> file_descriptor.cpp
> .\boost/iostreams/positioning.hpp(107): error C3861: '_FPOSOFF': identifier not found
> libs\iostreams\src\file_descriptor.cpp(265): warning C4244: 'argument': conversion from 'std::streamsize' to 'DWORD', possible loss of data
> libs\iostreams\src\file_descriptor.cpp(289): warning C4244: 'argument': conversion from 'std::streamsize' to 'DWORD', possible loss of data
>
> cl /Zm800 -nologo @"build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi\file_descriptor.obj.rsp"
>
> ...failed compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi\file_descriptor.obj...
> compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi\mapped_file.obj
> mapped_file.cpp
> .\boost/iostreams/positioning.hpp(107): error C3861: '_FPOSOFF': identifier not found
> libs\iostreams\src\mapped_file.cpp(59): warning C4244: 'return': conversion from 'const boost::iostreams::stream_offset' to '::size_t', possible loss of data
> libs\iostreams\src\mapped_file.cpp(325): warning C4244: 'argument': conversion from 'boost::iostreams::stream_offset' to 'SIZE_T', possible loss of data
>
> cl /Zm800 -nologo @"build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi\mapped_file.obj.rsp"
>
> ...failed compile-c-c++ build\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi\mapped_file.obj...
> ...skipped <pbuild\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi>libboost_iostreams-vc-mt-1_60.lib for lack of <pbuild\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi>file_descriptor.obj...
> ...skipped <pstage\lib>libboost_iostreams-vc-mt-1_60.lib for lack of <pbuild\boost\bin.v2\libs\iostreams\build\msvc-99\release\link-static\threading-multi>libboost_iostreams-vc-mt-1_60.lib...
> ...failed updating 4 targets...
> ...skipped 4 targets...
> ...updated 10 targets...
> failed

I have pushed a fix for this on the 'develop' branch of iostreams. In
the fix basically iostreams uses _FPOSOFF for versions of VC++ prior to
VC++14 but uses '((long long)(fp))' for VC++14 on up.

This won't get in the upcoming release but it should get in the
subsequent Boost release.

>
>
> Billy3


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk