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 <llvm/Support/DataTypes.h>
13 #include <mcld/Config/Config.h>
14 #include <string>
15 
16 namespace mcld {
17 namespace sys {
18 
19 typedef uint8_t* Address;
20 typedef off_t Offset;
21 
22 /** \fn strerror
23  *  \brief system error message
24  */
25 char *strerror(int pErrnum);
26 
27 std::string getDefaultTargetTriple();
28 
29 int GetPageSize();
30 
31 /// GetRandomNum - generate a random number.
32 long GetRandomNum();
33 
34 /// SetRandomSeed - set the initial seed value for future calls to random().
35 void SetRandomSeed(unsigned pSeed);
36 
37 } // namespace of sys
38 } // namespace of mcld
39 
40 #endif
41 
42