Changeset 153 for pjproject/trunk
- Timestamp:
- Feb 8, 2006 11:14:03 AM (19 years ago)
- Location:
- pjproject/trunk/pjlib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/build/Makefile
r136 r153 9 9 # Gather all flags. 10 10 # 11 export _CFLAGS := -O2 -g$(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \11 export _CFLAGS := $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \ 12 12 $(CFLAGS) $(CC_INC)../include 13 13 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \ -
pjproject/trunk/pjlib/include/pj/compat/os_linux.h
r125 r153 77 77 #define PJ_HAS_HIGH_RES_TIMER 1 78 78 #define PJ_HAS_MALLOC 1 79 #define PJ_OS_HAS_CHECK_STACK 0 79 #ifndef PJ_OS_HAS_CHECK_STACK 80 # define PJ_OS_HAS_CHECK_STACK 0 81 #endif 80 82 #define PJ_NATIVE_STRING_IS_UNICODE 0 81 83 -
pjproject/trunk/pjlib/include/pj/compat/os_linux_kernel.h
r125 r153 95 95 #define PJ_HAS_EVENT_OBJ 0 96 96 #define PJ_HAS_HIGH_RES_TIMER 1 97 #define PJ_OS_HAS_CHECK_STACK 0 97 #ifndef PJ_OS_HAS_CHECK_STACK 98 # define PJ_OS_HAS_CHECK_STACK 0 98 99 #define PJ_TERM_HAS_COLOR 0 99 100 #define PJ_NATIVE_STRING_IS_UNICODE 0 -
pjproject/trunk/pjlib/include/pj/compat/os_palmos.h
r125 r153 71 71 /* Default threading is enabled, unless it's overridden. */ 72 72 #ifndef PJ_HAS_THREADS 73 # define PJ_HAS_THREADS 73 # define PJ_HAS_THREADS (1) 74 74 #endif 75 75 76 #define PJ_HAS_HIGH_RES_TIMER 1 77 #define PJ_OS_HAS_CHECK_STACK 0 78 #define PJ_NATIVE_STRING_IS_UNICODE 0 76 #define PJ_HAS_HIGH_RES_TIMER 1 77 #ifndef PJ_OS_HAS_CHECK_STACK 78 # define PJ_OS_HAS_CHECK_STACK 0 79 #define PJ_NATIVE_STRING_IS_UNICODE 0 79 80 80 81 #endif /* __PJ_COMPAT_OS_PALMOS_H__ */ -
pjproject/trunk/pjlib/include/pj/compat/os_sunos.h
r125 r153 72 72 /* Default threading is enabled, unless it's overridden. */ 73 73 #ifndef PJ_HAS_THREADS 74 # define PJ_HAS_THREADS 74 # define PJ_HAS_THREADS (1) 75 75 #endif 76 76 77 #define PJ_HAS_HIGH_RES_TIMER 1 78 #define PJ_HAS_MALLOC 1 79 #define PJ_OS_HAS_CHECK_STACK 0 80 #define PJ_NATIVE_STRING_IS_UNICODE 0 77 #define PJ_HAS_HIGH_RES_TIMER 1 78 #define PJ_HAS_MALLOC 1 79 #ifndef PJ_OS_HAS_CHECK_STACK 80 # define PJ_OS_HAS_CHECK_STACK 0 81 #endif 82 #define PJ_NATIVE_STRING_IS_UNICODE 0 81 83 82 #define PJ_ATOMIC_VALUE_TYPE 84 #define PJ_ATOMIC_VALUE_TYPE long 83 85 84 86 /* Get BSD related identifers in Sun's include files */ -
pjproject/trunk/pjlib/include/pj/compat/os_win32.h
r125 r153 76 76 /* Default threading is enabled, unless it's overridden. */ 77 77 #ifndef PJ_HAS_THREADS 78 # define PJ_HAS_THREADS 78 # define PJ_HAS_THREADS (1) 79 79 #endif 80 80 81 #define PJ_HAS_HIGH_RES_TIMER 1 82 #define PJ_HAS_MALLOC 1 83 #define PJ_OS_HAS_CHECK_STACK 1 84 #define PJ_NATIVE_STRING_IS_UNICODE 0 81 #define PJ_HAS_HIGH_RES_TIMER 1 82 #define PJ_HAS_MALLOC 1 83 #ifndef PJ_OS_HAS_CHECK_STACK 84 # define PJ_OS_HAS_CHECK_STACK 1 85 #endif 86 #define PJ_NATIVE_STRING_IS_UNICODE 0 85 87 86 #define PJ_ATOMIC_VALUE_TYPE 88 #define PJ_ATOMIC_VALUE_TYPE long 87 89 88 90 #endif /* __PJ_COMPAT_OS_WIN32_H__ */ -
pjproject/trunk/pjlib/src/pj/sock_bsd.c
r125 r153 523 523 524 524 /* 525 * Connect socket. 526 */ 527 PJ_DEF(pj_status_t) pj_sock_connect( pj_sock_t sock, 528 const pj_sockaddr_t *addr, 529 int namelen) 530 { 531 PJ_CHECK_STACK(); 532 if (connect(sock, (struct sockaddr*)addr, namelen) != 0) 533 return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); 534 else 535 return PJ_SUCCESS; 536 } 537 538 539 /* 525 540 * Shutdown socket. 526 541 */ … … 544 559 PJ_CHECK_STACK(); 545 560 if (listen(sock, backlog) != 0) 546 return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());547 else548 return PJ_SUCCESS;549 }550 551 /*552 * Connect socket.553 */554 PJ_DEF(pj_status_t) pj_sock_connect( pj_sock_t sock,555 const pj_sockaddr_t *addr,556 int namelen)557 {558 PJ_CHECK_STACK();559 if (connect(sock, (struct sockaddr*)addr, namelen) != 0)560 561 return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); 561 562 else -
pjproject/trunk/pjlib/src/pjlib-test/util.c
r65 r153 51 51 return rc; 52 52 53 #if PJ_HAS_TCP 53 54 if (type == PJ_SOCK_STREAM) { 54 55 rc = pj_sock_listen(sock, 5); … … 56 57 return rc; 57 58 } 59 #endif 58 60 59 61 *ptr_sock = sock; … … 95 97 96 98 /* For TCP, listen the socket. */ 99 #if PJ_HAS_TCP 97 100 if (type == PJ_SOCK_STREAM) { 98 101 rc = pj_sock_listen(sock[SERVER], PJ_SOMAXCONN); … … 100 103 goto on_error; 101 104 } 105 #endif 102 106 103 107 /* Connect client socket. */ … … 108 112 109 113 /* For TCP, must accept(), and get the new socket. */ 114 #if PJ_HAS_TCP 110 115 if (type == PJ_SOCK_STREAM) { 111 116 pj_sock_t newserver; … … 119 124 sock[SERVER] = newserver; 120 125 } 126 #endif 121 127 122 128 *serverfd = sock[SERVER];
Note: See TracChangeset
for help on using the changeset viewer.