OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_POSIX_SAFE_STRERROR_H_ | 5 #ifndef BASE_POSIX_SAFE_STRERROR_H_ |
6 #define BASE_POSIX_SAFE_STRERROR_H_ | 6 #define BASE_POSIX_SAFE_STRERROR_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/base_export.h" | 12 #include "base/base_export.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 | 15 |
14 // BEFORE using anything from this file, first look at PLOG and friends in | 16 // BEFORE using anything from this file, first look at PLOG and friends in |
15 // logging.h and use them instead if applicable. | 17 // logging.h and use them instead if applicable. |
16 // | 18 // |
17 // This file declares safe, portable alternatives to the POSIX strerror() | 19 // This file declares safe, portable alternatives to the POSIX strerror() |
(...skipping 15 matching lines...) Expand all Loading... |
33 // in a C++ string. | 35 // in a C++ string. |
34 // | 36 // |
35 // Use this instead of strerror(). Note though that safe_strerror_r will be | 37 // Use this instead of strerror(). Note though that safe_strerror_r will be |
36 // more robust in the case of heap corruption errors, since it doesn't need to | 38 // more robust in the case of heap corruption errors, since it doesn't need to |
37 // allocate a string. | 39 // allocate a string. |
38 BASE_EXPORT std::string safe_strerror(int err); | 40 BASE_EXPORT std::string safe_strerror(int err); |
39 | 41 |
40 } // namespace base | 42 } // namespace base |
41 | 43 |
42 #endif // BASE_POSIX_SAFE_STRERROR_H_ | 44 #endif // BASE_POSIX_SAFE_STRERROR_H_ |
OLD | NEW |