Index: pjproject/main/pjlib/include/pj/addr_resolv.h
===================================================================
--- pjproject/main/pjlib/include/pj/addr_resolv.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/addr_resolv.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/array.h
===================================================================
--- pjproject/main/pjlib/include/pj/array.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/array.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/assert.h
===================================================================
--- pjproject/main/pjlib/include/pj/assert.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/assert.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/assert.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/assert.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/assert.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/cc_gcc.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/cc_gcc.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/cc_gcc.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/cc_msvc.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/cc_msvc.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/cc_msvc.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/ctype.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/ctype.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/ctype.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/errno.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/errno.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/errno.h	(revision 2)
@@ -10,5 +10,6 @@
 
 #elif (defined(PJ_LINUX) && PJ_LINUX != 0) || \
-      (defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0)
+      (defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0) || \
+      (defined(PJ_SUNOS) && PJ_SUNOS != 0)
 
     typedef int pj_os_err_type;
Index: pjproject/main/pjlib/include/pj/compat/high_precision.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/high_precision.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/high_precision.h	(revision 2)
@@ -36,4 +36,6 @@
 
 #else
+#   warning "High precision math is not available"
+
     /*
      * Last, fallback to 32-bit arithmetics.
Index: pjproject/main/pjlib/include/pj/compat/m_alpha.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/m_alpha.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/m_alpha.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/m_i386.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/m_i386.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/m_i386.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/m_m68k.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/m_m68k.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/m_m68k.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/m_sparc.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/m_sparc.h	(revision 2)
+++ pjproject/main/pjlib/include/pj/compat/m_sparc.h	(revision 2)
@@ -0,0 +1,21 @@
+/* $Header:  $ */
+/* 
+ *$Log:  $
+ * 
+ */
+#ifndef __PJ_COMPAT_M_SPARC_H__
+#define __PJ_COMPAT_M_SPARC_H__
+
+/**
+ * @file m_sparc.h
+ * @brief Describes SPARC family processor specifics.
+ */
+
+#define PJ_SPARC		1
+
+#define PJ_HAS_PENTIUM		0
+#define PJ_IS_LITTLE_ENDIAN	0
+#define PJ_IS_BIG_ENDIAN	1
+
+
+#endif	/* __PJ_COMPAT_M_SPARC_H__ */
Index: pjproject/main/pjlib/include/pj/compat/malloc.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/malloc.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/malloc.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/os_linux.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/os_linux.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/os_linux.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/os_linux_kernel.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/os_linux_kernel.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/os_linux_kernel.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/os_palmos.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/os_palmos.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/os_palmos.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/os_sunos.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/os_sunos.h	(revision 2)
+++ pjproject/main/pjlib/include/pj/compat/os_sunos.h	(revision 2)
@@ -0,0 +1,56 @@
+/* $Header:  $ */
+/* $Log:  $
+ * 
+ */
+#ifndef __PJ_COMPAT_OS_SUNOS_H__
+#define __PJ_COMPAT_OS_SUNOS_H__
+
+/**
+ * @file os_sunos.h
+ * @brief Describes SunOS/Solaris operating system specifics.
+ */
+
+#define PJ_HAS_ARPA_INET_H	    1
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    1
+#define PJ_HAS_LINUX_SOCKET_H	    0
+#define PJ_HAS_MALLOC_H		    1
+#define PJ_HAS_NETDB_H		    1
+#define PJ_HAS_NETINET_IN_H	    1
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    1
+#define PJ_HAS_SYS_SELECT_H	    1
+#define PJ_HAS_SYS_SOCKET_H	    1
+#define PJ_HAS_SYS_TIMEB_H	    1
+#define PJ_HAS_SYS_TYPES_H	    1
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    1
+
+#define PJ_HAS_MSWSOCK_H	    0
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    0
+
+#define PJ_SOCK_HAS_INET_ATON	    0
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS	    (1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER	    1
+#define PJ_HAS_MALLOC               1
+#define PJ_OS_HAS_CHECK_STACK	    0
+
+#define PJ_ATOMIC_VALUE_TYPE	    long
+
+/* Get BSD related identifers in Sun's include files */
+#define BSD_COMP
+
+#endif	/* __PJ_COMPAT_OS_SUNOS_H__ */
+
Index: pjproject/main/pjlib/include/pj/compat/os_win32.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/os_win32.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/os_win32.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/rand.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/rand.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/rand.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/setjmp.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/setjmp.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/setjmp.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/size_t.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/size_t.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/size_t.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/socket.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/socket.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/socket.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/sprintf.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/sprintf.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/sprintf.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/stdarg.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/stdarg.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/stdarg.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/stdfileio.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/stdfileio.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/stdfileio.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/string.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/string.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/string.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/time.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/time.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/time.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/compat/vsprintf.h
===================================================================
--- pjproject/main/pjlib/include/pj/compat/vsprintf.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/compat/vsprintf.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/config.h
===================================================================
--- pjproject/main/pjlib/include/pj/config.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/config.h	(revision 2)
@@ -22,14 +22,16 @@
 
 /********************************************************************
- * Include target specific configuration.
- */
-#if defined(PJ_WIN32)
+ * Include target OS specific configuration.
+ */
+#if defined(PJ_WIN32) && PJ_WIN32!=0
 #  include <pj/compat/os_win32.h>
-#elif defined(PJ_LINUX)
+#elif defined(PJ_LINUX) && PJ_LINUX!=0
 #  include <pj/compat/os_linux.h>
-#elif defined(PJ_LINUX_KERNEL)
+#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0
 #  include <pj/compat/os_linux_kernel.h>
-#elif defined(PJ_PALMOS)
+#elif defined(PJ_PALMOS) && PJ_PALMOS!=0
 #  include <pj/compat/os_palmos.h>
+#elif defined(PJ_SUNOS) && PJ_SUNOS!=0
+#  include <pj/compat/os_sunos.h>
 #else
 #  error "Please specify target os."
@@ -41,9 +43,11 @@
  */
 #if defined (PJ_M_I386) && PJ_M_I386 != 0
-#  include <pj/compat/m_i386.h>
+#   include <pj/compat/m_i386.h>
 #elif defined (PJ_M_M68K) && PJ_M_M68K != 0
 #   include <pj/compat/m_m68k.h>
 #elif defined (PJ_M_ALPHA) && PJ_M_ALPHA != 0
 #   include <pj/compat/m_alpha.h>
+#elif defined (PJ_M_SPARC) && PJ_M_SPARC != 0
+#   include <pj/compat/m_sparc.h>
 #else
 #  error "Please specify target machine."
Index: pjproject/main/pjlib/include/pj/ctype.h
===================================================================
--- pjproject/main/pjlib/include/pj/ctype.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/ctype.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/doxygen.h
===================================================================
--- pjproject/main/pjlib/include/pj/doxygen.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/doxygen.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/equeue.h
===================================================================
--- pjproject/main/pjlib/include/pj/equeue.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/equeue.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/errno.h
===================================================================
--- pjproject/main/pjlib/include/pj/errno.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/errno.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/except.h
===================================================================
--- pjproject/main/pjlib/include/pj/except.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/except.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/fifobuf.h
===================================================================
--- pjproject/main/pjlib/include/pj/fifobuf.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/fifobuf.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/guid.h
===================================================================
--- pjproject/main/pjlib/include/pj/guid.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/guid.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/hash.h
===================================================================
--- pjproject/main/pjlib/include/pj/hash.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/hash.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/ioqueue.h
===================================================================
--- pjproject/main/pjlib/include/pj/ioqueue.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/ioqueue.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/list.h
===================================================================
--- pjproject/main/pjlib/include/pj/list.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/list.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/list_i.h
===================================================================
--- pjproject/main/pjlib/include/pj/list_i.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/list_i.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/lock.h
===================================================================
--- pjproject/main/pjlib/include/pj/lock.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/lock.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/log.h
===================================================================
--- pjproject/main/pjlib/include/pj/log.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/log.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/md5.h
===================================================================
--- pjproject/main/pjlib/include/pj/md5.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/md5.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/os.h
===================================================================
--- pjproject/main/pjlib/include/pj/os.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/os.h	(revision 2)
@@ -58,5 +58,5 @@
  */
 #if !defined(PJ_THREAD_DESC_SIZE)
-#   define PJ_THREAD_DESC_SIZE	    (PJ_MAX_OBJ_NAME + 10*sizeof(long))
+#   define PJ_THREAD_DESC_SIZE	    (16)
 #endif
 
@@ -65,5 +65,5 @@
  * or native API. 
  */
-typedef pj_uint8_t pj_thread_desc[PJ_THREAD_DESC_SIZE];
+typedef long pj_thread_desc[PJ_THREAD_DESC_SIZE];
 
 /**
@@ -245,5 +245,5 @@
  * @param value	    The value.
  */
-PJ_DECL(void) pj_thread_local_set(long index, void *value);
+PJ_DECL(pj_status_t) pj_thread_local_set(long index, void *value);
 
 /**
@@ -784,6 +784,11 @@
     struct
     {
+#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0
 	pj_uint32_t lo;     /**< Low 32-bit value of the 64-bit value. */
 	pj_uint32_t hi;     /**< high 32-bit value of the 64-bit value. */
+#else
+	pj_uint32_t hi;     /**< high 32-bit value of the 64-bit value. */
+	pj_uint32_t lo;     /**< Low 32-bit value of the 64-bit value. */
+#endif
     } u32;                  /**< The 64-bit value as two 32-bit values. */
 
Index: pjproject/main/pjlib/include/pj/pool.h
===================================================================
--- pjproject/main/pjlib/include/pj/pool.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/pool.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/pool_i.h
===================================================================
--- pjproject/main/pjlib/include/pj/pool_i.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/pool_i.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/rand.h
===================================================================
--- pjproject/main/pjlib/include/pj/rand.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/rand.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/rbtree.h
===================================================================
--- pjproject/main/pjlib/include/pj/rbtree.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/rbtree.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/scanner.h
===================================================================
--- pjproject/main/pjlib/include/pj/scanner.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/scanner.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/sock.h
===================================================================
--- pjproject/main/pjlib/include/pj/sock.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/sock.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/sock_select.h
===================================================================
--- pjproject/main/pjlib/include/pj/sock_select.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/sock_select.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/string.h
===================================================================
--- pjproject/main/pjlib/include/pj/string.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/string.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/string_i.h
===================================================================
--- pjproject/main/pjlib/include/pj/string_i.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/string_i.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/stun.h
===================================================================
--- pjproject/main/pjlib/include/pj/stun.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/stun.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/timer.h
===================================================================
--- pjproject/main/pjlib/include/pj/timer.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/timer.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/types.h
===================================================================
--- pjproject/main/pjlib/include/pj/types.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/types.h	(revision 2)
Index: pjproject/main/pjlib/include/pj/xml.h
===================================================================
--- pjproject/main/pjlib/include/pj/xml.h	(revision 1)
+++ pjproject/main/pjlib/include/pj/xml.h	(revision 2)
