Changeset 697


Ignore:
Timestamp:
Sep 9, 2006 8:05:33 PM (15 years ago)
Author:
bennylp
Message:

Added PJ_HAS_SOCKLEN_T test in configure script (some MacOS X have it, some dont)

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r689 r697  
    74157415  cat >>confdefs.h <<\_ACEOF 
    74167416#define PJ_SOCKADDR_HAS_LEN 1 
     7417_ACEOF 
     7418 
     7419                   echo "$as_me:$LINENO: result: yes" >&5 
     7420echo "${ECHO_T}yes" >&6 
     7421else 
     7422  echo "$as_me: failed program was:" >&5 
     7423sed 's/^/| /' conftest.$ac_ext >&5 
     7424 
     7425echo "$as_me:$LINENO: result: no" >&5 
     7426echo "${ECHO_T}no" >&6 
     7427fi 
     7428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     7429 
     7430# Determine if socklen_t is available 
     7431echo "$as_me:$LINENO: checking if socklen_t is available" >&5 
     7432echo $ECHO_N "checking if socklen_t is available... $ECHO_C" >&6 
     7433cat >conftest.$ac_ext <<_ACEOF 
     7434/* confdefs.h.  */ 
     7435_ACEOF 
     7436cat confdefs.h >>conftest.$ac_ext 
     7437cat >>conftest.$ac_ext <<_ACEOF 
     7438/* end confdefs.h.  */ 
     7439#include <unistd.h> 
     7440int 
     7441main () 
     7442{ 
     7443socklen_t xxx = 0; 
     7444  ; 
     7445  return 0; 
     7446} 
     7447_ACEOF 
     7448rm -f conftest.$ac_objext 
     7449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     7450  (eval $ac_compile) 2>conftest.er1 
     7451  ac_status=$? 
     7452  grep -v '^ *+' conftest.er1 >conftest.err 
     7453  rm -f conftest.er1 
     7454  cat conftest.err >&5 
     7455  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     7456  (exit $ac_status); } && 
     7457         { ac_try='test -z "$ac_c_werror_flag" 
     7458                         || test ! -s conftest.err' 
     7459  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     7460  (eval $ac_try) 2>&5 
     7461  ac_status=$? 
     7462  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     7463  (exit $ac_status); }; } && 
     7464         { ac_try='test -s conftest.$ac_objext' 
     7465  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     7466  (eval $ac_try) 2>&5 
     7467  ac_status=$? 
     7468  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     7469  (exit $ac_status); }; }; then 
     7470  cat >>confdefs.h <<\_ACEOF 
     7471#define PJ_HAS_SOCKLEN_T 1 
    74177472_ACEOF 
    74187473 
  • pjproject/trunk/aconfigure.ac

    r689 r697  
    111111                  AC_MSG_RESULT(no)) 
    112112 
     113# Determine if socklen_t is available 
     114AC_MSG_CHECKING([if socklen_t is available]) 
     115AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], 
     116                                   [socklen_t xxx = 0;])], 
     117                  [AC_DEFINE(PJ_HAS_SOCKLEN_T,1) 
     118                   AC_MSG_RESULT(yes)], 
     119                  AC_MSG_RESULT(no)) 
     120 
    113121# Determine if SO_ERROR is available 
    114122AC_MSG_CHECKING([if SO_ERROR is available]) 
  • pjproject/trunk/pjlib/include/pj/compat/os_auto.h.in

    r625 r697  
    6464#undef PJ_SOCKADDR_HAS_LEN 
    6565 
     66/* Does the OS have socklen_t? */ 
     67#undef PJ_HAS_SOCKLEN_T 
     68 
     69#if !defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0 
     70  typedef int socklen_t; 
     71#endif 
     72 
    6673/** 
    6774 * If this macro is set, it tells select I/O Queue that select() needs to 
     
    100107#endif 
    101108 
     109/* Do we need high resolution timer? */ 
    102110#undef PJ_HAS_HIGH_RES_TIMER 
     111 
     112/* Is malloc() available? */ 
    103113#undef PJ_HAS_MALLOC 
     114 
    104115#ifndef PJ_OS_HAS_CHECK_STACK 
    105116#   define PJ_OS_HAS_CHECK_STACK    0 
    106117#endif 
     118 
     119/* Unicode? */ 
    107120#undef PJ_NATIVE_STRING_IS_UNICODE 
    108121 
     122/* The type of atomic variable value: */ 
    109123#undef PJ_ATOMIC_VALUE_TYPE 
    110124 
Note: See TracChangeset for help on using the changeset viewer.