Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation for PS4 libraries #129

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

pkierski
Copy link

This is a simple compatibility fix for PS4 standard libraries. They don't have Dinkumware-like fpos_t implementation. The minimal code to reproduce problem/check solution:

#include <boost/iostreams/categories.hpp>
#include <boost/iostreams/operations.hpp>

class SourceMock
{
public:
	using char_type = char;
	using category = boost::iostreams::source_tag;
	std::streamsize read(char* /*buffer*/, std::streamsize /*size*/) { return 0; }
};

void foo()
{
	SourceMock source;
	char buffer[42];
	boost::iostreams::read(source, buffer, sizeof(buffer));
}

Output without fix looks like:

1>In file included from foo.ccp:2:
1>In file included from C:\.conan\7fa4fb\1\include\boost/iostreams/operations.hpp:16:
1>In file included from C:\.conan\7fa4fb\1\include\boost/iostreams/close.hpp:19:
1>In file included from C:\.conan\7fa4fb\1\include\boost/iostreams/detail/adapter/non_blocking_adapter.hpp:13:
1>In file included from C:\.conan\7fa4fb\1\include\boost/iostreams/seek.hpp:23:
1>C:\.conan\7fa4fb\1\include\boost/iostreams/positioning.hpp(52,10): error : no matching constructor for initialization of 'std::streampos' (aka 'fpos<_Mbstatet>')
1>C:\Program Files (x86)\SCE\ORBIS SDKs\7.000\target\include\iosfwd(48,2): note: candidate constructor not viable: no known conversion from 'boost::iostreams::stream_offset' (aka 'long') to 'fpos_t' for 2nd argument
1>C:\Program Files (x86)\SCE\ORBIS SDKs\7.000\target\include\iosfwd(43,2): note: candidate constructor not viable: allows at most single argument '_Off', but 2 arguments were provided
1>C:\Program Files (x86)\SCE\ORBIS SDKs\7.000\target\include\iosfwd(38,8): note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
1>C:\Program Files (x86)\SCE\ORBIS SDKs\7.000\target\include\iosfwd(38,8): note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #129 (e30b6e2) into develop (f4ea3c9) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #129   +/-   ##
========================================
  Coverage    68.84%   68.84%           
========================================
  Files           80       80           
  Lines         3444     3444           
  Branches      1027     1027           
========================================
  Hits          2371     2371           
  Misses         454      454           
  Partials       619      619           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d2e763...e30b6e2. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant