Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/tcf/framework')
-rw-r--r--agent/tcf/framework/channel_tcp.c2
-rw-r--r--agent/tcf/framework/events.c2
-rw-r--r--agent/tcf/framework/mdep-inet.h2
-rw-r--r--agent/tcf/framework/mdep.c2
-rw-r--r--agent/tcf/framework/mdep.h12
-rw-r--r--agent/tcf/framework/trace.c2
-rw-r--r--agent/tcf/framework/trace.h1
7 files changed, 14 insertions, 9 deletions
diff --git a/agent/tcf/framework/channel_tcp.c b/agent/tcf/framework/channel_tcp.c
index 70d30abe..32f984b4 100644
--- a/agent/tcf/framework/channel_tcp.c
+++ b/agent/tcf/framework/channel_tcp.c
@@ -39,7 +39,7 @@
# include <openssl/rand.h>
# include <openssl/err.h>
# if defined(_WIN32) || defined(__CYGWIN__)
-# include <ShlObj.h>
+# include <shlobj.h>
# endif
#else
typedef void SSL;
diff --git a/agent/tcf/framework/events.c b/agent/tcf/framework/events.c
index 3a35fde7..12f0b5c4 100644
--- a/agent/tcf/framework/events.c
+++ b/agent/tcf/framework/events.c
@@ -227,7 +227,7 @@ void post_event_with_delay(EventCallBack * handler, void * arg, unsigned long de
}
check_error(pthread_mutex_unlock(&event_lock));
- trace(LOG_EVENTCORE, "post_event: event %#" PRIxPTR ", handler %#" PRIxPTR ", arg %#" PRIxPTR ", runtime %02u%02u.%03u",
+ trace(LOG_EVENTCORE, "post_event: event %#" PRIxPTR ", handler %#" PRIxPTR ", arg %#" PRIxPTR ", runtime %02u:%02u.%03u",
(uintptr_t)ev, (uintptr_t)ev->handler, (uintptr_t)ev->arg,
(unsigned)(ev->runtime.tv_sec / 60 % 60),
(unsigned)(ev->runtime.tv_sec % 60),
diff --git a/agent/tcf/framework/mdep-inet.h b/agent/tcf/framework/mdep-inet.h
index 32f4b849..3352595c 100644
--- a/agent/tcf/framework/mdep-inet.h
+++ b/agent/tcf/framework/mdep-inet.h
@@ -45,7 +45,7 @@ extern const char * loc_gai_strerror(int ecode);
/* inet_ntop()/inet_pton() are not available in MinGW */
/* inet_ntop()/inet_pton() are not available in Windows before Windows Vista */
-#if defined(__MINGW32__) || (defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600)
+#if (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) || (defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600)
extern const char * inet_ntop(int af, const void * src, char * dst, socklen_t size);
extern int inet_pton(int af, const char * src, void * dst);
#endif
diff --git a/agent/tcf/framework/mdep.c b/agent/tcf/framework/mdep.c
index 24343c79..af926ca1 100644
--- a/agent/tcf/framework/mdep.c
+++ b/agent/tcf/framework/mdep.c
@@ -264,7 +264,7 @@ int wsa_closesocket(int socket) {
/* inet_ntop()/inet_pton() are not available in MinGW */
/* inet_ntop()/inet_pton() are not available in Windows before Windows Vista */
-#if defined(__MINGW32__) || (defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600)
+#if (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) || (defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600)
const char * inet_ntop(int af, const void * src, char * dst, socklen_t size) {
char * str = NULL;
if (af != AF_INET) {
diff --git a/agent/tcf/framework/mdep.h b/agent/tcf/framework/mdep.h
index f71751bb..44c7a0fe 100644
--- a/agent/tcf/framework/mdep.h
+++ b/agent/tcf/framework/mdep.h
@@ -161,14 +161,20 @@ typedef unsigned long pid_t;
#endif
#endif
-#define CLOCK_REALTIME 1
-#define CLOCK_MONOTONIC 2
+#ifndef CLOCK_REALTIME
+# define CLOCK_REALTIME 1
+#endif
+#ifndef CLOCK_MONOTONIC
+# define CLOCK_MONOTONIC 2
+#endif
typedef int clockid_t;
extern int clock_gettime(clockid_t clock_id, struct timespec * tp);
extern void usleep(unsigned useconds);
#define off_t __int64
-#define lseek _lseeki64
+#ifndef lseek
+# define lseek _lseeki64
+#endif
extern int truncate(const char * path, off_t size);
extern int ftruncate(int f, off_t size);
diff --git a/agent/tcf/framework/trace.c b/agent/tcf/framework/trace.c
index bb1aa70e..be3ddbe6 100644
--- a/agent/tcf/framework/trace.c
+++ b/agent/tcf/framework/trace.c
@@ -56,7 +56,6 @@ struct trace_mode trace_mode_table[MAX_TRACE_MODES + 1] = {
{ LOG_PROXY, "proxy", "proxy state" },
{ LOG_TCFLOG, "tcflog", "proxy traffic" },
{ LOG_ELF, "elf", "ELF reader" },
- { LOG_LUA, "lua", "LUA interpreter" },
{ LOG_STACK, "stack", "stack trace service" },
{ LOG_PLUGIN, "plugin", "plugins" },
{ LOG_SHUTDOWN, "shutdown", "shutdown of subsystems" },
@@ -182,6 +181,7 @@ int add_trace_mode(int mode, const char * name, const char * description) {
void open_log_file(const char * log_name) {
#if ENABLE_Trace
+ use_syslog = 0;
if (log_name == NULL) {
log_file = NULL;
}
diff --git a/agent/tcf/framework/trace.h b/agent/tcf/framework/trace.h
index 1b3ca5df..8ada41d8 100644
--- a/agent/tcf/framework/trace.h
+++ b/agent/tcf/framework/trace.h
@@ -37,7 +37,6 @@
#define LOG_PROXY 0x200
#define LOG_TCFLOG 0x400
#define LOG_ELF 0x800
-#define LOG_LUA 0x1000
#define LOG_STACK 0x2000
#define LOG_PLUGIN 0x4000
#define LOG_SHUTDOWN 0x8000

Back to the top