mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 10:35:50 +00:00
89 lines
3.6 KiB
C++
89 lines
3.6 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of Beast: https://github.com/vinniefalco/Beast
|
|
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
|
|
|
Portions of this file are from JUCE.
|
|
Copyright (c) 2013 - Raw Material Software Ltd.
|
|
Please visit http://www.juce.com
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#ifndef BEAST_CSTDINT_H_INCLUDED
|
|
#define BEAST_CSTDINT_H_INCLUDED
|
|
|
|
#include "Config.h"
|
|
|
|
namespace beast {
|
|
|
|
typedef signed char int8;
|
|
typedef signed short int16;
|
|
typedef signed int int32;
|
|
typedef unsigned char uint8;
|
|
typedef unsigned short uint16;
|
|
typedef unsigned int uint32;
|
|
|
|
#if BEAST_MSVC
|
|
typedef __int64 int64;
|
|
typedef unsigned __int64 uint64;
|
|
|
|
/** A platform-independent macro for writing 64-bit literals, needed because
|
|
different compilers have different syntaxes for this.
|
|
|
|
E.g. writing literal64bit (0x1000000000) will translate to 0x1000000000LL for
|
|
GCC, or 0x1000000000 for MSVC.
|
|
*/
|
|
#define literal64bit(longLiteral) ((__int64) longLiteral)
|
|
|
|
#else
|
|
/** A platform-independent 64-bit integer type. */
|
|
typedef long long int64;
|
|
/** A platform-independent 64-bit unsigned integer type. */
|
|
typedef unsigned long long uint64;
|
|
/** A platform-independent macro for writing 64-bit literals, needed because
|
|
different compilers have different syntaxes for this.
|
|
|
|
E.g. writing literal64bit (0x1000000000) will translate to 0x1000000000LL for
|
|
GCC, or 0x1000000000 for MSVC.
|
|
*/
|
|
#define literal64bit(longLiteral) (longLiteral##LL)
|
|
|
|
#endif
|
|
|
|
#if BEAST_64BIT
|
|
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
|
typedef int64 pointer_sized_int;
|
|
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
|
typedef uint64 pointer_sized_uint;
|
|
#elif BEAST_MSVC
|
|
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
|
typedef _W64 int pointer_sized_int;
|
|
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
|
typedef _W64 unsigned int pointer_sized_uint;
|
|
#else
|
|
/** A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
|
typedef int pointer_sized_int;
|
|
/** An unsigned integer type that's guaranteed to be large enough to hold a pointer without truncating it. */
|
|
typedef unsigned int pointer_sized_uint;
|
|
#endif
|
|
|
|
#if BEAST_MSVC
|
|
typedef pointer_sized_int ssize_t;
|
|
#endif
|
|
|
|
}
|
|
|
|
#endif
|