Changeset 3426 for pjproject/trunk/pjlib/src/pj/os_info.c
- Timestamp:
- Feb 28, 2011 10:19:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/os_info.c
r3424 r3426 89 89 return &si; 90 90 91 si.machine.ptr = si.os_name.ptr = si.sdk_name.ptr = si.info.ptr = ""; 92 91 93 #define ALLOC_CP_STR(str,field) \ 92 94 do { \ … … 109 111 int i, maxtok; 110 112 111 if (uname(&u) != 0) 113 /* Successful uname() returns zero on Linux and positive value 114 * on OpenSolaris. 115 */ 116 if (uname(&u) == -1) 112 117 goto get_sdk_info; 118 113 119 ALLOC_CP_STR(u.machine, machine); 114 120 ALLOC_CP_STR(u.sysname, os_name); … … 227 233 228 234 cnt = pj_ansi_snprintf(tmp, sizeof(tmp), 229 "%s%s /%s/%s%s",235 "%s%s%s%s%s%s%s", 230 236 si.os_name.ptr, 231 237 ver_info(si.os_ver, os_ver), 238 (si.machine.slen ? "/" : ""), 232 239 si.machine.ptr, 240 (si.sdk_name.slen ? "/" : ""), 233 241 si.sdk_name.ptr, 234 242 ver_info(si.sdk_ver, sdk_ver));
Note: See TracChangeset
for help on using the changeset viewer.