Index: /pjproject/branches/symbian/build/cc-mwcc.mak
===================================================================
--- /pjproject/branches/symbian/build/cc-mwcc.mak	(revision 496)
+++ /pjproject/branches/symbian/build/cc-mwcc.mak	(revision 496)
@@ -0,0 +1,22 @@
+export CC = mwccsym2 -c
+export AR = mwldsym2 -sym full -subsystem windows -msgstyle parseable -nowraplines -nodefaultlibs -library -o 
+export LD = mwldsym2.exe -sym full -subsystem windows -msgstyle parseable -nowraplines -nodefaultlibs -stdlib -noimplib -m="?_E32Startup@@YGXXZ" -L"C:\Symbian\7.0s\S80_DP2_0_SDK_CW\epoc32\release\winscw\udeb" -leexe.lib -l"euser.lib" -l"estlib.lib" -l"ecrt0.lib"
+export LDOUT = -o 
+export RANLIB = echo ranlib
+
+export OBJEXT := .o
+export LIBEXT := .lib
+export LIBEXT2 :=
+
+export CC_OUT := -o 
+export CC_INC := -i 
+export CC_DEF := -D
+export CC_OPTIMIZE := -O2
+export CC_LIB := -l
+
+export CC_SOURCES :=
+export CC_CFLAGS := -sym full -wchar_t off -align 4 -enum int -str pool -nostdinc -msgstyle parseable -nowraplines -O0 -D_UNICODE -D__SYMBIAN32__ -D__CW32__ -D__WINS__ -D__WINSCW__ -D_DEBUG -i-
+#export CC_CFLAGS += -Wdeclaration-after-statement
+export CC_CXXFLAGS := $(CC_CFLAGS)
+export CC_LDFLAGS :=
+
Index: /pjproject/branches/symbian/build/host-win32.mak
===================================================================
--- /pjproject/branches/symbian/build/host-win32.mak	(revision 495)
+++ /pjproject/branches/symbian/build/host-win32.mak	(revision 496)
@@ -1,6 +1,6 @@
 export HOST_MV := ren
-export HOST_RM := if exist @@; del /F /Q @@
-export HOST_RMR := if exist @@; del /F /Q @@
-export HOST_RMDIR := if exist @@; rmdir @@
+export HOST_RM := if exist @@; del /F /Q /S @@
+export HOST_RMR := if exist @@; del /F /Q /S @@
+export HOST_RMDIR := if exist @@; rmdir /S /Q @@
 export HOST_MKDIR := if not exist @@; mkdir @@
 export HOST_EXE := .exe
Index: /pjproject/branches/symbian/build/os-symbian.mak
===================================================================
--- /pjproject/branches/symbian/build/os-symbian.mak	(revision 495)
+++ /pjproject/branches/symbian/build/os-symbian.mak	(revision 496)
@@ -1,3 +1,3 @@
-export OS_CFLAGS   := $(CC_DEF)PJ_SYMBIAN=1 -I$(SYMBIAN_SDK_PATH)/include -I$(SYMBIAN_SDK_PATH)/include/libc -O
+export OS_CFLAGS   := $(CC_DEF)PJ_SYMBIAN=1 -I$(SYMBIAN_SDK_PATH)/include -I$(SYMBIAN_SDK_PATH)/include/libc -I../src/pjlib-test -O
 
 export OS_CXXFLAGS :=
Index: /pjproject/branches/symbian/pjlib/build/Makefile
===================================================================
--- /pjproject/branches/symbian/pjlib/build/Makefile	(revision 495)
+++ /pjproject/branches/symbian/pjlib/build/Makefile	(revision 496)
@@ -28,4 +28,5 @@
 	types.o symbols.o
 export PJLIB_CFLAGS += $(_CFLAGS)
+export PJLIB_CXXFLAGS += $(_CXXFLAGS)
 
 ###############################################################################
Index: /pjproject/branches/symbian/pjlib/build/os-symbian.mak
===================================================================
--- /pjproject/branches/symbian/pjlib/build/os-symbian.mak	(revision 495)
+++ /pjproject/branches/symbian/pjlib/build/os-symbian.mak	(revision 496)
@@ -8,5 +8,10 @@
 # to all operating systems should go in Makefile instead.
 #
-export PJLIB_OBJS +=
+export PJLIB_OBJS += addr_resolv_sock.o file_access_unistd.o \
+			file_io_ansi.o guid_simple.o \
+			log_writer_stdout.o os_core_symbian.o \
+			os_error_unix.o os_time_unix.o \
+			os_timestamp_common.o os_timestamp_posix.o \
+			pool_policy_malloc.o compat/string.o sock_bsd.o sock_select.o
 
 #
@@ -31,11 +36,6 @@
 # operating system.
 #
-export TARGETS	    =	pjlib pjlib-test.bas
-
-pjlib-test.bas: pjlib-test
-	@echo [creating bas]
+export TARGETS	    =	pjlib pjlib-test
 
 
 
-
-
Index: /pjproject/branches/symbian/pjlib/include/pj/compat/cc_mwcc.h
===================================================================
--- /pjproject/branches/symbian/pjlib/include/pj/compat/cc_mwcc.h	(revision 496)
+++ /pjproject/branches/symbian/pjlib/include/pj/compat/cc_mwcc.h	(revision 496)
@@ -0,0 +1,51 @@
+/* $Id: cc_gcc.h 122 2006-01-18 23:32:27Z bennylp $ */
+/* 
+ * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#ifndef __PJ_COMPAT_CC_MWCC_H__
+#define __PJ_COMPAT_CC_MWCC_H__
+
+/**
+ * @file cc_mwcc.h
+ * @brief Describes MWCC compiler specifics.
+ */
+
+#ifndef __CW32__
+#  error "This file is only for mwcc!"
+#endif
+
+#define PJ_CC_NAME		"mwcc32sym"
+#define PJ_CC_VER_1		1
+#define PJ_CC_VER_2		0
+#define PJ_CC_VER_3		0
+
+
+#define PJ_INLINE_SPECIFIER	static inline
+#define PJ_THREAD_FUNC	
+#define PJ_NORETURN		
+#define PJ_ATTR_NORETURN	__attribute__ ((noreturn))
+
+#define PJ_HAS_INT64		1
+
+typedef long long pj_int64_t;
+typedef unsigned long long pj_uint64_t;
+
+#define PJ_INT64_FMT		"L"
+
+
+#endif	/* __PJ_COMPAT_CC_MWCC_H__ */
+
Index: /pjproject/branches/symbian/pjlib/include/pj/compat/os_symbian.h
===================================================================
--- /pjproject/branches/symbian/pjlib/include/pj/compat/os_symbian.h	(revision 495)
+++ /pjproject/branches/symbian/pjlib/include/pj/compat/os_symbian.h	(revision 496)
@@ -41,4 +41,5 @@
 #define PJ_HAS_STDLIB_H		    1
 #define PJ_HAS_STRING_H		    1
+#define PJ_HAS_NO_SNPRINTF      1
 #define PJ_HAS_SYS_IOCTL_H	    1
 #define PJ_HAS_SYS_SELECT_H	    0
@@ -101,6 +102,6 @@
  */
 
-/*#define NULL			    ((void*)0)
-*/
+#define NULL			    ((void*)0)
+
 /*
  * Override features.
@@ -134,4 +135,7 @@
 #define PJ_THREAD_ALLOCATE_STACK    	0
 
+/* Missing socklen_t */
+typedef unsigned int socklen_t;
+
 #endif	/* __PJ_COMPAT_OS_SYMBIAN_H__ */
 
Index: /pjproject/branches/symbian/pjlib/include/pj/config.h
===================================================================
--- /pjproject/branches/symbian/pjlib/include/pj/config.h	(revision 495)
+++ /pjproject/branches/symbian/pjlib/include/pj/config.h	(revision 496)
@@ -32,4 +32,6 @@
 #elif defined(__GNUC__)
 #  include <pj/compat/cc_gcc.h>
+#elif defined(__CW32__)
+#  include <pj/compat/cc_mwcc.h>
 #else
 #  error "Unknown compiler."
Index: /pjproject/branches/symbian/pjlib/include/pj/sock.h
===================================================================
--- /pjproject/branches/symbian/pjlib/include/pj/sock.h	(revision 495)
+++ /pjproject/branches/symbian/pjlib/include/pj/sock.h	(revision 496)
@@ -61,6 +61,8 @@
  */
 extern const pj_uint16_t PJ_AF_UNIX;    /**< Unix domain socket.	*/
-#define PJ_AF_LOCAL	 PJ_AF_UNIX;    /**< POSIX name for AF_UNIX	*/
+extern const pj_uint16_t PJ_AF_LOCAL;    /**< Unix domain socket.	*/
+
 extern const pj_uint16_t PJ_AF_INET;    /**< Internet IP protocol.	*/
+
 extern const pj_uint16_t PJ_AF_INET6;   /**< IP version 6.		*/
 extern const pj_uint16_t PJ_AF_PACKET;  /**< Packet family.		*/
Index: /pjproject/branches/symbian/pjlib/src/pj/config.c
===================================================================
--- /pjproject/branches/symbian/pjlib/src/pj/config.c	(revision 495)
+++ /pjproject/branches/symbian/pjlib/src/pj/config.c	(revision 496)
@@ -1,4 +1,4 @@
 /* $Id$ */
-/* 
+/*
  * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
  *
@@ -15,5 +15,5 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <pj/config.h>
@@ -32,7 +32,7 @@
     PJ_LOG(3, (id, " PJ_HAS_PENTIUM            : %d", PJ_HAS_PENTIUM));
     PJ_LOG(3, (id, " PJ_OS_NAME                : %s", PJ_OS_NAME));
-    PJ_LOG(3, (id, " PJ_CC_NAME/VER_(1,2,3)    : %s-%d.%d.%d", PJ_CC_NAME,
-	       PJ_CC_VER_1, PJ_CC_VER_2, PJ_CC_VER_3));
-    PJ_LOG(3, (id, " PJ_IS_(BIG/LITTLE)_ENDIAN : %s", 
+/*    PJ_LOG(3, (id, " PJ_CC_NAME/VER_(1,2,3)    : %s-%d.%d.%d", PJ_CC_NAME,
+	       PJ_CC_VER_1, PJ_CC_VER_2, PJ_CC_VER_3));*/
+    PJ_LOG(3, (id, " PJ_IS_(BIG/LITTLE)_ENDIAN : %s",
 	       (PJ_IS_BIG_ENDIAN?"big-endian":"little-endian")));
     PJ_LOG(3, (id, " PJ_HAS_INT64              : %d", PJ_HAS_INT64));
Index: /pjproject/branches/symbian/pjlib/src/pj/os_core_symbian.cpp
===================================================================
--- /pjproject/branches/symbian/pjlib/src/pj/os_core_symbian.cpp	(revision 496)
+++ /pjproject/branches/symbian/pjlib/src/pj/os_core_symbian.cpp	(revision 496)
@@ -0,0 +1,117 @@
+/* $Id: os_core_unix.c 433 2006-05-10 19:24:40Z bennylp $ */
+/* 
+ * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+
+#include <pj/os.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+#include <pj/guid.h>
+#include <pj/except.h>
+#include <pj/errno.h>
+
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+#  include <semaphore.h>
+#endif
+
+#include <unistd.h>	    // getpid()
+#include <errno.h>	    // errno
+
+
+/*
+    TODO: implement these stub methods!
+*/
+
+/*
+ * pj_init(void).
+ * Init PJLIB!
+ */
+PJ_DEF(pj_status_t) pj_init(void)
+{
+
+  return PJ_SUCCESS;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * pj_thread_local_alloc()
+ */
+PJ_DEF(pj_status_t) pj_thread_local_alloc(long *index)
+{
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_thread_local_free()
+ */
+PJ_DEF(void) pj_thread_local_free(long index)
+{
+}
+
+/*
+ * pj_thread_local_set()
+ */
+PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value)
+{
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_thread_local_get()
+ */
+PJ_DEF(void*) pj_thread_local_get(long index)
+{
+    return NULL;
+}
+
+
+/*
+ * pj_mutex_create_simple()
+ */
+PJ_DEF(pj_status_t) pj_mutex_create_simple( pj_pool_t *pool, 
+                                            const char *name,
+					    pj_mutex_t **mutex )
+{
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_mutex_lock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_lock(pj_mutex_t *mutex)
+{
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_mutex_unlock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_unlock(pj_mutex_t *mutex)
+{
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_mutex_destroy()
+ */
+PJ_DEF(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex)
+{
+    return PJ_SUCCESS;
+}
Index: /pjproject/branches/symbian/pjlib/src/pj/sock_bsd.c
===================================================================
--- /pjproject/branches/symbian/pjlib/src/pj/sock_bsd.c	(revision 495)
+++ /pjproject/branches/symbian/pjlib/src/pj/sock_bsd.c	(revision 496)
@@ -29,7 +29,21 @@
  * The values here are indexed based on pj_addr_family.
  */
+#ifdef AF_UNIX
 const pj_uint16_t PJ_AF_UNIX	= AF_UNIX;
+const pj_uint16_t PJ_AF_LOCAL	= AF_UNIX;
+#else
+const pj_uint16_t PJ_AF_UNIX	= 0xFFFF;
+#ifdef AF_LOCAL
+const pj_uint16_t PJ_AF_LOCAL	= AF_LOCAL;
+#else
+const pj_uint16_t PJ_AF_LOCAL	= 0xFFFF;
+#endif
+#endif
 const pj_uint16_t PJ_AF_INET	= AF_INET;
+#ifdef AF_INET6
 const pj_uint16_t PJ_AF_INET6	= AF_INET6;
+#else
+const pj_uint16_t PJ_AF_INET6	= 0xFFFF;
+#endif
 #ifdef AF_PACKET
 const pj_uint16_t PJ_AF_PACKET	= AF_PACKET;
@@ -50,5 +64,9 @@
 const pj_uint16_t PJ_SOCK_DGRAM	= SOCK_DGRAM;
 const pj_uint16_t PJ_SOCK_RAW	= SOCK_RAW;
+#ifdef SOCK_RDM
 const pj_uint16_t PJ_SOCK_RDM	= SOCK_RDM;
+#else
+const pj_uint16_t PJ_SOCK_RDM	= 0xFFFF;
+#endif
 
 /*
@@ -78,5 +96,9 @@
 
 /* optname values. */
+#ifdef SO_TYPE
 const pj_uint16_t PJ_SO_TYPE    = SO_TYPE;
+#else
+const pj_uint16_t PJ_SO_TYPE    = 0xFFFF;
+#endif
 const pj_uint16_t PJ_SO_RCVBUF  = SO_RCVBUF;
 const pj_uint16_t PJ_SO_SNDBUF  = SO_SNDBUF;
@@ -462,6 +484,11 @@
     PJ_ASSERT_RETURN(len, PJ_EINVAL);
 
+#if !defined(PJ_SYMBIAN) && PJ_SYMBIAN == 0
     *len = sendto(sock, (const char*)buf, *len, flags, 
 		  (const struct sockaddr*)to, tolen);
+#else
+    *len = sendto(sock, (const char*)buf, *len, flags, 
+		  (struct sockaddr*)to, tolen);
+#endif
 
     if (*len < 0) 
@@ -543,5 +570,9 @@
 {
     PJ_CHECK_STACK();
+#if !defined(PJ_SYMBIAN) && PJ_SYMBIAN == 0
     if (setsockopt(sock, level, optname, (const char*)optval, optlen) != 0)
+#else
+    if (setsockopt(sock, level, optname, (void *)optval, optlen) != 0)
+#endif
 	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
     else
Index: /pjproject/branches/symbian/pjlib/src/pj/symbols.c
===================================================================
--- /pjproject/branches/symbian/pjlib/src/pj/symbols.c	(revision 495)
+++ /pjproject/branches/symbian/pjlib/src/pj/symbols.c	(revision 496)
@@ -249,5 +249,7 @@
 PJ_EXPORT_SYMBOL(PJ_AF_UNIX)
 PJ_EXPORT_SYMBOL(PJ_AF_INET)
+#ifdef AF_INET6
 PJ_EXPORT_SYMBOL(PJ_AF_INET6)
+#endif
 PJ_EXPORT_SYMBOL(PJ_AF_PACKET)
 PJ_EXPORT_SYMBOL(PJ_AF_IRDA)
Index: /pjproject/branches/symbian/pjlib/src/pjlib-test/test.h
===================================================================
--- /pjproject/branches/symbian/pjlib/src/pjlib-test/test.h	(revision 495)
+++ /pjproject/branches/symbian/pjlib/src/pjlib-test/test.h	(revision 496)
@@ -1,4 +1,4 @@
 /* $Id$ */
-/* 
+/*
  * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
  *
@@ -15,5 +15,5 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #ifndef __PJLIB_TEST_H__
@@ -42,5 +42,5 @@
 #define INCLUDE_MUTEX_TEST	    GROUP_OS
 #define INCLUDE_SLEEP_TEST          GROUP_OS
-#define INCLUDE_THREAD_TEST         GROUP_OS 
+#define INCLUDE_THREAD_TEST         GROUP_OS
 #define INCLUDE_SOCK_TEST	    GROUP_NETWORK
 #define INCLUDE_SOCK_PERF_TEST      GROUP_NETWORK
@@ -49,5 +49,5 @@
 #define INCLUDE_TCP_IOQUEUE_TEST    GROUP_NETWORK
 #define INCLUDE_IOQUEUE_PERF_TEST   GROUP_NETWORK
-#define INCLUDE_IOQUEUE_UNREG_TEST  1	// GROUP_NETWORK
+#define INCLUDE_IOQUEUE_UNREG_TEST  0	// GROUP_NETWORK
 #define INCLUDE_FILE_TEST           GROUP_FILE
 
