• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- SystemUtils.h ------------------------------------------------------===//
2 //
3 //                     The MCLinker Project
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 #ifndef MCLD_SUPPORT_SYSTEMUTILS_H_
10 #define MCLD_SUPPORT_SYSTEMUTILS_H_
11 
12 #include "mcld/Config/Config.h"
13 
14 #include <llvm/Support/DataTypes.h>
15 
16 #include <string>
17 
18 namespace mcld {
19 namespace sys {
20 
21 typedef uint8_t* Address;
22 typedef off_t Offset;
23 
24 /** \fn strerror
25  *  \brief system error message
26  */
27 char* strerror(int pErrnum);
28 
29 std::string getDefaultTargetTriple();
30 
31 int GetPageSize();
32 
33 /// GetRandomNum - generate a random number.
34 long GetRandomNum();
35 
36 /// SetRandomSeed - set the initial seed value for future calls to random().
37 void SetRandomSeed(unsigned pSeed);
38 
39 }  // namespace sys
40 }  // namespace mcld
41 
42 #endif  // MCLD_SUPPORT_SYSTEMUTILS_H_
43