fix build with clang6; from freebsd
This commit is contained in:
parent
1e5a67f986
commit
4b6f766f63
16
news/pan/patches/patch-pan_data-impl_article-filter_cc
Normal file
16
news/pan/patches/patch-pan_data-impl_article-filter_cc
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-pan_data-impl_article-filter_cc,v 1.1 2018/04/12 18:10:27 jasper Exp $
|
||||
|
||||
https://svnweb.freebsd.org/ports/head/news/pan/files/patch-c%2B%2B11?revision=458276&view=markup
|
||||
|
||||
Index: pan/data-impl/article-filter.cc
|
||||
--- pan/data-impl/article-filter.cc.orig
|
||||
+++ 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 += ' ';
|
||||
}
|
16
news/pan/patches/patch-pan_general_string-view_h
Normal file
16
news/pan/patches/patch-pan_general_string-view_h
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-pan_general_string-view_h,v 1.1 2018/04/12 18:10:27 jasper Exp $
|
||||
|
||||
https://svnweb.freebsd.org/ports/head/news/pan/files/patch-c%2B%2B11?revision=458276&view=markup
|
||||
|
||||
Index: pan/general/string-view.h
|
||||
--- pan/general/string-view.h.orig
|
||||
+++ 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;
|
52
news/pan/patches/patch-pan_tasks_nntp_cc
Normal file
52
news/pan/patches/patch-pan_tasks_nntp_cc
Normal file
@ -0,0 +1,52 @@
|
||||
$OpenBSD: patch-pan_tasks_nntp_cc,v 1.1 2018/04/12 18:10:27 jasper Exp $
|
||||
|
||||
https://svnweb.freebsd.org/ports/head/news/pan/files/patch-c%2B%2B11?revision=458276&view=markup
|
||||
|
||||
Index: pan/tasks/nntp.cc
|
||||
--- pan/tasks/nntp.cc.orig
|
||||
+++ pan/tasks/nntp.cc
|
||||
@@ -355,7 +355,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 ();
|
||||
}
|
||||
|
||||
@@ -368,7 +368,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 ();
|
||||
}
|
||||
|
||||
@@ -409,7 +409,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 ();
|
||||
}
|
||||
@@ -451,7 +451,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 ();
|
||||
}
|
||||
@@ -479,7 +479,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 ();
|
||||
}
|
16
news/pan/patches/patch-pan_tasks_task-xover_cc
Normal file
16
news/pan/patches/patch-pan_tasks_task-xover_cc
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-pan_tasks_task-xover_cc,v 1.1 2018/04/12 18:10:27 jasper Exp $
|
||||
|
||||
https://svnweb.freebsd.org/ports/head/news/pan/files/patch-c%2B%2B11?revision=458276&view=markup
|
||||
|
||||
Index: pan/tasks/task-xover.cc
|
||||
--- pan/tasks/task-xover.cc.orig
|
||||
+++ 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]);
|
19
news/pan/patches/patch-pan_usenet-utils_numbers_cc
Normal file
19
news/pan/patches/patch-pan_usenet-utils_numbers_cc
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-pan_usenet-utils_numbers_cc,v 1.1 2018/04/12 18:10:27 jasper Exp $
|
||||
|
||||
https://svnweb.freebsd.org/ports/head/news/pan/files/patch-c%2B%2B11?revision=458276&view=markup
|
||||
|
||||
Index: pan/usenet-utils/numbers.cc
|
||||
--- pan/usenet-utils/numbers.cc.orig
|
||||
+++ 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user