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