Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2018 11:46:11 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475645 - head/devel/poco-ssl/files
Message-ID:  <201807291146.w6TBkBrg005214@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sun Jul 29 11:46:10 2018
New Revision: 475645
URL: https://svnweb.freebsd.org/changeset/ports/475645

Log:
  devel/poco-ssl: Fix build with Clang 6
  
  src/NumberParser.cpp:127:35: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
          return std::sscanf(s.c_str(), "%"I64_FMT"d%c", &value, &temp) == 1;
                                           ^
  
  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475217_s336659/logs/poco-ssl-1.4.3_5.log

Added:
  head/devel/poco-ssl/files/patch-Foundation_src_NumberFormatter.cpp   (contents, props changed)
  head/devel/poco-ssl/files/patch-Foundation_src_NumberParser.cpp   (contents, props changed)

Added: head/devel/poco-ssl/files/patch-Foundation_src_NumberFormatter.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/poco-ssl/files/patch-Foundation_src_NumberFormatter.cpp	Sun Jul 29 11:46:10 2018	(r475645)
@@ -0,0 +1,103 @@
+error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
+
+--- Foundation/src/NumberFormatter.cpp.orig	2018-07-29 11:30:18 UTC
++++ Foundation/src/NumberFormatter.cpp
+@@ -245,7 +245,7 @@ void NumberFormatter::appendHex(std::string& str, unsi
+ void NumberFormatter::append(std::string& str, Int64 value)
+ {
+ 	char buffer[64];
+-	std::sprintf(buffer, "%"I64_FMT"d", value);
++	std::sprintf(buffer, "%" I64_FMT "d", value);
+ 	str.append(buffer);
+ }
+ 
+@@ -255,7 +255,7 @@ void NumberFormatter::append(std::string& str, Int64 v
+ 	poco_assert (width > 0 && width < 64);
+ 
+ 	char buffer[64];
+-	std::sprintf(buffer, "%*"I64_FMT"d", width, value);
++	std::sprintf(buffer, "%*" I64_FMT "d", width, value);
+ 	str.append(buffer);
+ }
+ 
+@@ -265,7 +265,7 @@ void NumberFormatter::append0(std::string& str, Int64 
+ 	poco_assert (width > 0 && width < 64);
+ 
+ 	char buffer[64];
+-	std::sprintf(buffer, "%0*"I64_FMT"d", width, value);
++	std::sprintf(buffer, "%0*" I64_FMT "d", width, value);
+ 	str.append(buffer);
+ }
+ 
+@@ -273,7 +273,7 @@ void NumberFormatter::append0(std::string& str, Int64 
+ void NumberFormatter::appendHex(std::string& str, Int64 value)
+ {
+ 	char buffer[64];
+-	std::sprintf(buffer, "%"I64_FMT"X", value);
++	std::sprintf(buffer, "%" I64_FMT "X", value);
+ 	str.append(buffer);
+ }
+ 
+@@ -283,7 +283,7 @@ void NumberFormatter::appendHex(std::string& str, Int6
+ 	poco_assert (width > 0 && width < 64);
+ 
+ 	char buffer[64];
+-	std::sprintf(buffer, "%0*"I64_FMT"X", width, value);
++	std::sprintf(buffer, "%0*" I64_FMT "X", width, value);
+ 	str.append(buffer);
+ }
+ 
+@@ -291,7 +291,7 @@ void NumberFormatter::appendHex(std::string& str, Int6
+ void NumberFormatter::append(std::string& str, UInt64 value)
+ {
+ 	char buffer[64];
+-	std::sprintf(buffer, "%"I64_FMT"u", value);
++	std::sprintf(buffer, "%" I64_FMT "u", value);
+ 	str.append(buffer);
+ }
+ 
+@@ -301,7 +301,7 @@ void NumberFormatter::append(std::string& str, UInt64 
+ 	poco_assert (width > 0 && width < 64);
+ 
+ 	char buffer[64];
+-	std::sprintf(buffer, "%*"I64_FMT"u", width, value);
++	std::sprintf(buffer, "%*" I64_FMT "u", width, value);
+ 	str.append(buffer);
+ }
+ 
+@@ -311,7 +311,7 @@ void NumberFormatter::append0(std::string& str, UInt64
+ 	poco_assert (width > 0 && width < 64);
+ 
+ 	char buffer[64];
+-	std::sprintf(buffer, "%0*"I64_FMT"u", width, value);
++	std::sprintf(buffer, "%0*" I64_FMT "u", width, value);
+ 	str.append(buffer);
+ }
+ 
+@@ -319,7 +319,7 @@ void NumberFormatter::append0(std::string& str, UInt64
+ void NumberFormatter::appendHex(std::string& str, UInt64 value)
+ {
+ 	char buffer[64];
+-	std::sprintf(buffer, "%"I64_FMT"X", value);
++	std::sprintf(buffer, "%" I64_FMT "X", value);
+ 	str.append(buffer);
+ }
+ 
+@@ -329,7 +329,7 @@ void NumberFormatter::appendHex(std::string& str, UInt
+ 	poco_assert (width > 0 && width < 64);
+ 
+ 	char buffer[64];
+-	std::sprintf(buffer, "%0*"I64_FMT"X", width, value);
++	std::sprintf(buffer, "%0*" I64_FMT "X", width, value);
+ 	str.append(buffer);
+ }
+ 
+@@ -396,7 +396,7 @@ void NumberFormatter::append(std::string& str, const v
+ 	#if defined(POCO_LONG_IS_64_BIT)
+ 		std::sprintf(buffer, "%016lX", (UIntPtr) ptr);
+ 	#else
+-		std::sprintf(buffer, "%016"I64_FMT"X", (UIntPtr) ptr);
++		std::sprintf(buffer, "%016" I64_FMT "X", (UIntPtr) ptr);
+ 	#endif
+ #else
+ 	std::sprintf(buffer, "%08lX", (UIntPtr) ptr);

Added: head/devel/poco-ssl/files/patch-Foundation_src_NumberParser.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/poco-ssl/files/patch-Foundation_src_NumberParser.cpp	Sun Jul 29 11:46:10 2018	(r475645)
@@ -0,0 +1,33 @@
+src/NumberParser.cpp:127:35: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
+        return std::sscanf(s.c_str(), "%"I64_FMT"d%c", &value, &temp) == 1;
+                                                 ^
+
+--- Foundation/src/NumberParser.cpp.orig	2018-07-29 11:21:10 UTC
++++ Foundation/src/NumberParser.cpp
+@@ -124,7 +124,7 @@ Int64 NumberParser::parse64(const std::string& s)
+ bool NumberParser::tryParse64(const std::string& s, Int64& value)
+ {
+ 	char temp;
+-	return std::sscanf(s.c_str(), "%"I64_FMT"d%c", &value, &temp) == 1;
++	return std::sscanf(s.c_str(), "%" I64_FMT "d%c", &value, &temp) == 1;
+ }
+ 
+ 
+@@ -141,7 +141,7 @@ UInt64 NumberParser::parseUnsigned64(const std::string
+ bool NumberParser::tryParseUnsigned64(const std::string& s, UInt64& value)
+ {
+ 	char temp;
+-	return std::sscanf(s.c_str(), "%"I64_FMT"u%c", &value, &temp) == 1;
++	return std::sscanf(s.c_str(), "%" I64_FMT "u%c", &value, &temp) == 1;
+ }
+ 
+ 
+@@ -158,7 +158,7 @@ UInt64 NumberParser::parseHex64(const std::string& s)
+ bool NumberParser::tryParseHex64(const std::string& s, UInt64& value)
+ {
+ 	char temp;
+-	return std::sscanf(s.c_str(), "%"I64_FMT"x%c", &value, &temp) == 1;
++	return std::sscanf(s.c_str(), "%" I64_FMT "x%c", &value, &temp) == 1;
+ }
+ 
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807291146.w6TBkBrg005214>