Files
MINGW-packages/mingw-w64-openshadinglanguage/0008-openimageio-api-changes.patch
2019-07-31 16:00:38 +03:00

51 lines
2.4 KiB
Diff

--- OpenShadingLanguage-Release-1.8.9/src/liboslcomp/oslcomp.cpp.orig 2017-05-31 08:14:33.000000000 +0300
+++ OpenShadingLanguage-Release-1.8.9/src/liboslcomp/oslcomp.cpp 2017-06-19 11:08:15.725143800 +0300
@@ -159,8 +159,8 @@
std::string &result)
{
// Read file contents into a string
- std::ifstream instream;
- OIIO::Filesystem::open(instream, filename);
+ OIIO::ifstream instream;
+ OIIO::Filesystem::open(instream, OIIO::string_view(filename.c_str()));
if (! instream.is_open()) {
error (ustring(filename), 0, "Could not open \"%s\"\n", filename.c_str());
return false;
@@ -590,8 +590,8 @@
if (m_output_filename.size() == 0)
m_output_filename = default_output_filename ();
- std::ofstream oso_output;
- OIIO::Filesystem::open (oso_output, m_output_filename);
+ OIIO::ofstream oso_output;
+ OIIO::Filesystem::open (oso_output, OIIO::string_view(m_output_filename.c_str()));
if (! oso_output.good()) {
error (ustring(), 0, "Could not open \"%s\"",
m_output_filename.c_str());
--- OpenShadingLanguage-Release-1.8.9/src/liboslexec/shadingsys.cpp.orig 2017-05-31 08:14:33.000000000 +0300
+++ OpenShadingLanguage-Release-1.8.9/src/liboslexec/shadingsys.cpp 2017-06-19 11:10:14.683198900 +0300
@@ -2912,8 +2916,8 @@
bool ok = true;
std::string groupfilename = tmpdir + "/shadergroup";
- std::ofstream groupfile;
- OIIO::Filesystem::open(groupfile, groupfilename);
+ OIIO::ofstream groupfile;
+ OIIO::Filesystem::open(groupfile, OIIO::string_view(groupfilename.c_str()));
if (groupfile.good()) {
groupfile << group->serialize();
groupfile.close ();
--- OpenShadingLanguage-Release-1.10.2/src/oslc/oslcmain.cpp.orig 2018-12-06 11:43:43.386845000 +0300
+++ OpenShadingLanguage-Release-1.10.2/src/oslc/oslcmain.cpp 2018-12-06 11:46:16.962062000 +0300
@@ -183,8 +183,8 @@
ok = compiler.compile_buffer (sourcecode, osobuffer, args, "",
shader_path);
if (ok) {
- std::ofstream file;
- OIIO::Filesystem::open (file, compiler.output_filename());
+ OIIO::ofstream file;
+ OIIO::Filesystem::open (file, OIIO::string_view(compiler.output_filename().c_str()));
if (file.good()) {
file << osobuffer;
file.close ();