Changeset 1235


Ignore:
Timestamp:
Apr 30, 2007 9:03:32 PM (17 years ago)
Author:
bennylp
Message:

Initial Symbian integration to trunk for pjlib

Location:
pjproject/trunk
Files:
22 added
26 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/compat/setjmp.h

    r974 r1235  
    8383# endif   /* _ASM */ 
    8484 
     85#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 
     86    /* Symbian framework don't use setjmp/longjmp */ 
     87     
    8588#else 
    8689#  warning "setjmp()/longjmp() is not implemented" 
  • pjproject/trunk/pjlib/include/pj/compat/socket.h

    r974 r1235  
    8888#  define OSERR_ECONNRESET     WSAECONNRESET 
    8989#  define OSERR_ENOTCONN       WSAENOTCONN 
     90#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 
     91#  define OSERR_EWOULDBLOCK    -1 
     92#  define OSERR_EINPROGRESS    -1 
     93#  define OSERR_ECONNRESET     -1 
     94#  define OSERR_ENOTCONN       -1 
    9095#else 
    9196#  define OSERR_EWOULDBLOCK    EWOULDBLOCK 
  • pjproject/trunk/pjlib/include/pj/compat/string.h

    r974 r1235  
    7373#define pj_ansi_strnicmp        strncasecmp 
    7474#define pj_ansi_sprintf         sprintf 
     75 
     76#if defined(PJ_HAS_NO_SNPRINTF) && PJ_HAS_NO_SNPRINTF != 0 
     77#   include <pj/types.h> 
     78#   include <pj/compat/stdarg.h> 
     79    PJ_BEGIN_DECL 
     80    PJ_DECL(int) snprintf(char*s1, pj_size_t len, const char*s2, ...); 
     81    PJ_DECL(int) vsnprintf(char*s1, pj_size_t len, const char*s2, va_list arg); 
     82    PJ_END_DECL 
     83#endif 
     84     
    7585#define pj_ansi_snprintf        snprintf 
    7686#define pj_ansi_vsprintf        vsprintf 
  • pjproject/trunk/pjlib/include/pj/config.h

    r974 r1235  
    3232#elif defined(__GNUC__) 
    3333#  include <pj/compat/cc_gcc.h> 
     34#elif defined(__CW32__) 
     35#  include <pj/compat/cc_mwcc.h> 
     36#elif defined(__MWERKS__) 
     37#  include <pj/compat/cc_codew.h> 
    3438#else 
    3539#  error "Unknown compiler." 
     
    4549     */ 
    4650#   include <pj/compat/os_auto.h> 
     51 
     52#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 
     53    /* 
     54     * SymbianOS 
     55     */ 
     56#  include <pj/compat/os_symbian.h> 
    4757 
    4858#elif defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE) 
  • pjproject/trunk/pjlib/include/pj/config_site_sample.h

    r826 r1235  
    6666#   define PJ_DEBUG                     0 
    6767#   define PJSIP_SAFE_MODULE            0 
    68 #   define PJ_HAS_STRICMP_ALNUM         1 
     68#   define PJ_HAS_STRICMP_ALNUM         0 
    6969#   define PJ_HASH_USE_OWN_TOLOWER      1 
    7070#   define PJSIP_UNESCAPE_IN_PLACE      1 
  • pjproject/trunk/pjlib/include/pj/except.h

    r974 r1235  
    238238#define PJ_GET_EXCEPTION()  GetExceptionCode() 
    239239 
     240 
     241#elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 
     242/***************************************************************************** 
     243 ** 
     244 ** IMPLEMENTATION OF EXCEPTION USING SYMBIAN LEAVE/TRAP FRAMEWORK 
     245 ** 
     246 ****************************************************************************/ 
     247 
     248class TPjException 
     249{ 
     250public: 
     251    int code_; 
     252}; 
     253 
     254#define PJ_USE_EXCEPTION 
     255#define PJ_TRY                  try 
     256//#define PJ_CATCH(id)           
     257#define PJ_CATCH_ANY            catch (const TPjException & pj_excp_) 
     258#define PJ_END 
     259#define PJ_THROW(x_id)          do { TPjException e; e.code_=x_id; throw e;} \ 
     260                                while (0) 
     261#define PJ_GET_EXCEPTION()      pj_excp_.code_ 
     262 
    240263#else 
    241264/***************************************************************************** 
  • pjproject/trunk/pjlib/include/pj/list_i.h

    r974 r1235  
    129129    while (node != list) { 
    130130        ++count; 
    131         node = node->next; 
     131        node = (pj_list*)node->next; 
    132132    } 
    133133 
  • pjproject/trunk/pjlib/src/pj/array.c

    r986 r1235  
    5656{ 
    5757    unsigned i; 
    58     const char *char_array = array; 
     58    const char *char_array = (const char*)array; 
    5959    for (i=0; i<count; ++i) { 
    6060        if ( (*matching)(char_array) == PJ_SUCCESS) { 
  • pjproject/trunk/pjlib/src/pj/errno.c

    r996 r1235  
    1919#include <pj/errno.h> 
    2020#include <pj/string.h> 
     21#include <pj/compat/string.h> 
    2122#include <pj/assert.h> 
    2223 
     
    2425 * in separate file. 
    2526 */ 
    26 extern int platform_strerror( pj_os_err_type code,  
    27                               char *buf, pj_size_t bufsize ); 
     27PJ_BEGIN_DECL 
     28 
     29    PJ_DECL(int) platform_strerror(pj_os_err_type code,  
     30                                   char *buf, pj_size_t bufsize ); 
     31PJ_END_DECL 
    2832 
    2933#define PJLIB_MAX_ERR_MSG_HANDLER   8 
  • pjproject/trunk/pjlib/src/pj/fifobuf.c

    r974 r1235  
    3535               fifobuf, buffer, size)); 
    3636 
    37     fifobuf->first = buffer; 
     37    fifobuf->first = (char*)buffer; 
    3838    fifobuf->last = fifobuf->first + size; 
    3939    fifobuf->ubegin = fifobuf->uend = fifobuf->first; 
     
    119119pj_fifobuf_unalloc (pj_fifobuf_t *fifobuf, void *buf) 
    120120{ 
    121     char *ptr = buf; 
     121    char *ptr = (char*)buf; 
    122122    char *endptr; 
    123123    unsigned sz; 
     
    150150pj_fifobuf_free (pj_fifobuf_t *fifobuf, void *buf) 
    151151{ 
    152     char *ptr = buf; 
     152    char *ptr = (char*)buf; 
    153153    char *end; 
    154154    unsigned sz; 
  • pjproject/trunk/pjlib/src/pj/guid.c

    r974 r1235  
    2222PJ_DEF(void) pj_create_unique_string(pj_pool_t *pool, pj_str_t *str) 
    2323{ 
    24     str->ptr = pj_pool_alloc(pool, PJ_GUID_STRING_LENGTH); 
     24    str->ptr = (char*)pj_pool_alloc(pool, PJ_GUID_STRING_LENGTH); 
    2525    pj_generate_unique_string(str); 
    2626} 
  • pjproject/trunk/pjlib/src/pj/hash.c

    r1210 r1235  
    5656 
    5757    if (keylen==PJ_HASH_KEY_STRING) { 
    58         const unsigned char *p = key; 
     58        const pj_uint8_t *p = (const pj_uint8_t*)key; 
    5959        for ( ; *p; ++p ) { 
    6060            hash = (hash * PJ_HASH_MULTIPLIER) + *p; 
    6161        } 
    6262    } else { 
    63         const unsigned char *p = key, 
    64                             *end = p + keylen; 
     63        const pj_uint8_t *p = (const pj_uint8_t*)key, 
     64                              *end = p + keylen; 
    6565        for ( ; p!=end; ++p) { 
    6666            hash = (hash * PJ_HASH_MULTIPLIER) + *p; 
     
    104104    PJ_ASSERT_RETURN(sizeof(pj_hash_entry)==PJ_HASH_ENTRY_SIZE, NULL); 
    105105 
    106     h = pj_pool_alloc(pool, sizeof(pj_hash_table_t)); 
     106    h = PJ_POOL_ALLOC_T(pool, pj_hash_table_t); 
    107107    h->count = 0; 
    108108 
     
    120120     
    121121    h->rows = table_size; 
    122     h->table = pj_pool_calloc(pool, table_size+1, sizeof(pj_hash_entry*)); 
     122    h->table = (pj_hash_entry**) 
     123               pj_pool_calloc(pool, table_size+1, sizeof(pj_hash_entry*)); 
    123124    return h; 
    124125} 
     
    143144        hash=0; 
    144145        if (keylen==PJ_HASH_KEY_STRING) { 
    145             const unsigned char *p = key; 
     146            const pj_uint8_t *p = (const pj_uint8_t*)key; 
    146147            for ( ; *p; ++p ) { 
    147148                hash = hash * PJ_HASH_MULTIPLIER + *p; 
     
    149150            keylen = p - (const unsigned char*)key; 
    150151        } else { 
    151             const unsigned char *p = key, 
    152                                 *end = p + keylen; 
     152            const pj_uint8_t *p = (const pj_uint8_t*)key, 
     153                                  *end = p + keylen; 
    153154            for ( ; p!=end; ++p) { 
    154155                hash = hash * PJ_HASH_MULTIPLIER + *p; 
     
    180181     */ 
    181182    if (entry_buf) { 
    182         entry = entry_buf; 
     183        entry = (pj_hash_entry*)entry_buf; 
    183184    } else { 
    184185        /* Pool must be specified! */ 
    185186        PJ_ASSERT_RETURN(pool != NULL, NULL); 
    186187 
    187         entry = pj_pool_alloc(pool, sizeof(pj_hash_entry)); 
     188        entry = PJ_POOL_ALLOC_T(pool, pj_hash_entry); 
    188189        PJ_LOG(6, ("hashtbl",  
    189190                   "%p: New p_entry %p created, pool used=%u, cap=%u",  
  • pjproject/trunk/pjlib/src/pj/lock.c

    r974 r1235  
    6565    PJ_ASSERT_RETURN(pool && lock, PJ_EINVAL); 
    6666 
    67     p_lock = pj_pool_alloc(pool, sizeof(pj_lock_t)); 
     67    p_lock = PJ_POOL_ALLOC_T(pool, pj_lock_t); 
    6868    if (!p_lock) 
    6969        return PJ_ENOMEM; 
     
    153153    PJ_ASSERT_RETURN(pool && lock, PJ_EINVAL); 
    154154 
    155     p_lock = pj_pool_alloc(pool, sizeof(pj_lock_t)); 
     155    p_lock = PJ_POOL_ALLOC_T(pool, pj_lock_t); 
    156156    if (!p_lock) 
    157157        return PJ_ENOMEM; 
  • pjproject/trunk/pjlib/src/pj/os_rwmutex.c

    r974 r1235  
    5757 
    5858    *p_mutex = NULL; 
    59     rwmutex = pj_pool_alloc(pool, sizeof(struct pj_rwmutex_t)); 
     59    rwmutex = PJ_POOL_ALLOC_T(pool, pj_rwmutex_t); 
    6060 
    6161    status = pj_mutex_create_simple(pool, name, &rwmutex ->read_lock); 
  • pjproject/trunk/pjlib/src/pj/pool.c

    r974 r1235  
    171171    pj_pool_t *pool; 
    172172    pj_pool_block *block; 
    173     unsigned char *buffer; 
     173    pj_uint8_t *buffer; 
    174174 
    175175    PJ_CHECK_STACK(); 
     
    184184 
    185185    /* Allocate initial block */ 
    186     buffer = (*f->policy.block_alloc)(f, initial_size); 
     186    buffer = (pj_uint8_t*) (*f->policy.block_alloc)(f, initial_size); 
    187187    if (!buffer) 
    188188        return NULL; 
  • pjproject/trunk/pjlib/src/pj/pool_buf.c

    r974 r1235  
    5858    PJ_UNUSED_ARG(factory); 
    5959 
    60     param = pj_thread_local_get(tls); 
     60    param = (struct creation_param*) pj_thread_local_get(tls); 
    6161    if (param == NULL) { 
    6262        /* Don't assert(), this is normal no-memory situation */ 
  • pjproject/trunk/pjlib/src/pj/pool_caching.c

    r1019 r1235  
    8686    /* Delete all pool in free list */ 
    8787    for (i=0; i < PJ_CACHING_POOL_ARRAY_SIZE; ++i) { 
    88         pj_pool_t *pool = cp->free_list[i].next; 
     88        pj_pool_t *pool = (pj_pool_t*) cp->free_list[i].next; 
    8989        pj_pool_t *next; 
    9090        for (; pool != (void*)&cp->free_list[i]; pool = next) { 
     
    9696 
    9797    /* Delete all pools in used list */ 
    98     pool = cp->used_list.next; 
     98    pool = (pj_pool_t*) cp->used_list.next; 
    9999    while (pool != (pj_pool_t*) &cp->used_list) { 
    100100        pj_pool_t *next = pool->next; 
     
    165165    } else { 
    166166        /* Get one pool from the list. */ 
    167         pool = cp->free_list[idx].next; 
     167        pool = (pj_pool_t*) cp->free_list[idx].next; 
    168168        pj_list_erase(pool); 
    169169 
     
    258258                             cp->capacity, cp->max_capacity, cp->used_count)); 
    259259    if (detail) { 
    260         pj_pool_t *pool = cp->used_list.next; 
     260        pj_pool_t *pool = (pj_pool_t*) cp->used_list.next; 
    261261        pj_uint32_t total_used = 0, total_capacity = 0; 
    262262        PJ_LOG(3,("cachpool", "  Dumping all active pools:")); 
  • pjproject/trunk/pjlib/src/pj/timer.c

    r669 r1235  
    256256    pj_timer_entry **new_heap = 0; 
    257257     
    258     new_heap = pj_pool_alloc(ht->pool, sizeof(pj_timer_entry*) * new_size); 
     258    new_heap = (pj_timer_entry**)  
     259               pj_pool_alloc(ht->pool, sizeof(pj_timer_entry*) * new_size); 
    259260    memcpy(new_heap, ht->heap, ht->max_size * sizeof(pj_timer_entry*)); 
    260261    //delete [] this->heap_; 
     
    264265     
    265266    new_timer_ids = 0; 
    266     new_timer_ids = pj_pool_alloc(ht->pool, new_size * sizeof(pj_timer_id_t)); 
     267    new_timer_ids = (pj_timer_id_t*) 
     268                    pj_pool_alloc(ht->pool, new_size * sizeof(pj_timer_id_t)); 
    267269     
    268270    memcpy( new_timer_ids, ht->timer_ids, ht->max_size * sizeof(pj_timer_id_t)); 
     
    371373 
    372374    /* Allocate timer heap data structure from the pool */ 
    373     ht = pj_pool_alloc(pool, sizeof(pj_timer_heap_t)); 
     375    ht = PJ_POOL_ALLOC_T(pool, pj_timer_heap_t); 
    374376    if (!ht) 
    375377        return PJ_ENOMEM; 
     
    387389 
    388390    // Create the heap array. 
    389     ht->heap = pj_pool_alloc(pool, sizeof(pj_timer_entry*) * size); 
     391    ht->heap = (pj_timer_entry**) 
     392               pj_pool_alloc(pool, sizeof(pj_timer_entry*) * size); 
    390393    if (!ht->heap) 
    391394        return PJ_ENOMEM; 
    392395 
    393396    // Create the parallel 
    394     ht->timer_ids = pj_pool_alloc( pool, sizeof(pj_timer_id_t) * size); 
     397    ht->timer_ids = (pj_timer_id_t *) 
     398                    pj_pool_alloc( pool, sizeof(pj_timer_id_t) * size); 
    395399    if (!ht->timer_ids) 
    396400        return PJ_ENOMEM; 
  • pjproject/trunk/pjlib/src/pjlib-test/ioq_perf.c

    r974 r1235  
    7373                             pj_ssize_t bytes_read) 
    7474{ 
    75     test_item *item = pj_ioqueue_get_user_data(key); 
     75    test_item *item = (test_item*)pj_ioqueue_get_user_data(key); 
    7676    pj_status_t rc; 
    7777    int data_is_available = 1; 
     
    151151                              pj_ssize_t bytes_sent) 
    152152{ 
    153     test_item *item = pj_ioqueue_get_user_data(key); 
     153    test_item *item = (test_item*) pj_ioqueue_get_user_data(key); 
    154154     
    155155    //TRACE_((THIS_FILE, "     write complete: sent = %d", bytes_sent)); 
     
    189189static int worker_thread(void *p) 
    190190{ 
    191     struct thread_arg *arg = p; 
     191    struct thread_arg *arg = (struct thread_arg*) p; 
    192192    const pj_time_val timeout = {0, 100}; 
    193193    int rc; 
     
    250250        return -10; 
    251251 
    252     items = pj_pool_alloc(pool, sockpair_cnt*sizeof(test_item)); 
    253     thread = pj_pool_alloc(pool, thread_cnt*sizeof(pj_thread_t*)); 
     252    items = (test_item*) pj_pool_alloc(pool, sockpair_cnt*sizeof(test_item)); 
     253    thread = (pj_thread_t**) 
     254             pj_pool_alloc(pool, thread_cnt*sizeof(pj_thread_t*)); 
    254255 
    255256    TRACE_((THIS_FILE, "     creating ioqueue..")); 
     
    266267        items[i].ioqueue = ioqueue; 
    267268        items[i].buffer_size = buffer_size; 
    268         items[i].outgoing_buffer = pj_pool_alloc(pool, buffer_size); 
    269         items[i].incoming_buffer = pj_pool_alloc(pool, buffer_size); 
     269        items[i].outgoing_buffer = (char*) pj_pool_alloc(pool, buffer_size); 
     270        items[i].incoming_buffer = (char*) pj_pool_alloc(pool, buffer_size); 
    270271        items[i].bytes_recv = items[i].bytes_sent = 0; 
    271272 
     
    332333        struct thread_arg *arg; 
    333334 
    334         arg = pj_pool_zalloc(pool, sizeof(*arg)); 
     335        arg = (thread_arg*) pj_pool_zalloc(pool, sizeof(*arg)); 
    335336        arg->id = i; 
    336337        arg->ioqueue = ioqueue; 
  • pjproject/trunk/pjlib/src/pjlib-test/ioq_udp.c

    r974 r1235  
    329329                             pj_ssize_t bytes_read) 
    330330{ 
    331     unsigned *p_packet_cnt = pj_ioqueue_get_user_data(key); 
     331    unsigned *p_packet_cnt = (unsigned*) pj_ioqueue_get_user_data(key); 
    332332 
    333333    PJ_UNUSED_ARG(op_key); 
     
    511511        return PJ_ENOMEM; 
    512512 
    513     key = pj_pool_alloc(pool, MAX*sizeof(pj_ioqueue_key_t*)); 
    514     sock = pj_pool_alloc(pool, MAX*sizeof(pj_sock_t)); 
     513    key = (pj_ioqueue_key_t**)  
     514          pj_pool_alloc(pool, MAX*sizeof(pj_ioqueue_key_t*)); 
     515    sock = (pj_sock_t*) pj_pool_alloc(pool, MAX*sizeof(pj_sock_t)); 
    515516     
    516517    /* Create IOQueue */ 
  • pjproject/trunk/pjlib/src/pjlib-test/ioq_unreg.c

    r974 r1235  
    124124static int worker_thread(void *arg) 
    125125{ 
    126     pj_ioqueue_t *ioqueue = arg; 
     126    pj_ioqueue_t *ioqueue = (pj_ioqueue_t*) arg; 
    127127 
    128128    while (!thread_quitting) { 
     
    211211    /* Initialize test data */ 
    212212    sock_data.pool = pj_pool_create(mem, "sd", 1000, 1000, NULL); 
    213     sock_data.buffer = pj_pool_alloc(sock_data.pool, 128); 
     213    sock_data.buffer = (char*) pj_pool_alloc(sock_data.pool, 128); 
    214214    sock_data.bufsize = 128; 
    215     sock_data.op_key = pj_pool_alloc(sock_data.pool,  
     215    sock_data.op_key = (pj_ioqueue_op_key_t*)  
     216                       pj_pool_alloc(sock_data.pool,  
    216217                                     sizeof(*sock_data.op_key)); 
    217218    sock_data.received = 0; 
  • pjproject/trunk/pjlib/src/pjlib-test/sock.c

    r1029 r1235  
    6464#define UDP_PORT        51234 
    6565#define TCP_PORT        (UDP_PORT+10) 
    66 #define BIG_DATA_LEN    9000 
     66#define BIG_DATA_LEN    8192 
    6767#define ADDRESS         "127.0.0.1" 
    68 #define A0              127 
    69 #define A1              0 
    70 #define A2              0 
    71 #define A3              1 
    72  
    7368 
    7469static char bigdata[BIG_DATA_LEN]; 
     
    8378    pj_sockaddr_in addr2; 
    8479    const pj_str_t *hostname; 
     80#if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 
     81    /* Symbian IP address is saved in host order */ 
     82    unsigned char A[] = {1, 0, 0, 127}; 
     83#else 
     84    unsigned char A[] = {127, 0, 0, 1}; 
     85#endif 
    8586 
    8687    PJ_LOG(3,("test", "...format_test()")); 
     
    9293    /* Check the result. */ 
    9394    p = (unsigned char*)&addr; 
    94     if (p[0]!=A0 || p[1]!=A1 || p[2]!=A2 || p[3]!=A3) { 
     95    if (p[0]!=A[0] || p[1]!=A[1] || p[2]!=A[2] || p[3]!=A[3]) { 
    9596        PJ_LOG(3,("test", "  error: mismatched address. p0=%d, p1=%d, " 
    9697                          "p2=%d, p3=%d", p[0] & 0xFF, p[1] & 0xFF,  
     
    369370        goto on_error; 
    370371 
     372// This test will fail on S60 3rd Edition MR2 
     373#if 0 
    371374    /* connect() the sockets. */ 
    372375    rc = pj_sock_connect(cs, &dstaddr, sizeof(dstaddr)); 
     
    386389    if (rc != 0) 
    387390        goto on_error; 
     391#endif 
    388392 
    389393on_error: 
     
    460464} 
    461465 
     466#if 0 
     467#include "../pj/os_symbian.h" 
     468static int connect_test() 
     469{ 
     470        RSocketServ rSockServ; 
     471        RSocket rSock; 
     472        TInetAddr inetAddr; 
     473        TRequestStatus reqStatus; 
     474        char buffer[16]; 
     475        TPtrC8 data((const TUint8*)buffer, (TInt)sizeof(buffer)); 
     476        int rc; 
     477         
     478        rc = rSockServ.Connect(); 
     479        if (rc != KErrNone) 
     480                return rc; 
     481         
     482        rc = rSock.Open(rSockServ, KAfInet, KSockDatagram, KProtocolInetUdp); 
     483        if (rc != KErrNone)  
     484        {                
     485                rSockServ.Close(); 
     486                return rc; 
     487        } 
     488         
     489        inetAddr.Init(KAfInet); 
     490        inetAddr.Input(_L("127.0.0.1")); 
     491        inetAddr.SetPort(80); 
     492         
     493        rSock.Connect(inetAddr, reqStatus); 
     494        User::WaitForRequest(reqStatus); 
     495 
     496        if (reqStatus != KErrNone) { 
     497                rSock.Close(); 
     498                rSockServ.Close(); 
     499                return rc; 
     500        } 
     501     
     502        rSock.Send(data, 0, reqStatus); 
     503        User::WaitForRequest(reqStatus); 
     504         
     505        if (reqStatus!=KErrNone) { 
     506                rSock.Close(); 
     507                rSockServ.Close(); 
     508                return rc; 
     509        } 
     510         
     511        rSock.Close(); 
     512        rSockServ.Close(); 
     513        return KErrNone; 
     514} 
     515#endif 
     516 
    462517int sock_test() 
    463518{ 
     
    466521    pj_create_random_string(bigdata, BIG_DATA_LEN); 
    467522 
     523// Enable this to demonstrate the error witn S60 3rd Edition MR2 
     524#if 0 
     525    rc = connect_test(); 
     526    if (rc != 0) 
     527        return rc; 
     528#endif 
     529     
    468530    rc = format_test(); 
    469531    if (rc != 0) 
  • pjproject/trunk/pjlib/src/pjlib-test/sock_perf.c

    r974 r1235  
    7070 
    7171    /* Create buffers. */ 
    72     outgoing_buffer = pj_pool_alloc(pool, buf_size); 
    73     incoming_buffer = pj_pool_alloc(pool, buf_size); 
     72    outgoing_buffer = (char*) pj_pool_alloc(pool, buf_size); 
     73    incoming_buffer = (char*) pj_pool_alloc(pool, buf_size); 
    7474 
    7575    /* Start loop. */ 
  • pjproject/trunk/pjlib/src/pjlib-test/string.c

    r1210 r1235  
    237237    } 
    238238 
     239    /* Avoid division by zero */ 
     240    if (c2 == 0) c2=1; 
     241     
    239242    PJ_LOG(3, ("", "  time: stricmp=%u, stricmp_alnum=%u (speedup=%d.%02dx)",  
    240243                   c1, c2, 
     
    329332     * pj_strcpy(), pj_strcat()  
    330333     */ 
    331     s3.ptr = pj_pool_alloc(pool, 256); 
     334    s3.ptr = (char*) pj_pool_alloc(pool, 256); 
    332335    if (!s3.ptr)  
    333336        return -200; 
     
    349352     * pj_utoa()  
    350353     */ 
    351     s5.ptr = pj_pool_alloc(pool, 16); 
     354    s5.ptr = (char*) pj_pool_alloc(pool, 16); 
    352355    if (!s5.ptr) 
    353356        return -270; 
     
    393396        int j; 
    394397         
    395         random[i].ptr = pj_pool_alloc(pool, RLEN); 
     398        random[i].ptr = (char*) pj_pool_alloc(pool, RLEN); 
    396399        if (!random[i].ptr) 
    397400            return -320; 
  • pjproject/trunk/pjlib/src/pjlib-test/test.h

    r974 r1235  
    2222#include <pj/types.h> 
    2323 
    24 #define GROUP_LIBC                  1 
    25 #define GROUP_OS                    1 
    26 #define GROUP_DATA_STRUCTURE        1 
     24#define GROUP_LIBC                  0 
     25#define GROUP_OS                    0 
     26#define GROUP_DATA_STRUCTURE        0 
    2727#define GROUP_NETWORK               1 
    28 #define GROUP_FILE                  1 
     28#if defined(PJ_SYMBIAN) 
     29#   define GROUP_FILE               0 
     30#else 
     31#   define GROUP_FILE               1 
     32#endif 
    2933 
    30 #define INCLUDE_ERRNO_TEST          GROUP_LIBC 
     34#if defined(PJ_SYMBIAN) 
     35#   define INCLUDE_ERRNO_TEST       0 
     36#else 
     37#   define INCLUDE_ERRNO_TEST       GROUP_LIBC 
     38#endif 
    3139#define INCLUDE_TIMESTAMP_TEST      GROUP_OS 
    3240#define INCLUDE_EXCEPTION_TEST      GROUP_LIBC 
     
    4048#define INCLUDE_TIMER_TEST          GROUP_DATA_STRUCTURE 
    4149#define INCLUDE_ATOMIC_TEST         GROUP_OS 
    42 #define INCLUDE_MUTEX_TEST          GROUP_OS 
     50#define INCLUDE_MUTEX_TEST          (PJ_HAS_THREADS && GROUP_OS) 
    4351#define INCLUDE_SLEEP_TEST          GROUP_OS 
    44 #define INCLUDE_THREAD_TEST         GROUP_OS  
     52#define INCLUDE_THREAD_TEST         (PJ_HAS_THREADS && GROUP_OS) 
    4553#define INCLUDE_SOCK_TEST           GROUP_NETWORK 
    46 #define INCLUDE_SOCK_PERF_TEST      GROUP_NETWORK 
     54#if defined(PJ_SYMBIAN) 
     55#   define INCLUDE_SOCK_PERF_TEST   0 
     56#else 
     57#   define INCLUDE_SOCK_PERF_TEST   GROUP_NETWORK 
     58#endif 
    4759#define INCLUDE_SELECT_TEST         GROUP_NETWORK 
    4860#define INCLUDE_UDP_IOQUEUE_TEST    GROUP_NETWORK 
    4961#define INCLUDE_TCP_IOQUEUE_TEST    GROUP_NETWORK 
    50 #define INCLUDE_IOQUEUE_PERF_TEST   GROUP_NETWORK 
    51 #define INCLUDE_IOQUEUE_UNREG_TEST  GROUP_NETWORK 
     62#define INCLUDE_IOQUEUE_PERF_TEST   (PJ_HAS_THREADS && GROUP_NETWORK) 
     63#define INCLUDE_IOQUEUE_UNREG_TEST  (PJ_HAS_THREADS && GROUP_NETWORK) 
    5264#define INCLUDE_FILE_TEST           GROUP_FILE 
    5365 
  • pjproject/trunk/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c

    r974 r1235  
    118118static int worker_thread(void *arg) 
    119119{ 
    120     pj_ioqueue_t *ioqueue = arg; 
     120    pj_ioqueue_t *ioqueue = (pj_ioqueue_t*) arg; 
    121121    struct op_key read_op, write_op; 
    122122    char recv_buf[512], send_buf[512]; 
Note: See TracChangeset for help on using the changeset viewer.