| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 CFStringRef cfpath = (CFStringRef) CFDictionaryGetValue(procinfo, | 366 CFStringRef cfpath = (CFStringRef) CFDictionaryGetValue(procinfo, |
| 367 kIOBundleExecutableKey); | 367 kIOBundleExecutableKey); |
| 368 std::string path8; | 368 std::string path8; |
| 369 bool success = ToUtf8(cfpath, &path8); | 369 bool success = ToUtf8(cfpath, &path8); |
| 370 CFRelease(procinfo); | 370 CFRelease(procinfo); |
| 371 if (success) | 371 if (success) |
| 372 path->SetPathname(path8); | 372 path->SetPathname(path8); |
| 373 return success; | 373 return success; |
| 374 #elif defined(__native_client__) | 374 #elif defined(__native_client__) |
| 375 return false; | 375 return false; |
| 376 #elif IOS | 376 #elif WEBRTC_IOS |
| 377 IOSAppName(path); | 377 IOSAppName(path); |
| 378 return true; | 378 return true; |
| 379 #else // WEBRTC_MAC && !defined(WEBRTC_IOS) | 379 #else // WEBRTC_MAC && !defined(WEBRTC_IOS) |
| 380 char buffer[PATH_MAX + 2]; | 380 char buffer[PATH_MAX + 2]; |
| 381 ssize_t len = readlink("/proc/self/exe", buffer, arraysize(buffer) - 1); | 381 ssize_t len = readlink("/proc/self/exe", buffer, arraysize(buffer) - 1); |
| 382 if ((len <= 0) || (len == PATH_MAX + 1)) | 382 if ((len <= 0) || (len == PATH_MAX + 1)) |
| 383 return false; | 383 return false; |
| 384 buffer[len] = '\0'; | 384 buffer[len] = '\0'; |
| 385 path->SetPathname(buffer); | 385 path->SetPathname(buffer); |
| 386 return true; | 386 return true; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 565 |
| 566 } // namespace rtc | 566 } // namespace rtc |
| 567 | 567 |
| 568 #if defined(__native_client__) | 568 #if defined(__native_client__) |
| 569 extern "C" int __attribute__((weak)) | 569 extern "C" int __attribute__((weak)) |
| 570 link(const char* oldpath, const char* newpath) { | 570 link(const char* oldpath, const char* newpath) { |
| 571 errno = EACCES; | 571 errno = EACCES; |
| 572 return -1; | 572 return -1; |
| 573 } | 573 } |
| 574 #endif | 574 #endif |
| OLD | NEW |