Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.1 KiB

  1. //===- llvm/Support/Errno.h - Portable+convenient errno handling -*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file declares some portable and convenient functions to deal with errno.
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_SUPPORT_ERRNO_H
  14. #define LLVM_SUPPORT_ERRNO_H
  15. #include <string>
  16. namespace llvm {
  17. namespace sys {
  18. /// Returns a string representation of the errno value, using whatever
  19. /// thread-safe variant of strerror() is available. Be sure to call this
  20. /// immediately after the function that set errno, or errno may have been
  21. /// overwritten by an intervening call.
  22. std::string StrError();
  23. /// Like the no-argument version above, but uses \p errnum instead of errno.
  24. std::string StrError(int errnum);
  25. } // namespace sys
  26. } // namespace llvm
  27. #endif // LLVM_SYSTEM_ERRNO_H