From 8f064c4b084312424408aab3367240324ca2d456 Mon Sep 17 00:00:00 2001 From: Andreas Volz Date: Fri, 8 Oct 2010 00:22:58 +0200 Subject: added patches from: Roman Fietze --- .gitignore | 22 ++++++++++++++++++++++ configure.ac | 2 +- examples/echo/echo-client.cpp | 10 ++++++---- 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3cfba9c --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +Makefile.in +aclocal.m4 +autom4te.cache/ +config.guess +config.h.in +config.sub +configure +data/Makefile.in +depcomp +doc/Makefile.in +examples/Makefile.in +examples/echo/Makefile.in +examples/ecore/Makefile.in +examples/glib/Makefile.in +examples/hal/Makefile.in +examples/properties/Makefile.in +install-sh +ltmain.sh +m4/ +missing +src/Makefile.in +tools/Makefile.in diff --git a/configure.ac b/configure.ac index bb5fc01..a570fd4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Autojunk script for libdbus-c++ AC_PREREQ(2.59) -AC_INIT([libdbus-c++], 0.5.0, [andreas.volz@tux-style.com]) +AC_INIT([libdbus-c++], 0.6.0-pre1, [andreas.volz@tux-style.com]) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER([config.h]) diff --git a/examples/echo/echo-client.cpp b/examples/echo/echo-client.cpp index f01f23a..f84c093 100644 --- a/examples/echo/echo-client.cpp +++ b/examples/echo/echo-client.cpp @@ -28,7 +28,7 @@ void EchoClient::Echoed(const DBus::Variant &value) * For some strange reason, libdbus frequently dies with an OOM */ -static const int THREADS = 3; +static const size_t THREADS = 3; static bool spin = true; @@ -42,7 +42,7 @@ DBus::DefaultTimeout *timeout; void *greeter_thread(void *arg) { char idstr[16]; - int i = (int) arg; + size_t i = (size_t) arg; snprintf(idstr, sizeof(idstr), "%lu", pthread_self()); @@ -92,6 +92,8 @@ void handler3 (const void *data, void *buffer, unsigned int nbyte) int main() { + size_t i; + signal(SIGTERM, niam); signal(SIGINT, niam); @@ -112,7 +114,7 @@ int main() thread_pipe_list[0] = dispatcher.add_pipe (handler1, NULL); thread_pipe_list[1] = dispatcher.add_pipe (handler2, NULL); thread_pipe_list[2] = dispatcher.add_pipe (handler3, NULL); - for (int i = 0; i < THREADS; ++i) + for (i = 0; i < THREADS; ++i) { pthread_create(threads+i, NULL, greeter_thread, (void*) i); } @@ -121,7 +123,7 @@ int main() cout << "terminating" << endl; - for (int i = 0; i < THREADS; ++i) + for (i = 0; i < THREADS; ++i) { pthread_join(threads[i], NULL); } -- cgit v1.2.1