diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-08-04 09:20:30 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-08-04 09:20:30 +0000 |
| commit | b18cf4bb8aa46248dbd32e02c9fa3ec8b9abe11e (patch) | |
| tree | 40de54c0f32483b1f695673f8e1a251670d69f1a /include | |
| parent | d100b7c251540bdad6c9c6214ecbf755aeb53bc7 (diff) | |
| download | zabbix-b18cf4bb8aa46248dbd32e02c9fa3ec8b9abe11e.tar.gz zabbix-b18cf4bb8aa46248dbd32e02c9fa3ec8b9abe11e.tar.xz zabbix-b18cf4bb8aa46248dbd32e02c9fa3ec8b9abe11e.zip | |
- added ZABBIX agent for Win64 platforms. (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3096 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
| -rw-r--r-- | include/common.h | 14 | ||||
| -rwxr-xr-x | include/daemon.h | 4 | ||||
| -rwxr-xr-x | include/mutexs.h | 6 | ||||
| -rwxr-xr-x | include/perfmon.h | 4 | ||||
| -rw-r--r-- | include/pid.h | 4 | ||||
| -rwxr-xr-x | include/service.h | 8 | ||||
| -rwxr-xr-x | include/symbols.h | 6 | ||||
| -rw-r--r-- | include/sysinfo.h | 4 | ||||
| -rwxr-xr-x | include/threads.h | 6 | ||||
| -rwxr-xr-x | include/zbxplugin.h | 6 | ||||
| -rwxr-xr-x | include/zbxsock.h | 6 | ||||
| -rwxr-xr-x | include/zbxtypes.h | 6 |
12 files changed, 36 insertions, 38 deletions
diff --git a/include/common.h b/include/common.h index 706596a4..9d84ba5a 100644 --- a/include/common.h +++ b/include/common.h @@ -27,15 +27,13 @@ #define ON 1 #define OFF 0 -#define ZABBIX_REVDATE "2 August 2006" -#define ZABBIX_VERSION "1.3" - -#if defined(WIN32) - -# pragma warning (disable: 4100) - -#endif /* WIN32 */ +#define APPLICATION_NAME "ZABBIX Agent" +#define ZABBIX_REVDATE "2 August 2006" +#define ZABBIX_VERSION "1.3" +#if defined(_WINDOWS) +/*# pragma warning (disable: 4100)*/ +#endif /* _WINDOWS */ #ifndef HAVE_GETOPT_LONG struct option { diff --git a/include/daemon.h b/include/daemon.h index 5afea932..e683f3bd 100755 --- a/include/daemon.h +++ b/include/daemon.h @@ -21,9 +21,9 @@ #ifndef ZABBIX_DAEMON_H #define ZABBIX_DAEMON_H -#if defined(WIN32) +#if defined(_WINDOWS) # error "This module allowed only for Linux OS" -#endif +#endif /* _WINDOWS */ #define USE_PID_FILE (1) diff --git a/include/mutexs.h b/include/mutexs.h index 3f9f82e7..ea3906f7 100755 --- a/include/mutexs.h +++ b/include/mutexs.h @@ -20,13 +20,13 @@ #ifndef ZABBIX_MUTEXS_H #define ZABBIX_MUTEXS_H -#if defined(WIN32) +#if defined(_WINDOWS) #define ZBX_MUTEX HANDLE #define ZBX_MUTEX_ERROR (0) #define ZBX_MUTEX_OK (1) -#else /* not WIN32 */ +#else /* not _WINDOWS */ #define ZBX_MUTEX int @@ -34,7 +34,7 @@ #define ZBX_MUTEX_ERROR (-1) #define ZBX_MUTEX_OK (1) -#endif /* WIN32 */ +#endif /* _WINDOWS */ int zbx_mutex_create(ZBX_MUTEX *mutex, char *name); int zbx_mutex_lock(ZBX_MUTEX *mutex); diff --git a/include/perfmon.h b/include/perfmon.h index 9ff8218b..77b15f08 100755 --- a/include/perfmon.h +++ b/include/perfmon.h @@ -20,9 +20,9 @@ #ifndef ZABBIX_PERFMON_H #define ZABBIX_PERFMON_H -#if !defined(WIN32) +#if !defined(_WINDOWS) # error "This module allowed only for Windows OS" -#endif +#endif /* _WINDOWS */ // // Performance Counter Indexes diff --git a/include/pid.h b/include/pid.h index 5895610b..635b9578 100644 --- a/include/pid.h +++ b/include/pid.h @@ -20,9 +20,9 @@ #ifndef ZABBIX_PID_H #define ZABBIX_PID_H -#if defined(WIN32) +#if defined(_WINDOWS) # error "This module allowed only for Linux OS" -#endif +#endif /* _WINDOWS */ int create_pid_file(const char *pidfile); void drop_pid_file(const char *pidfile); diff --git a/include/service.h b/include/service.h index 29af770b..e6fae036 100755 --- a/include/service.h +++ b/include/service.h @@ -20,16 +20,16 @@ #ifndef ZABBIX_SERVICE_H #define ZABBIX_SERVICE_H -#if !defined(WIN32) +#if !defined(_WINDOWS) # error "This module allowed only for Windows OS" -#endif +#endif /* _WINDOWS */ #include "threads.h" extern ZBX_THREAD_HANDLE *threads; -#define ZABBIX_SERVICE_NAME "ZabbixAgentdW32" -#define ZABBIX_EVENT_SOURCE "ZABBIX Win32 Agent" +#define ZABBIX_SERVICE_NAME APPLICATION_NAME +#define ZABBIX_EVENT_SOURCE APPLICATION_NAME void service_start(void); diff --git a/include/symbols.h b/include/symbols.h index 8fb83c2e..a8c334fb 100755 --- a/include/symbols.h +++ b/include/symbols.h @@ -20,7 +20,7 @@ #ifndef ZABBIX_SYMBOLS_H #define ZABBIX_SYMBOLS_H -#if defined (WIN32) +#if defined (_WINDOWS) DWORD (__stdcall *zbx_GetGuiResources)(HANDLE,DWORD); BOOL (__stdcall *zbx_GetProcessIoCounters)(HANDLE,PIO_COUNTERS); @@ -29,10 +29,10 @@ BOOL (__stdcall *zbx_GlobalMemoryStatusEx)(LPMEMORYSTATUSEX); void import_symbols(void); -#else /* not WIN32 */ +#else /* not _WINDOWS */ # define import_symbols() -#endif /* WIN32 */ +#endif /* _WINDOWS */ #endif /* ZABBIX_SYMBOLS_H */ diff --git a/include/sysinfo.h b/include/sysinfo.h index 29a707f9..cd14b328 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -123,10 +123,10 @@ int WEB_PAGE_GET(const char *cmd, const char *param, unsigned flags, AGENT_RESUL int WEB_PAGE_PERF(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result); int WEB_PAGE_REGEXP(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result); -#if defined(WIN32) +#if defined(_WINDOWS) int PERF_MONITOR(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result); int SERVICE_STATE(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result); int PROC_INFO(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result); -#endif +#endif /* _WINDOWS */ #endif diff --git a/include/threads.h b/include/threads.h index 6bed36de..3883f7d7 100755 --- a/include/threads.h +++ b/include/threads.h @@ -22,7 +22,7 @@ #include "common.h" -#if defined(WIN32) +#if defined(_WINDOWS) #define ZBX_THREAD_ERROR (0) @@ -40,7 +40,7 @@ #define zbx_sleep(sec) Sleep(((DWORD)(sec))*((DWORD)1000)) -#else /* not WIN32 */ +#else /* not _WINDOWS */ #define ZBX_THREAD_ERROR (-1) @@ -58,7 +58,7 @@ #define zbx_sleep(sec) sleep((sec)) -#endif /* WIN32 */ +#endif /* _WINDOWS */ ZBX_THREAD_HANDLE zbx_thread_start(ZBX_THREAD_ENTRY_POINTER(handler), void *args); int zbx_thread_wait(ZBX_THREAD_HANDLE thread); diff --git a/include/zbxplugin.h b/include/zbxplugin.h index dc7ea342..cf8998af 100755 --- a/include/zbxplugin.h +++ b/include/zbxplugin.h @@ -20,17 +20,17 @@ #ifndef ZABBIX_ZBXPLUGIN_H #define ZABBIX_ZBXPLUGIN_H -#ifdef WIN32 +#ifdef _WINDOWS # define __zabbix_api __cdecl typedef HMODULE ZBX_MODULE; -#else /* not WIN32 */ +#else /* not _WINDOWS */ # define __zabbix_api typedef void* ZBX_MODULE; -#endif /* WIN32 */ +#endif /* _WINDOWS */ #define MAX_CMDNAME 256 diff --git a/include/zbxsock.h b/include/zbxsock.h index 1b211f03..1ee07ea5 100755 --- a/include/zbxsock.h +++ b/include/zbxsock.h @@ -60,15 +60,15 @@ typedef struct sockaddr_in ZBX_SOCKADDR; int zbx_sock_read(ZBX_SOCKET sock, void *buf, int buflen, int timeout); int zbx_sock_write(ZBX_SOCKET sock, void *buf, int buflen); -#if defined (WIN32) +#if defined (_WINDOWS) int zbx_sock_init(void); # define zbx_sock_close(sock) closesocket(sock) # define zbx_sock_last_error() WSAGetLastError() -#else /* not WIN32 */ +#else /* not _WINDOWS */ # define zbx_sock_init() SUCCEED # define zbx_sock_close(sock) close(sock) # define zbx_sock_last_error() errno -#endif /* WIN32 */ +#endif /* _WINDOWS */ #endif /* ZABBIX_ZBXSOCK_H */ diff --git a/include/zbxtypes.h b/include/zbxtypes.h index 9e72edd8..4bc35c1e 100755 --- a/include/zbxtypes.h +++ b/include/zbxtypes.h @@ -20,7 +20,7 @@ #ifndef ZABBIX_TYPES_H #define ZABBIX_TYPES_H -#if defined(WIN32) +#if defined(_WINDOWS) # define zbx_uint64_t __int64 # define ZBX_FS_UI64 "%I64u" @@ -37,7 +37,7 @@ # define uint32_t __int32 #endif /* uint32_t */ -#else /* WIN32 */ +#else /* _WINDOWS */ # define zbx_uint64_t uint64_t # if __WORDSIZE == 64 @@ -48,7 +48,7 @@ # define zbx_pid_t pid_t -#endif /* WIN32 */ +#endif /* _WINDOWS */ #ifndef S_ISREG # define S_ISREG(x) (((x) & S_IFMT) == S_IFREG) |
