From 8e3faf41966f95cd986e9c77ca7a0da8c3231045 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 17 Dec 2020 15:09:43 -0500
Subject: [PATCH] Revert "Various small format cleanups"

This reverts commit b659eb256e645d46a6f7194ce2e5bcb99c890357.
---
 indra/llinventory/llinventory.cpp   |  5 +++--
 indra/llinventory/llpermissions.cpp | 16 +++++++++++-----
 indra/llmessage/net.cpp             |  4 ++--
 indra/llrender/llshadermgr.cpp      |  6 +++++-
 4 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 63fb034b6c5..7bc6c507a95 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -779,8 +779,9 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
 	const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
 	if(!inv_type_str.empty()) 
 		output_stream << "\t\tinv_type\t" << inv_type_str << "\n";
-
-	output_stream << absl::StreamFormat("\t\tflags\t%08x\n", mFlags);
+	std::string buffer;
+	buffer = llformat( "\t\tflags\t%08x\n", mFlags);
+	output_stream << buffer;
 	mSaleInfo.exportLegacyStream(output_stream);
 	output_stream << "\t\tname\t" << mName.c_str() << "|\n";
 	output_stream << "\t\tdesc\t" << mDescription.c_str() << "|\n";
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index 43b76e17e7c..0359d2f554c 100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
@@ -672,11 +672,17 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
 	output_stream <<  "\tpermissions 0\n";
 	output_stream <<  "\t{\n";
 
-	output_stream << absl::StreamFormat("\t\tbase_mask\t%08x\n", mMaskBase);
-	output_stream << absl::StreamFormat("\t\towner_mask\t%08x\n", mMaskOwner);
-	output_stream << absl::StreamFormat("\t\tgroup_mask\t%08x\n", mMaskGroup);
-	output_stream << absl::StreamFormat("\t\teveryone_mask\t%08x\n", mMaskEveryone);
-	output_stream << absl::StreamFormat("\t\tnext_owner_mask\t%08x\n", mMaskNextOwner);
+	std::string buffer;
+	buffer = llformat( "\t\tbase_mask\t%08x\n",		mMaskBase);
+	output_stream << buffer;
+	buffer = llformat( "\t\towner_mask\t%08x\n",		mMaskOwner);
+	output_stream << buffer;
+	buffer = llformat( "\t\tgroup_mask\t%08x\n",		mMaskGroup);
+	output_stream << buffer;
+	buffer = llformat( "\t\teveryone_mask\t%08x\n",	mMaskEveryone);
+	output_stream << buffer;
+	buffer = llformat( "\t\tnext_owner_mask\t%08x\n",	mMaskNextOwner);
+	output_stream << buffer;
 
 	mCreator.toString(uuid_str);
 	output_stream <<  "\t\tcreator_id\t" << uuid_str << "\n";
diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp
index e84fef5fdb1..e7b4e40f5b0 100644
--- a/indra/llmessage/net.cpp
+++ b/indra/llmessage/net.cpp
@@ -275,8 +275,8 @@ S32 start_net(S32& socket_out, int& nPort)
 	nRet = ioctlsocket (hSocket, FIONBIO, &argp);
 	if (nRet == SOCKET_ERROR) 
 	{
-		LL_WARNS("AppInit") << absl::StreamFormat("Failed to set socket non-blocking, Err: %d", 
-		WSAGetLastError()) << LL_ENDL;
+		printf("Failed to set socket non-blocking, Err: %d\n", 
+		WSAGetLastError());
 	}
 
 	// set a large receive buffer
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 127f9ab2771..a6d55624b87 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -588,11 +588,15 @@ static std::string get_program_log(GLuint ret)
 //dump shader source for debugging
 void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLchar** shader_code_text)
 {
+	char num_str[16]; // U32 = max 10 digits
+
 	LL_SHADER_LOADING_WARNS() << "\n";
 
 	for (U32 i = 0; i < shader_code_count; i++)
 	{
-		LL_CONT << absl::StreamFormat("%4d: ", i + 1) << shader_code_text[i];
+		snprintf(num_str, sizeof(num_str), "%4d: ", i+1);
+		std::string line_number(num_str);
+		LL_CONT << line_number << shader_code_text[i];
 	}
     LL_CONT << LL_ENDL;
 }
-- 
GitLab