Added PJ_HAS_SOCKLEN_T test in configure script (some MacOS X have it, some dont)
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@697 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
033d7f6efe
commit
30f85c66a6
55
aconfigure
55
aconfigure
|
@ -7427,6 +7427,61 @@ echo "${ECHO_T}no" >&6
|
|||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
# Determine if socklen_t is available
|
||||
echo "$as_me:$LINENO: checking if socklen_t is available" >&5
|
||||
echo $ECHO_N "checking if socklen_t is available... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
socklen_t xxx = 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define PJ_HAS_SOCKLEN_T 1
|
||||
_ACEOF
|
||||
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
# Determine if SO_ERROR is available
|
||||
echo "$as_me:$LINENO: checking if SO_ERROR is available" >&5
|
||||
echo $ECHO_N "checking if SO_ERROR is available... $ECHO_C" >&6
|
||||
|
|
|
@ -110,6 +110,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>
|
|||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# Determine if socklen_t is available
|
||||
AC_MSG_CHECKING([if socklen_t is available])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
|
||||
[socklen_t xxx = 0;])],
|
||||
[AC_DEFINE(PJ_HAS_SOCKLEN_T,1)
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
# Determine if SO_ERROR is available
|
||||
AC_MSG_CHECKING([if SO_ERROR is available])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>
|
||||
|
|
|
@ -63,6 +63,13 @@
|
|||
*/
|
||||
#undef PJ_SOCKADDR_HAS_LEN
|
||||
|
||||
/* Does the OS have socklen_t? */
|
||||
#undef PJ_HAS_SOCKLEN_T
|
||||
|
||||
#if !defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If this macro is set, it tells select I/O Queue that select() needs to
|
||||
* be given correct value of nfds (i.e. largest fd + 1). This requires
|
||||
|
@ -99,13 +106,20 @@
|
|||
# define PJ_HAS_THREADS (1)
|
||||
#endif
|
||||
|
||||
/* Do we need high resolution timer? */
|
||||
#undef PJ_HAS_HIGH_RES_TIMER
|
||||
|
||||
/* Is malloc() available? */
|
||||
#undef PJ_HAS_MALLOC
|
||||
|
||||
#ifndef PJ_OS_HAS_CHECK_STACK
|
||||
# define PJ_OS_HAS_CHECK_STACK 0
|
||||
#endif
|
||||
|
||||
/* Unicode? */
|
||||
#undef PJ_NATIVE_STRING_IS_UNICODE
|
||||
|
||||
/* The type of atomic variable value: */
|
||||
#undef PJ_ATOMIC_VALUE_TYPE
|
||||
|
||||
/* If 1, use Read/Write mutex emulation for platforms that don't support it */
|
||||
|
|
Loading…
Reference in New Issue