Changeset 1783 for pjproject/trunk
- Timestamp:
- Feb 7, 2008 1:11:39 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure
r1738 r1783 1 1 #! /bin/sh 2 2 # Guess values for system-dependent variables and create Makefiles. 3 # Generated by GNU Autoconf 2.61 for pjproject 0. 7.3 # Generated by GNU Autoconf 2.61 for pjproject 0.8. 4 4 # 5 5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, … … 573 573 PACKAGE_NAME='pjproject' 574 574 PACKAGE_TARNAME='pjproject' 575 PACKAGE_VERSION='0. 7'576 PACKAGE_STRING='pjproject 0. 7'575 PACKAGE_VERSION='0.8' 576 PACKAGE_STRING='pjproject 0.8' 577 577 PACKAGE_BUGREPORT='' 578 578 … … 1213 1213 # This message is too long to be a string in the A/UX 3.1 sh. 1214 1214 cat <<_ACEOF 1215 \`configure' configures pjproject 0. 7to adapt to many kinds of systems.1215 \`configure' configures pjproject 0.8 to adapt to many kinds of systems. 1216 1216 1217 1217 Usage: $0 [OPTION]... [VAR=VALUE]... … … 1279 1279 if test -n "$ac_init_help"; then 1280 1280 case $ac_init_help in 1281 short | recursive ) echo "Configuration of pjproject 0. 7:";;1281 short | recursive ) echo "Configuration of pjproject 0.8:";; 1282 1282 esac 1283 1283 cat <<\_ACEOF … … 1377 1377 if $ac_init_version; then 1378 1378 cat <<\_ACEOF 1379 pjproject configure 0. 71379 pjproject configure 0.8 1380 1380 generated by GNU Autoconf 2.61 1381 1381 … … 1391 1391 running configure, to aid debugging if configure makes a mistake. 1392 1392 1393 It was created by pjproject $as_me 0. 7, which was1393 It was created by pjproject $as_me 0.8, which was 1394 1394 generated by GNU Autoconf 2.61. Invocation command line was 1395 1395 … … 6574 6574 6575 6575 6576 if test "${ac_cv_header_semaphore_h+set}" = set; then 6577 { echo "$as_me:$LINENO: checking for semaphore.h" >&5 6578 echo $ECHO_N "checking for semaphore.h... $ECHO_C" >&6; } 6579 if test "${ac_cv_header_semaphore_h+set}" = set; then 6580 echo $ECHO_N "(cached) $ECHO_C" >&6 6581 fi 6582 { echo "$as_me:$LINENO: result: $ac_cv_header_semaphore_h" >&5 6583 echo "${ECHO_T}$ac_cv_header_semaphore_h" >&6; } 6584 else 6585 # Is the header compilable? 6586 { echo "$as_me:$LINENO: checking semaphore.h usability" >&5 6587 echo $ECHO_N "checking semaphore.h usability... $ECHO_C" >&6; } 6588 cat >conftest.$ac_ext <<_ACEOF 6589 /* confdefs.h. */ 6590 _ACEOF 6591 cat confdefs.h >>conftest.$ac_ext 6592 cat >>conftest.$ac_ext <<_ACEOF 6593 /* end confdefs.h. */ 6594 $ac_includes_default 6595 #include <semaphore.h> 6596 _ACEOF 6597 rm -f conftest.$ac_objext 6598 if { (ac_try="$ac_compile" 6599 case "(($ac_try" in 6600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6601 *) ac_try_echo=$ac_try;; 6602 esac 6603 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6604 (eval "$ac_compile") 2>conftest.er1 6605 ac_status=$? 6606 grep -v '^ *+' conftest.er1 >conftest.err 6607 rm -f conftest.er1 6608 cat conftest.err >&5 6609 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6610 (exit $ac_status); } && { 6611 test -z "$ac_c_werror_flag" || 6612 test ! -s conftest.err 6613 } && test -s conftest.$ac_objext; then 6614 ac_header_compiler=yes 6615 else 6616 echo "$as_me: failed program was:" >&5 6617 sed 's/^/| /' conftest.$ac_ext >&5 6618 6619 ac_header_compiler=no 6620 fi 6621 6622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6623 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 6624 echo "${ECHO_T}$ac_header_compiler" >&6; } 6625 6626 # Is the header present? 6627 { echo "$as_me:$LINENO: checking semaphore.h presence" >&5 6628 echo $ECHO_N "checking semaphore.h presence... $ECHO_C" >&6; } 6629 cat >conftest.$ac_ext <<_ACEOF 6630 /* confdefs.h. */ 6631 _ACEOF 6632 cat confdefs.h >>conftest.$ac_ext 6633 cat >>conftest.$ac_ext <<_ACEOF 6634 /* end confdefs.h. */ 6635 #include <semaphore.h> 6636 _ACEOF 6637 if { (ac_try="$ac_cpp conftest.$ac_ext" 6638 case "(($ac_try" in 6639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6640 *) ac_try_echo=$ac_try;; 6641 esac 6642 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6643 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 6644 ac_status=$? 6645 grep -v '^ *+' conftest.er1 >conftest.err 6646 rm -f conftest.er1 6647 cat conftest.err >&5 6648 echo "$as_me:$LINENO: \$? = $ac_status" >&5 6649 (exit $ac_status); } >/dev/null && { 6650 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 6651 test ! -s conftest.err 6652 }; then 6653 ac_header_preproc=yes 6654 else 6655 echo "$as_me: failed program was:" >&5 6656 sed 's/^/| /' conftest.$ac_ext >&5 6657 6658 ac_header_preproc=no 6659 fi 6660 6661 rm -f conftest.err conftest.$ac_ext 6662 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 6663 echo "${ECHO_T}$ac_header_preproc" >&6; } 6664 6665 # So? What about this header? 6666 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6667 yes:no: ) 6668 { echo "$as_me:$LINENO: WARNING: semaphore.h: accepted by the compiler, rejected by the preprocessor!" >&5 6669 echo "$as_me: WARNING: semaphore.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 6670 { echo "$as_me:$LINENO: WARNING: semaphore.h: proceeding with the compiler's result" >&5 6671 echo "$as_me: WARNING: semaphore.h: proceeding with the compiler's result" >&2;} 6672 ac_header_preproc=yes 6673 ;; 6674 no:yes:* ) 6675 { echo "$as_me:$LINENO: WARNING: semaphore.h: present but cannot be compiled" >&5 6676 echo "$as_me: WARNING: semaphore.h: present but cannot be compiled" >&2;} 6677 { echo "$as_me:$LINENO: WARNING: semaphore.h: check for missing prerequisite headers?" >&5 6678 echo "$as_me: WARNING: semaphore.h: check for missing prerequisite headers?" >&2;} 6679 { echo "$as_me:$LINENO: WARNING: semaphore.h: see the Autoconf documentation" >&5 6680 echo "$as_me: WARNING: semaphore.h: see the Autoconf documentation" >&2;} 6681 { echo "$as_me:$LINENO: WARNING: semaphore.h: section \"Present But Cannot Be Compiled\"" >&5 6682 echo "$as_me: WARNING: semaphore.h: section \"Present But Cannot Be Compiled\"" >&2;} 6683 { echo "$as_me:$LINENO: WARNING: semaphore.h: proceeding with the preprocessor's result" >&5 6684 echo "$as_me: WARNING: semaphore.h: proceeding with the preprocessor's result" >&2;} 6685 { echo "$as_me:$LINENO: WARNING: semaphore.h: in the future, the compiler will take precedence" >&5 6686 echo "$as_me: WARNING: semaphore.h: in the future, the compiler will take precedence" >&2;} 6687 6688 ;; 6689 esac 6690 { echo "$as_me:$LINENO: checking for semaphore.h" >&5 6691 echo $ECHO_N "checking for semaphore.h... $ECHO_C" >&6; } 6692 if test "${ac_cv_header_semaphore_h+set}" = set; then 6693 echo $ECHO_N "(cached) $ECHO_C" >&6 6694 else 6695 ac_cv_header_semaphore_h=$ac_header_preproc 6696 fi 6697 { echo "$as_me:$LINENO: result: $ac_cv_header_semaphore_h" >&5 6698 echo "${ECHO_T}$ac_cv_header_semaphore_h" >&6; } 6699 6700 fi 6701 if test $ac_cv_header_semaphore_h = yes; then 6702 cat >>confdefs.h <<\_ACEOF 6703 #define PJ_HAS_SEMAPHORE_H 1 6704 _ACEOF 6705 6706 fi 6707 6708 6576 6709 if test "${ac_cv_header_setjmp_h+set}" = set; then 6577 6710 { echo "$as_me:$LINENO: checking for setjmp.h" >&5 … … 9556 9689 _ACEOF 9557 9690 9691 ac_rwmutex="yes" 9558 9692 { echo "$as_me:$LINENO: result: yes" >&5 9559 9693 echo "${ECHO_T}yes" >&6; } … … 9566 9700 _ACEOF 9567 9701 9702 ac_rwmutex="no" 9568 9703 { echo "$as_me:$LINENO: result: no" >&5 9704 echo "${ECHO_T}no" >&6; } 9705 fi 9706 9707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9708 9709 if test "$ac_rwmutex" = "no"; then 9710 { echo "$as_me:$LINENO: checking if pthread_rwlock_t is available with _POSIX_READER_WRITER_LOCKS" >&5 9711 echo $ECHO_N "checking if pthread_rwlock_t is available with _POSIX_READER_WRITER_LOCKS... $ECHO_C" >&6; } 9712 cat >conftest.$ac_ext <<_ACEOF 9713 /* confdefs.h. */ 9714 _ACEOF 9715 cat confdefs.h >>conftest.$ac_ext 9716 cat >>conftest.$ac_ext <<_ACEOF 9717 /* end confdefs.h. */ 9718 #define _POSIX_READER_WRITER_LOCKS 9719 #include <pthread.h> 9720 int 9721 main () 9722 { 9723 pthread_rwlock_t *x; 9724 ; 9725 return 0; 9726 } 9727 _ACEOF 9728 rm -f conftest.$ac_objext 9729 if { (ac_try="$ac_compile" 9730 case "(($ac_try" in 9731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9732 *) ac_try_echo=$ac_try;; 9733 esac 9734 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 9735 (eval "$ac_compile") 2>conftest.er1 9736 ac_status=$? 9737 grep -v '^ *+' conftest.er1 >conftest.err 9738 rm -f conftest.er1 9739 cat conftest.err >&5 9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9741 (exit $ac_status); } && { 9742 test -z "$ac_c_werror_flag" || 9743 test ! -s conftest.err 9744 } && test -s conftest.$ac_objext; then 9745 cat >>confdefs.h <<\_ACEOF 9746 #define PJ_EMULATE_RWMUTEX 0 9747 _ACEOF 9748 9749 CFLAGS="$CFLAGS -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS" 9750 { echo "$as_me:$LINENO: result: yes" >&5 9751 echo "${ECHO_T}yes" >&6; } 9752 else 9753 echo "$as_me: failed program was:" >&5 9754 sed 's/^/| /' conftest.$ac_ext >&5 9755 9756 cat >>confdefs.h <<\_ACEOF 9757 #define PJ_EMULATE_RWMUTEX 1 9758 _ACEOF 9759 9760 { echo "$as_me:$LINENO: result: no" >&5 9761 echo "${ECHO_T}no" >&6; } 9762 fi 9763 9764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9765 fi 9766 9767 { echo "$as_me:$LINENO: checking if pthread_mutexattr_settype() is available" >&5 9768 echo $ECHO_N "checking if pthread_mutexattr_settype() is available... $ECHO_C" >&6; } 9769 cat >conftest.$ac_ext <<_ACEOF 9770 /* confdefs.h. */ 9771 _ACEOF 9772 cat confdefs.h >>conftest.$ac_ext 9773 cat >>conftest.$ac_ext <<_ACEOF 9774 /* end confdefs.h. */ 9775 #include <pthread.h> 9776 int 9777 main () 9778 { 9779 pthread_mutexattr_settype(0,PTHREAD_MUTEX_FAST_NP); 9780 ; 9781 return 0; 9782 } 9783 _ACEOF 9784 rm -f conftest.$ac_objext 9785 if { (ac_try="$ac_compile" 9786 case "(($ac_try" in 9787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9788 *) ac_try_echo=$ac_try;; 9789 esac 9790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 9791 (eval "$ac_compile") 2>conftest.er1 9792 ac_status=$? 9793 grep -v '^ *+' conftest.er1 >conftest.err 9794 rm -f conftest.er1 9795 cat conftest.err >&5 9796 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9797 (exit $ac_status); } && { 9798 test -z "$ac_c_werror_flag" || 9799 test ! -s conftest.err 9800 } && test -s conftest.$ac_objext; then 9801 cat >>confdefs.h <<\_ACEOF 9802 #define PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE 1 9803 _ACEOF 9804 9805 { echo "$as_me:$LINENO: result: yes" >&5 9806 echo "${ECHO_T}yes" >&6; } 9807 else 9808 echo "$as_me: failed program was:" >&5 9809 sed 's/^/| /' conftest.$ac_ext >&5 9810 9811 { echo "$as_me:$LINENO: result: no" >&5 9812 echo "${ECHO_T}no" >&6; } 9813 fi 9814 9815 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9816 9817 { echo "$as_me:$LINENO: checking if pthread_mutexattr_t has recursive member" >&5 9818 echo $ECHO_N "checking if pthread_mutexattr_t has recursive member... $ECHO_C" >&6; } 9819 cat >conftest.$ac_ext <<_ACEOF 9820 /* confdefs.h. */ 9821 _ACEOF 9822 cat confdefs.h >>conftest.$ac_ext 9823 cat >>conftest.$ac_ext <<_ACEOF 9824 /* end confdefs.h. */ 9825 #include <pthread.h> 9826 int 9827 main () 9828 { 9829 pthread_mutexattr_t attr; 9830 attr.recursive=1; 9831 ; 9832 return 0; 9833 } 9834 _ACEOF 9835 rm -f conftest.$ac_objext 9836 if { (ac_try="$ac_compile" 9837 case "(($ac_try" in 9838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9839 *) ac_try_echo=$ac_try;; 9840 esac 9841 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 9842 (eval "$ac_compile") 2>conftest.er1 9843 ac_status=$? 9844 grep -v '^ *+' conftest.er1 >conftest.err 9845 rm -f conftest.er1 9846 cat conftest.err >&5 9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5 9848 (exit $ac_status); } && { 9849 test -z "$ac_c_werror_flag" || 9850 test ! -s conftest.err 9851 } && test -s conftest.$ac_objext; then 9852 cat >>confdefs.h <<\_ACEOF 9853 #define PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE 1 9854 _ACEOF 9855 9856 { echo "$as_me:$LINENO: result: yes" >&5 9857 echo "${ECHO_T}yes" >&6; } 9858 else 9859 echo "$as_me: failed program was:" >&5 9860 sed 's/^/| /' conftest.$ac_ext >&5 9861 9862 { echo "$as_me:$LINENO: result: no" >&5 9569 9863 echo "${ECHO_T}no" >&6; } 9570 9864 fi … … 11193 11487 # values after options handling. 11194 11488 ac_log=" 11195 This file was extended by pjproject $as_me 0. 7, which was11489 This file was extended by pjproject $as_me 0.8, which was 11196 11490 generated by GNU Autoconf 2.61. Invocation command line was 11197 11491 … … 11242 11536 cat >>$CONFIG_STATUS <<_ACEOF 11243 11537 ac_cs_version="\\ 11244 pjproject config.status 0. 711538 pjproject config.status 0.8 11245 11539 configured by $0, generated by GNU Autoconf 2.61, 11246 11540 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -
pjproject/trunk/aconfigure.ac
r1738 r1783 1 AC_INIT(pjproject,0. 7)1 AC_INIT(pjproject,0.8) 2 2 3 3 host_orig="$host" … … 147 147 AC_CHECK_HEADER(net/if.h,[AC_DEFINE(PJ_HAS_NET_IF_H,1)]) 148 148 AC_CHECK_HEADER(ifaddrs.h,[AC_DEFINE(PJ_HAS_IFADDRS_H,1)]) 149 AC_CHECK_HEADER(semaphore.h,[AC_DEFINE(PJ_HAS_SEMAPHORE_H,1)]) 149 150 AC_CHECK_HEADER(setjmp.h,[AC_DEFINE(PJ_HAS_SETJMP_H,1)]) 150 151 AC_CHECK_HEADER(stdarg.h,[AC_DEFINE(PJ_HAS_STDARG_H,1)]) … … 269 270 [pthread_rwlock_t *x;])], 270 271 [AC_DEFINE(PJ_EMULATE_RWMUTEX,0) 272 ac_rwmutex="yes" 271 273 AC_MSG_RESULT(yes)], 272 274 [AC_DEFINE(PJ_EMULATE_RWMUTEX,1) 275 ac_rwmutex="no" 273 276 AC_MSG_RESULT(no)]) 277 278 dnl # If rwmutex is not detected, check again but this time 279 dnl # with _POSIX_READER_WRITER_LOCKS defined (newlib needs this) 280 if test "$ac_rwmutex" = "no"; then 281 AC_MSG_CHECKING([if pthread_rwlock_t is available with _POSIX_READER_WRITER_LOCKS]) 282 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_READER_WRITER_LOCKS 283 #include <pthread.h>]], 284 [pthread_rwlock_t *x;])], 285 [AC_DEFINE(PJ_EMULATE_RWMUTEX,0) 286 CFLAGS="$CFLAGS -D_POSIX_THREADS -D_POSIX_READER_WRITER_LOCKS" 287 AC_MSG_RESULT(yes)], 288 [AC_DEFINE(PJ_EMULATE_RWMUTEX,1) 289 AC_MSG_RESULT(no)]) 290 fi 291 292 dnl # Do we have pthread_mutexattr_settype()? 293 AC_MSG_CHECKING([if pthread_mutexattr_settype() is available]) 294 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], 295 [pthread_mutexattr_settype(0,PTHREAD_MUTEX_FAST_NP);])], 296 [AC_DEFINE(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE,1) 297 AC_MSG_RESULT(yes)], 298 [AC_MSG_RESULT(no)]) 299 300 dnl # Does pthread_mutexattr_t has "recursive" member? 301 AC_MSG_CHECKING([if pthread_mutexattr_t has recursive member]) 302 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], 303 [[pthread_mutexattr_t attr; 304 attr.recursive=1;]])], 305 [AC_DEFINE(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE,1) 306 AC_MSG_RESULT(yes)], 307 [AC_MSG_RESULT(no)]) 274 308 275 309 AC_SUBST(ac_os_objs) -
pjproject/trunk/pjlib/include/pj/compat/os_auto.h.in
r1738 r1783 55 55 #undef PJ_HAS_NET_IF_H 56 56 #undef PJ_HAS_IFADDRS_H 57 #undef PJ_HAS_SEMAPHORE_H 57 58 #undef PJ_HAS_SETJMP_H 58 59 #undef PJ_HAS_STDARG_H … … 79 80 #undef PJ_SOCK_HAS_INET_NTOP 80 81 #undef PJ_SOCK_HAS_GETADDRINFO 82 83 /* On these OSes, semaphore feature depends on semaphore.h */ 84 #if defined(PJ_HAS_SEMAPHORE_H) && PJ_HAS_SEMAPHORE_H!=0 85 # define PJ_HAS_SEMAPHORE 1 86 #else 87 # define PJ_HAS_SEMAPHORE 0 88 #endif 89 90 /* Do we have pthread_mutexattr_settype()? */ 91 #undef PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE 92 93 /* Does pthread_mutexattr_t has "recursive" member? */ 94 #undef PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE 81 95 82 96 /* Set 1 if native sockaddr_in has sin_len member. -
pjproject/trunk/pjlib/include/pj/config.h
r1748 r1783 486 486 * aware of this constant, to make sure that the program will not break when 487 487 * the underlying implementation changes. 488 *489 * For implementation based on select(), the value here will be used as the490 * maximum number of socket handles passed to select() (i.e. FD_SETSIZE will491 * be set to this value).492 *493 * Default: if FD_SETSIZE is defined and the value is greather than 256,494 * then it will be used. Otherwise 256 (64 for WinCE).495 488 */ 496 489 #ifndef PJ_IOQUEUE_MAX_HANDLES … … 539 532 540 533 /** 534 * Determine if FD_SETSIZE is changeable/set-able. If so, then we will 535 * set it to PJ_IOQUEUE_MAX_HANDLES. 536 */ 537 /* This is awful, as we should actually check for __GLIBC__ rather than 538 * __GNUC__. But alas! Libc headers are not included yet at this stage. 539 */ 540 #ifdef __GNUC__ 541 # define PJ_FD_SETSIZE_SETABLE 0 542 #else 543 # define PJ_FD_SETSIZE_SETABLE 1 544 #endif 545 546 /** 541 547 * Overrides FD_SETSIZE so it is consistent throughout the library. 542 * OS specific configuration header (compat/os_*) might have declared 543 * FD_SETSIZE, thus we only set if it hasn't been declared. 548 * We only do this if we detected that FD_SETSIZE is changeable. 544 549 * 545 550 * Default: #PJ_IOQUEUE_MAX_HANDLES 546 551 */ 547 #ifndef FD_SETSIZE 548 # define FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES 549 #endif 552 #if PJ_FD_SETSIZE_SETABLE 553 /* Only override FD_SETSIZE if the value has not been set */ 554 # ifndef FD_SETSIZE 555 # define FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES 556 # endif 557 #else 558 /* When FD_SETSIZE is not changeable, check if PJ_IOQUEUE_MAX_HANDLES 559 * is lower than FD_SETSIZE value. 560 */ 561 # ifdef FD_SETSIZE 562 # if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE 563 # error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE" 564 # endif 565 # endif 566 #endif 567 550 568 551 569 /** -
pjproject/trunk/pjlib/include/pj/sock_select.h
r1405 r1783 55 55 typedef struct pj_fd_set_t 56 56 { 57 pj_sock_t data[FD_SETSIZE + 4];/**< Opaque buffer for fd_set */57 pj_sock_t data[PJ_IOQUEUE_MAX_HANDLES+ 4]; /**< Opaque buffer for fd_set */ 58 58 } pj_fd_set_t; 59 59 -
pjproject/trunk/pjlib/src/pj/os_core_unix.c
r1589 r1783 35 35 #include <pj/errno.h> 36 36 37 #if defined(PJ_HAS_SEMAPHORE ) && PJ_HAS_SEMAPHORE!= 037 #if defined(PJ_HAS_SEMAPHORE_H) && PJ_HAS_SEMAPHORE_H != 0 38 38 # include <semaphore.h> 39 39 #endif … … 949 949 950 950 if (type == PJ_MUTEX_SIMPLE) { 951 #if defined(PJ_LINUX) && PJ_LINUX!=0 951 #if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ 952 defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) 952 953 rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP); 953 #elif defined(PJ_RTEMS) && PJ_RTEMS!=0 954 #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ 955 defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE) 954 956 /* Nothing to do, default is simple */ 955 957 #else … … 957 959 #endif 958 960 } else { 959 #if defined(PJ_LINUX) && PJ_LINUX!=0 961 #if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ 962 defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) 960 963 rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); 961 #elif defined(PJ_RTEMS) && PJ_RTEMS!=0 964 #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ 965 defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE) 962 966 // Phil Torre <ptorre@zetron.com>: 963 967 // The RTEMS implementation of POSIX mutexes doesn't include 964 968 // pthread_mutexattr_settype(), so what follows is a hack 965 969 // until I get RTEMS patched to support the set/get functions. 970 // 971 // More info: 972 // newlib's pthread also lacks pthread_mutexattr_settype(), 973 // but it seems to have mutexattr.recursive. 966 974 PJ_TODO(FIX_RTEMS_RECURSIVE_MUTEX_TYPE) 967 975 attr.recursive = 1; … … 1240 1248 */ 1241 1249 #if defined(PJ_EMULATE_RWMUTEX) && PJ_EMULATE_RWMUTEX!=0 1242 # include "os_rwmutex.c" 1250 /* We need semaphore functionality to emulate rwmutex */ 1251 # if !defined(PJ_HAS_SEMAPHORE) || PJ_HAS_SEMAPHORE==0 1252 # error "Semaphore support needs to be enabled to emulate rwmutex" 1253 # endif 1254 # include "os_rwmutex.c" 1243 1255 #else 1244 1256 struct pj_rwmutex_t -
pjproject/trunk/pjlib/src/pj/sock_select.c
r974 r1783 34 34 # pragma warning(disable: 4018) // Signed/unsigned mismatch in FD_* 35 35 # pragma warning(disable: 4389) // Signed/unsigned mismatch in FD_* 36 #endif 37 38 /* Now that we have access to OS'es <sys/select>, lets check again that 39 * PJ_IOQUEUE_MAX_HANDLES is not greater than FD_SETSIZE 40 */ 41 #if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE 42 # error "PJ_IOQUEUE_MAX_HANDLES cannot be greater than FD_SETSIZE" 36 43 #endif 37 44
Note: See TracChangeset
for help on using the changeset viewer.