TrinityCore
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
randomc.h
Go to the documentation of this file.
1
/*
2
* Copyright notice
3
* ================
4
* GNU General Public License http://www.gnu.org/licenses/gpl.html
5
* This C++ implementation of SFMT contains parts of the original C code
6
* which was published under the following BSD license, which is therefore
7
* in effect in addition to the GNU General Public License.
8
* Copyright (c) 2006, 2007 by Mutsuo Saito, Makoto Matsumoto and Hiroshima University.
9
* Copyright (c) 2008 by Agner Fog.
10
* Copyright (c) 2008-2013 Trinity Core
11
*
12
* BSD License:
13
* Redistribution and use in source and binary forms, with or without
14
* modification, are permitted provided that the following conditions are met:
15
* > Redistributions of source code must retain the above copyright notice,
16
* this list of conditions and the following disclaimer.
17
* > Redistributions in binary form must reproduce the above copyright notice,
18
* this list of conditions and the following disclaimer in the documentation
19
* and/or other materials provided with the distribution.
20
* > Neither the name of the Hiroshima University nor the names of its
21
* contributors may be used to endorse or promote products derived from
22
* this software without specific prior written permission.
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
*/
35
36
#ifndef RANDOMC_H
37
#define RANDOMC_H
38
39
// Define integer types with known size: int32_t, uint32_t, int64_t, uint64_t.
40
// If this doesn't work then insert compiler-specific definitions here:
41
#if defined(__GNUC__)
42
// Compilers supporting C99 or C++0x have inttypes.h defining these integer types
43
#include <inttypes.h>
44
#define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers
45
#elif defined(_WIN16) || defined(__MSDOS__) || defined(_MSDOS)
46
// 16 bit systems use long int for 32 bit integer
47
typedef
signed
long
int
int32_t
;
48
typedef
unsigned
long
int
uint32_t
;
49
#elif defined(_MSC_VER)
50
// Microsoft have their own definition
51
typedef
signed
__int32
int32_t
;
52
typedef
unsigned
__int32
uint32_t
;
53
typedef
signed
__int64
int64_t
;
54
typedef
unsigned
__int64
uint64_t
;
55
#define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers
56
#else
57
// This works with most compilers
58
typedef
signed
int
int32_t
;
59
typedef
unsigned
int
uint32_t
;
60
typedef
long
long
int64_t
;
61
typedef
unsigned
long
long
uint64_t
;
62
#define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers
63
#endif
64
65
#endif // RANDOMC_H
int64_t
long long int64_t
Definition:
randomc.h:60
uint32_t
unsigned int uint32_t
Definition:
randomc.h:59
int32_t
signed int int32_t
Definition:
randomc.h:58
uint64_t
unsigned long long uint64_t
Definition:
randomc.h:61
Generated on Tue Apr 5 2016 20:13:12 for TrinityCore by
1.8.8