Index: trunk/tools/switchboard2/util.cc |
— | — | @@ -12,12 +12,15 @@ |
13 | 13 | #include <unistd.h> |
14 | 14 | |
15 | 15 | #include <cerrno> |
| 16 | +#include <cstdlib> |
| 17 | +#include <cstring> |
16 | 18 | |
17 | 19 | #include "util.h" |
18 | 20 | |
19 | 21 | ssize_t |
20 | 22 | timed_read(int fd, void *buf, std::size_t nbytes, int timeout) |
21 | 23 | { |
| 24 | + using std::memset; |
22 | 25 | if (timeout > -1) { |
23 | 26 | struct timeval tv; |
24 | 27 | tv.tv_sec = timeout; |
— | — | @@ -40,6 +43,7 @@ |
41 | 44 | ssize_t |
42 | 45 | timed_write(int fd, void const *buf, std::size_t nbytes, int timeout) |
43 | 46 | { |
| 47 | + using std::memset; |
44 | 48 | if (timeout > -1) { |
45 | 49 | struct timeval tv; |
46 | 50 | tv.tv_sec = timeout; |
Index: trunk/tools/switchboard2/process.cc |
— | — | @@ -113,9 +113,9 @@ |
114 | 114 | { |
115 | 115 | LOG4CXX_DEBUG(logger, boost::format("connecting to process socket... %s") % bindpath_); |
116 | 116 | struct sockaddr_un addr; |
117 | | - memset(&addr, 0, sizeof(addr)); |
| 117 | + std::memset(&addr, 0, sizeof(addr)); |
118 | 118 | addr.sun_family = AF_UNIX; |
119 | | - strcpy(addr.sun_path, bindpath_.c_str()); |
| 119 | + std::strcpy(addr.sun_path, bindpath_.c_str()); |
120 | 120 | |
121 | 121 | return ::connect(socket, (sockaddr *) &addr, sizeof(addr)); |
122 | 122 | } |
Index: trunk/tools/switchboard2/main.cc |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | #include "version.h" |
44 | 44 | #include "process_factory.h" |
45 | 45 | |
46 | | - void * acceptor_thread(void *); |
| 46 | + extern "C" void * acceptor_thread(void *); |
47 | 47 | |
48 | 48 | extern "C" void |
49 | 49 | sigexit(int) |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | struct sockaddr_un addr; |
120 | 120 | int lsnsock; |
121 | 121 | std::memset(&addr, 0, sizeof(addr)); |
122 | | - strncpy(addr.sun_path, mainconf.listeners[i].host.c_str(), sizeof(addr.sun_path) - 1); |
| 122 | + std::strncpy(addr.sun_path, mainconf.listeners[i].host.c_str(), sizeof(addr.sun_path) - 1); |
123 | 123 | addr.sun_family = AF_UNIX; |
124 | 124 | |
125 | 125 | unlink(addr.sun_path); |
— | — | @@ -353,7 +353,7 @@ |
354 | 354 | process_factory::instance().cleanup_thread(); |
355 | 355 | } |
356 | 356 | |
357 | | -void * |
| 357 | +extern "C" void * |
358 | 358 | acceptor_thread(void *arg) |
359 | 359 | { |
360 | 360 | int fd = reinterpret_cast<intptr_t>(arg); |
Index: trunk/tools/switchboard2/version.h |
— | — | @@ -10,6 +10,6 @@ |
11 | 11 | #ifndef VERSION_H |
12 | 12 | #define VERSION_H |
13 | 13 | |
14 | | -#define SB_VERSION "V-2.0.6" |
| 14 | +#define SB_VERSION "V-2.0.7" |
15 | 15 | |
16 | 16 | #endif /* !VERSION_H */ |
Index: trunk/tools/switchboard2/Makefile |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | CFLAGS = $(EXTRA_CFLAGS) |
7 | 7 | CXXFLAGS = $(EXTRA_CXXFLAGS) |
8 | 8 | LDFLAGS = $(EXTRA_LDFLAGS) |
9 | | -LIBS = -llog4cxx -lboost_system$(BOOSTTAG) -lboost_signals$(BOOSTTAG) $(EXTRA_LIBS) |
| 9 | +LIBS = -llog4cxx $(EXTRA_LIBS) |
10 | 10 | |
11 | 11 | CONFIG_FLAGS = \ |
12 | 12 | -DPREFIX=\"$(PREFIX)\" \ |