Index: pjproject/trunk/build.symbian/00.bat
===================================================================
--- pjproject/trunk/build.symbian/00.bat	(revision 1404)
+++ pjproject/trunk/build.symbian/00.bat	(revision 1405)
@@ -1,5 +1,6 @@
-rem set MWSym2Libraries=1
-rem set EPOCROOT=\Symbian\9.1\S60_3rd\
-rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\
-rem set EPOCROOT=\Symbian\UIQ3SDK\
+@rem set MWSym2Libraries=1
+@rem set EPOCROOT=\Symbian\9.1\S60_3rd\
+@rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\
+@rem set EPOCROOT=\Symbian\UIQ3SDK\
+@rem set EPOCROOT=\symbian\UIQ3.1\
 bldmake bldfiles
Index: pjproject/trunk/build.symbian/01.bat
===================================================================
--- pjproject/trunk/build.symbian/01.bat	(revision 1404)
+++ pjproject/trunk/build.symbian/01.bat	(revision 1405)
@@ -1,6 +1,7 @@
-rem set MWSym2Libraries=1
-rem set MWSym2Libraries=\Symbian\9.1\S60_3rd\Epoc32\release\winscw\udeb
+@rem call abld build -v vs6 udeb
+@rem call abld build -v gcce urel
+@rem call abld build winscw udeb
+call abld build %1 %2 %3 %4
 
-rem set EPOCROOT=\Symbian\9.1\S60_3rd\
-rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\
-call abld build -v vs6 udeb
+
+
Index: pjproject/trunk/build.symbian/bld.inf
===================================================================
--- pjproject/trunk/build.symbian/bld.inf	(revision 1404)
+++ pjproject/trunk/build.symbian/bld.inf	(revision 1405)
@@ -1,9 +1,10 @@
 prj_platforms
 winscw
-armv5
+//armv5
 gcce
 
 prj_mmpfiles
 pjlib.mmp
+pjlib_test.mmp
 pjlib_util.mmp
 pjnath.mmp
@@ -13,6 +14,6 @@
 pjsip_simple.mmp
 pjsip_ua.mmp
-//pjlib_test.mmp
-//sipstateless.mmp
+pjlib_test.mmp
+sipstateless.mmp
 pjsua_lib.mmp
 null_audio.mmp
Index: pjproject/trunk/build.symbian/makedef.sh
===================================================================
--- pjproject/trunk/build.symbian/makedef.sh	(revision 1405)
+++ pjproject/trunk/build.symbian/makedef.sh	(revision 1405)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+MMP=$1
+if test "$MMP" == ""; then
+	echo Usage: makedef.sh FILE.MMP
+	exit 1
+fi
+
+if test -f $MMP; then
+	true
+else
+	echo "Unable to open $MMP"
+	exit 1
+fi
+
+TARGET=`grep -w TARGET $MMP | awk '{print $2}' | awk -F '.' '{print $1}' | head -1`
+DEFFILE="${TARGET}U.def"
+SOURCES=`grep -w SOURCE $MMP | awk '{print $2}' | tr '\\\\' '/'`
+SOURCEPATH=`grep -w SOURCEPATH $MMP | tr '\\\\' '/' | awk '{print $2}'`
+INCPATH=`grep INCLUDE $MMP | awk '{print $2}' | grep pj | tr '\\\\' '/'`
+INCLUDE=""
+for INC in $INCPATH; do
+	INCLUDE=`echo $INCLUDE -I$INC`
+done
+
+echo > tmpnames.def
+
+
+for file in $SOURCES; do
+	#SYMBOLS=`grep PJ_DEF ${SOURCEPATH}/$file | awk -F ')' '{print $2}' | awk -F '(' '{print $1}' | awk -F '=' '{print $1}' | tr -d '[:blank:]' | sort | uniq`
+	SYMBOLS=`
+		cpp -DPJ_SYMBIAN=1 -DPJ_DLL -DPJ_EXPORTING=1 $INCLUDE ${SOURCEPATH}/$file 2>&1 |
+       		grep EXPORT_C | 
+		sed 's/(/;/' | 
+		sed 's/=/;/' | 
+		awk -F ';' '{print $1}' | 
+		awk '{print $NF}'`
+	echo Processing ${SOURCEPATH}/$file..
+	for SYM in $SYMBOLS; do
+		echo $SYM >> tmpnames.def
+	done
+done
+
+echo "Writing $DEFFILE"
+echo EXPORTS > $DEFFILE
+i=0
+for SYM in `cat tmpnames.def | sort | uniq`; do
+	echo "             $SYM"
+	i=`expr $i + 1`
+	printf "\\t%-40s @ $i NONAME\\n" $SYM >> $DEFFILE
+done
+
+
+echo
+echo "Done. Total $i symbols exported."
+
Index: pjproject/trunk/build.symbian/pjlib.mmp
===================================================================
--- pjproject/trunk/build.symbian/pjlib.mmp	(revision 1404)
+++ pjproject/trunk/build.symbian/pjlib.mmp	(revision 1405)
@@ -1,6 +1,21 @@
+#if defined(EKA2)
+// ARM ABIv2 doesn't support static libraries anymore
+TARGET		pjlib.dll
+TARGETTYPE	dll
+UID		0x1000008d 0xA0004299
+CAPABILITY	NONE
+LIBRARY		esock.lib insock.lib charconv.lib euser.lib estlib.lib
+MACRO		PJ_DLL
+MACRO		PJ_EXPORTING
+
+DEFFILE		.\pjlib.def
+
+#else
+
 TARGET 		pjlib.lib
 TARGETTYPE 	lib
 UID		0x100039CE 0x10004299
-VENDORID	0x70000001
+//VENDORID	0x70000001
+#endif
 
 SOURCEPATH	..\pjlib\src\pj
@@ -33,4 +48,5 @@
 SOURCE		rand.c
 SOURCE		rbtree.c
+SOURCE		sock_common.c
 SOURCE		types.c
 
@@ -92,6 +108,6 @@
 
 SYSTEMINCLUDE	..\pjlib\include
-
 SYSTEMINCLUDE	\epoc32\include
 SYSTEMINCLUDE	\epoc32\include\libc
 
+
Index: pjproject/trunk/build.symbian/pjlibU.def
===================================================================
--- pjproject/trunk/build.symbian/pjlibU.def	(revision 1405)
+++ pjproject/trunk/build.symbian/pjlibU.def	(revision 1405)
@@ -0,0 +1,290 @@
+EXPORTS
+	PJ_FD_CLR                                @ 1 NONAME
+	PJ_FD_COUNT                              @ 2 NONAME
+	PJ_FD_ISSET                              @ 3 NONAME
+	PJ_FD_SET                                @ 4 NONAME
+	PJ_FD_ZERO                               @ 5 NONAME
+	pj_AF_INET                               @ 6 NONAME
+	pj_AF_INET6                              @ 7 NONAME
+	pj_AF_IRDA                               @ 8 NONAME
+	pj_AF_PACKET                             @ 9 NONAME
+	pj_AF_UNIX                               @ 10 NONAME
+	pj_IPTOS_LOWDELAY                        @ 11 NONAME
+	pj_IPTOS_MINCOST                         @ 12 NONAME
+	pj_IPTOS_RELIABILITY                     @ 13 NONAME
+	pj_IPTOS_THROUGHPUT                      @ 14 NONAME
+	pj_IP_TOS                                @ 15 NONAME
+	pj_MSG_DONTROUTE                         @ 16 NONAME
+	pj_MSG_OOB                               @ 17 NONAME
+	pj_MSG_PEEK                              @ 18 NONAME
+	pj_SOCK_DGRAM                            @ 19 NONAME
+	pj_SOCK_RAW                              @ 20 NONAME
+	pj_SOCK_RDM                              @ 21 NONAME
+	pj_SOCK_STREAM                           @ 22 NONAME
+	pj_SOL_IP                                @ 23 NONAME
+	pj_SOL_IPV6                              @ 24 NONAME
+	pj_SOL_SOCKET                            @ 25 NONAME
+	pj_SOL_TCP                               @ 26 NONAME
+	pj_SOL_UDP                               @ 27 NONAME
+	pj_SO_RCVBUF                             @ 28 NONAME
+	pj_SO_SNDBUF                             @ 29 NONAME
+	pj_SO_TYPE                               @ 30 NONAME
+	pj_ansi_to_unicode                       @ 31 NONAME
+	pj_array_erase                           @ 32 NONAME
+	pj_array_find                            @ 33 NONAME
+	pj_array_insert                          @ 34 NONAME
+	pj_atexit                                @ 35 NONAME
+	pj_atomic_add                            @ 36 NONAME
+	pj_atomic_add_and_get                    @ 37 NONAME
+	pj_atomic_create                         @ 38 NONAME
+	pj_atomic_dec                            @ 39 NONAME
+	pj_atomic_dec_and_get                    @ 40 NONAME
+	pj_atomic_destroy                        @ 41 NONAME
+	pj_atomic_get                            @ 42 NONAME
+	pj_atomic_inc                            @ 43 NONAME
+	pj_atomic_inc_and_get                    @ 44 NONAME
+	pj_atomic_set                            @ 45 NONAME
+	pj_caching_pool_destroy                  @ 46 NONAME
+	pj_caching_pool_init                     @ 47 NONAME
+	pj_create_random_string                  @ 48 NONAME
+	pj_create_unique_string                  @ 49 NONAME
+	pj_dump_config                           @ 50 NONAME
+	pj_elapsed_cycle                         @ 51 NONAME
+	pj_elapsed_msec                          @ 52 NONAME
+	pj_elapsed_nanosec                       @ 53 NONAME
+	pj_elapsed_time                          @ 54 NONAME
+	pj_elapsed_usec                          @ 55 NONAME
+	pj_enter_critical_section                @ 56 NONAME
+	pj_enum_ip_interface                     @ 57 NONAME
+	pj_enum_ip_route                         @ 58 NONAME
+	pj_exception_id_alloc                    @ 59 NONAME
+	pj_exception_id_free                     @ 60 NONAME
+	pj_exception_id_name                     @ 61 NONAME
+	pj_fifobuf_alloc                         @ 62 NONAME
+	pj_fifobuf_free                          @ 63 NONAME
+	pj_fifobuf_init                          @ 64 NONAME
+	pj_fifobuf_max_size                      @ 65 NONAME
+	pj_fifobuf_unalloc                       @ 66 NONAME
+	pj_file_close                            @ 67 NONAME
+	pj_file_delete                           @ 68 NONAME
+	pj_file_exists                           @ 69 NONAME
+	pj_file_flush                            @ 70 NONAME
+	pj_file_getpos                           @ 71 NONAME
+	pj_file_getstat                          @ 72 NONAME
+	pj_file_move                             @ 73 NONAME
+	pj_file_open                             @ 74 NONAME
+	pj_file_read                             @ 75 NONAME
+	pj_file_setpos                           @ 76 NONAME
+	pj_file_size                             @ 77 NONAME
+	pj_file_write                            @ 78 NONAME
+	pj_generate_unique_string                @ 79 NONAME
+	pj_get_netos_error                       @ 80 NONAME
+	pj_get_os_error                          @ 81 NONAME
+	pj_get_timestamp                         @ 82 NONAME
+	pj_get_timestamp_freq                    @ 83 NONAME
+	pj_gethostaddr                           @ 84 NONAME
+	pj_gethostbyname                         @ 85 NONAME
+	pj_gethostip                             @ 86 NONAME
+	pj_gethostname                           @ 87 NONAME
+	pj_getpid                                @ 88 NONAME
+	pj_gettimeofday                          @ 89 NONAME
+	pj_hash_calc                             @ 90 NONAME
+	pj_hash_calc_tolower                     @ 91 NONAME
+	pj_hash_count                            @ 92 NONAME
+	pj_hash_create                           @ 93 NONAME
+	pj_hash_first                            @ 94 NONAME
+	pj_hash_get                              @ 95 NONAME
+	pj_hash_next                             @ 96 NONAME
+	pj_hash_set                              @ 97 NONAME
+	pj_hash_set_np                           @ 98 NONAME
+	pj_hash_this                             @ 99 NONAME
+	pj_htonl                                 @ 100 NONAME
+	pj_htons                                 @ 101 NONAME
+	pj_inet_addr                             @ 102 NONAME
+	pj_inet_addr2                            @ 103 NONAME
+	pj_inet_aton                             @ 104 NONAME
+	pj_inet_ntoa                             @ 105 NONAME
+	pj_init                                  @ 106 NONAME
+	pj_ioqueue_accept                        @ 107 NONAME
+	pj_ioqueue_connect                       @ 108 NONAME
+	pj_ioqueue_create                        @ 109 NONAME
+	pj_ioqueue_destroy                       @ 110 NONAME
+	pj_ioqueue_get_user_data                 @ 111 NONAME
+	pj_ioqueue_is_pending                    @ 112 NONAME
+	pj_ioqueue_name                          @ 113 NONAME
+	pj_ioqueue_op_key_init                   @ 114 NONAME
+	pj_ioqueue_poll                          @ 115 NONAME
+	pj_ioqueue_post_completion               @ 116 NONAME
+	pj_ioqueue_recv                          @ 117 NONAME
+	pj_ioqueue_recvfrom                      @ 118 NONAME
+	pj_ioqueue_register_sock                 @ 119 NONAME
+	pj_ioqueue_send                          @ 120 NONAME
+	pj_ioqueue_sendto                        @ 121 NONAME
+	pj_ioqueue_set_lock                      @ 122 NONAME
+	pj_ioqueue_set_user_data                 @ 123 NONAME
+	pj_ioqueue_unregister                    @ 124 NONAME
+	pj_leave_critical_section                @ 125 NONAME
+	pj_list_erase                            @ 126 NONAME
+	pj_list_find_node                        @ 127 NONAME
+	pj_list_insert_after                     @ 128 NONAME
+	pj_list_insert_before                    @ 129 NONAME
+	pj_list_insert_nodes_after               @ 130 NONAME
+	pj_list_insert_nodes_before              @ 131 NONAME
+	pj_list_merge_first                      @ 132 NONAME
+	pj_list_merge_last                       @ 133 NONAME
+	pj_list_search                           @ 134 NONAME
+	pj_list_size                             @ 135 NONAME
+	pj_lock_acquire                          @ 136 NONAME
+	pj_lock_create_null_mutex                @ 137 NONAME
+	pj_lock_create_recursive_mutex           @ 138 NONAME
+	pj_lock_create_semaphore                 @ 139 NONAME
+	pj_lock_create_simple_mutex              @ 140 NONAME
+	pj_lock_destroy                          @ 141 NONAME
+	pj_lock_release                          @ 142 NONAME
+	pj_lock_tryacquire                       @ 143 NONAME
+	pj_log                                   @ 144 NONAME
+	pj_log_1                                 @ 145 NONAME
+	pj_log_2                                 @ 146 NONAME
+	pj_log_3                                 @ 147 NONAME
+	pj_log_4                                 @ 148 NONAME
+	pj_log_5                                 @ 149 NONAME
+	pj_log_get_decor                         @ 150 NONAME
+	pj_log_get_level                         @ 151 NONAME
+	pj_log_get_log_func                      @ 152 NONAME
+	pj_log_set_decor                         @ 153 NONAME
+	pj_log_set_level                         @ 154 NONAME
+	pj_log_set_log_func                      @ 155 NONAME
+	pj_log_write                             @ 156 NONAME
+	pj_mutex_create                          @ 157 NONAME
+	pj_mutex_create_recursive                @ 158 NONAME
+	pj_mutex_create_simple                   @ 159 NONAME
+	pj_mutex_destroy                         @ 160 NONAME
+	pj_mutex_lock                            @ 161 NONAME
+	pj_mutex_trylock                         @ 162 NONAME
+	pj_mutex_unlock                          @ 163 NONAME
+	pj_ntohl                                 @ 164 NONAME
+	pj_ntohs                                 @ 165 NONAME
+	pj_pool_alloc                            @ 166 NONAME
+	pj_pool_alloc_from_block                 @ 167 NONAME
+	pj_pool_allocate_find                    @ 168 NONAME
+	pj_pool_calloc                           @ 169 NONAME
+	pj_pool_create                           @ 170 NONAME
+	pj_pool_create_int                       @ 171 NONAME
+	pj_pool_create_on_buf                    @ 172 NONAME
+	pj_pool_destroy_int                      @ 173 NONAME
+	pj_pool_factory_default_policy           @ 174 NONAME
+	pj_pool_factory_get_default_policy       @ 175 NONAME
+	pj_pool_get_capacity                     @ 176 NONAME
+	pj_pool_get_used_size                    @ 177 NONAME
+	pj_pool_getobjname                       @ 178 NONAME
+	pj_pool_init_int                         @ 179 NONAME
+	pj_pool_release                          @ 180 NONAME
+	pj_pool_reset                            @ 181 NONAME
+	pj_rand                                  @ 182 NONAME
+	pj_rbtree_erase                          @ 183 NONAME
+	pj_rbtree_find                           @ 184 NONAME
+	pj_rbtree_first                          @ 185 NONAME
+	pj_rbtree_init                           @ 186 NONAME
+	pj_rbtree_insert                         @ 187 NONAME
+	pj_rbtree_last                           @ 188 NONAME
+	pj_rbtree_max_height                     @ 189 NONAME
+	pj_rbtree_min_height                     @ 190 NONAME
+	pj_rbtree_next                           @ 191 NONAME
+	pj_rbtree_prev                           @ 192 NONAME
+	pj_register_strerror                     @ 193 NONAME
+	pj_rwmutex_create                        @ 194 NONAME
+	pj_rwmutex_destroy                       @ 195 NONAME
+	pj_rwmutex_lock_read                     @ 196 NONAME
+	pj_rwmutex_lock_write                    @ 197 NONAME
+	pj_rwmutex_unlock_read                   @ 198 NONAME
+	pj_rwmutex_unlock_write                  @ 199 NONAME
+	pj_sem_create                            @ 200 NONAME
+	pj_sem_destroy                           @ 201 NONAME
+	pj_sem_post                              @ 202 NONAME
+	pj_sem_trywait                           @ 203 NONAME
+	pj_sem_wait                              @ 204 NONAME
+	pj_set_netos_error                       @ 205 NONAME
+	pj_set_os_error                          @ 206 NONAME
+	pj_shutdown                              @ 207 NONAME
+	pj_sock_accept                           @ 208 NONAME
+	pj_sock_bind                             @ 209 NONAME
+	pj_sock_bind_in                          @ 210 NONAME
+	pj_sock_close                            @ 211 NONAME
+	pj_sock_connect                          @ 212 NONAME
+	pj_sock_getpeername                      @ 213 NONAME
+	pj_sock_getsockname                      @ 214 NONAME
+	pj_sock_getsockopt                       @ 215 NONAME
+	pj_sock_listen                           @ 216 NONAME
+	pj_sock_recv                             @ 217 NONAME
+	pj_sock_recvfrom                         @ 218 NONAME
+	pj_sock_select                           @ 219 NONAME
+	pj_sock_send                             @ 220 NONAME
+	pj_sock_sendto                           @ 221 NONAME
+	pj_sock_setsockopt                       @ 222 NONAME
+	pj_sock_shutdown                         @ 223 NONAME
+	pj_sock_socket                           @ 224 NONAME
+	pj_sockaddr_in_init                      @ 225 NONAME
+	pj_sockaddr_in_set_str_addr              @ 226 NONAME
+	pj_srand                                 @ 227 NONAME
+	pj_str                                   @ 228 NONAME
+	pj_strassign                             @ 229 NONAME
+	pj_strcat                                @ 230 NONAME
+	pj_strcat2                               @ 231 NONAME
+	pj_strcmp                                @ 232 NONAME
+	pj_strcmp2                               @ 233 NONAME
+	pj_strcpy                                @ 234 NONAME
+	pj_strcpy2                               @ 235 NONAME
+	pj_strdup                                @ 236 NONAME
+	pj_strdup2                               @ 237 NONAME
+	pj_strdup2_with_null                     @ 238 NONAME
+	pj_strdup3                               @ 239 NONAME
+	pj_strdup_with_null                      @ 240 NONAME
+	pj_strerror                              @ 241 NONAME
+	pj_stricmp                               @ 242 NONAME
+	pj_stricmp2                              @ 243 NONAME
+	pj_strltrim                              @ 244 NONAME
+	pj_strncmp                               @ 245 NONAME
+	pj_strncmp2                              @ 246 NONAME
+	pj_strncpy                               @ 247 NONAME
+	pj_strncpy_with_null                     @ 248 NONAME
+	pj_strnicmp                              @ 249 NONAME
+	pj_strnicmp2                             @ 250 NONAME
+	pj_strrtrim                              @ 251 NONAME
+	pj_strtoul                               @ 252 NONAME
+	pj_strtoul2                              @ 253 NONAME
+	pj_strtrim                               @ 254 NONAME
+	pj_symbianos_poll                        @ 255 NONAME
+	pj_thread_create                         @ 256 NONAME
+	pj_thread_destroy                        @ 257 NONAME
+	pj_thread_get_name                       @ 258 NONAME
+	pj_thread_join                           @ 259 NONAME
+	pj_thread_local_alloc                    @ 260 NONAME
+	pj_thread_local_free                     @ 261 NONAME
+	pj_thread_local_get                      @ 262 NONAME
+	pj_thread_local_set                      @ 263 NONAME
+	pj_thread_register                       @ 264 NONAME
+	pj_thread_resume                         @ 265 NONAME
+	pj_thread_sleep                          @ 266 NONAME
+	pj_thread_this                           @ 267 NONAME
+	pj_time_decode                           @ 268 NONAME
+	pj_time_encode                           @ 269 NONAME
+	pj_time_gmt_to_local                     @ 270 NONAME
+	pj_time_local_to_gmt                     @ 271 NONAME
+	pj_time_val_normalize                    @ 272 NONAME
+	pj_timer_entry_init                      @ 273 NONAME
+	pj_timer_heap_cancel                     @ 274 NONAME
+	pj_timer_heap_count                      @ 275 NONAME
+	pj_timer_heap_create                     @ 276 NONAME
+	pj_timer_heap_destroy                    @ 277 NONAME
+	pj_timer_heap_earliest_time              @ 278 NONAME
+	pj_timer_heap_mem_size                   @ 279 NONAME
+	pj_timer_heap_poll                       @ 280 NONAME
+	pj_timer_heap_schedule                   @ 281 NONAME
+	pj_timer_heap_set_lock                   @ 282 NONAME
+	pj_timer_heap_set_max_timed_out_per_poll @ 283 NONAME
+	pj_unicode_to_ansi                       @ 284 NONAME
+	pj_utoa                                  @ 285 NONAME
+	pj_utoa_pad                              @ 286 NONAME
+	platform_strerror                        @ 287 NONAME
+	snprintf                                 @ 288 NONAME
+	vsnprintf                                @ 289 NONAME
Index: pjproject/trunk/build.symbian/pjlib_test.mmp
===================================================================
--- pjproject/trunk/build.symbian/pjlib_test.mmp	(revision 1404)
+++ pjproject/trunk/build.symbian/pjlib_test.mmp	(revision 1405)
@@ -8,4 +8,8 @@
 MACRO		PJ_M_I386=1
 MACRO		PJ_SYMBIAN=1
+
+#if defined(EKA2)
+MACRO		PJ_DLL
+#endif
 
 OPTION		CW -lang c++
Index: pjproject/trunk/pjlib-util/src/pjlib-util-test/resolver_test.c
===================================================================
--- pjproject/trunk/pjlib-util/src/pjlib-util-test/resolver_test.c	(revision 1404)
+++ pjproject/trunk/pjlib-util/src/pjlib-util-test/resolver_test.c	(revision 1405)
@@ -428,5 +428,5 @@
 	pj_sockaddr_in addr;
 
-	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &g_server[i].sock);
+	status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &g_server[i].sock);
 	if (status != PJ_SUCCESS)
 	    return -10;
Index: pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c
===================================================================
--- pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c	(revision 1404)
+++ pjproject/trunk/pjlib-util/src/pjlib-util/resolver.c	(revision 1405)
@@ -306,5 +306,5 @@
 
     /* Create the UDP socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &resv->udp_sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &resv->udp_sock);
     if (status != PJ_SUCCESS)
 	goto on_error;
Index: pjproject/trunk/pjlib-util/src/pjlib-util/stun_simple_client.c
===================================================================
--- pjproject/trunk/pjlib-util/src/pjlib-util/stun_simple_client.c	(revision 1404)
+++ pjproject/trunk/pjlib-util/src/pjlib-util/stun_simple_client.c	(revision 1405)
@@ -218,5 +218,5 @@
 	    rec[i].srv[0].mapped_port == rec[i].srv[1].mapped_port)
 	{
-	    mapped_addr[i].sin_family = PJ_AF_INET;
+	    mapped_addr[i].sin_family = pj_AF_INET();
 	    mapped_addr[i].sin_addr.s_addr = rec[i].srv[0].mapped_addr;
 	    mapped_addr[i].sin_port = (pj_uint16_t)rec[i].srv[0].mapped_port;
Index: pjproject/trunk/pjlib/build/Makefile
===================================================================
--- pjproject/trunk/pjlib/build/Makefile	(revision 1404)
+++ pjproject/trunk/pjlib/build/Makefile	(revision 1405)
@@ -26,6 +26,5 @@
 	hash.o ip_helper_generic.o list.o lock.o log.o os_time_common.o \
 	pool.o pool_buf.o pool_caching.o pool_dbg.o rand.o \
-	rbtree.o string.o timer.o \
-	types.o symbols.o
+	rbtree.o sock_common.o string.o timer.o types.o
 export PJLIB_CFLAGS += $(_CFLAGS)
 
Index: pjproject/trunk/pjlib/build/pjlib.dsp
===================================================================
--- pjproject/trunk/pjlib/build/pjlib.dsp	(revision 1404)
+++ pjproject/trunk/pjlib/build/pjlib.dsp	(revision 1405)
@@ -41,4 +41,5 @@
 # PROP Intermediate_Dir ".\output\pjlib-i386-win32-vc6-release"
 # PROP Target_Dir ""
+F90=df.exe
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
 # ADD CPP /nologo /MD /W4 /Zi /O2 /Ob2 /I "../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /c
@@ -65,4 +66,5 @@
 # PROP Intermediate_Dir ".\output\pjlib-i386-win32-vc6-debug"
 # PROP Target_Dir ""
+F90=df.exe
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
 # ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /GZ /c
@@ -332,4 +334,8 @@
 # Begin Source File
 
+SOURCE=..\src\pj\sock_common.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\src\pj\sock_select.c
 # End Source File
Index: pjproject/trunk/pjlib/build/pjlib.vcproj
===================================================================
--- pjproject/trunk/pjlib/build/pjlib.vcproj	(revision 1404)
+++ pjproject/trunk/pjlib/build/pjlib.vcproj	(revision 1405)
@@ -917,4 +917,8 @@
 			</File>
 			<File
+				RelativePath="..\src\pj\sock_common.c"
+				>
+			</File>
+			<File
 				RelativePath="..\src\pj\sock_select.c"
 				>
Index: pjproject/trunk/pjlib/build/wince-evc4/pjlib_wince.vcp
===================================================================
--- pjproject/trunk/pjlib/build/wince-evc4/pjlib_wince.vcp	(revision 1404)
+++ pjproject/trunk/pjlib/build/wince-evc4/pjlib_wince.vcp	(revision 1405)
@@ -376,9 +376,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -387,4 +393,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -392,7 +399,9 @@
 	"..\..\include\pj\compat\size_t.h"\
 	"..\..\include\pj\compat\socket.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -802,9 +811,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -813,11 +828,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -1201,6 +1219,12 @@
 
 DEP_CPP_CONFI=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -1209,9 +1233,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ioqueue.h"\
 	"..\..\include\pj\log.h"\
@@ -1438,7 +1464,13 @@
 
 DEP_CPP_CTYPE=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -1447,9 +1479,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\types.h"\
@@ -1690,9 +1724,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -1701,11 +1741,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -2080,9 +2123,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -2091,11 +2140,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -2430,6 +2482,12 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -2438,9 +2496,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\fifobuf.h"\
 	"..\..\include\pj\log.h"\
@@ -2699,9 +2759,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -2710,11 +2776,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -3052,7 +3121,13 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -3061,9 +3136,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\errno.h"\
 	"..\..\include\pj\file_io.h"\
@@ -3332,9 +3409,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -3343,11 +3426,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -3719,9 +3805,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -3730,11 +3822,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -4122,9 +4217,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -4133,11 +4234,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -4558,9 +4662,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -4569,4 +4679,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -4574,7 +4685,9 @@
 	"..\..\include\pj\compat\size_t.h"\
 	"..\..\include\pj\compat\socket.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -5064,9 +5177,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -5075,11 +5194,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -5618,7 +5740,9 @@
 	"..\..\include\pj\unicode.h"\
 	"..\..\include\pjlib.h"\
-	{$(INCLUDE)}"ipexport.h"\
-	{$(INCLUDE)}"Iphlpapi.h"\
-	{$(INCLUDE)}"iptypes.h"\
+	
+NODEP_CPP_IP_HE=\
+	".\pexport.h"\
+	".\phlpapi.h"\
+	".\ptypes.h"\
 	
 
@@ -5656,6 +5780,12 @@
 
 DEP_CPP_LIST_=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -5664,9 +5794,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\list.h"\
 	"..\..\include\pj\list_i.h"\
@@ -5912,9 +6044,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -5923,11 +6061,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -6334,9 +6475,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -6345,4 +6492,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -6353,4 +6501,5 @@
 	"..\..\include\pj\config.h"\
 	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -6722,6 +6871,12 @@
 
 DEP_CPP_LOG_W=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -6730,4 +6885,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -6736,4 +6892,5 @@
 	"..\..\include\pj\config.h"\
 	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\log.h"\
 	"..\..\include\pj\os.h"\
@@ -6991,9 +7148,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -7002,11 +7165,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -7445,9 +7611,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -7456,4 +7628,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -7464,4 +7637,5 @@
 	"..\..\include\pj\config.h"\
 	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -7850,9 +8024,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -7861,11 +8041,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -8166,4 +8349,198 @@
 
 DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_OS_TIM=\
 	"..\..\include\pj\compat\cc_gcc.h"\
 	"..\..\include\pj\compat\cc_msvc.h"\
@@ -8184,190 +8561,4 @@
 	
 
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\m_alpha.h"\
-	"..\..\include\pj\compat\m_i386.h"\
-	"..\..\include\pj\compat\m_m68k.h"\
-	"..\..\include\pj\compat\m_sparc.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\m_alpha.h"\
-	"..\..\include\pj\compat\m_i386.h"\
-	"..\..\include\pj\compat\m_m68k.h"\
-	"..\..\include\pj\compat\m_sparc.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\m_alpha.h"\
-	"..\..\include\pj\compat\m_armv4.h"\
-	"..\..\include\pj\compat\m_i386.h"\
-	"..\..\include\pj\compat\m_m68k.h"\
-	"..\..\include\pj\compat\m_sparc.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\m_alpha.h"\
-	"..\..\include\pj\compat\m_i386.h"\
-	"..\..\include\pj\compat\m_m68k.h"\
-	"..\..\include\pj\compat\m_sparc.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-NODEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\m_arm.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\m_alpha.h"\
-	"..\..\include\pj\compat\m_i386.h"\
-	"..\..\include\pj\compat\m_m68k.h"\
-	"..\..\include\pj\compat\m_sparc.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\m_alpha.h"\
-	"..\..\include\pj\compat\m_i386.h"\
-	"..\..\include\pj\compat\m_m68k.h"\
-	"..\..\include\pj\compat\m_sparc.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\m_alpha.h"\
-	"..\..\include\pj\compat\m_i386.h"\
-	"..\..\include\pj\compat\m_m68k.h"\
-	"..\..\include\pj\compat\m_sparc.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-
-!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
-
-DEP_CPP_OS_TIM=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\high_precision.h"\
-	"..\..\include\pj\compat\os_darwinos.h"\
-	"..\..\include\pj\compat\os_linux.h"\
-	"..\..\include\pj\compat\os_linux_kernel.h"\
-	"..\..\include\pj\compat\os_palmos.h"\
-	"..\..\include\pj\compat\os_rtems.h"\
-	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
-	"..\..\include\pj\os.h"\
-	"..\..\include\pj\types.h"\
-	
-
 !ENDIF 
 
@@ -8406,7 +8597,13 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -8415,9 +8612,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\errno.h"\
 	"..\..\include\pj\log.h"\
@@ -8675,9 +8874,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -8686,11 +8891,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -9118,9 +9326,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -9129,11 +9343,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -9665,9 +9882,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -9676,11 +9899,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -10074,10 +10300,16 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
 	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -10086,11 +10318,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -10122,4 +10357,5 @@
 	"..\..\include\pj\unicode.h"\
 	"..\..\include\pjlib.h"\
+	"..\..\src\pj\pool_signature.h"\
 	
 
@@ -10469,6 +10705,12 @@
 
 DEP_CPP_RAND_=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -10477,4 +10719,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -10483,4 +10726,5 @@
 	"..\..\include\pj\config.h"\
 	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\os.h"\
 	"..\..\include\pj\rand.h"\
@@ -10715,6 +10959,12 @@
 
 DEP_CPP_RBTRE=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -10723,9 +10973,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\os.h"\
 	"..\..\include\pj\rbtree.h"\
@@ -10973,9 +11225,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -10984,4 +11242,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -10989,7 +11248,9 @@
 	"..\..\include\pj\compat\size_t.h"\
 	"..\..\include\pj\compat\socket.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -11367,4 +11628,291 @@
 # Begin Source File
 
+SOURCE=..\..\src\pj\sock_common.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SOCK_C=\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\src\pj\sock_select.c
 
@@ -11402,7 +11950,13 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
-	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -11411,4 +11965,5 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
@@ -11417,4 +11972,5 @@
 	"..\..\include\pj\config.h"\
 	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\errno.h"\
 	"..\..\include\pj\os.h"\
@@ -11699,9 +12255,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -11710,11 +12272,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -12111,9 +12676,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -12122,11 +12693,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
@@ -12523,6 +13097,12 @@
 
 DEP_CPP_TYPES=\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -12531,9 +13111,11 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
-	"..\..\include\pj\compat\os_win32.h"\
-	"..\..\include\pj\compat\os_win32_wince.h"\
-	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\os.h"\
 	"..\..\include\pj\types.h"\
@@ -12767,9 +13349,15 @@
 	"..\..\include\pj\assert.h"\
 	"..\..\include\pj\compat\assert.h"\
-	"..\..\include\pj\compat\cc_gcc.h"\
-	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_armcc.h"\
+	"..\..\include\pj\compat\cc_codew.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_gcce.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\cc_mwcc.h"\
 	"..\..\include\pj\compat\ctype.h"\
 	"..\..\include\pj\compat\errno.h"\
 	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
 	"..\..\include\pj\compat\os_darwinos.h"\
 	"..\..\include\pj\compat\os_linux.h"\
@@ -12778,11 +13366,14 @@
 	"..\..\include\pj\compat\os_rtems.h"\
 	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_symbian.h"\
 	"..\..\include\pj\compat\os_win32.h"\
 	"..\..\include\pj\compat\os_win32_wince.h"\
 	"..\..\include\pj\compat\setjmp.h"\
 	"..\..\include\pj\compat\size_t.h"\
-	"..\..\include\pj\compat\string.h"\
-	"..\..\include\pj\config.h"\
-	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
 	"..\..\include\pj\ctype.h"\
 	"..\..\include\pj\errno.h"\
Index: pjproject/trunk/pjlib/include/pj/compat/cc_msvc.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/compat/cc_msvc.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/compat/cc_msvc.h	(revision 1405)
@@ -54,4 +54,8 @@
 #endif
 
+#define PJ_EXPORT_DECL_SPECIFIER    __declspec(dllexport)
+#define PJ_EXPORT_DEF_SPECIFIER	    __declspec(dllexport)
+#define PJ_IMPORT_DECL_SPECIFIER    __declspec(dllimport)
+
 #define PJ_THREAD_FUNC	
 #define PJ_NORETURN		__declspec(noreturn)
Index: pjproject/trunk/pjlib/include/pj/compat/os_symbian.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/compat/os_symbian.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/compat/os_symbian.h	(revision 1405)
@@ -149,13 +149,9 @@
 #endif
 
-/*
-#if defined(PJ_EXPORTING)
-#   define PJ_EXPORT_IMPORT EXPORT_C
-#elif defined(PJ_IMPORTING)
-#   define PJ_EXPORT_IMPORT IMPORT_C
-#else
-#   error "Must define either PJ_EXPORTING or PJ_IMPORTING"
-#endif
-*/
+#define PJ_EXPORT_DECL_SPECIFIER	IMPORT_C
+//#define PJ_EXPORT_DECL_SPECIFIER
+#define PJ_EXPORT_DEF_SPECIFIER		EXPORT_C
+#define PJ_IMPORT_DECL_SPECIFIER	IMPORT_C
+
 
 #endif	/* __PJ_COMPAT_OS_SYMBIAN_H__ */
Index: pjproject/trunk/pjlib/include/pj/config.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/config.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/config.h	(revision 1405)
@@ -658,4 +658,35 @@
 
 /**
+ * Guide for building dynamic link libraries (DLL).
+ *
+ * The libraries support generation of dynamic link libraries for
+ * Symbian ABIv2 target (.dso files, in S60 3rd Edition). Similar
+ * procedures may be applied for Win32 DLL too, with some modification.
+ *
+ * Macros related for building DLL/DSO files:
+ *  - For platforms that supports dynamic link libraries generation,
+ *    it must declare PJ_EXPORT_SPECIFIER macro which value contains
+ *    the prefix to be added to symbol definition, to export this 
+ *    symbol in the DLL/DSO. For example, on Win32/Visual Studio, the
+ *    value of this macro is "__declspec(dllexport)", and for ARM 
+ *    ABIv2/Symbian, the value is \a EXPORT_C. 
+ *  - For platforms that supports linking with dynamic link libraries,
+ *    it must declare PJ_IMPORT_SPECIFIER macro which value contains
+ *    the prefix to be added to symbol declaration, to import this 
+ *    symbol from a DLL/DSO. For example, on Win32/Visual Studio, the
+ *    value of this macro is "__declspec(dllimport)", and for ARM 
+ *    ABIv2/Symbian, the value is \a IMPORT_C. 
+ *  - When PJLIB is built as DLL/DSO, both \a PJ_DLL and \a PJ_EXPORTING
+ *    macros must be declared, so that PJ_EXPORT_SPECIFIER prefix will be
+ *    added into function definition.
+ *  - When application wants to link dynamically with PJLIB, then it
+ *    must declare \a PJ_DLL macro when using/including PJLIB header,
+ *    so that PJ_IMPORT_SPECIFIER is properly added into symbol
+ *    declarations.
+ *
+ * When \a PJ_DLL macro is not declared, static linking is assumed.
+ */
+
+/**
  * @def PJ_INLINE(type)
  * @param type The return type of the function.
@@ -665,9 +696,4 @@
 
 /**
- * @def PJ_DECL(type)
- * @param type The return type of the function.
- * Declare a function.
- */
-/**
  * @def PJ_DECL_NO_RETURN(type)
  * @param type The return type of the function.
@@ -683,5 +709,4 @@
  */
 #ifdef __cplusplus
-#  define PJ_DECL(type)		    type
 #  define PJ_DECL_NO_RETURN(type)   type PJ_NORETURN
 #  define PJ_IDECL_NO_RETURN(type)  PJ_INLINE(type) PJ_NORETURN
@@ -689,5 +714,4 @@
 #  define PJ_END_DECL		    }
 #else
-#  define PJ_DECL(type)		    extern type
 #  define PJ_DECL_NO_RETURN(type)   PJ_NORETURN type
 #  define PJ_IDECL_NO_RETURN(type)  PJ_NORETURN PJ_INLINE(type)
@@ -696,4 +720,71 @@
 #endif
 
+
+/**
+ * This macro declares platform/compiler specific specifier prefix
+ * to be added to symbol declaration to export the symbol when PJLIB
+ * is built as dynamic library.
+ *
+ * This macro should have been added by platform specific headers,
+ * if the platform supports building dynamic library target. 
+ */
+#ifndef PJ_EXPORT_DECL_SPECIFIER
+#   define PJ_EXPORT_DECL_SPECIFIER
+#endif
+
+
+/**
+ * This macro declares platform/compiler specific specifier prefix
+ * to be added to symbol definition to export the symbol when PJLIB
+ * is built as dynamic library.
+ *
+ * This macro should have been added by platform specific headers,
+ * if the platform supports building dynamic library target. 
+ */
+#ifndef PJ_EXPORT_DEF_SPECIFIER
+#   define PJ_EXPORT_DEF_SPECIFIER
+#endif
+
+
+/**
+ * This macro declares platform/compiler specific specifier prefix
+ * to be added to symbol declaration to import the symbol.
+ *
+ * This macro should have been added by platform specific headers,
+ * if the platform supports building dynamic library target.
+ */
+#ifndef PJ_IMPORT_DECL_SPECIFIER
+#   define PJ_IMPORT_DECL_SPECIFIER
+#endif
+
+
+/**
+ * This macro has been deprecated. It will evaluate to nothing.
+ */
+#ifndef PJ_EXPORT_SYMBOL
+#   define PJ_EXPORT_SYMBOL(x)
+#endif
+
+
+/**
+ * @def PJ_DECL(type)
+ * @param type The return type of the function.
+ * Declare a function.
+ */
+#if defined(PJ_DLL)
+#   if defined(PJ_EXPORTING)
+#	define PJ_DECL(type)	    PJ_EXPORT_DECL_SPECIFIER type
+#   else
+#	define PJ_DECL(type)	    PJ_IMPORT_DECL_SPECIFIER type
+#   endif
+#elif !defined(PJ_DECL)
+#   if defined(__cplusplus)
+#	define PJ_DECL(type)	    type
+#   else
+#	define PJ_DECL(type)	    extern type
+#   endif
+#endif
+
+
 /**
  * @def PJ_DEF(type)
@@ -701,17 +792,38 @@
  * Define a function.
  */
-#define PJ_DEF(type)	  type
-
-/**
- * @def PJ_EXPORT_SYMBOL(sym)
- * @param sym The symbol to export.
- * Export the specified symbol in compilation type that requires export
- * (e.g. Linux kernel).
- */
-#ifdef __PJ_EXPORT_SYMBOL
-#  define PJ_EXPORT_SYMBOL(sym)	    __PJ_EXPORT_SYMBOL(sym)
-#else
-#  define PJ_EXPORT_SYMBOL(sym)
-#endif
+#if defined(PJ_DLL) && defined(PJ_EXPORTING)
+#   define PJ_DEF(type)		    PJ_EXPORT_DEF_SPECIFIER type
+#elif !defined(PJ_DEF)
+#   define PJ_DEF(type)		    type
+#endif
+
+
+/**
+ * @def PJ_DECL_DATA(type)
+ * @param type The data type.
+ * Declare a global data.
+ */ 
+#if defined(PJ_DLL)
+#   if defined(PJ_EXPORTING)
+#	define PJ_DECL_DATA(type)   PJ_EXPORT_DECL_SPECIFIER extern type
+#   else
+#	define PJ_DECL_DATA(type)   PJ_IMPORT_DECL_SPECIFIER extern type
+#   endif
+#elif !defined(PJ_DECL_DATA)
+#   define PJ_DECL_DATA(type)	    extern type
+#endif
+
+
+/**
+ * @def PJ_DEF_DATA(type)
+ * @param type The data type.
+ * Define a global data.
+ */ 
+#if defined(PJ_DLL) && defined(PJ_EXPORTING)
+#   define PJ_DEF_DATA(type)	    PJ_EXPORT_DEF_SPECIFIER type
+#elif !defined(PJ_DEF_DATA)
+#   define PJ_DEF_DATA(type)	    type
+#endif
+
 
 /**
@@ -734,4 +846,5 @@
 #endif
 
+
 /**
  * @def PJ_UNUSED_ARG(arg)
Index: pjproject/trunk/pjlib/include/pj/errno.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/errno.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/errno.h	(revision 1405)
@@ -353,10 +353,9 @@
  */
 
-
-PJ_END_DECL
-
 /* Internal */
 void pj_errno_clear_handlers(void);
 
+PJ_END_DECL
+
 #endif	/* __PJ_ERRNO_H__ */
 
Index: pjproject/trunk/pjlib/include/pj/ioqueue.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/ioqueue.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/ioqueue.h	(revision 1405)
@@ -478,4 +478,7 @@
 /**
  * Poll the I/O Queue for completed events.
+ *
+ * Note: polling the ioqueue is not necessary in Symbian. Please see
+ * @ref PJ_SYMBIAN_OS for more info.
  *
  * @param ioque		the I/O Queue.
Index: pjproject/trunk/pjlib/include/pj/list_i.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/list_i.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/list_i.h	(revision 1405)
@@ -20,5 +20,5 @@
 
 /* Internal */
-PJ_IDEF(void) pj_link_node(pj_list_type *prev, pj_list_type *next)
+PJ_INLINE(void) pj_link_node(pj_list_type *prev, pj_list_type *next)
 {
     ((pj_list*)prev)->next = next;
@@ -26,19 +26,5 @@
 }
 
-/*
-PJ_IDEF(void) 
-pj_list_init(pj_list_type * node)
-{
-    ((pj_list*)node)->next = ((pj_list*)node)->prev = node;
-}
-
-PJ_IDEF(int) pj_list_empty(const pj_list_type * node)
-{
-    return ((pj_list*)node)->next == node;
-}
-*/
-
-PJ_IDEF(void) 
-pj_list_insert_after(pj_list_type *pos, pj_list_type *node)
+PJ_IDEF(void) pj_list_insert_after(pj_list_type *pos, pj_list_type *node)
 {
     ((pj_list*)node)->prev = pos;
@@ -49,6 +35,5 @@
 
 
-PJ_IDEF(void) 
-pj_list_insert_before(pj_list_type *pos, pj_list_type *node)
+PJ_IDEF(void) pj_list_insert_before(pj_list_type *pos, pj_list_type *node)
 {
     pj_list_insert_after(((pj_list*)pos)->prev, node);
@@ -56,6 +41,5 @@
 
 
-PJ_IDEF(void)	    
-pj_list_insert_nodes_after(pj_list_type *pos, pj_list_type *lst)
+PJ_IDEF(void) pj_list_insert_nodes_after(pj_list_type *pos, pj_list_type *lst)
 {
     pj_list *lst_last = (pj_list *) ((pj_list*)lst)->prev;
@@ -66,12 +50,10 @@
 }
 
-PJ_IDEF(void) 
-pj_list_insert_nodes_before(pj_list_type *pos, pj_list_type *lst)
+PJ_IDEF(void) pj_list_insert_nodes_before(pj_list_type *pos, pj_list_type *lst)
 {
     pj_list_insert_nodes_after(((pj_list*)pos)->prev, lst);
 }
 
-PJ_IDEF(void)
-pj_list_merge_last(pj_list_type *lst1, pj_list_type *lst2)
+PJ_IDEF(void) pj_list_merge_last(pj_list_type *lst1, pj_list_type *lst2)
 {
     if (!pj_list_empty(lst2)) {
@@ -82,6 +64,5 @@
 }
 
-PJ_IDEF(void)
-pj_list_merge_first(pj_list_type *lst1, pj_list_type *lst2)
+PJ_IDEF(void) pj_list_merge_first(pj_list_type *lst1, pj_list_type *lst2)
 {
     if (!pj_list_empty(lst2)) {
@@ -92,6 +73,5 @@
 }
 
-PJ_IDEF(void) 
-pj_list_erase(pj_list_type *node)
+PJ_IDEF(void) pj_list_erase(pj_list_type *node)
 {
     pj_link_node( ((pj_list*)node)->prev, ((pj_list*)node)->next);
@@ -99,6 +79,5 @@
 
 
-PJ_IDEF(pj_list_type*) 
-pj_list_find_node(pj_list_type *list, pj_list_type *node)
+PJ_IDEF(pj_list_type*) pj_list_find_node(pj_list_type *list, pj_list_type *node)
 {
     pj_list *p = (pj_list *) ((pj_list*)list)->next;
@@ -110,7 +89,6 @@
 
 
-PJ_IDEF(pj_list_type*) 
-pj_list_search(pj_list_type *list, void *value,
-	       int (*comp)(void *value, const pj_list_type *node))
+PJ_IDEF(pj_list_type*) pj_list_search(pj_list_type *list, void *value,
+	       		int (*comp)(void *value, const pj_list_type *node))
 {
     pj_list *p = (pj_list *) ((pj_list*)list)->next;
Index: pjproject/trunk/pjlib/include/pj/log.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/log.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/log.h	(revision 1405)
@@ -175,8 +175,8 @@
  * @return	    Current log maximum level.
  */
-#if 0
+#if 1
 PJ_DECL(int) pj_log_get_level(void);
 #else
-extern int pj_log_max_level;
+PJ_DECL_DATA(int) pj_log_max_level;
 #define pj_log_get_level()  pj_log_max_level
 #endif
Index: pjproject/trunk/pjlib/include/pj/os.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/os.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/os.h	(revision 1405)
@@ -237,4 +237,67 @@
 /* **************************************************************************/
 /**
+ * @defgroup PJ_SYMBIAN_OS Symbian OS Specific
+ * @ingroup PJ_OS
+ * @{
+ * Functionalities specific to Symbian OS.
+ *
+ * Symbian OS strongly discourages the use of polling since this wastes
+ * CPU power, and instead provides Active Object and Active Scheduler
+ * pattern to allow application (in this case, PJLIB) to register asynchronous
+ * tasks. PJLIB port for Symbian complies to this recommended behavior.
+ * As the result, few things have been changed in PJLIB for Symbian:
+ *	- the timer heap (see @ref PJ_TIMER) is implemented with active
+ *	  object framework, and each timer entry registered to the timer 
+ *	  heap will register an Active Object to the Active Scheduler.
+ *	  Because of this, polling the timer heap with pj_timer_heap_poll()
+ *	  is no longer necessary, and this function will just evaluate
+ *	  to nothing.
+ *	- the ioqueue (see @ref PJ_IOQUEUE) is also implemented with
+ *	  active object framework, with each asynchronous operation will
+ *	  register an Active Object to the Active Scheduler. Because of
+ *	  this, polling the ioqueue with pj_ioqueue_poll() is no longer
+ *	  necessary, and this function will just evaluate to nothing.
+ *
+ * Since timer heap and ioqueue polling are no longer necessary, Symbian
+ * application can now poll for all events by calling 
+ * \a User::WaitForAnyRequest() and \a CActiveScheduler::RunIfReady().
+ * PJLIB provides a thin wrapper which calls these two functions,
+ * called pj_symbianos_poll().
+ */
+ 
+/**
+ * Wait the completion of any Symbian active objects. When the timeout
+ * value is not specified (the \a ms_timeout argument is -1), this 
+ * function is a thin wrapper which calls \a User::WaitForAnyRequest() 
+ * and \a CActiveScheduler::RunIfReady(). If the timeout value is
+ * specified, this function will schedule a timer entry to the timer
+ * heap (which is an Active Object), to limit the wait time for event
+ * occurences. Scheduling a timer entry is an expensive operation,
+ * therefore application should only specify a timeout value when it's
+ * really necessary (for example, when it's not sure there are other
+ * Active Objects currently running in the application).
+ *
+ * @param priority	The minimum priority of the Active Objects to
+ *			poll, which values are from CActive::TPriority
+ *			constants. If -1 is given, CActive::EPriorityStandard.
+ *			priority will be used.
+ * @param ms_timeout	Optional timeout to wait. Application should
+ *			specify -1 to let the function wait indefinitely
+ *			for any events.
+ *
+ * @return		PJ_TRUE if there have been any events executed
+ *			during the polling. This function will only return
+ *			PJ_FALSE if \a ms_timeout argument is specified
+ *			(i.e. the value is not -1) and there was no event
+ *			executed when the timeout timer elapsed.
+ */
+PJ_DECL(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout);
+
+/**
+ * @}
+ */
+ 
+/* **************************************************************************/
+/**
  * @defgroup PJ_TLS Thread Local Storage.
  * @ingroup PJ_OS
@@ -406,5 +469,5 @@
  *  - PJ_MUTEX_DEFAULT: default mutex type, which is system dependent.
  *  - PJ_MUTEX_SIMPLE: non-recursive mutex.
- *  - PJ_MUTEX_RECURSIVE: recursive mutex.
+ *  - PJ_MUTEX_RECURSE: recursive mutex.
  */
 typedef enum pj_mutex_type_e
Index: pjproject/trunk/pjlib/include/pj/pool.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/pool.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/pool.h	(revision 1405)
@@ -228,7 +228,7 @@
 	}
 
-	// Create the pool factory, in this case, a caching pool.
-	pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 
-			     1024*1024 );
+	// Create the pool factory, in this case, a caching pool,
+	// using default pool policy.
+	pj_caching_pool_init(&cp, NULL, 1024*1024 );
 
 	// Do a demo
@@ -506,6 +506,12 @@
 	    ((type*)pj_pool_zalloc(pool, sizeof(type)))
 
-
-
+/*
+ * Internal functions
+ */
+PJ_IDECL(void*) pj_pool_alloc_from_block(pj_pool_block *block, pj_size_t size);
+PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, unsigned size);
+
+
+	
 /**
  * @}	// PJ_POOL
@@ -618,6 +624,17 @@
  *  - callback will raise PJ_NO_MEMORY_EXCEPTION exception.
  *  - access to pool factory is not serialized (i.e. not thread safe).
- */
-extern pj_pool_factory_policy pj_pool_factory_default_policy;
+ *
+ * @see pj_pool_factory_get_default_policy
+ */
+PJ_DECL_DATA(pj_pool_factory_policy) pj_pool_factory_default_policy;
+
+
+/**
+ * Get the default pool factory policy.
+ *
+ * @return the pool policy.
+ */
+PJ_DECL(const pj_pool_factory_policy*) pj_pool_factory_get_default_policy(void);
+
 
 /**
Index: pjproject/trunk/pjlib/include/pj/pool_i.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/pool_i.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/pool_i.h	(revision 1405)
@@ -21,5 +21,4 @@
 #include <pj/string.h>
 
-PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, unsigned size);
 
 PJ_IDEF(pj_size_t) pj_pool_get_capacity( pj_pool_t *pool )
Index: pjproject/trunk/pjlib/include/pj/sock.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/sock.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/sock.h	(revision 1405)
@@ -60,10 +60,16 @@
  * THE LIBRARY WILL DO TRANSLATION TO THE NATIVE VALUE.
  */
-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_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.		*/
-extern const pj_uint16_t PJ_AF_IRDA;    /**< IRDA sockets.		*/
+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_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.	*/
+extern const pj_uint16_t PJ_AF_IRDA; /**< IRDA sockets.		*/
+
+PJ_DECL(pj_uint16_t) pj_AF_UNIX(void);
+PJ_DECL(pj_uint16_t) pj_AF_INET(void);
+PJ_DECL(pj_uint16_t) pj_AF_INET6(void);
+PJ_DECL(pj_uint16_t) pj_AF_PACKET(void);
+PJ_DECL(pj_uint16_t) pj_AF_IRDA(void);
 
 
@@ -75,10 +81,16 @@
 
 extern const pj_uint16_t PJ_SOCK_STREAM; /**< Sequenced, reliable, connection-
-					      based byte streams.           */
+					     based byte streams.           */
 extern const pj_uint16_t PJ_SOCK_DGRAM;  /**< Connectionless, unreliable 
-					      datagrams of fixed maximum 
-					      lengths.                      */
+					     datagrams of fixed maximum 
+					     lengths.                      */
 extern const pj_uint16_t PJ_SOCK_RAW;    /**< Raw protocol interface.       */
 extern const pj_uint16_t PJ_SOCK_RDM;    /**< Reliably-delivered messages.  */
+
+
+PJ_DECL(int) pj_SOCK_STREAM(void);
+PJ_DECL(int) pj_SOCK_DGRAM(void);
+PJ_DECL(int) pj_SOCK_RAW(void);
+PJ_DECL(int) pj_SOCK_RDM(void);
 
 
@@ -94,4 +106,10 @@
 extern const pj_uint16_t PJ_SOL_IPV6;	/**< IP version 6   */
 
+PJ_DECL(pj_uint16_t) pj_SOL_SOCKET(void);
+PJ_DECL(pj_uint16_t) pj_SOL_IP(void);
+PJ_DECL(pj_uint16_t) pj_SOL_TCP(void);
+PJ_DECL(pj_uint16_t) pj_SOL_UDP(void);
+PJ_DECL(pj_uint16_t) pj_SOL_IPV6(void);
+
 
 /* IP_TOS 
@@ -103,4 +121,5 @@
 extern const pj_uint16_t PJ_IP_TOS;	/**< IP_TOS optname in setsockopt() */
 
+PJ_DECL(int) pj_IP_TOS(void);
 
 /*
@@ -115,5 +134,10 @@
 extern const pj_uint16_t PJ_IPTOS_RELIABILITY;	/**< Optimize for reliability*/
 extern const pj_uint16_t PJ_IPTOS_MINCOST;	/**< "filler data" where slow 
-						 transmission does't matter */
+						  transmission does't matter */
+
+PJ_DECL(int) pj_IPTOS_LOWDELAY(void);
+PJ_DECL(int) pj_IPTOS_THROUGHPUT(void);
+PJ_DECL(int) pj_IPTOS_RELIABILITY(void);
+PJ_DECL(int) pj_IPTOS_MINCOST(void);
 
 
@@ -122,7 +146,11 @@
  * or #pj_sock_getsockopt().
  */
-extern const pj_uint16_t PJ_SO_TYPE;    /**< Socket type.               */
-extern const pj_uint16_t PJ_SO_RCVBUF;  /**< Buffer size for receive.   */
-extern const pj_uint16_t PJ_SO_SNDBUF;  /**< Buffer size for send.      */
+extern const pj_uint16_t PJ_SO_TYPE;  /**< Socket type.             */
+extern const pj_uint16_t PJ_SO_RCVBUF;/**< Buffer size for receive. */
+extern const pj_uint16_t PJ_SO_SNDBUF;/**< Buffer size for send.    */
+
+PJ_DECL(pj_uint16_t) pj_SO_TYPE(void);
+PJ_DECL(pj_uint16_t) pj_SO_RCVBUF(void);
+PJ_DECL(pj_uint16_t) pj_SO_SNDBUF(void);
 
 
@@ -130,7 +158,11 @@
  * Flags to be specified in #pj_sock_recv, #pj_sock_send, etc.
  */
-extern const int PJ_MSG_OOB;	    /**< Out-of-band messages.		 */
-extern const int PJ_MSG_PEEK;	    /**< Peek, don't remove from buffer. */
-extern const int PJ_MSG_DONTROUTE;  /**< Don't route.			 */
+extern const int PJ_MSG_OOB;	  /**< Out-of-band messages.         */
+extern const int PJ_MSG_PEEK;	  /**< Peek, don't remove from buffer*/
+extern const int PJ_MSG_DONTROUTE;/**< Don't route.                  */
+
+PJ_DECL(int) pj_MSG_OOB(void);
+PJ_DECL(int) pj_MSG_PEEK(void);
+PJ_DECL(int) pj_MSG_DONTROUTE(void);
 
 
Index: pjproject/trunk/pjlib/include/pj/sock_select.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/sock_select.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/sock_select.h	(revision 1405)
@@ -65,4 +65,19 @@
  */
 PJ_DECL(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp);
+
+
+/**
+ * This is an internal function, application shouldn't use this.
+ * 
+ * Get the number of descriptors in the set. This is defined in sock_select.c
+ * This function will only return the number of sockets set from PJ_FD_SET
+ * operation. When the set is modified by other means (such as by select()),
+ * the count will not be reflected here.
+ *
+ * @param fdsetp    The descriptor set.
+ *
+ * @return          Number of descriptors in the set.
+ */
+PJ_DECL(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp);
 
 
Index: pjproject/trunk/pjlib/include/pj/timer.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/timer.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/timer.h	(revision 1405)
@@ -254,4 +254,7 @@
  * each of the expired timers.
  *
+ * Note: polling the timer heap is not necessary in Symbian. Please see
+ * @ref PJ_SYMBIAN_OS for more info.
+ *
  * @param ht         The timer heap.
  * @param next_delay If this parameter is not NULL, it will be filled up with
Index: pjproject/trunk/pjlib/include/pj/types.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/types.h	(revision 1404)
+++ pjproject/trunk/pjlib/include/pj/types.h	(revision 1405)
@@ -303,5 +303,9 @@
 PJ_DECL(void) pj_shutdown(void);
 
+/**
+ * Type of callback to register to pj_atexit().
+ */
 typedef void (*pj_exit_callback)(void);
+
 /**
  * Register cleanup function to be called by PJLIB when pj_shutdown() is 
Index: pjproject/trunk/pjlib/src/pj/addr_resolv_sock.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/addr_resolv_sock.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/addr_resolv_sock.c	(revision 1405)
@@ -84,5 +84,5 @@
 	int len;
 
-	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &fd);
+	status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &fd);
 	if (status != PJ_SUCCESS) {
 	    return status;
Index: pjproject/trunk/pjlib/src/pj/addr_resolv_symbian.cpp
===================================================================
--- pjproject/trunk/pjlib/src/pj/addr_resolv_symbian.cpp	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/addr_resolv_symbian.cpp	(revision 1405)
@@ -77,5 +77,5 @@
     he->h_name = resolved_name;
     he->h_aliases = no_aliases;
-    he->h_addrtype = PJ_AF_INET;
+    he->h_addrtype = pj_AF_INET();
     he->h_length = 4;
     he->h_addr_list = (char**) addr_list;
@@ -86,5 +86,5 @@
 
 /* Resolve the IP address of local machine */
-pj_status_t pj_gethostip(pj_in_addr *addr)
+PJ_DEF(pj_status_t) pj_gethostip(pj_in_addr *addr)
 {
     const pj_str_t *hostname = pj_gethostname();
@@ -112,5 +112,5 @@
 	int len;
 
-	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &fd);
+	status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &fd);
 	if (status != PJ_SUCCESS) {
 	    return status;
Index: pjproject/trunk/pjlib/src/pj/errno.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/errno.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/errno.c	(revision 1405)
@@ -102,5 +102,5 @@
 
 /* Register strerror handle. */
-PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start,
+PJ_DEF(pj_status_t) pj_register_strerror( pj_status_t start,
 					  pj_status_t space,
 					  pjsip_error_callback f)
Index: pjproject/trunk/pjlib/src/pj/fifobuf.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/fifobuf.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/fifobuf.c	(revision 1405)
@@ -26,6 +26,5 @@
 #define SZ  sizeof(unsigned)
 
-PJ_DEF(void)
-pj_fifobuf_init (pj_fifobuf_t *fifobuf, void *buffer, unsigned size)
+PJ_DEF(void) pj_fifobuf_init (pj_fifobuf_t *fifobuf, void *buffer, unsigned size)
 {
     PJ_CHECK_STACK();
@@ -41,6 +40,5 @@
 }
 
-PJ_DEF(unsigned)
-pj_fifobuf_max_size (pj_fifobuf_t *fifobuf)
+PJ_DEF(unsigned) pj_fifobuf_max_size (pj_fifobuf_t *fifobuf)
 {
     unsigned s1, s2;
@@ -58,6 +56,5 @@
 }
 
-PJ_DEF(void*)
-pj_fifobuf_alloc (pj_fifobuf_t *fifobuf, unsigned size)
+PJ_DEF(void*) pj_fifobuf_alloc (pj_fifobuf_t *fifobuf, unsigned size)
 {
     unsigned available;
@@ -116,6 +113,5 @@
 }
 
-PJ_DEF(pj_status_t)
-pj_fifobuf_unalloc (pj_fifobuf_t *fifobuf, void *buf)
+PJ_DEF(pj_status_t) pj_fifobuf_unalloc (pj_fifobuf_t *fifobuf, void *buf)
 {
     char *ptr = (char*)buf;
@@ -147,6 +143,5 @@
 }
 
-PJ_DEF(pj_status_t)
-pj_fifobuf_free (pj_fifobuf_t *fifobuf, void *buf)
+PJ_DEF(pj_status_t) pj_fifobuf_free (pj_fifobuf_t *fifobuf, void *buf)
 {
     char *ptr = (char*)buf;
Index: pjproject/trunk/pjlib/src/pj/file_io_ansi.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/file_io_ansi.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/file_io_ansi.c	(revision 1405)
@@ -110,4 +110,5 @@
 }
 
+/*
 PJ_DEF(pj_bool_t) pj_file_eof(pj_oshandle_t fd, enum pj_file_access access)
 {
@@ -115,4 +116,5 @@
     return feof((FILE*)fd) ? PJ_TRUE : 0;
 }
+*/
 
 PJ_DEF(pj_status_t) pj_file_setpos( pj_oshandle_t fd,
Index: pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c	(revision 1405)
@@ -101,8 +101,8 @@
      */
     optlen = sizeof(key->fd_type);
-    rc = pj_sock_getsockopt(sock, PJ_SOL_SOCKET, PJ_SO_TYPE,
+    rc = pj_sock_getsockopt(sock, pj_SOL_SOCKET(), pj_SO_TYPE(),
                             &key->fd_type, &optlen);
     if (rc != PJ_SUCCESS)
-        key->fd_type = PJ_SOCK_STREAM;
+        key->fd_type = pj_SOCK_STREAM();
 
     /* Create mutex for the key. */
@@ -270,5 +270,5 @@
          * so that send() can work in parallel.
          */
-        if (h->fd_type == PJ_SOCK_DGRAM) {
+        if (h->fd_type == pj_SOCK_DGRAM()) {
             pj_list_erase(write_op);
 
@@ -316,10 +316,10 @@
         if (send_rc!=PJ_SUCCESS || 
             write_op->written == (pj_ssize_t)write_op->size ||
-            h->fd_type == PJ_SOCK_DGRAM) 
+            h->fd_type == pj_SOCK_DGRAM()) 
         {
 
 	    write_op->op = PJ_IOQUEUE_OP_NONE;
 
-            if (h->fd_type != PJ_SOCK_DGRAM) {
+            if (h->fd_type != pj_SOCK_DGRAM()) {
                 /* Write completion of the whole stream. */
                 pj_list_erase(write_op);
Index: pjproject/trunk/pjlib/src/pj/ioqueue_select.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/ioqueue_select.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/ioqueue_select.c	(revision 1405)
@@ -64,20 +64,4 @@
 #   error "Error reporting must be enabled for this function to work!"
 #endif
-
-/**
- * Get the number of descriptors in the set. This is defined in sock_select.c
- * This function will only return the number of sockets set from PJ_FD_SET
- * operation. When the set is modified by other means (such as by select()),
- * the count will not be reflected here.
- *
- * That's why don't export this function in the header file, to avoid
- * misunderstanding.
- *
- * @param fdsetp    The descriptor set.
- *
- * @return          Number of descriptors in the set.
- */
-PJ_DECL(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp);
-
 
 /*
Index: pjproject/trunk/pjlib/src/pj/ioqueue_winnt.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/ioqueue_winnt.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/ioqueue_winnt.c	(revision 1405)
@@ -1107,5 +1107,5 @@
     op_key_rec = (union operation_key*)op_key->internal__;
     
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, 
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, 
                             &op_key_rec->accept.newsock);
     if (status != PJ_SUCCESS)
Index: pjproject/trunk/pjlib/src/pj/log.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/log.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/log.c	(revision 1405)
@@ -25,5 +25,9 @@
 #if PJ_LOG_MAX_LEVEL >= 1
 
-PJ_DEF(int) pj_log_max_level = PJ_LOG_MAX_LEVEL;
+#if 0
+PJ_DEF_DATA(int) pj_log_max_level = PJ_LOG_MAX_LEVEL;
+#else
+static int pj_log_max_level = PJ_LOG_MAX_LEVEL;
+#endif
 static pj_log_func *log_writer = &pj_log_write;
 static unsigned log_decor = PJ_LOG_HAS_TIME | PJ_LOG_HAS_MICRO_SEC |
@@ -49,5 +53,5 @@
 }
 
-#if 0
+#if 1
 PJ_DEF(int) pj_log_get_level(void)
 {
@@ -170,4 +174,5 @@
 }
 
+/*
 PJ_DEF(void) pj_log_0(const char *obj, const char *format, ...)
 {
@@ -177,4 +182,5 @@
     va_end(arg);
 }
+*/
 
 PJ_DEF(void) pj_log_1(const char *obj, const char *format, ...)
Index: pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp
===================================================================
--- pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp	(revision 1405)
@@ -261,6 +261,4 @@
 
 
-PJ_DECL(void) pj_shutdown(void);
-
 /*
  * pj_init(void).
@@ -332,4 +330,92 @@
     PjSymbianOS *os = PjSymbianOS::Instance();
     os->Shutdown();
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+class CPollTimeoutTimer : public CActive 
+{
+public:
+    static CPollTimeoutTimer* NewL(int msec, TInt prio);
+    ~CPollTimeoutTimer();
+    
+    virtual void RunL();
+    virtual void DoCancel();
+
+private:	
+    RTimer	     rtimer_;
+    
+    explicit CPollTimeoutTimer(TInt prio);
+    void ConstructL(int msec);
+};
+
+CPollTimeoutTimer::CPollTimeoutTimer(TInt prio)
+: CActive(prio)
+{
+}
+
+
+CPollTimeoutTimer::~CPollTimeoutTimer() 
+{
+    rtimer_.Close();
+}
+
+void CPollTimeoutTimer::ConstructL(int msec) 
+{
+    rtimer_.CreateLocal();
+    CActiveScheduler::Add(this);
+    rtimer_.After(iStatus, msec*1000);
+    SetActive();
+}
+
+CPollTimeoutTimer* CPollTimeoutTimer::NewL(int msec, TInt prio) 
+{
+    CPollTimeoutTimer *self = new CPollTimeoutTimer(prio);
+    CleanupStack::PushL(self);
+    self->ConstructL(msec);    
+    CleanupStack::Pop(self);
+
+    return self;
+}
+
+void CPollTimeoutTimer::RunL() 
+{
+}
+
+void CPollTimeoutTimer::DoCancel() 
+{
+     rtimer_.Cancel();
+}
+
+
+/*
+ * Wait the completion of any Symbian active objects. 
+ */
+PJ_DEF(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout)
+{
+    CPollTimeoutTimer *timer = NULL;
+    
+    if (priority==-1)
+    	priority = CActive::EPriorityStandard;
+    
+    if (ms_timeout >= 0) {
+    	timer = CPollTimeoutTimer::NewL(ms_timeout, priority);
+    }
+    
+    PjSymbianOS::Instance()->WaitForActiveObjects(priority);
+    
+    if (timer) {
+        bool timer_is_active = timer->IsActive();
+    
+        if (timer_is_active)
+            timer->Cancel();
+        
+        delete timer;
+        
+    	return timer_is_active ? PJ_TRUE : PJ_FALSE;
+    	
+    } else {
+    	return PJ_TRUE;
+    }
 }
 
Index: pjproject/trunk/pjlib/src/pj/os_symbian.h
===================================================================
--- pjproject/trunk/pjlib/src/pj/os_symbian.h	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/os_symbian.h	(revision 1405)
@@ -221,5 +221,5 @@
     {
 	pj_bzero(&pj_addr, sizeof(pj_sockaddr_in));
-	pj_addr.sin_family = PJ_AF_INET;
+	pj_addr.sin_family = pj_AF_INET();
 	pj_addr.sin_addr.s_addr = pj_htonl(sym_addr.Address());
 	pj_addr.sin_port = pj_htons((pj_uint16_t) sym_addr.Port());
Index: pjproject/trunk/pjlib/src/pj/os_time_common.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/os_time_common.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/os_time_common.c	(revision 1405)
@@ -19,4 +19,6 @@
 #include <pj/os.h>
 #include <pj/compat/time.h>
+#include <pj/errno.h>
+
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -66,10 +68,18 @@
  * Convert local time to GMT.
  */
-PJ_DEF(pj_status_t) pj_time_local_to_gmt(pj_time_val *tv);
+PJ_DEF(pj_status_t) pj_time_local_to_gmt(pj_time_val *tv)
+{
+    PJ_UNUSED_ARG(tv);
+    return PJ_EBUG;
+}
 
 /**
  * Convert GMT to local time.
  */
-PJ_DEF(pj_status_t) pj_time_gmt_to_local(pj_time_val *tv);
+PJ_DEF(pj_status_t) pj_time_gmt_to_local(pj_time_val *tv)
+{
+    PJ_UNUSED_ARG(tv);
+    return PJ_EBUG;
+}
 
 
Index: pjproject/trunk/pjlib/src/pj/pool_caching.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/pool_caching.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/pool_caching.c	(revision 1405)
@@ -66,4 +66,8 @@
 	pj_list_init(&cp->free_list[i]);
 
+    if (policy == NULL) {
+    	policy = &pj_pool_factory_default_policy;
+    }
+    
     pj_memcpy(&cp->factory.policy, policy, sizeof(pj_pool_factory_policy));
     cp->factory.create_pool = &cpool_create_pool;
Index: pjproject/trunk/pjlib/src/pj/pool_policy_kmalloc.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/pool_policy_kmalloc.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/pool_policy_kmalloc.c	(revision 1405)
@@ -57,2 +57,7 @@
 };
 
+PJ_DEF(const pj_pool_factory_policy*) pj_pool_factory_get_default_policy(void)
+{
+    return &pj_pool_factory_default_policy;
+}
+
Index: pjproject/trunk/pjlib/src/pj/pool_policy_malloc.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/pool_policy_malloc.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/pool_policy_malloc.c	(revision 1405)
@@ -87,5 +87,5 @@
 }
 
-pj_pool_factory_policy pj_pool_factory_default_policy = 
+PJ_DECL_DATA(pj_pool_factory_policy) pj_pool_factory_default_policy =
 {
     &default_block_alloc,
@@ -95,3 +95,9 @@
 };
 
+PJ_DEF(const pj_pool_factory_policy*) pj_pool_factory_get_default_policy(void)
+{
+    return &pj_pool_factory_default_policy;
+}
+
+
 #endif	/* PJ_HAS_POOL_ALT_API */
Index: pjproject/trunk/pjlib/src/pj/pool_policy_new.cpp
===================================================================
--- pjproject/trunk/pjlib/src/pj/pool_policy_new.cpp	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/pool_policy_new.cpp	(revision 1405)
@@ -78,5 +78,5 @@
 }
 
-pj_pool_factory_policy pj_pool_factory_default_policy = 
+PJ_DEF_DATA(pj_pool_factory_policy) pj_pool_factory_default_policy = 
 {
     &operator_new,
@@ -85,11 +85,11 @@
     0
 };
- 
-PJ_DEF(pj_pool_factory_policy*) pj_pool_factory_get_default_policy(void)
+
+PJ_DEF(const pj_pool_factory_policy*) pj_pool_factory_get_default_policy(void)
 {
     return &pj_pool_factory_default_policy;
 }
 
-
+ 
 #endif	/* PJ_HAS_POOL_ALT_API */
 
Index: pjproject/trunk/pjlib/src/pj/sock_common.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/sock_common.c	(revision 1405)
+++ pjproject/trunk/pjlib/src/pj/sock_common.c	(revision 1405)
@@ -0,0 +1,145 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/sock.h>
+
+PJ_DEF(pj_uint16_t) pj_AF_UNIX(void)
+{
+    return PJ_AF_UNIX;
+}
+
+PJ_DEF(pj_uint16_t) pj_AF_INET(void)
+{
+    return PJ_AF_INET;
+}
+
+PJ_DEF(pj_uint16_t) pj_AF_INET6(void)
+{
+    return PJ_AF_INET6;
+}
+
+PJ_DEF(pj_uint16_t) pj_AF_PACKET(void)
+{
+    return PJ_AF_PACKET;
+}
+
+PJ_DEF(pj_uint16_t) pj_AF_IRDA(void)
+{
+    return PJ_AF_IRDA;
+}
+
+PJ_DEF(int) pj_SOCK_STREAM(void)
+{
+    return PJ_SOCK_STREAM;
+}
+
+PJ_DEF(int) pj_SOCK_DGRAM(void)
+{
+    return PJ_SOCK_DGRAM;
+}
+
+PJ_DEF(int) pj_SOCK_RAW(void)
+{
+    return PJ_SOCK_RAW;
+}
+
+PJ_DEF(int) pj_SOCK_RDM(void)
+{
+    return PJ_SOCK_RDM;
+}
+
+PJ_DEF(pj_uint16_t) pj_SOL_SOCKET(void)
+{
+    return PJ_SOL_SOCKET;
+}
+
+PJ_DEF(pj_uint16_t) pj_SOL_IP(void)
+{
+    return PJ_SOL_IP;
+}
+
+PJ_DEF(pj_uint16_t) pj_SOL_TCP(void)
+{
+    return PJ_SOL_TCP;
+}
+
+PJ_DEF(pj_uint16_t) pj_SOL_UDP(void)
+{
+    return PJ_SOL_UDP;
+}
+
+PJ_DEF(pj_uint16_t) pj_SOL_IPV6(void)
+{
+    return PJ_SOL_IPV6;
+}
+
+PJ_DEF(int) pj_IP_TOS(void)
+{
+    return PJ_IP_TOS;
+}
+
+PJ_DEF(int) pj_IPTOS_LOWDELAY(void)
+{
+    return PJ_IPTOS_LOWDELAY;
+}
+
+PJ_DEF(int) pj_IPTOS_THROUGHPUT(void)
+{
+    return PJ_IPTOS_THROUGHPUT;
+}
+
+PJ_DEF(int) pj_IPTOS_RELIABILITY(void)
+{
+    return PJ_IPTOS_RELIABILITY;
+}
+
+PJ_DEF(int) pj_IPTOS_MINCOST(void)
+{
+    return PJ_IPTOS_MINCOST;
+}
+
+PJ_DEF(pj_uint16_t) pj_SO_TYPE(void)
+{
+    return PJ_SO_TYPE;
+}
+
+PJ_DEF(pj_uint16_t) pj_SO_RCVBUF(void)
+{
+    return PJ_SO_RCVBUF;
+}
+
+PJ_DEF(pj_uint16_t) pj_SO_SNDBUF(void)
+{
+    return PJ_SO_SNDBUF;
+}
+
+PJ_DEF(int) pj_MSG_OOB(void)
+{
+    return PJ_MSG_OOB;
+}
+
+PJ_DEF(int) pj_MSG_PEEK(void)
+{
+    return PJ_MSG_PEEK;
+}
+
+PJ_DEF(int) pj_MSG_DONTROUTE(void)
+{
+    return PJ_MSG_DONTROUTE;
+}
+
Index: pjproject/trunk/pjlib/src/pj/sock_symbian.cpp
===================================================================
--- pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 1405)
@@ -53,4 +53,11 @@
 const pj_uint16_t PJ_SOL_IPV6	= 0xFFFF;
 
+/* TOS */
+const pj_uint16_t PJ_IP_TOS		= 0;
+const pj_uint16_t PJ_IPTOS_LOWDELAY	= 0;
+const pj_uint16_t PJ_IPTOS_THROUGHPUT	= 0;
+const pj_uint16_t PJ_IPTOS_RELIABILITY	= 0;
+const pj_uint16_t PJ_IPTOS_MINCOST	= 0;
+
 /* ioctl() is also not supported. */
 const pj_uint16_t PJ_SO_TYPE    = 0xFFFF;
@@ -58,4 +65,8 @@
 const pj_uint16_t PJ_SO_SNDBUF  = 0xFFFF;
 
+/* Flags */
+const int PJ_MSG_OOB	     = 0;
+const int PJ_MSG_PEEK	     = KSockReadPeek;
+const int PJ_MSG_DONTROUTE   = 0;
 
 /////////////////////////////////////////////////////////////////////////////
@@ -456,7 +467,7 @@
     /* Set proto if none is specified. */
     if (proto == 0) {
-	if (type == PJ_SOCK_STREAM)
+	if (type == pj_SOCK_STREAM())
 	    proto = KProtocolInetTcp;
-	else if (type == PJ_SOCK_DGRAM)
+	else if (type == pj_SOCK_DGRAM())
 	    proto = KProtocolInetUdp;
     }
Index: pjproject/trunk/pjlib/src/pj/types.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/types.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pj/types.c	(revision 1405)
@@ -20,5 +20,5 @@
 #include <pj/os.h>
 
-void pj_time_val_normalize(pj_time_val *t)
+PJ_DEF(void) pj_time_val_normalize(pj_time_val *t)
 {
     PJ_CHECK_STACK();
Index: pjproject/trunk/pjlib/src/pjlib-test/echo_clt.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/echo_clt.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/echo_clt.c	(revision 1405)
@@ -66,5 +66,5 @@
     unsigned counter = 0;
 
-    rc = app_socket(PJ_AF_INET, client->sock_type, 0, -1, &sock);
+    rc = app_socket(pj_AF_INET(), client->sock_type, 0, -1, &sock);
     if (rc != PJ_SUCCESS) {
         app_perror("...unable to create socket", rc);
Index: pjproject/trunk/pjlib/src/pjlib-test/ioq_perf.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/ioq_perf.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/ioq_perf.c	(revision 1405)
@@ -276,5 +276,5 @@
         /* Create socket pair. */
 	TRACE_((THIS_FILE, "      calling socketpair.."));
-        rc = app_socketpair(PJ_AF_INET, sock_type, 0, 
+        rc = app_socketpair(pj_AF_INET(), sock_type, 0, 
                             &items[i].server_fd, &items[i].client_fd);
         if (rc != PJ_SUCCESS) {
@@ -452,47 +452,47 @@
     } test_param[] = 
     {
-        { PJ_SOCK_DGRAM, "udp", 1, 1},
-        { PJ_SOCK_DGRAM, "udp", 1, 2},
-        { PJ_SOCK_DGRAM, "udp", 1, 4},
-        { PJ_SOCK_DGRAM, "udp", 1, 8},
-        { PJ_SOCK_DGRAM, "udp", 2, 1},
-        { PJ_SOCK_DGRAM, "udp", 2, 2},
-        { PJ_SOCK_DGRAM, "udp", 2, 4},
-        { PJ_SOCK_DGRAM, "udp", 2, 8},
-        { PJ_SOCK_DGRAM, "udp", 4, 1},
-        { PJ_SOCK_DGRAM, "udp", 4, 2},
-        { PJ_SOCK_DGRAM, "udp", 4, 4},
-        { PJ_SOCK_DGRAM, "udp", 4, 8},
-        { PJ_SOCK_DGRAM, "udp", 4, 16},
-        { PJ_SOCK_STREAM, "tcp", 1, 1},
-        { PJ_SOCK_STREAM, "tcp", 1, 2},
-        { PJ_SOCK_STREAM, "tcp", 1, 4},
-        { PJ_SOCK_STREAM, "tcp", 1, 8},
-        { PJ_SOCK_STREAM, "tcp", 2, 1},
-        { PJ_SOCK_STREAM, "tcp", 2, 2},
-        { PJ_SOCK_STREAM, "tcp", 2, 4},
-        { PJ_SOCK_STREAM, "tcp", 2, 8},
-        { PJ_SOCK_STREAM, "tcp", 4, 1},
-        { PJ_SOCK_STREAM, "tcp", 4, 2},
-        { PJ_SOCK_STREAM, "tcp", 4, 4},
-        { PJ_SOCK_STREAM, "tcp", 4, 8},
-        { PJ_SOCK_STREAM, "tcp", 4, 16},
+        { pj_SOCK_DGRAM(), "udp", 1, 1},
+        { pj_SOCK_DGRAM(), "udp", 1, 2},
+        { pj_SOCK_DGRAM(), "udp", 1, 4},
+        { pj_SOCK_DGRAM(), "udp", 1, 8},
+        { pj_SOCK_DGRAM(), "udp", 2, 1},
+        { pj_SOCK_DGRAM(), "udp", 2, 2},
+        { pj_SOCK_DGRAM(), "udp", 2, 4},
+        { pj_SOCK_DGRAM(), "udp", 2, 8},
+        { pj_SOCK_DGRAM(), "udp", 4, 1},
+        { pj_SOCK_DGRAM(), "udp", 4, 2},
+        { pj_SOCK_DGRAM(), "udp", 4, 4},
+        { pj_SOCK_DGRAM(), "udp", 4, 8},
+        { pj_SOCK_DGRAM(), "udp", 4, 16},
+        { pj_SOCK_STREAM(), "tcp", 1, 1},
+        { pj_SOCK_STREAM(), "tcp", 1, 2},
+        { pj_SOCK_STREAM(), "tcp", 1, 4},
+        { pj_SOCK_STREAM(), "tcp", 1, 8},
+        { pj_SOCK_STREAM(), "tcp", 2, 1},
+        { pj_SOCK_STREAM(), "tcp", 2, 2},
+        { pj_SOCK_STREAM(), "tcp", 2, 4},
+        { pj_SOCK_STREAM(), "tcp", 2, 8},
+        { pj_SOCK_STREAM(), "tcp", 4, 1},
+        { pj_SOCK_STREAM(), "tcp", 4, 2},
+        { pj_SOCK_STREAM(), "tcp", 4, 4},
+        { pj_SOCK_STREAM(), "tcp", 4, 8},
+        { pj_SOCK_STREAM(), "tcp", 4, 16},
 /*
-	{ PJ_SOCK_DGRAM, "udp", 32, 1},
-	{ PJ_SOCK_DGRAM, "udp", 32, 1},
-	{ PJ_SOCK_DGRAM, "udp", 32, 1},
-	{ PJ_SOCK_DGRAM, "udp", 32, 1},
-	{ PJ_SOCK_DGRAM, "udp", 1, 32},
-	{ PJ_SOCK_DGRAM, "udp", 1, 32},
-	{ PJ_SOCK_DGRAM, "udp", 1, 32},
-	{ PJ_SOCK_DGRAM, "udp", 1, 32},
-	{ PJ_SOCK_STREAM, "tcp", 32, 1},
-	{ PJ_SOCK_STREAM, "tcp", 32, 1},
-	{ PJ_SOCK_STREAM, "tcp", 32, 1},
-	{ PJ_SOCK_STREAM, "tcp", 32, 1},
-	{ PJ_SOCK_STREAM, "tcp", 1, 32},
-	{ PJ_SOCK_STREAM, "tcp", 1, 32},
-	{ PJ_SOCK_STREAM, "tcp", 1, 32},
-	{ PJ_SOCK_STREAM, "tcp", 1, 32},
+	{ pj_SOCK_DGRAM(), "udp", 32, 1},
+	{ pj_SOCK_DGRAM(), "udp", 32, 1},
+	{ pj_SOCK_DGRAM(), "udp", 32, 1},
+	{ pj_SOCK_DGRAM(), "udp", 32, 1},
+	{ pj_SOCK_DGRAM(), "udp", 1, 32},
+	{ pj_SOCK_DGRAM(), "udp", 1, 32},
+	{ pj_SOCK_DGRAM(), "udp", 1, 32},
+	{ pj_SOCK_DGRAM(), "udp", 1, 32},
+	{ pj_SOCK_STREAM(), "tcp", 32, 1},
+	{ pj_SOCK_STREAM(), "tcp", 32, 1},
+	{ pj_SOCK_STREAM(), "tcp", 32, 1},
+	{ pj_SOCK_STREAM(), "tcp", 32, 1},
+	{ pj_SOCK_STREAM(), "tcp", 1, 32},
+	{ pj_SOCK_STREAM(), "tcp", 1, 32},
+	{ pj_SOCK_STREAM(), "tcp", 1, 32},
+	{ pj_SOCK_STREAM(), "tcp", 1, 32},
 */
     };
Index: pjproject/trunk/pjlib/src/pjlib-test/ioq_tcp.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/ioq_tcp.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/ioq_tcp.c	(revision 1405)
@@ -51,4 +51,5 @@
                              callback_accept_status,
                              callback_connect_status;
+static unsigned		     callback_call_count;
 static pj_ioqueue_key_t     *callback_read_key,
                             *callback_write_key,
@@ -66,4 +67,5 @@
     callback_read_op = op_key;
     callback_read_size = bytes_read;
+    callback_call_count++;
 }
 
@@ -75,4 +77,5 @@
     callback_write_op = op_key;
     callback_write_size = bytes_written;
+    callback_call_count++;
 }
 
@@ -97,4 +100,5 @@
 	callback_accept_op = op_key;
 	callback_accept_status = status;
+	callback_call_count++;
     }
 }
@@ -104,4 +108,5 @@
     callback_connect_key = key;
     callback_connect_status = status;
+    callback_call_count++;
 }
 
@@ -169,5 +174,10 @@
     while (pending_op > 0) {
         timeout.sec = 1; timeout.msec = 0;
+#ifdef PJ_SYMBIAN
+	PJ_UNUSED_ARG(ioque);
+	status = pj_symbianos_poll(-1, 1000);
+#else
 	status = pj_ioqueue_poll(ioque, &timeout);
+#endif
 	if (status > 0) {
             if (callback_read_size) {
@@ -198,5 +208,9 @@
     // Subsequent poll should yield zero too.
     timeout.sec = timeout.msec = 0;
+#ifdef PJ_SYMBIAN
+    status = pj_symbianos_poll(-1, 1);
+#else
     status = pj_ioqueue_poll(ioque, &timeout);
+#endif
     if (status != 0)
         return -173;
@@ -227,5 +241,5 @@
     char *send_buf, *recv_buf;
     pj_ioqueue_t *ioque = NULL;
-    pj_ioqueue_key_t *skey, *ckey0, *ckey1;
+    pj_ioqueue_key_t *skey=NULL, *ckey0=NULL, *ckey1=NULL;
     pj_ioqueue_op_key_t accept_op;
     int bufsize = BUF_MIN_SIZE;
@@ -244,5 +258,5 @@
 
     // Create server socket and client socket for connecting
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &ssock);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &ssock);
     if (rc != PJ_SUCCESS) {
         app_perror("...error creating socket", rc);
@@ -250,5 +264,5 @@
     }
 
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &csock1);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &csock1);
     if (rc != PJ_SUCCESS) {
         app_perror("...error creating socket", rc);
@@ -322,4 +336,5 @@
     callback_read_size = callback_write_size = 0;
     callback_accept_status = callback_connect_status = -2;
+    callback_call_count = 0;
 
     callback_read_key = callback_write_key = 
@@ -330,5 +345,11 @@
 	pj_time_val timeout = {1, 0};
 
-	status=pj_ioqueue_poll(ioque, &timeout);
+#ifdef PJ_SYMBIAN
+	callback_call_count = 0;
+	pj_symbianos_poll(-1, 1000);
+	status = callback_call_count;
+#else
+	status = pj_ioqueue_poll(ioque, &timeout);
+#endif
 	if (status > 0) {
             if (callback_accept_status != -2) {
@@ -374,5 +395,9 @@
     if (pending_op == 0) {
         pj_time_val timeout = {1, 0};
+#ifdef PJ_SYMBIAN
+	status = pj_symbianos_poll(-1, 1000);
+#else
         status = pj_ioqueue_poll(ioque, &timeout);
+#endif
         if (status != 0) {
             status=-60; goto on_error;
@@ -408,10 +433,19 @@
 
 on_error:
-    if (ssock != PJ_INVALID_SOCKET)
+    if (skey != NULL)
+    	pj_ioqueue_unregister(skey);
+    else if (ssock != PJ_INVALID_SOCKET)
 	pj_sock_close(ssock);
-    if (csock1 != PJ_INVALID_SOCKET)
+    
+    if (ckey1 != NULL)
+    	pj_ioqueue_unregister(ckey1);
+    else if (csock1 != PJ_INVALID_SOCKET)
 	pj_sock_close(csock1);
-    if (csock0 != PJ_INVALID_SOCKET)
+    
+    if (ckey0 != NULL)
+    	pj_ioqueue_unregister(ckey0);
+    else if (csock0 != PJ_INVALID_SOCKET)
 	pj_sock_close(csock0);
+    
     if (ioque != NULL)
 	pj_ioqueue_destroy(ioque);
@@ -427,9 +461,9 @@
 static int compliance_test_1(void)
 {
-    pj_sock_t csock1=-1;
+    pj_sock_t csock1=PJ_INVALID_SOCKET;
     pj_sockaddr_in addr;
     pj_pool_t *pool = NULL;
     pj_ioqueue_t *ioque = NULL;
-    pj_ioqueue_key_t *ckey1;
+    pj_ioqueue_key_t *ckey1 = NULL;
     pj_ssize_t status = -1;
     int pending_op = 0;
@@ -447,5 +481,5 @@
 
     // Create client socket
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &csock1);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &csock1);
     if (rc != PJ_SUCCESS) {
         app_perror("...ERROR in pj_sock_socket()", rc);
@@ -484,5 +518,11 @@
 	pj_time_val timeout = {1, 0};
 
-	status=pj_ioqueue_poll(ioque, &timeout);
+#ifdef PJ_SYMBIAN
+	callback_call_count = 0;
+	pj_symbianos_poll(-1, 1000);
+	status = callback_call_count;
+#else
+	status = pj_ioqueue_poll(ioque, &timeout);
+#endif
 	if (status > 0) {
             if (callback_connect_key==ckey1) {
@@ -513,5 +553,9 @@
     if (pending_op == 0) {
         pj_time_val timeout = {1, 0};
+#ifdef PJ_SYMBIAN
+	status = pj_symbianos_poll(-1, 1000);
+#else
         status = pj_ioqueue_poll(ioque, &timeout);
+#endif
         if (status != 0) {
             status=-60; goto on_error;
@@ -523,6 +567,9 @@
 
 on_error:
-    if (csock1 != PJ_INVALID_SOCKET)
+    if (ckey1 != NULL)
+    	pj_ioqueue_unregister(ckey1);
+    else if (csock1 != PJ_INVALID_SOCKET)
 	pj_sock_close(csock1);
+    
     if (ioque != NULL)
 	pj_ioqueue_destroy(ioque);
@@ -577,4 +624,17 @@
     pj_status_t rc;
 
+    listener.sock = PJ_INVALID_SOCKET;
+    listener.key = NULL;
+    
+    for (i=0; i<MAX_PAIR; ++i) {
+    	server[i].sock = PJ_INVALID_SOCKET;
+    	server[i].key = NULL;
+    }
+    
+    for (i=0; i<MAX_PAIR; ++i) {
+    	client[i].sock = PJ_INVALID_SOCKET;
+    	client[i].key = NULL;	
+    }
+    
     // Create pool.
     pool = pj_pool_create(mem, NULL, POOL_SIZE, 4000, NULL);
@@ -594,5 +654,5 @@
 
     // Create listener socket
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &listener.sock);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &listener.sock);
     if (rc != PJ_SUCCESS) {
         app_perror("...error creating socket", rc);
@@ -636,5 +696,5 @@
 	// Client connect and server accept.
 	for (i=0; i<MAX_PAIR; ++i) {
-	    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &client[i].sock);
+	    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &client[i].sock);
 	    if (rc != PJ_SUCCESS) {
 		app_perror("...error creating socket", rc);
@@ -684,5 +744,9 @@
 	    pj_time_val timeout = {1, 0};
 
-	    status=pj_ioqueue_poll(ioque, &timeout);
+#ifdef PJ_SYMBIAN
+	    status = pj_symbianos_poll(-1, 1000);
+#else
+	    status = pj_ioqueue_poll(ioque, &timeout);
+#endif
 	    if (status > 0) {
 		if (status > pending_op) {
@@ -705,5 +769,9 @@
 	if (pending_op == 0) {
 	    pj_time_val timeout = {1, 0};
+#ifdef PJ_SYMBIAN
+	    status = pj_symbianos_poll(-1, 1000);
+#else
 	    status = pj_ioqueue_poll(ioque, &timeout);
+#endif
 	    if (status != 0) {
 		status=-120; goto on_error;
@@ -720,5 +788,5 @@
 
 	    // Check addresses
-	    if (server[i].local_addr.sin_family != PJ_AF_INET ||
+	    if (server[i].local_addr.sin_family != pj_AF_INET() ||
 		server[i].local_addr.sin_addr.s_addr == 0 ||
 		server[i].local_addr.sin_port == 0)
@@ -729,5 +797,5 @@
 	    }
 
-	    if (server[i].rem_addr.sin_family != PJ_AF_INET ||
+	    if (server[i].rem_addr.sin_family != pj_AF_INET() ||
 		server[i].rem_addr.sin_addr.s_addr == 0 ||
 		server[i].rem_addr.sin_port == 0)
Index: pjproject/trunk/pjlib/src/pjlib-test/ioq_udp.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/ioq_udp.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/ioq_udp.c	(revision 1405)
@@ -134,5 +134,5 @@
     char *send_buf, *recv_buf;
     pj_ioqueue_t *ioque = NULL;
-    pj_ioqueue_key_t *skey, *ckey;
+    pj_ioqueue_key_t *skey = NULL, *ckey = NULL;
     pj_ioqueue_op_key_t read_op, write_op;
     int bufsize = BUF_MIN_SIZE;
@@ -153,7 +153,7 @@
     // Allocate sockets for sending and receiving.
     TRACE_("creating sockets...");
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &ssock);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &ssock);
     if (rc==PJ_SUCCESS)
-        rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &csock);
+        rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &csock);
     else
         csock = PJ_INVALID_SOCKET;
@@ -166,5 +166,5 @@
     TRACE_("bind socket...");
     pj_bzero(&addr, sizeof(addr));
-    addr.sin_family = PJ_AF_INET;
+    addr.sin_family = pj_AF_INET();
     addr.sin_port = pj_htons(PORT);
     if (pj_sock_bind(ssock, &addr, sizeof(addr))) {
@@ -259,5 +259,9 @@
 
 	TRACE_("poll...");
+#ifdef PJ_SYMBIAN
+	rc = pj_symbianos_poll(-1, 5000);
+#else
 	rc = pj_ioqueue_poll(ioque, &timeout);
+#endif
 
 	if (rc == 0) {
@@ -286,5 +290,5 @@
 		status=-68; goto on_error;
 	    }
-	    if (addr.sin_family != PJ_AF_INET) {
+	    if (addr.sin_family != pj_AF_INET()) {
 		status=-69; goto on_error;
 	    }
@@ -313,8 +317,14 @@
 
 on_error:
-    if (ssock)
+    if (skey)
+    	pj_ioqueue_unregister(skey);
+    else if (ssock != -1)
 	pj_sock_close(ssock);
-    if (csock)
+    
+    if (ckey)
+    	pj_ioqueue_unregister(ckey);
+    else if (csock != -1)
 	pj_sock_close(csock);
+    
     if (ioque != NULL)
 	pj_ioqueue_destroy(ioque);
@@ -373,5 +383,5 @@
 
     /* Create sender socket */
-    status = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, SPORT, &ssock);
+    status = app_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, SPORT, &ssock);
     if (status != PJ_SUCCESS) {
 	app_perror("Error initializing socket", status);
@@ -380,5 +390,5 @@
 
     /* Create receiver socket. */
-    status = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, RPORT, &rsock);
+    status = app_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, RPORT, &rsock);
     if (status != PJ_SUCCESS) {
 	app_perror("Error initializing socket", status);
@@ -436,5 +446,9 @@
     /* Check if packet is received. */
     timeout.sec = 1; timeout.msec = 0;
+#ifdef PJ_SYMBIAN
+    pj_symbianos_poll(-1, 1000);
+#else
     pj_ioqueue_poll(ioqueue, &timeout);
+#endif
 
     if (packet_cnt != 1) {
@@ -470,6 +484,10 @@
 
     /* Poll ioqueue. */
+#ifdef PJ_SYMBIAN
+    pj_symbianos_poll(-1, 1000);
+#else
     timeout.sec = 1; timeout.msec = 0;
     pj_ioqueue_poll(ioqueue, &timeout);
+#endif
 
     /* Must NOT receive any packets after socket is closed! */
@@ -525,5 +543,5 @@
     for (count=0; count<MAX; ++count) {
 	sock[count] = PJ_INVALID_SOCKET;
-	rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock[count]);
+	rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &sock[count]);
 	if (rc != PJ_SUCCESS || sock[count] == PJ_INVALID_SOCKET) {
 	    PJ_LOG(3,(THIS_FILE, "....unable to create %d-th socket, rc=%d", 
@@ -592,5 +610,5 @@
     char *send_buf, *recv_buf;
     pj_ioqueue_t *ioque = NULL;
-    pj_ioqueue_key_t *skey, *ckey, *key;
+    pj_ioqueue_key_t *skey, *ckey, *keys[SOCK_INACTIVE_MAX+2];
     pj_timestamp t1, t2, t_elapsed;
     int rc=0, i;    /* i must be signed */
@@ -608,7 +626,7 @@
 
     // Allocate sockets for sending and receiving.
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &ssock);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &ssock);
     if (rc == PJ_SUCCESS) {
-        rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &csock);
+        rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &csock);
     } else
         csock = PJ_INVALID_SOCKET;
@@ -620,5 +638,5 @@
     // Bind server socket.
     pj_bzero(&addr, sizeof(addr));
-    addr.sin_family = PJ_AF_INET;
+    addr.sin_family = pj_AF_INET();
     addr.sin_port = pj_htons(PORT);
     if (pj_sock_bind(ssock, &addr, sizeof(addr)))
@@ -641,9 +659,9 @@
                               inactive_sock_count*sizeof(pj_ioqueue_op_key_t));
     pj_bzero(&addr, sizeof(addr));
-    addr.sin_family = PJ_AF_INET;
+    addr.sin_family = pj_AF_INET();
     for (i=0; i<inactive_sock_count; ++i) {
         pj_ssize_t bytes;
 
-	rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &inactive_sock[i]);
+	rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &inactive_sock[i]);
 	if (rc != PJ_SUCCESS || inactive_sock[i] < 0) {
 	    app_perror("...error: pj_sock_socket()", rc);
@@ -657,5 +675,5 @@
 	}
 	rc = pj_ioqueue_register_sock(pool, ioque, inactive_sock[i], 
-			              NULL, &test_cb, &key);
+			              NULL, &test_cb, &keys[i]);
 	if (rc != PJ_SUCCESS) {
 	    pj_sock_close(inactive_sock[i]);
@@ -666,5 +684,5 @@
 	}
         bytes = bufsize;
-	rc = pj_ioqueue_recv(key, &inactive_read_op[i], recv_buf, &bytes, 0);
+	rc = pj_ioqueue_recv(keys[i], &inactive_read_op[i], recv_buf, &bytes, 0);
 	if (rc != PJ_EPENDING) {
 	    pj_sock_close(inactive_sock[i]);
@@ -736,5 +754,9 @@
 	do {
 	    pj_time_val timeout = { 1, 0 };
+#ifdef PJ_SYMBIAN
+	    rc = pj_symbianos_poll(-1, 1000);
+#else
 	    rc = pj_ioqueue_poll(ioque, &timeout);
+#endif
 	    TRACE__((THIS_FILE, "     poll rc=%d", rc));
 	} while (rc >= 0 && callback_read_key != skey);
@@ -761,5 +783,9 @@
 	do {
 	    pj_time_val timeout = { 0, 10 };
+#ifdef PJ_SYMBIAN
+	    rc = pj_symbianos_poll(-1, 100);
+#else	    
 	    rc = pj_ioqueue_poll(ioque, &timeout);
+#endif
 	} while (rc>0);
 
@@ -785,9 +811,9 @@
     // Cleaning up.
     for (i=inactive_sock_count-1; i>=0; --i) {
-	pj_sock_close(inactive_sock[i]);
-    }
-
-    pj_sock_close(ssock);
-    pj_sock_close(csock);
+	pj_ioqueue_unregister(keys[i]);
+    }
+
+    pj_ioqueue_unregister(skey);
+    pj_ioqueue_unregister(ckey);
 
 
Index: pjproject/trunk/pjlib/src/pjlib-test/ioq_unreg.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/ioq_unreg.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/ioq_unreg.c	(revision 1405)
@@ -160,5 +160,5 @@
      */
     if (other_socket) {
-	status = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 56127, &osd.sock);
+	status = app_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, 56127, &osd.sock);
 	if (status != PJ_SUCCESS) {
 	    app_perror("Error creating other socket", status);
@@ -201,5 +201,5 @@
 
     /* Create pair of client/server sockets */
-    status = app_socketpair(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 
+    status = app_socketpair(pj_AF_INET(), pj_SOCK_DGRAM(), 0, 
 			    &sock_data.sock, &sock_data.csock);
     if (status != PJ_SUCCESS) {
Index: pjproject/trunk/pjlib/src/pjlib-test/main.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/main.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/main.c	(revision 1405)
@@ -82,7 +82,7 @@
             
             if (pj_stricmp2(&type, "tcp")==0)
-                param_echo_sock_type = PJ_SOCK_STREAM;
+                param_echo_sock_type = pj_SOCK_STREAM();
             else if (pj_stricmp2(&type, "udp")==0)
-                param_echo_sock_type = PJ_SOCK_DGRAM;
+                param_echo_sock_type = pj_SOCK_DGRAM();
             else {
                 PJ_LOG(3,("", "error: unknown socket type %s", type.ptr));
Index: pjproject/trunk/pjlib/src/pjlib-test/select.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/select.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/select.c	(revision 1405)
@@ -113,10 +113,10 @@
     
     // Create two UDP sockets.
-    rc = pj_sock_socket( PJ_AF_INET, PJ_SOCK_DGRAM, 0, &udp1);
+    rc = pj_sock_socket( pj_AF_INET(), pj_SOCK_DGRAM(), 0, &udp1);
     if (rc != PJ_SUCCESS) {
         app_perror("...error: unable to create socket", rc);
 	status=-10; goto on_return;
     }
-    rc = pj_sock_socket( PJ_AF_INET, PJ_SOCK_DGRAM, 0, &udp2);
+    rc = pj_sock_socket( pj_AF_INET(), pj_SOCK_DGRAM(), 0, &udp2);
     if (udp2 == PJ_INVALID_SOCKET) {
         app_perror("...error: unable to create socket", rc);
@@ -126,5 +126,5 @@
     // Bind one of the UDP socket.
     pj_bzero(&udp_addr, sizeof(udp_addr));
-    udp_addr.sin_family = PJ_AF_INET;
+    udp_addr.sin_family = pj_AF_INET();
     udp_addr.sin_port = UDP_PORT;
     udp_addr.sin_addr = pj_inet_addr(pj_cstr(&s, "127.0.0.1"));
Index: pjproject/trunk/pjlib/src/pjlib-test/sock.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/sock.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/sock.c	(revision 1405)
@@ -78,10 +78,5 @@
     pj_sockaddr_in addr2;
     const pj_str_t *hostname;
-#if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
-    /* Symbian IP address is saved in host order */
-    unsigned char A[] = {1, 0, 0, 127};
-#else
-    unsigned char A[] = {127, 0, 0, 1};
-#endif
+    const unsigned char A[] = {127, 0, 0, 1};
 
     PJ_LOG(3,("test", "...format_test()"));
@@ -137,6 +132,6 @@
     pj_status_t rc = PJ_SUCCESS;
 
-    types[0] = PJ_SOCK_STREAM;
-    types[1] = PJ_SOCK_DGRAM;
+    types[0] = pj_SOCK_STREAM();
+    types[1] = pj_SOCK_DGRAM();
 
     PJ_LOG(3,("test", "...simple_sock_test()"));
@@ -144,7 +139,7 @@
     for (i=0; i<(int)(sizeof(types)/sizeof(types[0])); ++i) {
 	
-	rc = pj_sock_socket(PJ_AF_INET, types[i], 0, &sock);
+	rc = pj_sock_socket(pj_AF_INET(), types[i], 0, &sock);
 	if (rc != PJ_SUCCESS) {
-	    app_perror("...error: unable to create socket type %d", rc);
+	    app_perror("...error: unable to create socket", rc);
 	    break;
 	} else {
@@ -238,5 +233,5 @@
             }
 	    if (received != DATA_LEN-total_received) {
-                if (sock_type != PJ_SOCK_STREAM) {
+                if (sock_type != pj_SOCK_STREAM()) {
 	            PJ_LOG(3,("", "...error: expecting %u bytes, got %u bytes",
                               DATA_LEN-total_received, received));
@@ -296,5 +291,5 @@
         }
 	if (received != BIG_DATA_LEN-total_received) {
-            if (sock_type != PJ_SOCK_STREAM) {
+            if (sock_type != pj_SOCK_STREAM()) {
 	        PJ_LOG(3,("", "...error: expecting %u bytes, got %u bytes",
                           BIG_DATA_LEN-total_received, received));
@@ -326,5 +321,5 @@
     PJ_LOG(3,("test", "...udp_test()"));
 
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &ss);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &ss);
     if (rc != 0) {
 	app_perror("...error: unable to create socket", rc);
@@ -332,5 +327,5 @@
     }
 
-    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &cs);
+    rc = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &cs);
     if (rc != 0)
 	return -110;
@@ -338,5 +333,5 @@
     /* Bind server socket. */
     pj_bzero(&dstaddr, sizeof(dstaddr));
-    dstaddr.sin_family = PJ_AF_INET;
+    dstaddr.sin_family = pj_AF_INET();
     dstaddr.sin_port = pj_htons(UDP_PORT);
     dstaddr.sin_addr = pj_inet_addr(pj_cstr(&s, ADDRESS));
@@ -349,5 +344,5 @@
     /* Bind client socket. */
     pj_bzero(&srcaddr, sizeof(srcaddr));
-    srcaddr.sin_family = PJ_AF_INET;
+    srcaddr.sin_family = pj_AF_INET();
     srcaddr.sin_port = pj_htons(UDP_PORT-1);
     srcaddr.sin_addr = pj_inet_addr(pj_cstr(&s, ADDRESS));
@@ -359,5 +354,5 @@
 	    
     /* Test send/recv, with sendto */
-    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, &dstaddr, NULL, 
+    rc = send_recv_test(pj_SOCK_DGRAM(), ss, cs, &dstaddr, NULL, 
                         sizeof(dstaddr));
     if (rc != 0)
@@ -365,5 +360,5 @@
 
     /* Test send/recv, with sendto and recvfrom */
-    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, &dstaddr, 
+    rc = send_recv_test(pj_SOCK_DGRAM(), ss, cs, &dstaddr, 
                         &srcaddr, sizeof(dstaddr));
     if (rc != 0)
@@ -383,10 +378,10 @@
 
     /* Test send/recv with send() */
-    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, NULL, NULL, 0);
+    rc = send_recv_test(pj_SOCK_DGRAM(), ss, cs, NULL, NULL, 0);
     if (rc != 0)
 	goto on_error;
 
     /* Test send/recv with send() and recvfrom */
-    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, NULL, &srcaddr, 
+    rc = send_recv_test(pj_SOCK_DGRAM(), ss, cs, NULL, &srcaddr, 
                         sizeof(srcaddr));
     if (rc != 0)
@@ -421,5 +416,5 @@
     PJ_LOG(3,("test", "...tcp_test()"));
 
-    rc = app_socketpair(PJ_AF_INET, PJ_SOCK_STREAM, 0, &ss, &cs);
+    rc = app_socketpair(pj_AF_INET(), pj_SOCK_STREAM(), 0, &ss, &cs);
     if (rc != PJ_SUCCESS) {
         app_perror("...error: app_socketpair():", rc);
@@ -428,5 +423,5 @@
 
     /* Test send/recv with send() and recv() */
-    retval = send_recv_test(PJ_SOCK_STREAM, ss, cs, NULL, NULL, 0);
+    retval = send_recv_test(pj_SOCK_STREAM(), ss, cs, NULL, NULL, 0);
 
     rc = pj_sock_close(cs);
Index: pjproject/trunk/pjlib/src/pjlib-test/sock_perf.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/sock_perf.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/sock_perf.c	(revision 1405)
@@ -63,5 +63,5 @@
 
     /* Create producer-consumer pair. */
-    rc = app_socketpair(PJ_AF_INET, sock_type, 0, &consumer, &producer);
+    rc = app_socketpair(pj_AF_INET(), sock_type, 0, &consumer, &producer);
     if (rc != PJ_SUCCESS) {
         app_perror("...error: create socket pair", rc);
@@ -106,5 +106,5 @@
             }
 	    if ((pj_size_t)part_received != buf_size-received) {
-                if (sock_type != PJ_SOCK_STREAM) {
+                if (sock_type != pj_SOCK_STREAM()) {
 	            PJ_LOG(3,("", "...error: expecting %u bytes, got %u bytes",
                               buf_size-received, part_received));
@@ -166,5 +166,5 @@
 #if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0
     /* Benchmarking UDP */
-    rc = sock_producer_consumer(PJ_SOCK_DGRAM, 512, LOOP, &bandwidth);
+    rc = sock_producer_consumer(pj_SOCK_DGRAM(), 512, LOOP, &bandwidth);
     if (rc != 0) return rc;
     PJ_LOG(3,("", "....bandwidth UDP = %d KB/s", bandwidth));
@@ -172,5 +172,5 @@
 
     /* Benchmarking TCP */
-    rc = sock_producer_consumer(PJ_SOCK_STREAM, 512, LOOP, &bandwidth);
+    rc = sock_producer_consumer(pj_SOCK_STREAM(), 512, LOOP, &bandwidth);
     if (rc != 0) return rc;
     PJ_LOG(3,("", "....bandwidth TCP = %d KB/s", bandwidth));
Index: pjproject/trunk/pjlib/src/pjlib-test/test.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/test.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/test.c	(revision 1405)
@@ -65,5 +65,5 @@
     
     //pj_dump_config();
-    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 );
+    pj_caching_pool_init( &caching_pool, NULL, 0 );
 
 #if INCLUDE_ERRNO_TEST
@@ -166,5 +166,5 @@
 #elif INCLUDE_ECHO_CLIENT
     if (param_echo_sock_type == 0)
-        param_echo_sock_type = PJ_SOCK_DGRAM;
+        param_echo_sock_type = pj_SOCK_DGRAM();
 
     echo_client( param_echo_sock_type, 
@@ -192,7 +192,12 @@
 }
 
+#include <pj/sock.h>
+
 int test_main(void)
 {
+    int i;
     PJ_USE_EXCEPTION;
+
+    i = pj_AF_INET();
 
     PJ_TRY {
Index: pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c	(revision 1405)
@@ -177,5 +177,5 @@
     }
 
-    rc = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 
+    rc = app_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, 
                     ECHO_SERVER_START_PORT, &sock);
     if (rc != PJ_SUCCESS) {
Index: pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_sync.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_sync.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_sync.c	(revision 1405)
@@ -78,5 +78,5 @@
     }
 
-    rc = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM,0, ECHO_SERVER_START_PORT, &sock);
+    rc = app_socket(pj_AF_INET(), pj_SOCK_DGRAM(),0, ECHO_SERVER_START_PORT, &sock);
     if (rc != PJ_SUCCESS) {
         app_perror("...socket error", rc);
Index: pjproject/trunk/pjlib/src/pjlib-test/util.c
===================================================================
--- pjproject/trunk/pjlib/src/pjlib-test/util.c	(revision 1404)
+++ pjproject/trunk/pjlib/src/pjlib-test/util.c	(revision 1405)
@@ -54,5 +54,5 @@
     
 #if PJ_HAS_TCP
-    if (type == PJ_SOCK_STREAM) {
+    if (type == pj_SOCK_STREAM()) {
         rc = pj_sock_listen(sock, 5);
         if (rc != PJ_SUCCESS)
@@ -87,5 +87,5 @@
     /* Retry bind */
     pj_bzero(&addr, sizeof(addr));
-    addr.sin_family = PJ_AF_INET;
+    addr.sin_family = pj_AF_INET();
     for (i=0; i<5; ++i) {
         addr.sin_port = pj_htons(port++);
@@ -100,5 +100,5 @@
     /* For TCP, listen the socket. */
 #if PJ_HAS_TCP
-    if (type == PJ_SOCK_STREAM) {
+    if (type == pj_SOCK_STREAM()) {
         rc = pj_sock_listen(sock[SERVER], PJ_SOMAXCONN);
         if (rc != PJ_SUCCESS)
@@ -115,5 +115,5 @@
     /* For TCP, must accept(), and get the new socket. */
 #if PJ_HAS_TCP
-    if (type == PJ_SOCK_STREAM) {
+    if (type == pj_SOCK_STREAM()) {
         pj_sock_t newserver;
 
Index: pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c	(revision 1404)
+++ pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c	(revision 1405)
@@ -163,5 +163,5 @@
 
     /* Create RTP socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &si.rtp_sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &si.rtp_sock);
     if (status != PJ_SUCCESS)
 	goto on_error;
@@ -176,5 +176,5 @@
 
     /* Create RTCP socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &si.rtcp_sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &si.rtcp_sock);
     if (status != PJ_SUCCESS)
 	goto on_error;
Index: pjproject/trunk/pjmedia/src/test/audio_tool.c
===================================================================
--- pjproject/trunk/pjmedia/src/test/audio_tool.c	(revision 1404)
+++ pjproject/trunk/pjmedia/src/test/audio_tool.c	(revision 1405)
@@ -265,5 +265,5 @@
 
     pj_bzero(&skinfo, sizeof(skinfo));
-    skinfo.rtp_sock = skinfo.rtcp_sock = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 0);
+    skinfo.rtp_sock = skinfo.rtcp_sock = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, 0);
     if (skinfo.rtp_sock == PJ_INVALID_SOCKET) {
 	PJ_LOG(1,(THIS_FILE, "Unable to create socket"));
Index: pjproject/trunk/pjnath/src/pjnath/ice_session.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/ice_session.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjnath/ice_session.c	(revision 1405)
@@ -727,5 +727,5 @@
     pj_ansi_strcpy(laddr, pj_inet_ntoa(lcand->addr.ipv4.sin_addr));
 
-    if (lcand->addr.addr.sa_family == PJ_AF_INET) {
+    if (lcand->addr.addr.sa_family == pj_AF_INET()) {
 	len = pj_ansi_snprintf(buffer, bufsize,
 			       "%d: [%d] %s:%d-->%s:%d",
@@ -835,8 +835,8 @@
 	return SOCKADDR_NOT_EQUAL;
 
-    if (a1->addr.sa_family == PJ_AF_INET) {
+    if (a1->addr.sa_family == pj_AF_INET()) {
 	return !(a1->ipv4.sin_addr.s_addr == a2->ipv4.sin_addr.s_addr &&
 		 a1->ipv4.sin_port == a2->ipv4.sin_port);
-    } else if (a1->addr.sa_family == PJ_AF_INET6) {
+    } else if (a1->addr.sa_family == pj_AF_INET6()) {
 	return pj_memcmp(&a1->ipv6, &a2->ipv6, sizeof(a1->ipv6));
     } else {
Index: pjproject/trunk/pjnath/src/pjnath/ice_strans.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/ice_strans.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjnath/ice_strans.c	(revision 1405)
@@ -286,5 +286,5 @@
 
     /* Create socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &comp->sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &comp->sock);
     if (status != PJ_SUCCESS)
 	return status;
Index: pjproject/trunk/pjnath/src/pjnath/stun_msg.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/stun_msg.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjnath/stun_msg.c	(revision 1405)
@@ -770,5 +770,5 @@
 
     /* Family (IPv4 only for now) */
-    PJ_ASSERT_RETURN(ca->sockaddr.addr.sa_family == PJ_AF_INET, PJ_EINVAL);
+    PJ_ASSERT_RETURN(ca->sockaddr.addr.sa_family == pj_AF_INET(), PJ_EINVAL);
     *buf++ = 1;
 
Index: pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjnath/stun_msg_dump.c	(revision 1405)
@@ -84,5 +84,5 @@
 	    attr = (const pj_stun_sockaddr_attr*)ahdr;
 
-	    if (attr->sockaddr.addr.sa_family == PJ_AF_INET) {
+	    if (attr->sockaddr.addr.sa_family == pj_AF_INET()) {
 		len = pj_ansi_snprintf(p, end-p,
 				       ", IPv4 addr=%s:%d\n",
@@ -90,5 +90,5 @@
 				       pj_ntohs(attr->sockaddr.ipv4.sin_port));
 
-	    } else if (attr->sockaddr.addr.sa_family == PJ_AF_INET6) {
+	    } else if (attr->sockaddr.addr.sa_family == pj_AF_INET6()) {
 		len = pj_ansi_snprintf(p, end-p,
 				       ", IPv6 addr present\n");
Index: pjproject/trunk/pjnath/src/pjnath/stun_session.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/stun_session.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjnath/stun_session.c	(revision 1405)
@@ -563,8 +563,8 @@
     char buf[512];
     
-    if (dst->addr.sa_family == PJ_AF_INET) {
+    if (dst->addr.sa_family == pj_AF_INET()) {
 	dst_name = pj_inet_ntoa(dst->ipv4.sin_addr);
 	dst_port = pj_ntohs(dst->ipv4.sin_port);
-    } else if (dst->addr.sa_family == PJ_AF_INET6) {
+    } else if (dst->addr.sa_family == pj_AF_INET6()) {
 	dst_name = "IPv6";
 	dst_port = pj_ntohs(dst->ipv6.sin6_port);
Index: pjproject/trunk/pjnath/src/pjstun-client/client_main.c
===================================================================
--- pjproject/trunk/pjnath/src/pjstun-client/client_main.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjstun-client/client_main.c	(revision 1405)
@@ -271,5 +271,5 @@
     pj_assert(status == PJ_SUCCESS);
 
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &g.peer_sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &g.peer_sock);
     pj_assert(status == PJ_SUCCESS);
 
@@ -277,5 +277,5 @@
     pj_assert(status == PJ_SUCCESS);
 
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &g.sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &g.sock);
     pj_assert(status == PJ_SUCCESS);
 
Index: pjproject/trunk/pjnath/src/pjstun-srv-test/bind_usage.c
===================================================================
--- pjproject/trunk/pjnath/src/pjstun-srv-test/bind_usage.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjstun-srv-test/bind_usage.c	(revision 1405)
@@ -75,5 +75,5 @@
 
     status = pj_stun_usage_create(srv, "bind%p", &usage_cb,
-				  PJ_AF_INET, PJ_SOCK_DGRAM, 0,
+				  pj_AF_INET(), pj_SOCK_DGRAM(), 0,
 				  &local_addr, sizeof(local_addr),
 				  &bu->usage);
Index: pjproject/trunk/pjnath/src/pjstun-srv-test/main.c
===================================================================
--- pjproject/trunk/pjnath/src/pjstun-srv-test/main.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjstun-srv-test/main.c	(revision 1405)
@@ -132,5 +132,5 @@
     */
 
-    status = pj_stun_turn_usage_create(srv, PJ_SOCK_DGRAM, NULL,
+    status = pj_stun_turn_usage_create(srv, pj_SOCK_DGRAM(), NULL,
 				       3478, o.use_fingerprint, &turn);
     if (status != PJ_SUCCESS) {
Index: pjproject/trunk/pjnath/src/pjstun-srv-test/turn_usage.c
===================================================================
--- pjproject/trunk/pjnath/src/pjstun-srv-test/turn_usage.c	(revision 1404)
+++ pjproject/trunk/pjnath/src/pjstun-srv-test/turn_usage.c	(revision 1405)
@@ -160,5 +160,5 @@
     pj_status_t status;
 
-    PJ_ASSERT_RETURN(srv && (type==PJ_SOCK_DGRAM||type==PJ_SOCK_STREAM),
+    PJ_ASSERT_RETURN(srv && (type==pj_SOCK_DGRAM()||type==pj_SOCK_STREAM()),
 		     PJ_EINVAL);
     si = pj_stun_server_get_info(srv);
@@ -186,5 +186,5 @@
     usage_cb.on_destroy = &tu_on_destroy;
     status = pj_stun_usage_create(srv, "turn%p", &usage_cb,
-				  PJ_AF_INET, tu->type, 0,
+				  pj_AF_INET(), tu->type, 0,
 				  &local_addr, sizeof(local_addr),
 				  &tu->usage);
@@ -298,5 +298,5 @@
     /* STUN message decoding flag */
     flags = 0;
-    if (tu->type == PJ_SOCK_DGRAM)
+    if (tu->type == pj_SOCK_DGRAM())
 	flags |= PJ_STUN_IS_DATAGRAM;
     
@@ -362,5 +362,5 @@
 
 	/* Allocate specific port */
-	status = pj_sock_socket(PJ_AF_INET, type, 0, &sock);
+	status = pj_sock_socket(pj_AF_INET(), type, 0, &sock);
 	if (status != PJ_SUCCESS)
 	    return status;
@@ -401,5 +401,5 @@
 	    }
 
-	    status = pj_sock_socket(PJ_AF_INET, type, 0, &sock);
+	    status = pj_sock_socket(pj_AF_INET(), type, 0, &sock);
 	    if (status != PJ_SUCCESS)
 		return status;
@@ -511,5 +511,5 @@
     sd = (struct session_data*) pj_stun_session_get_user_data(sess);
 
-    if (sd->tu->type == PJ_SOCK_DGRAM) {
+    if (sd->tu->type == pj_SOCK_DGRAM()) {
 	return pj_stun_usage_sendto(sd->tu->usage, pkt, pkt_size, 0,
 				    dst_addr, addr_len);
@@ -547,7 +547,7 @@
 static const char *get_tp_type(int type)
 {
-    if (type==PJ_SOCK_DGRAM)
+    if (type==pj_SOCK_DGRAM())
 	return "udp";
-    else if (type==PJ_SOCK_STREAM)
+    else if (type==pj_SOCK_STREAM())
 	return "tcp";
     else
@@ -595,5 +595,5 @@
     sd = (struct session_data*) pj_stun_session_get_user_data(sess);
 
-    if (sd->tu->type == PJ_SOCK_DGRAM) {
+    if (sd->tu->type == pj_SOCK_DGRAM()) {
 	return pj_stun_usage_sendto(sd->tu->usage, pkt, pkt_size, 0,
 				    dst_addr, addr_len);
@@ -952,5 +952,5 @@
 	return PJ_SUCCESS;
     } else if (a_rt) {
-	client->sock_type = a_rt->value ? PJ_SOCK_STREAM : PJ_SOCK_DGRAM;
+	client->sock_type = a_rt->value ? pj_SOCK_STREAM() : pj_SOCK_DGRAM();
     } else {
 	client->sock_type = client->tu->type;;
@@ -958,5 +958,5 @@
 
     /* Process REQUESTED-IP attribute */
-    if (a_rip && a_rip->sockaddr.addr.sa_family != PJ_AF_INET) {
+    if (a_rip && a_rip->sockaddr.addr.sa_family != pj_AF_INET()) {
 	client_respond(client, msg, PJ_STUN_SC_INVALID_IP_ADDR, NULL,
 		       src_addr, src_addr_len);
@@ -1131,5 +1131,5 @@
 	client->active_peer = NULL;
 
-    } else if (a_raddr->sockaddr.addr.sa_family != PJ_AF_INET) {
+    } else if (a_raddr->sockaddr.addr.sa_family != pj_AF_INET()) {
 	/* Bad request (not IPv4) */
 	client_respond(client, msg, PJ_STUN_SC_BAD_REQUEST, NULL,
@@ -1197,5 +1197,5 @@
 	return PJ_SUCCESS;
 
-    } else if (a_raddr->sockaddr.addr.sa_family != PJ_AF_INET) {
+    } else if (a_raddr->sockaddr.addr.sa_family != pj_AF_INET()) {
 	/* REMOTE-ADDRESS present but not IPv4, discard packet */
 	return PJ_SUCCESS;
@@ -1210,5 +1210,5 @@
 	datalen = a_data->length;
 
-    } else if (client->sock_type == PJ_SOCK_STREAM) {
+    } else if (client->sock_type == pj_SOCK_STREAM()) {
 	/* Discard if no Data and Allocation type is TCP */
 	return PJ_SUCCESS;
Index: pjproject/trunk/pjsip-apps/src/samples/invtester.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/invtester.c	(revision 1404)
+++ pjproject/trunk/pjsip-apps/src/samples/invtester.c	(revision 1405)
@@ -226,5 +226,5 @@
 	pj_sockaddr_in addr;
 
-	addr.sin_family = PJ_AF_INET;
+	addr.sin_family = pj_AF_INET();
 	addr.sin_addr.s_addr = 0;
 	addr.sin_port = pj_htons(PORT);
Index: pjproject/trunk/pjsip-apps/src/samples/pjsip-perf.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/pjsip-perf.c	(revision 1404)
+++ pjproject/trunk/pjsip-apps/src/samples/pjsip-perf.c	(revision 1405)
@@ -761,5 +761,5 @@
 
 	pj_bzero(&addr, sizeof(addr));
-	addr.sin_family = PJ_AF_INET;
+	addr.sin_family = pj_AF_INET();
 	addr.sin_addr.s_addr = 0;
 	addr.sin_port = pj_htons((pj_uint16_t)app.local_port);
Index: pjproject/trunk/pjsip-apps/src/samples/proxy.h
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/proxy.h	(revision 1404)
+++ pjproject/trunk/pjsip-apps/src/samples/proxy.h	(revision 1405)
@@ -213,5 +213,5 @@
 	pj_sockaddr_in addr;
 
-	addr.sin_family = PJ_AF_INET;
+	addr.sin_family = pj_AF_INET();
 	addr.sin_addr.s_addr = 0;
 	addr.sin_port = pj_htons((pj_uint16_t)global.port);
Index: pjproject/trunk/pjsip-apps/src/samples/simpleua.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/simpleua.c	(revision 1404)
+++ pjproject/trunk/pjsip-apps/src/samples/simpleua.c	(revision 1405)
@@ -182,5 +182,5 @@
 	pj_sockaddr_in addr;
 
-	addr.sin_family = PJ_AF_INET;
+	addr.sin_family = pj_AF_INET();
 	addr.sin_addr.s_addr = 0;
 	addr.sin_port = pj_htons(5060);
Index: pjproject/trunk/pjsip-apps/src/samples/siprtp.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 1404)
+++ pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 1405)
@@ -306,5 +306,5 @@
 
 	pj_bzero(&addr, sizeof(addr));
-	addr.sin_family = PJ_AF_INET;
+	addr.sin_family = pj_AF_INET();
 	addr.sin_addr.s_addr = 0;
 	addr.sin_port = pj_htons((pj_uint16_t)app.sip_port);
Index: pjproject/trunk/pjsip-apps/src/samples/sipstateless.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/sipstateless.c	(revision 1404)
+++ pjproject/trunk/pjsip-apps/src/samples/sipstateless.c	(revision 1405)
@@ -129,5 +129,5 @@
 	pj_sockaddr_in addr;
 
-	addr.sin_family = PJ_AF_INET;
+	addr.sin_family = pj_AF_INET();
 	addr.sin_addr.s_addr = 0;
 	addr.sin_port = pj_htons(5060);
@@ -149,5 +149,5 @@
 	pj_sockaddr_in addr;
 
-	addr.sin_family = PJ_AF_INET;
+	addr.sin_family = pj_AF_INET();
 	addr.sin_addr.s_addr = 0;
 	addr.sin_port = pj_htons(5060);
Index: pjproject/trunk/pjsip/src/pjsip/sip_transport.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_transport.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/pjsip/sip_transport.c	(revision 1405)
@@ -561,5 +561,5 @@
     pj_memcpy(&tdata->tp_info.dst_addr, addr, addr_len);
     tdata->tp_info.dst_addr_len = addr_len;
-    if (((pj_sockaddr*)addr)->addr.sa_family == PJ_AF_INET) {
+    if (((pj_sockaddr*)addr)->addr.sa_family == pj_AF_INET()) {
 	const char *str_addr;
 	str_addr = pj_inet_ntoa(((pj_sockaddr_in*)addr)->sin_addr);
@@ -1472,10 +1472,10 @@
 	     */
 	    else if ((flag & PJSIP_TRANSPORT_DATAGRAM) && 
-		     (remote_addr->addr.sa_family == PJ_AF_INET)) 
+		     (remote_addr->addr.sa_family == pj_AF_INET())) 
 	    {
 		pj_sockaddr_in *addr = (pj_sockaddr_in*)&key.rem_addr;
 
 		pj_bzero(addr, sizeof(pj_sockaddr_in));
-		addr->sin_family = PJ_AF_INET;
+		addr->sin_family = pj_AF_INET();
 
 		key_len = sizeof(key.type) + sizeof(pj_sockaddr_in);
Index: pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c	(revision 1405)
@@ -368,5 +368,5 @@
 	goto on_error;
     loop->base.key.type = PJSIP_TRANSPORT_LOOP_DGRAM;
-    //loop->base.key.rem_addr.sa_family = PJ_AF_INET;
+    //loop->base.key.rem_addr.sa_family = pj_AF_INET();
     loop->base.type_name = "LOOP-DGRAM";
     loop->base.info = "LOOP-DGRAM";
Index: pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c	(revision 1405)
@@ -240,5 +240,6 @@
 
     /* Create and bind socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &listener->sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, 
+			    &listener->sock);
     if (status != PJ_SUCCESS)
 	goto on_error;
@@ -788,5 +789,5 @@
 
     /* Check that address is a sockaddr_in */
-    PJ_ASSERT_RETURN(rem_addr->addr.sa_family == PJ_AF_INET &&
+    PJ_ASSERT_RETURN(rem_addr->addr.sa_family == pj_AF_INET() &&
 		     addr_len == sizeof(pj_sockaddr_in), PJ_EINVAL);
 
@@ -796,5 +797,5 @@
     
     /* Create socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &sock);
     if (status != PJ_SUCCESS)
 	return status;
Index: pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c	(revision 1405)
@@ -938,5 +938,5 @@
 
     /* Create and bind socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &listener->sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &listener->sock);
     if (status != PJ_SUCCESS)
 	goto on_error;
@@ -1527,5 +1527,5 @@
 
     /* Check that address is a sockaddr_in */
-    PJ_ASSERT_RETURN(rem_addr->addr.sa_family == PJ_AF_INET &&
+    PJ_ASSERT_RETURN(rem_addr->addr.sa_family == pj_AF_INET() &&
 		     addr_len == sizeof(pj_sockaddr_in), PJ_EINVAL);
 
@@ -1535,5 +1535,5 @@
     
     /* Create socket */
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_STREAM(), 0, &sock);
     if (status != PJ_SUCCESS)
 	return status;
Index: pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c	(revision 1405)
@@ -420,5 +420,5 @@
     pj_status_t status;
 
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &sock);
     if (status != PJ_SUCCESS)
 	return status;
@@ -509,5 +509,5 @@
     /* Adjust socket rcvbuf size */
     sobuf_size = PJSIP_UDP_SO_RCVBUF_SIZE;
-    status = pj_sock_setsockopt(sock, PJ_SOL_SOCKET, PJ_SO_RCVBUF,
+    status = pj_sock_setsockopt(sock, pj_SOL_SOCKET(), pj_SO_RCVBUF(),
 				&sobuf_size, sizeof(sobuf_size));
     if (status != PJ_SUCCESS) {
@@ -520,5 +520,5 @@
     /* Adjust socket sndbuf size */
     sobuf_size = PJSIP_UDP_SO_SNDBUF_SIZE;
-    status = pj_sock_setsockopt(sock, PJ_SOL_SOCKET, PJ_SO_SNDBUF,
+    status = pj_sock_setsockopt(sock, pj_SOL_SOCKET(), pj_SO_SNDBUF(),
 				&sobuf_size, sizeof(sobuf_size));
     if (status != PJ_SUCCESS) {
@@ -640,5 +640,5 @@
 
     /* Remote address is left zero (except the family) */
-    tp->base.key.rem_addr.addr.sa_family = PJ_AF_INET;
+    tp->base.key.rem_addr.addr.sa_family = pj_AF_INET();
 
     /* Type name. */
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 1405)
@@ -1081,5 +1081,5 @@
     }
 
-    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock);
+    status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &sock);
     if (status != PJ_SUCCESS) {
 	pjsua_perror(THIS_FILE, "socket() error", status);
@@ -1152,5 +1152,5 @@
 	}
 
-	p_pub_addr->sin_family = PJ_AF_INET;
+	p_pub_addr->sin_family = pj_AF_INET();
 	p_pub_addr->sin_port = pj_htons((pj_uint16_t)port);
     }
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1405)
@@ -244,5 +244,5 @@
 
 	/* Create and bind RTP socket. */
-	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock[0]);
+	status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &sock[0]);
 	if (status != PJ_SUCCESS) {
 	    pjsua_perror(THIS_FILE, "socket() error", status);
@@ -259,5 +259,5 @@
 
 	/* Create and bind RTCP socket. */
-	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock[1]);
+	status = pj_sock_socket(pj_AF_INET(), pj_SOCK_DGRAM(), 0, &sock[1]);
 	if (status != PJ_SUCCESS) {
 	    pjsua_perror(THIS_FILE, "socket() error", status);
Index: pjproject/trunk/pjsip/src/test-pjsip/dns_test.c
===================================================================
--- pjproject/trunk/pjsip/src/test-pjsip/dns_test.c	(revision 1404)
+++ pjproject/trunk/pjsip/src/test-pjsip/dns_test.c	(revision 1405)
@@ -484,5 +484,5 @@
 
     a = (pj_sockaddr_in *)&r->entry[r->count].addr;
-    a->sin_family = PJ_AF_INET;
+    a->sin_family = pj_AF_INET();
     tmp = pj_str(addr);
     a->sin_addr = pj_inet_addr(&tmp);
