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

[7.5.0] java_launcher: Fix non-portable ofstream usage #24725

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/tools/launcher/java_launcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ wstring JavaBinaryLauncher::CreateClasspathJar(const wstring& classpath) {
wstring jar_manifest_file_path =
binary_base_path + rand_id + L".jar_manifest";
blaze_util::AddUncPrefixMaybe(&jar_manifest_file_path);
#if (__cplusplus >= 201703L)
wofstream jar_manifest_file(std::filesystem::path(jar_manifest_file_path));
#else
wofstream jar_manifest_file(jar_manifest_file_path);
#endif
jar_manifest_file << L"Manifest-Version: 1.0\n";
// No line in the MANIFEST.MF file may be longer than 72 bytes.
// A space prefix indicates the line is still the content of the last
Expand Down
Loading