summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-10-10 00:04:52 +0000
committerjoerg <joerg@pkgsrc.org>2013-10-10 00:04:52 +0000
commit44f039d146a8a5c0367004d47c0df508adfa20b3 (patch)
treebb735434c2c4cd935b8bb8d0821c0869d9e2deef
parentb96226ab4db4f627ef5007348e21527f533efef2 (diff)
downloadpkgsrc-44f039d146a8a5c0367004d47c0df508adfa20b3.tar.gz
Use natural type for backtrace return value. Fix cinttypes use.
-rw-r--r--devel/gearmand/distinfo4
-rw-r--r--devel/gearmand/patches/patch-libgearman-1.0_gearman.h18
-rw-r--r--devel/gearmand/patches/patch-libgearman_backtrace.cc40
3 files changed, 61 insertions, 1 deletions
diff --git a/devel/gearmand/distinfo b/devel/gearmand/distinfo
index e08d80039c8..71438bf2ad0 100644
--- a/devel/gearmand/distinfo
+++ b/devel/gearmand/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2013/10/04 07:03:37 fhajny Exp $
+$NetBSD: distinfo,v 1.2 2013/10/10 00:04:52 joerg Exp $
SHA1 (gearmand-1.0.6.tar.gz) = 872d5e13c20a29a20e45df3afa8f3981dc52d363
RMD160 (gearmand-1.0.6.tar.gz) = 44f1caead6fbd7e6a440be3275098bd798a807d0
@@ -10,7 +10,9 @@ SHA1 (patch-examples_reverse__client.cc) = 3e8a27626c8a922919adfddcd9b3b4bfec063
SHA1 (patch-examples_reverse__client__bg.cc) = 63db59b98a8128565cecaa682334be85edf37584
SHA1 (patch-examples_reverse__client__cb.cc) = 33f9710ca20101ce11cda04407eff1e05b14d29a
SHA1 (patch-examples_reverse__client__epoch.cc) = e4ea3dc00f9fc403a5500d95591255c0990da6d3
+SHA1 (patch-libgearman-1.0_gearman.h) = d97a3078ababae57922bee92e6bdcd28a4fb1aae
SHA1 (patch-libgearman-server__log.cc) = ecad056d7704451bce88e889fc0f9ce528281223
+SHA1 (patch-libgearman_backtrace.cc) = f8b643a91fb7d3656c10616fcd37a9dc0749904e
SHA1 (patch-libtest__exception.hpp) = 193ee0e3711272f99ee3594f8629e27d572ca116
SHA1 (patch-libtest__lite.h) = 90ca2fa29aaa2c17e05f64ddba14f1a9a5901f52
SHA1 (patch-libtest_main.cc) = bbde756232acf00b3f1562e1e4c4de67e5cfdf24
diff --git a/devel/gearmand/patches/patch-libgearman-1.0_gearman.h b/devel/gearmand/patches/patch-libgearman-1.0_gearman.h
new file mode 100644
index 00000000000..540b0fb8034
--- /dev/null
+++ b/devel/gearmand/patches/patch-libgearman-1.0_gearman.h
@@ -0,0 +1,18 @@
+$NetBSD: patch-libgearman-1.0_gearman.h,v 1.1 2013/10/10 00:04:52 joerg Exp $
+
+--- libgearman-1.0/gearman.h.orig 2013-10-09 23:41:20.000000000 +0000
++++ libgearman-1.0/gearman.h
+@@ -50,8 +50,12 @@
+ #endif
+
+ #ifdef __cplusplus
+-# include <tr1/cinttypes>
+ # include <cstddef>
++# if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
++# include <cinttypes>
++# else
++# include <tr1/cinttypes>
++# endif
+ # include <cstdlib>
+ # include <ctime>
+ #else
diff --git a/devel/gearmand/patches/patch-libgearman_backtrace.cc b/devel/gearmand/patches/patch-libgearman_backtrace.cc
new file mode 100644
index 00000000000..ff613dbb11f
--- /dev/null
+++ b/devel/gearmand/patches/patch-libgearman_backtrace.cc
@@ -0,0 +1,40 @@
+$NetBSD: patch-libgearman_backtrace.cc,v 1.1 2013/10/10 00:04:52 joerg Exp $
+
+--- libgearman/backtrace.cc.orig 2013-10-09 23:42:25.000000000 +0000
++++ libgearman/backtrace.cc
+@@ -67,14 +67,14 @@ void custom_backtrace(void)
+ #ifdef HAVE_EXECINFO_H
+ void *backtrace_buffer[MAX_DEPTH +1];
+
+- int stack_frames= backtrace(backtrace_buffer, MAX_DEPTH);
+- fprintf(stderr, "\nBegin stack trace, frames found: %d\n", stack_frames);
++ size_t stack_frames= backtrace(backtrace_buffer, MAX_DEPTH);
++ fprintf(stderr, "\nBegin stack trace, frames found: %zu\n", stack_frames);
+ if (stack_frames)
+ {
+ char **symbollist= backtrace_symbols(backtrace_buffer, stack_frames);
+ if (symbollist)
+ {
+- for (int x= 0; x < stack_frames; x++)
++ for (size_t x= 0; x < stack_frames; x++)
+ {
+ bool was_demangled= false;
+
+@@ -102,7 +102,7 @@ void custom_backtrace(void)
+ }
+
+ was_demangled= true;
+- fprintf(stderr, "#%d %p in %s at %s\n",
++ fprintf(stderr, "#%zu %p in %s at %s\n",
+ x, backtrace_buffer[x],
+ called_in,
+ dlinfo.dli_fname);
+@@ -113,7 +113,7 @@ void custom_backtrace(void)
+
+ if (was_demangled == false)
+ {
+- fprintf(stderr, "?%d %p in %s\n", x, backtrace_buffer[x], symbollist[x]);
++ fprintf(stderr, "?%zu %p in %s\n", x, backtrace_buffer[x], symbollist[x]);
+ }
+ }
+