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