- Timestamp:
- Jul 15, 2010 1:32:11 PM (14 years ago)
- Location:
- pjproject/trunk/pjlib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/compat/os_auto.h.in
r3059 r3238 170 170 #undef PJ_ATOMIC_VALUE_TYPE 171 171 172 /* Append ".local" suffix to the system's hostname? */ 173 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 174 # include "TargetConditionals.h" 175 # if defined(__IPHONE_4_0) && \ 176 __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_4_0 177 # define PJ_GETHOSTNAME_APPEND_LOCAL_SUFFIX 1 178 # endif 179 #endif 180 172 181 /* If 1, use Read/Write mutex emulation for platforms that don't support it */ 173 182 #undef PJ_EMULATE_RWMUTEX -
pjproject/trunk/pjlib/src/pj/sock_bsd.c
r2966 r3238 451 451 hostname.slen = 0; 452 452 } else { 453 hostname.slen = strlen(buf); 453 hostname.slen = strlen(buf); 454 #if defined(PJ_GETHOSTNAME_APPEND_LOCAL_SUFFIX) && \ 455 PJ_GETHOSTNAME_APPEND_LOCAL_SUFFIX!=0 456 { 457 const pj_str_t suffix = {".local", 6}; 458 459 if (hostname.slen < suffix.slen || 460 pj_ansi_strnicmp(hostname.ptr + hostname.slen - 461 suffix.slen, suffix.ptr, suffix.slen)) 462 { 463 if (hostname.slen + suffix.slen + 1 < sizeof(buf)) 464 pj_strcat(&hostname, &suffix); 465 else 466 hostname.slen = 0; 467 hostname.ptr[hostname.slen] = '\0'; 468 } 469 } 470 #endif 454 471 } 455 472 }
Note: See TracChangeset
for help on using the changeset viewer.