HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
errno.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_BASE_ARCH_ERRNO_H
8 #define PXR_BASE_ARCH_ERRNO_H
9 
10 /// \file arch/errno.h
11 /// \ingroup group_arch_SystemFunctions
12 /// Functions for dealing with system errors.
13 
14 #include "pxr/pxr.h"
15 #include "pxr/base/arch/api.h"
16 #include <string>
17 
19 
20 /// \addtogroup group_arch_SystemFunctions
21 ///@{
22 
23 /// Return the error string for the current value of errno.
24 ///
25 /// This function provides a thread-safe method of fetching the error string
26 /// from errno. POSIX.1c defines errno as a macro which provides access to a
27 /// thread-local integer. This function is thread-safe.
28 /// \overload
29 ARCH_API std::string ArchStrerror();
30 
31 /// Return the error string for the specified value of errno.
32 ///
33 /// This function is thread-safe.
34 ARCH_API std::string ArchStrerror(int errorCode);
35 
36 #if defined(ARCH_OS_WINDOWS)
37 /// Return the error string for the specified error code.
38 ///
39 /// This function is thread-safe.
40 ARCH_API std::string ArchStrSysError(unsigned long errorCode);
41 #endif
42 
43 ///@}
44 
46 
47 #endif // PXR_BASE_ARCH_ERRNO_H
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
ARCH_API std::string ArchStrerror()
#define ARCH_API
Definition: api.h:23