--- zabbix-1.8.10/include/common.h	2011-12-28 04:39:46.000000000 -0500
+++ zabbix-1.8.10.xlc/include/common.h	2012-01-12 17:09:43.000000000 -0500
@@ -424,7 +424,7 @@
 	ITEM_STATUS_ACTIVE = 0,
 	ITEM_STATUS_DISABLED,
 /*ITEM_STATUS_TRAPPED		2*/
-	ITEM_STATUS_NOTSUPPORTED = 3,
+	ITEM_STATUS_NOTSUPPORTED = 3
 /*ITEM_STATUS_DELETED		4*/
 /*ITEM_STATUS_NOTAVAILABLE	5*/
 } zbx_item_status_t;
@@ -457,7 +457,7 @@
 /*	TIMEPERIOD_TYPE_HOURLY,*/
 	TIMEPERIOD_TYPE_DAILY = 2,
 	TIMEPERIOD_TYPE_WEEKLY,
-	TIMEPERIOD_TYPE_MONTHLY,
+	TIMEPERIOD_TYPE_MONTHLY
 } zbx_timeperiod_type_t;
 
 typedef enum
--- zabbix-1.8.10/include/memalloc.h	2011-12-28 04:27:41.000000000 -0500
+++ zabbix-1.8.10.xlc/include/memalloc.h	2012-01-13 13:34:20.000000000 -0500
@@ -25,9 +25,9 @@
 
 typedef struct
 {
-	void		**buckets;
-	void		*lo_bound;
-	void		*hi_bound;
+	char		**buckets;
+	char		*lo_bound;
+	char		*hi_bound;
 	uint32_t	free_size;
 	uint32_t	used_size;
 	uint32_t	orig_size;
@@ -58,11 +58,11 @@
 size_t	zbx_mem_required_size(size_t size, int chunks_num, const char *descr, const char *param);
 
 #define ZBX_MEM_FUNC1_DECL_MALLOC(__prefix)				\
-static void	*__prefix ## _mem_malloc_func(void *old, size_t size)
+static void	*__prefix ## _mem_malloc_func(void *old, size_t size);
 #define ZBX_MEM_FUNC1_DECL_REALLOC(__prefix)				\
-static void	*__prefix ## _mem_realloc_func(void *old, size_t size)
+static void	*__prefix ## _mem_realloc_func(void *old, size_t size);
 #define ZBX_MEM_FUNC1_DECL_FREE(__prefix)				\
-static void	__prefix ## _mem_free_func(void *ptr)
+static void	__prefix ## _mem_free_func(void *ptr);
 
 #define ZBX_MEM_FUNC1_IMPL_MALLOC(__prefix, __info)			\
 									\
@@ -87,14 +87,14 @@
 
 #define ZBX_MEM_FUNC_DECL(__prefix)					\
 									\
-ZBX_MEM_FUNC1_DECL_MALLOC(__prefix);					\
-ZBX_MEM_FUNC1_DECL_REALLOC(__prefix);					\
-ZBX_MEM_FUNC1_DECL_FREE(__prefix);
+ZBX_MEM_FUNC1_DECL_MALLOC(__prefix)					\
+ZBX_MEM_FUNC1_DECL_REALLOC(__prefix)					\
+ZBX_MEM_FUNC1_DECL_FREE(__prefix)
 
 #define ZBX_MEM_FUNC_IMPL(__prefix, __info)				\
 									\
-ZBX_MEM_FUNC1_IMPL_MALLOC(__prefix, __info);				\
-ZBX_MEM_FUNC1_IMPL_REALLOC(__prefix, __info);				\
-ZBX_MEM_FUNC1_IMPL_FREE(__prefix, __info);
+ZBX_MEM_FUNC1_IMPL_MALLOC(__prefix, __info)				\
+ZBX_MEM_FUNC1_IMPL_REALLOC(__prefix, __info)				\
+ZBX_MEM_FUNC1_IMPL_FREE(__prefix, __info)
 
 #endif
--- zabbix-1.8.10/include/zbxalgo.h	2011-12-28 04:27:41.000000000 -0500
+++ zabbix-1.8.10.xlc/include/zbxalgo.h	2012-01-13 13:33:04.000000000 -0500
@@ -256,7 +256,7 @@
 void	zbx_vector_ ## __id ## _reserve(zbx_vector_ ## __id ## _t *vector, size_t size);			\
 void	zbx_vector_ ## __id ## _clear(zbx_vector_ ## __id ## _t *vector);
 
-ZBX_VECTOR_DECL(uint64, zbx_uint64_t);
-ZBX_VECTOR_DECL(ptr, void *);
+ZBX_VECTOR_DECL(uint64, zbx_uint64_t)
+ZBX_VECTOR_DECL(ptr, void *)
 
 #endif
--- zabbix-1.8.10/src/libs/zbxalgo/algodefs.c	2011-12-28 04:27:42.000000000 -0500
+++ zabbix-1.8.10.xlc/src/libs/zbxalgo/algodefs.c	2012-01-12 17:22:54.000000000 -0500
@@ -21,14 +21,12 @@
 
 #include "zbxalgo.h"
 
-typedef unsigned char uchar;
-
 /*
  * Bob Jenkins hash function (see http://burtleburtle.net/bob/hash/evahash.html)
  */
 zbx_hash_t	zbx_hash_lookup2(const void *data, size_t len, zbx_hash_t seed)
 {
-	const uchar	*p = (const uchar *)data;
+	const uint8_t	*p = (const uint8_t *)data;
 
 	zbx_hash_t	a, b, c;
 
@@ -87,7 +85,7 @@
  */
 zbx_hash_t	zbx_hash_modfnv(const void *data, size_t len, zbx_hash_t seed)
 {
-	const uchar	*p = (const uchar *)data;
+	const uint8_t	*p = (const uint8_t *)data;
 
 	zbx_hash_t	hash;
 
@@ -112,7 +110,7 @@
  */
 zbx_hash_t	zbx_hash_murmur2(const void *data, size_t len, zbx_hash_t seed)
 {
-	const uchar	*p = (const uchar *)data;
+	const uint8_t	*p = (const uint8_t *)data;
 
 	zbx_hash_t	hash;
 
@@ -161,7 +159,7 @@
  */
 zbx_hash_t	zbx_hash_sdbm(const void *data, size_t len, zbx_hash_t seed)
 {
-	const uchar	*p = (const uchar *)data;
+	const uint8_t	*p = (const uint8_t *)data;
 
 	zbx_hash_t	hash = seed;
 
@@ -206,7 +204,7 @@
  */
 zbx_hash_t	zbx_hash_djb2(const void *data, size_t len, zbx_hash_t seed)
 {
-	const uchar	*p = (const uchar *)data;
+	const uint8_t	*p = (const uint8_t *)data;
 
 	zbx_hash_t	hash;
        
--- zabbix-1.8.10/src/libs/zbxalgo/vector.c	2011-12-28 04:27:42.000000000 -0500
+++ zabbix-1.8.10.xlc/src/libs/zbxalgo/vector.c	2012-01-12 17:40:17.000000000 -0500
@@ -177,5 +177,5 @@
 	}													\
 }
 
-ZBX_VECTOR_IMPL(uint64, zbx_uint64_t);
-ZBX_VECTOR_IMPL(ptr, void *);
+ZBX_VECTOR_IMPL(uint64, zbx_uint64_t)
+ZBX_VECTOR_IMPL(ptr, void *)
--- zabbix-1.8.10/src/libs/zbxdbcache/dbcache.c	2011-12-28 04:27:42.000000000 -0500
+++ zabbix-1.8.10.xlc/src/libs/zbxdbcache/dbcache.c	2012-01-12 17:45:43.000000000 -0500
@@ -2805,9 +2805,9 @@
  *                                                                            *
  ******************************************************************************/
 
-ZBX_MEM_FUNC1_IMPL_MALLOC(__history, history_mem);
-ZBX_MEM_FUNC1_IMPL_MALLOC(__history_text, history_text_mem);
-ZBX_MEM_FUNC_IMPL(__trend, trend_mem);
+ZBX_MEM_FUNC1_IMPL_MALLOC(__history, history_mem)
+ZBX_MEM_FUNC1_IMPL_MALLOC(__history_text, history_text_mem)
+ZBX_MEM_FUNC_IMPL(__trend, trend_mem)
 
 void	init_database_cache()
 {
--- zabbix-1.8.10/src/libs/zbxdbcache/dbconfig.c	2011-12-28 04:27:42.000000000 -0500
+++ zabbix-1.8.10.xlc/src/libs/zbxdbcache/dbconfig.c	2012-01-13 13:27:58.000000000 -0500
@@ -1290,7 +1290,7 @@
  *                                                                            *
  ******************************************************************************/
 
-ZBX_MEM_FUNC_IMPL(__config, config_mem);
+ZBX_MEM_FUNC_IMPL(__config, config_mem)
 
 static zbx_hash_t	__config_item_hk_hash(const void *data)
 {
--- zabbix-1.8.10/src/libs/zbxmedia/sms.c	2011-12-28 04:27:42.000000000 -0500
+++ zabbix-1.8.10.xlc/src/libs/zbxmedia/sms.c	2012-01-12 18:11:29.000000000 -0500
@@ -222,6 +222,9 @@
 #ifdef ONOCR
 	options.c_oflag = ONOCR;
 #endif	/* ONOCR */
+#ifndef   CRTSCTS
+#  define CRTSCTS 0
+#endif
 
 	options.c_cflag = old_options.c_cflag | CRTSCTS | CS8 | CLOCAL | CREAD;
 	options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
--- zabbix-1.8.10/src/libs/zbxmemory/memalloc.c	2011-12-28 04:27:42.000000000 -0500
+++ zabbix-1.8.10.xlc/src/libs/zbxmemory/memalloc.c	2012-01-13 13:47:59.000000000 -0500
@@ -94,22 +94,18 @@
 #define LOCK_INFO	if (info->use_lock) zbx_mutex_lock(&info->mem_lock)
 #define UNLOCK_INFO	if (info->use_lock) zbx_mutex_unlock(&info->mem_lock)
 
-static void	*ALIGN4(void *ptr);
-static void	*ALIGN8(void *ptr);
-static void	*ALIGNPTR(void *ptr);
-
 static uint32_t	mem_proper_alloc_size(uint32_t size);
 static int	mem_bucket_by_size(uint32_t size);
 
-static void	mem_set_chunk_size(void *chunk, uint32_t size);
-static void	mem_set_used_chunk_size(void *chunk, uint32_t size);
+static void	mem_set_chunk_size(char *chunk, uint32_t size);
+static void	mem_set_used_chunk_size(char *chunk, uint32_t size);
 
-static void	*mem_get_prev_chunk(void *chunk);
-static void	mem_set_prev_chunk(void *chunk, void *prev);
-static void	*mem_get_next_chunk(void *chunk);
-static void	mem_set_next_chunk(void *chunk, void *next);
-static void	**mem_ptr_to_prev_field(void *chunk);
-static void	**mem_ptr_to_next_field(void *chunk, void **first_chunk);
+static void	*mem_get_prev_chunk(char *chunk);
+static void	mem_set_prev_chunk(char *chunk, void *prev);
+static void	*mem_get_next_chunk(char *chunk);
+static void	mem_set_next_chunk(char *chunk, void *next);
+static void	**mem_ptr_to_prev_field(char *chunk);
+static void	**mem_ptr_to_next_field(char *chunk, void **first_chunk);
 
 static void	mem_link_chunk(zbx_mem_info_t *info, void *chunk);
 static void	mem_unlink_chunk(zbx_mem_info_t *info, void *chunk);
@@ -136,17 +132,17 @@
 
 /* helper functions */
 
-static void	*ALIGN4(void *ptr)
+static char	*ALIGN4(char *ptr)
 {
-	return (void *)((uintptr_t)(ptr + 3) & (uintptr_t)~3);
+	return (char *)((uintptr_t)(ptr + 3) & (uintptr_t)~3);
 }
 
-static void	*ALIGN8(void *ptr)
+static char	*ALIGN8(char *ptr)
 {
-	return (void *)((uintptr_t)(ptr + 7) & (uintptr_t)~7);
+	return (char *)((uintptr_t)(ptr + 7) & (uintptr_t)~7);
 }
 
-static void	*ALIGNPTR(void *ptr)
+static char	*ALIGNPTR(char *ptr)
 {
 	if (4 == ZBX_PTR_SIZE)
 		return ALIGN4(ptr);
@@ -172,44 +168,44 @@
 	return MEM_BUCKET_COUNT - 1;
 }
 
-static void	mem_set_chunk_size(void *chunk, uint32_t size)
+static void	mem_set_chunk_size(char *chunk, uint32_t size)
 {
 	*(uint32_t *)chunk = size;
 	*(uint32_t *)(chunk + MEM_SIZE_FIELD + size) = size;
 }
 
-static void	mem_set_used_chunk_size(void *chunk, uint32_t size)
+static void	mem_set_used_chunk_size(char *chunk, uint32_t size)
 {
 	*(uint32_t *)chunk = MEM_FLG_USED | size;
 	*(uint32_t *)(chunk + MEM_SIZE_FIELD + size) = MEM_FLG_USED | size;
 }
 
-static void	*mem_get_prev_chunk(void *chunk)
+static void	*mem_get_prev_chunk(char *chunk)
 {
 	return *(void **)(chunk + MEM_SIZE_FIELD);
 }
 
-static void	mem_set_prev_chunk(void *chunk, void *prev)
+static void	mem_set_prev_chunk(char *chunk, void *prev)
 {
 	*(void **)(chunk + MEM_SIZE_FIELD) = prev;
 }
 
-static void	*mem_get_next_chunk(void *chunk)
+static void	*mem_get_next_chunk(char *chunk)
 {
 	return *(void **)(chunk + MEM_SIZE_FIELD + ZBX_PTR_SIZE);
 }
 
-static void	mem_set_next_chunk(void *chunk, void *next)
+static void	mem_set_next_chunk(char *chunk, void *next)
 {
 	*(void **)(chunk + MEM_SIZE_FIELD + ZBX_PTR_SIZE) = next;
 }
 
-static void	**mem_ptr_to_prev_field(void *chunk)
+static void	**mem_ptr_to_prev_field(char *chunk)
 {
 	return (NULL != chunk ? (void **)(chunk + MEM_SIZE_FIELD) : NULL);
 }
 
-static void	**mem_ptr_to_next_field(void *chunk, void **first_chunk)
+static void	**mem_ptr_to_next_field(char *chunk, void **first_chunk)
 {
 	return (NULL != chunk ? (void **)(chunk + MEM_SIZE_FIELD + ZBX_PTR_SIZE) : first_chunk);
 }
@@ -240,7 +236,7 @@
 	prev_chunk = mem_get_prev_chunk(chunk);
 	next_chunk = mem_get_next_chunk(chunk);
 
-	next_in_prev_chunk = mem_ptr_to_next_field(prev_chunk, &info->buckets[index]);
+	next_in_prev_chunk = mem_ptr_to_next_field(prev_chunk, (void **)&info->buckets[index]);
 	prev_in_next_chunk = mem_ptr_to_prev_field(next_chunk);
 
 	*next_in_prev_chunk = next_chunk;
@@ -253,7 +249,7 @@
 static void	*__mem_malloc(zbx_mem_info_t *info, uint32_t size)
 {
 	int		index;
-	void		*chunk;
+	char		*chunk;
 	uint32_t	chunk_size;
 
 	size = mem_proper_alloc_size(size);
@@ -307,7 +303,7 @@
 	}
 	else
 	{
-		void		*new_chunk;
+		char		*new_chunk;
 		uint32_t	new_chunk_size;
 
 		new_chunk = chunk + MEM_SIZE_FIELD + size + MEM_SIZE_FIELD;
@@ -327,13 +323,13 @@
 
 static void	*__mem_realloc(zbx_mem_info_t *info, void *old, uint32_t size)
 {
-	void		*chunk, *new_chunk, *next_chunk;
+	char		*chunk, *new_chunk, *next_chunk;
 	uint32_t	chunk_size, new_chunk_size;
 	int		next_free;
 
 	size = mem_proper_alloc_size(size);
 
-	chunk = old - MEM_SIZE_FIELD;
+	chunk = (char*)old - MEM_SIZE_FIELD;
 	chunk_size = CHUNK_SIZE(chunk);
 
 	next_chunk = chunk + MEM_SIZE_FIELD + chunk_size + MEM_SIZE_FIELD;
@@ -451,12 +447,12 @@
 
 static void	__mem_free(zbx_mem_info_t *info, void *ptr)
 {
-	void		*chunk;
-	void		*prev_chunk, *next_chunk;
+	char		*chunk;
+	char		*prev_chunk, *next_chunk;
 	uint32_t	chunk_size;
 	int		prev_free, next_free;
 
-	chunk = ptr - MEM_SIZE_FIELD;
+	chunk = (char*)ptr - MEM_SIZE_FIELD;
 	chunk_size = CHUNK_SIZE(chunk);
 
 	info->used_size -= chunk_size;
@@ -523,7 +519,7 @@
 	const char	*__function_name = "zbx_mem_create";
 
 	int		shm_id, index;
-	void		*base, *chunk_lsize, *chunk_rsize;
+	char		*base, *chunk_lsize, *chunk_rsize;
 
 	descr = (NULL == descr ? "(null)" : descr);
 	param = (NULL == param ? "(null)" : param);
@@ -561,16 +557,16 @@
 
 	/* allocate zbx_mem_info_t structure, its buckets, and description inside shared memory */
 
-	*info = ALIGN8(base);
+	*info = (zbx_mem_info_t*) ALIGN8(base);
 	(*info)->shm_id = shm_id;
 	(*info)->orig_size = (uint32_t)size;
-	size -= (void *)(*info + 1) - base;
-	base = (void *)(*info + 1);
-
-	(*info)->buckets = ALIGNPTR(base);
+	size -= ((char*)*info) + sizeof(zbx_mem_info_t) - base;
+	base =  ((char*)*info) + sizeof(zbx_mem_info_t);
+	
+	(*info)->buckets = (char**)ALIGNPTR(base);
 	memset((*info)->buckets, 0, MEM_BUCKET_COUNT * ZBX_PTR_SIZE);
-	size -= (void *)((*info)->buckets + MEM_BUCKET_COUNT) - base;
-	base = (void *)((*info)->buckets + MEM_BUCKET_COUNT);
+	size -= (char *)((*info)->buckets + MEM_BUCKET_COUNT) - base;
+	base = (char*)((*info)->buckets + MEM_BUCKET_COUNT);
 
 	zbx_strlcpy(base, descr, size);
 	(*info)->mem_descr = base;
@@ -624,8 +620,8 @@
 	(*info)->free_size = (*info)->total_size;
 
 	zabbix_log(LOG_LEVEL_DEBUG, "valid user addresses: [%p, %p] total size: " ZBX_FS_SIZE_T,
-			(*info)->lo_bound + MEM_SIZE_FIELD,
-			(*info)->hi_bound - MEM_SIZE_FIELD,
+			(char*)(*info)->lo_bound + MEM_SIZE_FIELD,
+			(char*)(*info)->hi_bound - MEM_SIZE_FIELD,
 			(zbx_fs_size_t)(*info)->total_size);
 
 	zabbix_log(LOG_LEVEL_DEBUG, "End of %s()", __function_name);
@@ -653,7 +649,7 @@
 {
 	const char	*__function_name = "zbx_mem_malloc";
 
-	void		*chunk;
+	char		*chunk;
 
 	if (NULL != old)
 	{
@@ -671,7 +667,7 @@
 
 	LOCK_INFO;
 
-	chunk = __mem_malloc(info, (uint32_t)size);
+	chunk = (char*) __mem_malloc(info, (uint32_t)size);
 
 	UNLOCK_INFO;
 
@@ -691,7 +687,7 @@
 {
 	const char	*__function_name = "zbx_mem_realloc";
 
-	void		*chunk;
+	char		*chunk;
 
 	if (0 == size || size > MEM_MAX_SIZE)
 	{
@@ -703,9 +699,9 @@
 	LOCK_INFO;
 
 	if (NULL == old)
-		chunk = __mem_malloc(info, (uint32_t)size);
+		chunk = (char*)__mem_malloc(info, (uint32_t)size);
 	else
-		chunk = __mem_realloc(info, old, (uint32_t)size);
+		chunk = (char*)__mem_realloc(info, old, (uint32_t)size);
 
 	UNLOCK_INFO;
 
--- zabbix-1.8.10/src/libs/zbxmemory/strpool.c	2011-12-28 04:27:42.000000000 -0500
+++ zabbix-1.8.10.xlc/src/libs/zbxmemory/strpool.c	2012-01-13 13:29:11.000000000 -0500
@@ -34,10 +34,7 @@
 
 static zbx_strpool_t	strpool;
 
-static zbx_hash_t	__strpool_hash_func(const void *data);
-static int		__strpool_compare_func(const void *d1, const void *d2);
-
-ZBX_MEM_FUNC_DECL(__strpool);
+ZBX_MEM_FUNC_DECL(__strpool)
 
 #define INIT_HASHSET_SIZE	1000
 #define	REFCOUNT_FIELD_SIZE	sizeof(uint32_t)
@@ -46,15 +43,15 @@
 
 static zbx_hash_t	__strpool_hash_func(const void *data)
 {
-	return ZBX_DEFAULT_STRING_HASH_FUNC(data + REFCOUNT_FIELD_SIZE);
+	return ZBX_DEFAULT_STRING_HASH_FUNC((char*)data + REFCOUNT_FIELD_SIZE);
 }
 
 static int	__strpool_compare_func(const void *d1, const void *d2)
 {
-	return strcmp(d1 + REFCOUNT_FIELD_SIZE, d2 + REFCOUNT_FIELD_SIZE);
+	return strcmp((char*)d1 + REFCOUNT_FIELD_SIZE, (char*)d2 + REFCOUNT_FIELD_SIZE);
 }
 
-ZBX_MEM_FUNC_IMPL(__strpool, strpool.mem_info);
+ZBX_MEM_FUNC_IMPL(__strpool, strpool.mem_info)
 
 /* public strpool interface */
 
@@ -123,7 +120,7 @@
 
 	UNLOCK_POOL;
 
-	return record + REFCOUNT_FIELD_SIZE;
+	return (char*)record + REFCOUNT_FIELD_SIZE;
 }
 
 const char	*zbx_strpool_acquire(const char *str)
