2001-11-27 18:50:04 -07:00
|
|
|
// basictypes.h
|
|
|
|
//
|
|
|
|
// Copyright (C) 2001, Chris Laurel <claurel@shatters.net>
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 2
|
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
#ifndef _BASICTYPES_H_
|
|
|
|
#define _BASICTYPES_H_
|
|
|
|
|
|
|
|
typedef unsigned int uint;
|
|
|
|
|
|
|
|
// Fixed size types
|
|
|
|
typedef int int32;
|
|
|
|
typedef unsigned int uint32;
|
|
|
|
typedef short int16;
|
|
|
|
typedef unsigned short uint16;
|
|
|
|
typedef char int8;
|
|
|
|
typedef unsigned char uint8;
|
|
|
|
|
2007-11-21 00:16:27 -07:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
// MS Visual C++ does not include stdint.h
|
|
|
|
typedef __int64 int64;
|
|
|
|
typedef unsigned __int64 uint64;
|
|
|
|
#else
|
|
|
|
#include <stdint.h>
|
2008-02-06 12:37:54 -07:00
|
|
|
#include <limits>
|
2007-11-21 00:16:27 -07:00
|
|
|
typedef int64_t int64;
|
|
|
|
typedef uint64_t uint64;
|
2017-07-31 14:16:13 -06:00
|
|
|
#ifndef INT64_MAX
|
2008-02-06 12:37:54 -07:00
|
|
|
#define INT64_MAX 9223372036854775807LL
|
2017-07-31 14:16:13 -06:00
|
|
|
#endif
|
2009-09-17 18:45:14 -06:00
|
|
|
#ifndef UINT64_MAX
|
2008-02-06 12:37:54 -07:00
|
|
|
#define UINT64_MAX 0xffffffffffffffffULL
|
2009-09-17 18:45:14 -06:00
|
|
|
#endif
|
2008-02-06 12:37:54 -07:00
|
|
|
//#define INT64_MAX std::numeric_limits<int64_t>::max()
|
|
|
|
//#define UINT64_MAX std::numeric_limits<uint64_t>::max()
|
2007-11-21 00:16:27 -07:00
|
|
|
#endif
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
#endif // _BASICTYPES_H_
|
|
|
|
|