| 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 |
| 11 #include "webrtc/rtc_base/unixfilesystem.h" | 11 #include "webrtc/base/unixfilesystem.h" |
| 12 | 12 |
| 13 #include <errno.h> | 13 #include <errno.h> |
| 14 #include <fcntl.h> | 14 #include <fcntl.h> |
| 15 #include <stdlib.h> | 15 #include <stdlib.h> |
| 16 #include <sys/stat.h> | 16 #include <sys/stat.h> |
| 17 #include <unistd.h> | 17 #include <unistd.h> |
| 18 | 18 |
| 19 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) | 19 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) |
| 20 #include <CoreServices/CoreServices.h> | 20 #include <CoreServices/CoreServices.h> |
| 21 #include <IOKit/IOCFBundle.h> | 21 #include <IOKit/IOCFBundle.h> |
| 22 #include <sys/statvfs.h> | 22 #include <sys/statvfs.h> |
| 23 #include "webrtc/rtc_base/macutils.h" | 23 #include "webrtc/base/macutils.h" |
| 24 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) | 24 #endif // WEBRTC_MAC && !defined(WEBRTC_IOS) |
| 25 | 25 |
| 26 #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) || defined(WEBRTC_IOS) | 26 #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) || defined(WEBRTC_IOS) |
| 27 #include <sys/types.h> | 27 #include <sys/types.h> |
| 28 #if defined(WEBRTC_ANDROID) | 28 #if defined(WEBRTC_ANDROID) |
| 29 #include <sys/statfs.h> | 29 #include <sys/statfs.h> |
| 30 #elif !defined(__native_client__) | 30 #elif !defined(__native_client__) |
| 31 #include <sys/statvfs.h> | 31 #include <sys/statvfs.h> |
| 32 #endif // !defined(__native_client__) | 32 #endif // !defined(__native_client__) |
| 33 #include <limits.h> | 33 #include <limits.h> |
| 34 #include <pwd.h> | 34 #include <pwd.h> |
| 35 #include <stdio.h> | 35 #include <stdio.h> |
| 36 #endif // WEBRTC_POSIX && !WEBRTC_MAC || WEBRTC_IOS | 36 #endif // WEBRTC_POSIX && !WEBRTC_MAC || WEBRTC_IOS |
| 37 | 37 |
| 38 #if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) | 38 #if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) |
| 39 #include <ctype.h> | 39 #include <ctype.h> |
| 40 #include <algorithm> | 40 #include <algorithm> |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 #if defined(__native_client__) && !defined(__GLIBC__) | 43 #if defined(__native_client__) && !defined(__GLIBC__) |
| 44 #include <sys/syslimits.h> | 44 #include <sys/syslimits.h> |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #include "webrtc/rtc_base/arraysize.h" | 47 #include "webrtc/base/arraysize.h" |
| 48 #include "webrtc/rtc_base/checks.h" | 48 #include "webrtc/base/checks.h" |
| 49 #include "webrtc/rtc_base/fileutils.h" | 49 #include "webrtc/base/fileutils.h" |
| 50 #include "webrtc/rtc_base/pathutils.h" | 50 #include "webrtc/base/pathutils.h" |
| 51 #include "webrtc/rtc_base/stream.h" | 51 #include "webrtc/base/stream.h" |
| 52 #include "webrtc/rtc_base/stringutils.h" | 52 #include "webrtc/base/stringutils.h" |
| 53 | 53 |
| 54 #if defined(WEBRTC_MAC) | 54 #if defined(WEBRTC_MAC) |
| 55 // Defined in applefilesystem.mm. No header file to discourage use | 55 // Defined in applefilesystem.mm. No header file to discourage use |
| 56 // elsewhere; other places should use GetApp{Data,Temp}Folder() in | 56 // elsewhere; other places should use GetApp{Data,Temp}Folder() in |
| 57 // this file. Don't copy/paste. I mean it. | 57 // this file. Don't copy/paste. I mean it. |
| 58 char* AppleDataDirectory(); | 58 char* AppleDataDirectory(); |
| 59 char* AppleTempDirectory(); | 59 char* AppleTempDirectory(); |
| 60 void AppleAppName(rtc::Pathname* path); | 60 void AppleAppName(rtc::Pathname* path); |
| 61 #endif | 61 #endif |
| 62 | 62 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 232 |
| 233 } // namespace rtc | 233 } // namespace rtc |
| 234 | 234 |
| 235 #if defined(__native_client__) | 235 #if defined(__native_client__) |
| 236 extern "C" int __attribute__((weak)) | 236 extern "C" int __attribute__((weak)) |
| 237 link(const char* oldpath, const char* newpath) { | 237 link(const char* oldpath, const char* newpath) { |
| 238 errno = EACCES; | 238 errno = EACCES; |
| 239 return -1; | 239 return -1; |
| 240 } | 240 } |
| 241 #endif | 241 #endif |
| OLD | NEW |