From owner-svn-ports-all@freebsd.org Sat Jan 6 14:20:34 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAE49EBB999; Sat, 6 Jan 2018 14:20:34 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A294C70E63; Sat, 6 Jan 2018 14:20:34 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2814137C6; Sat, 6 Jan 2018 14:20:33 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06EKXxj074851; Sat, 6 Jan 2018 14:20:33 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06EKXNi074850; Sat, 6 Jan 2018 14:20:33 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801061420.w06EKXNi074850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sat, 6 Jan 2018 14:20:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458276 - head/news/pan/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/news/pan/files X-SVN-Commit-Revision: 458276 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 14:20:34 -0000 Author: jbeich Date: Sat Jan 6 14:20:33 2018 New Revision: 458276 URL: https://svnweb.freebsd.org/changeset/ports/458276 Log: news/pan: unbreak build with Clang 6 (C++14 by default) text-match.cc:476:8: error: no viable conversion from 'pan::StringView' to 'std::__1::basic_string' s = tmp; ^~~ article-filter.cc:165:46: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT, xit->number); ^ Reported by: antoine (via bug 224669) Added: head/news/pan/files/ head/news/pan/files/patch-c++11 (contents, props changed) Added: head/news/pan/files/patch-c++11 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/pan/files/patch-c++11 Sat Jan 6 14:20:33 2018 (r458276) @@ -0,0 +1,166 @@ +text-match.cc:476:8: error: no viable conversion from 'pan::StringView' to 'std::__1::basic_string' + s = tmp; + ^~~ +/usr/include/c++/v1/string:767:5: note: candidate constructor not viable: no known conversion from 'pan::StringView' to 'const std::__1::basic_string &' for 1st argument + basic_string(const basic_string& __str); + ^ +/usr/include/c++/v1/string:772:5: note: candidate constructor not viable: no known conversion from 'pan::StringView' to 'std::__1::basic_string &&' for 1st argument + basic_string(basic_string&& __str) + ^ +/usr/include/c++/v1/string:782:31: note: candidate constructor not viable: no known conversion from 'pan::StringView' to 'const char *' for 1st argument + _LIBCPP_INLINE_VISIBILITY basic_string(const _CharT* __s); + ^ +/usr/include/c++/v1/string:815:5: note: candidate constructor not viable: no known conversion from 'pan::StringView' to 'initializer_list' for 1st argument + basic_string(initializer_list<_CharT> __il); + ^ +../../pan/general/string-view.h:98:10: note: candidate function + operator const std::string () const { return to_string(); } + ^ +/usr/include/c++/v1/string:834:44: note: passing argument to parameter '__str' here + basic_string& operator=(basic_string&& __str) + ^ +article-filter.cc:165:46: error: invalid suffix on literal; C++11 requires a space between literal + and identifier [-Wreserved-user-defined-literal] + g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT, xit->number); + ^ +nntp.cc:366:49: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + _commands.push_back (build_command ("XOVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", l... + ^ +nntp.cc:366:69: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + _commands.push_back (build_command ("XOVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", l... + ^ +nntp.cc:379:49: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + _commands.push_back (build_command ("XZVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", l... + ^ +nntp.cc:379:69: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + _commands.push_back (build_command ("XZVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", l... + ^ +nntp.cc:420:51: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + _commands.push_back (build_command ("ARTICLE %"G_GUINT64_FORMAT"\r\n", article_number)); + ^ +nntp.cc:462:48: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + _commands.push_back (build_command ("HEAD %"G_GUINT64_FORMAT"\r\n", article_number)); + ^ +nntp.cc:490:48: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + _commands.push_back (build_command ("BODY %"G_GUINT64_FORMAT"\r\n", article_number)); + ^ +numbers.cc:270:50: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + bytes = g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT",", r.low); + ^ + +numbers.cc:272:51: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + bytes = g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT",", r.... + ^ + +numbers.cc:272:71: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + bytes = g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT",", r.... + ^ +task-xover.cc:394:41: error: invalid suffix on literal; C++11 requires a space between literal and + identifier [-Wreserved-user-defined-literal] + xref = buf = g_strdup_printf("%s %s:%"G_GUINT64_FORMAT, + ^ + +--- pan/data-impl/article-filter.cc.orig 2016-03-12 23:32:41 UTC ++++ pan/data-impl/article-filter.cc +@@ -162,7 +162,7 @@ ArticleFilter :: test_article (const Data & dat + s += xit->group; + s += ':'; + char buf[32]; +- g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT, xit->number); ++ g_snprintf (buf, sizeof(buf), "%" G_GUINT64_FORMAT, xit->number); + s += buf; + s += ' '; + } +--- pan/general/string-view.h.orig 2011-06-02 10:17:28 UTC ++++ pan/general/string-view.h +@@ -95,7 +95,7 @@ namespace pan + std::string to_string () const {return empty() + ? std::string() + : std::string(str,str+len); } +- operator const std::string () const { return to_string(); } ++ operator std::string () const { return to_string(); } + + StringView substr (const char * start, const char * end) const; + void substr (const char * start, const char * end, StringView& setme) const; +--- pan/tasks/nntp.cc.orig 2016-11-23 21:06:54 UTC ++++ pan/tasks/nntp.cc +@@ -363,7 +363,7 @@ NNTP :: xover (const Quark & group, + _listener = l; + + enter_group(group); +- _commands.push_back (build_command ("XOVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", low, high)); ++ _commands.push_back (build_command ("XOVER %" G_GUINT64_FORMAT "-%" G_GUINT64_FORMAT "\r\n", low, high)); + write_next_command (); + } + +@@ -376,7 +376,7 @@ NNTP :: xzver (const Quark & group, + _listener = l; + + enter_group(group); +- _commands.push_back (build_command ("XZVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", low, high)); ++ _commands.push_back (build_command ("XZVER %" G_GUINT64_FORMAT "-%" G_GUINT64_FORMAT "\r\n", low, high)); + write_next_command (); + } + +@@ -417,7 +417,7 @@ NNTP :: article (const Quark & group, + + enter_group(group); + +- _commands.push_back (build_command ("ARTICLE %"G_GUINT64_FORMAT"\r\n", article_number)); ++ _commands.push_back (build_command ("ARTICLE %" G_GUINT64_FORMAT "\r\n", article_number)); + + write_next_command (); + } +@@ -459,7 +459,7 @@ NNTP :: get_headers (const Quark & group, + + enter_group(group); + +- _commands.push_back (build_command ("HEAD %"G_GUINT64_FORMAT"\r\n", article_number)); ++ _commands.push_back (build_command ("HEAD %" G_GUINT64_FORMAT "\r\n", article_number)); + + write_next_command (); + } +@@ -487,7 +487,7 @@ NNTP :: get_body (const Quark & group, + + enter_group(group); + +- _commands.push_back (build_command ("BODY %"G_GUINT64_FORMAT"\r\n", article_number)); ++ _commands.push_back (build_command ("BODY %" G_GUINT64_FORMAT "\r\n", article_number)); + + write_next_command (); + } +--- pan/tasks/task-xover.cc.orig 2016-03-07 21:09:53 UTC ++++ pan/tasks/task-xover.cc +@@ -391,7 +391,7 @@ TaskXOver::on_nntp_line_process(NNTP * nntp, const Str + // if news server doesn't provide an xref, fake one + char * buf(0); + if (xref.empty()) +- xref = buf = g_strdup_printf("%s %s:%"G_GUINT64_FORMAT, ++ xref = buf = g_strdup_printf("%s %s:%" G_GUINT64_FORMAT, + nntp->_server.c_str(), nntp->_group.c_str(), number); + + uint64_t& h(_high[nntp->_server]); +--- pan/usenet-utils/numbers.cc.orig 2011-06-02 10:17:28 UTC ++++ pan/usenet-utils/numbers.cc +@@ -267,9 +267,9 @@ Numbers :: to_string (std::string & str) const + Range r (*it); + + if (r.low == r.high) +- bytes = g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT",", r.low); ++ bytes = g_snprintf (buf, sizeof(buf), "%" G_GUINT64_FORMAT ",", r.low); + else +- bytes = g_snprintf (buf, sizeof(buf), "%"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT",", r.low, r.high); ++ bytes = g_snprintf (buf, sizeof(buf), "%" G_GUINT64_FORMAT "-%" G_GUINT64_FORMAT ",", r.low, r.high); + temp.append(buf, bytes); + } +