Changeset 1283


Ignore:
Timestamp:
May 16, 2007 1:51:26 PM (18 years ago)
Author:
bennylp
Message:

Fixed ticket #278: GUID generation cannot generate more than 216 unique numbers (thanks Igor Sobinov)

Location:
pjproject/branches/pjproject-0.5-stable
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/pjproject-0.5-stable/aconfigure

    r1056 r1283  
    33423342 
    33433343 
     3344echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5 
     3345echo $ECHO_N "checking for uuid_generate in -luuid... $ECHO_C" >&6 
     3346if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then 
     3347  echo $ECHO_N "(cached) $ECHO_C" >&6 
     3348else 
     3349  ac_check_lib_save_LIBS=$LIBS 
     3350LIBS="-luuid  $LIBS" 
     3351cat >conftest.$ac_ext <<_ACEOF 
     3352/* confdefs.h.  */ 
     3353_ACEOF 
     3354cat confdefs.h >>conftest.$ac_ext 
     3355cat >>conftest.$ac_ext <<_ACEOF 
     3356/* end confdefs.h.  */ 
     3357 
     3358/* Override any gcc2 internal prototype to avoid an error.  */ 
     3359#ifdef __cplusplus 
     3360extern "C" 
     3361#endif 
     3362/* We use char because int might match the return type of a gcc2 
     3363   builtin and then its argument prototype would still apply.  */ 
     3364char uuid_generate (); 
     3365int 
     3366main () 
     3367{ 
     3368uuid_generate (); 
     3369  ; 
     3370  return 0; 
     3371} 
     3372_ACEOF 
     3373rm -f conftest.$ac_objext conftest$ac_exeext 
     3374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
     3375  (eval $ac_link) 2>conftest.er1 
     3376  ac_status=$? 
     3377  grep -v '^ *+' conftest.er1 >conftest.err 
     3378  rm -f conftest.er1 
     3379  cat conftest.err >&5 
     3380  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3381  (exit $ac_status); } && 
     3382         { ac_try='test -z "$ac_c_werror_flag" 
     3383                         || test ! -s conftest.err' 
     3384  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3385  (eval $ac_try) 2>&5 
     3386  ac_status=$? 
     3387  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3388  (exit $ac_status); }; } && 
     3389         { ac_try='test -s conftest$ac_exeext' 
     3390  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3391  (eval $ac_try) 2>&5 
     3392  ac_status=$? 
     3393  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3394  (exit $ac_status); }; }; then 
     3395  ac_cv_lib_uuid_uuid_generate=yes 
     3396else 
     3397  echo "$as_me: failed program was:" >&5 
     3398sed 's/^/| /' conftest.$ac_ext >&5 
     3399 
     3400ac_cv_lib_uuid_uuid_generate=no 
     3401fi 
     3402rm -f conftest.err conftest.$ac_objext \ 
     3403      conftest$ac_exeext conftest.$ac_ext 
     3404LIBS=$ac_check_lib_save_LIBS 
     3405fi 
     3406echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5 
     3407echo "${ECHO_T}$ac_cv_lib_uuid_uuid_generate" >&6 
     3408if test $ac_cv_lib_uuid_uuid_generate = yes; then 
     3409  cat >>confdefs.h <<_ACEOF 
     3410#define HAVE_LIBUUID 1 
     3411_ACEOF 
     3412 
     3413  LIBS="-luuid $LIBS" 
     3414 
     3415fi 
     3416 
     3417echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5 
     3418echo $ECHO_N "checking for uuid_generate in -luuid... $ECHO_C" >&6 
     3419if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then 
     3420  echo $ECHO_N "(cached) $ECHO_C" >&6 
     3421else 
     3422  ac_check_lib_save_LIBS=$LIBS 
     3423LIBS="-luuid  $LIBS" 
     3424cat >conftest.$ac_ext <<_ACEOF 
     3425/* confdefs.h.  */ 
     3426_ACEOF 
     3427cat confdefs.h >>conftest.$ac_ext 
     3428cat >>conftest.$ac_ext <<_ACEOF 
     3429/* end confdefs.h.  */ 
     3430 
     3431/* Override any gcc2 internal prototype to avoid an error.  */ 
     3432#ifdef __cplusplus 
     3433extern "C" 
     3434#endif 
     3435/* We use char because int might match the return type of a gcc2 
     3436   builtin and then its argument prototype would still apply.  */ 
     3437char uuid_generate (); 
     3438int 
     3439main () 
     3440{ 
     3441uuid_generate (); 
     3442  ; 
     3443  return 0; 
     3444} 
     3445_ACEOF 
     3446rm -f conftest.$ac_objext conftest$ac_exeext 
     3447if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
     3448  (eval $ac_link) 2>conftest.er1 
     3449  ac_status=$? 
     3450  grep -v '^ *+' conftest.er1 >conftest.err 
     3451  rm -f conftest.er1 
     3452  cat conftest.err >&5 
     3453  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3454  (exit $ac_status); } && 
     3455         { ac_try='test -z "$ac_c_werror_flag" 
     3456                         || test ! -s conftest.err' 
     3457  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3458  (eval $ac_try) 2>&5 
     3459  ac_status=$? 
     3460  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3461  (exit $ac_status); }; } && 
     3462         { ac_try='test -s conftest$ac_exeext' 
     3463  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     3464  (eval $ac_try) 2>&5 
     3465  ac_status=$? 
     3466  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3467  (exit $ac_status); }; }; then 
     3468  ac_cv_lib_uuid_uuid_generate=yes 
     3469else 
     3470  echo "$as_me: failed program was:" >&5 
     3471sed 's/^/| /' conftest.$ac_ext >&5 
     3472 
     3473ac_cv_lib_uuid_uuid_generate=no 
     3474fi 
     3475rm -f conftest.err conftest.$ac_objext \ 
     3476      conftest$ac_exeext conftest.$ac_ext 
     3477LIBS=$ac_check_lib_save_LIBS 
     3478fi 
     3479echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5 
     3480echo "${ECHO_T}$ac_cv_lib_uuid_uuid_generate" >&6 
     3481if test $ac_cv_lib_uuid_uuid_generate = yes; then 
     3482  ac_has_uuid_lib=1 
     3483fi 
     3484 
     3485 
     3486 
    33443487echo "$as_me:$LINENO: result: Setting PJ_M_NAME to $target_cpu" >&5 
    33453488echo "${ECHO_T}Setting PJ_M_NAME to $target_cpu" >&6 
     
    80158158 
    80168159 
     8160if test "${ac_cv_header_uuid_uuid_h+set}" = set; then 
     8161  echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5 
     8162echo $ECHO_N "checking for uuid/uuid.h... $ECHO_C" >&6 
     8163if test "${ac_cv_header_uuid_uuid_h+set}" = set; then 
     8164  echo $ECHO_N "(cached) $ECHO_C" >&6 
     8165fi 
     8166echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5 
     8167echo "${ECHO_T}$ac_cv_header_uuid_uuid_h" >&6 
     8168else 
     8169  # Is the header compilable? 
     8170echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5 
     8171echo $ECHO_N "checking uuid/uuid.h usability... $ECHO_C" >&6 
     8172cat >conftest.$ac_ext <<_ACEOF 
     8173/* confdefs.h.  */ 
     8174_ACEOF 
     8175cat confdefs.h >>conftest.$ac_ext 
     8176cat >>conftest.$ac_ext <<_ACEOF 
     8177/* end confdefs.h.  */ 
     8178$ac_includes_default 
     8179#include <uuid/uuid.h> 
     8180_ACEOF 
     8181rm -f conftest.$ac_objext 
     8182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     8183  (eval $ac_compile) 2>conftest.er1 
     8184  ac_status=$? 
     8185  grep -v '^ *+' conftest.er1 >conftest.err 
     8186  rm -f conftest.er1 
     8187  cat conftest.err >&5 
     8188  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8189  (exit $ac_status); } && 
     8190         { ac_try='test -z "$ac_c_werror_flag" 
     8191                         || test ! -s conftest.err' 
     8192  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     8193  (eval $ac_try) 2>&5 
     8194  ac_status=$? 
     8195  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8196  (exit $ac_status); }; } && 
     8197         { ac_try='test -s conftest.$ac_objext' 
     8198  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     8199  (eval $ac_try) 2>&5 
     8200  ac_status=$? 
     8201  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8202  (exit $ac_status); }; }; then 
     8203  ac_header_compiler=yes 
     8204else 
     8205  echo "$as_me: failed program was:" >&5 
     8206sed 's/^/| /' conftest.$ac_ext >&5 
     8207 
     8208ac_header_compiler=no 
     8209fi 
     8210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     8211echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
     8212echo "${ECHO_T}$ac_header_compiler" >&6 
     8213 
     8214# Is the header present? 
     8215echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5 
     8216echo $ECHO_N "checking uuid/uuid.h presence... $ECHO_C" >&6 
     8217cat >conftest.$ac_ext <<_ACEOF 
     8218/* confdefs.h.  */ 
     8219_ACEOF 
     8220cat confdefs.h >>conftest.$ac_ext 
     8221cat >>conftest.$ac_ext <<_ACEOF 
     8222/* end confdefs.h.  */ 
     8223#include <uuid/uuid.h> 
     8224_ACEOF 
     8225if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
     8226  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     8227  ac_status=$? 
     8228  grep -v '^ *+' conftest.er1 >conftest.err 
     8229  rm -f conftest.er1 
     8230  cat conftest.err >&5 
     8231  echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     8232  (exit $ac_status); } >/dev/null; then 
     8233  if test -s conftest.err; then 
     8234    ac_cpp_err=$ac_c_preproc_warn_flag 
     8235    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
     8236  else 
     8237    ac_cpp_err= 
     8238  fi 
     8239else 
     8240  ac_cpp_err=yes 
     8241fi 
     8242if test -z "$ac_cpp_err"; then 
     8243  ac_header_preproc=yes 
     8244else 
     8245  echo "$as_me: failed program was:" >&5 
     8246sed 's/^/| /' conftest.$ac_ext >&5 
     8247 
     8248  ac_header_preproc=no 
     8249fi 
     8250rm -f conftest.err conftest.$ac_ext 
     8251echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
     8252echo "${ECHO_T}$ac_header_preproc" >&6 
     8253 
     8254# So?  What about this header? 
     8255case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
     8256  yes:no: ) 
     8257    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5 
     8258echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
     8259    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5 
     8260echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;} 
     8261    ac_header_preproc=yes 
     8262    ;; 
     8263  no:yes:* ) 
     8264    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5 
     8265echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;} 
     8266    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&5 
     8267echo "$as_me: WARNING: uuid/uuid.h:     check for missing prerequisite headers?" >&2;} 
     8268    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5 
     8269echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;} 
     8270    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&5 
     8271echo "$as_me: WARNING: uuid/uuid.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
     8272    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5 
     8273echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;} 
     8274    { echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5 
     8275echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;} 
     8276    ( 
     8277      cat <<\_ASBOX 
     8278## ------------------------------------ ## 
     8279## Report this to the pjproject lists.  ## 
     8280## ------------------------------------ ## 
     8281_ASBOX 
     8282    ) | 
     8283      sed "s/^/$as_me: WARNING:     /" >&2 
     8284    ;; 
     8285esac 
     8286echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5 
     8287echo $ECHO_N "checking for uuid/uuid.h... $ECHO_C" >&6 
     8288if test "${ac_cv_header_uuid_uuid_h+set}" = set; then 
     8289  echo $ECHO_N "(cached) $ECHO_C" >&6 
     8290else 
     8291  ac_cv_header_uuid_uuid_h=$ac_header_preproc 
     8292fi 
     8293echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5 
     8294echo "${ECHO_T}$ac_cv_header_uuid_uuid_h" >&6 
     8295 
     8296fi 
     8297if test $ac_cv_header_uuid_uuid_h = yes; then 
     8298  ac_has_uuid_h=1 
     8299fi 
     8300 
     8301 
     8302 
    80178303 
    80188304echo "$as_me:$LINENO: result: Setting PJ_OS_NAME to $target" >&5 
     
    83578643        ;; 
    83588644  *) 
    8359         ac_os_objs="file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o guid_simple.o ioqueue_select.o" 
     8645        ac_os_objs="file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o ioqueue_select.o" 
     8646        # UUID 
     8647        if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then 
     8648                ac_os_objs="$ac_os_objs guid_uuid.o" 
     8649        else 
     8650                ac_os_objs="$ac_os_objs guid_simple.o" 
     8651        fi 
    83608652        ;; 
    83618653esac 
  • pjproject/branches/pjproject-0.5-stable/aconfigure.ac

    r1056 r1283  
    4747AC_CHECK_LIB(rt,puts) 
    4848AC_CHECK_LIB(nsl,puts) 
     49AC_CHECK_LIB(uuid,uuid_generate) 
     50AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1])  
     51 
    4952 
    5053AC_MSG_RESULT([Setting PJ_M_NAME to $target_cpu]) 
     
    150153AC_CHECK_HEADER(winsock.h,[AC_DEFINE(PJ_HAS_WINSOCK_H,1)]) 
    151154AC_CHECK_HEADER(winsock2.h,[AC_DEFINE(PJ_HAS_WINSOCK2_H,1)]) 
     155AC_CHECK_HEADER(uuid/uuid.h,[ac_has_uuid_h=1]) 
     156 
    152157 
    153158AC_MSG_RESULT([Setting PJ_OS_NAME to $target]) 
     
    231236        ;; 
    232237  *) 
    233         ac_os_objs="file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o guid_simple.o ioqueue_select.o" 
     238        ac_os_objs="file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o ioqueue_select.o" 
     239        # UUID  
     240        if test "$ac_has_uuid_lib" = "1" -a "$ac_has_uuid_h" = "1"; then  
     241                ac_os_objs="$ac_os_objs guid_uuid.o"  
     242        else  
     243                ac_os_objs="$ac_os_objs guid_simple.o"  
     244        fi  
    234245        ;; 
    235246esac 
Note: See TracChangeset for help on using the changeset viewer.