Avoid potential negative array index access to cached text.
[LibreOffice.git] / sal / osl / unx / unixerrnostring.hxx
blob9e13b04e6c4e000b0538dd7b16fb56359577798c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_SAL_OSL_UNX_UNIXERRNOSTRING_HXX
11 #define INCLUDED_SAL_OSL_UNX_UNIXERRNOSTRING_HXX
13 #include <string>
15 // Return the symbolic name of an errno value, like "ENOENT".
17 // Rationale why to use this and not strerror(): This is intended to be used in SAL_INFO() and
18 // SAL_WARN(). Such messages are intended to be read by developers, not end-users. Developers are
19 // (or should be) familiar with symbolic errno names in code anyway. strerror() is localized and the
20 // localised error strings might be less familiar to a developer that happens to run a localised
21 // environment.
23 std::string UnixErrnoString(int nErrno);
25 #endif
27 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */