/***************************************************************************1* Copyright (C) 2007 by Sindre Aamås *2* [email protected] *3* *4* This program is free software; you can redistribute it and/or modify *5* it under the terms of the GNU General Public License version 2 as *6* published by the Free Software Foundation. *7* *8* This program is distributed in the hope that it will be useful, *9* but WITHOUT ANY WARRANTY; without even the implied warranty of *10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *11* GNU General Public License version 2 for more details. *12* *13* You should have received a copy of the GNU General Public License *14* version 2 along with this program; if not, write to the *15* Free Software Foundation, Inc., *16* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *17***************************************************************************/18#ifndef GAMBATTE_INT_H19#define GAMBATTE_INT_H2021// note that this is a hack to overcome the fact that libgambatte's original defines are not propagated.22#define HAVE_CSTDINT2324#ifdef HAVE_CSTDINT2526#include <cstdint>2728namespace gambatte {29using std::uint_least32_t;30using std::uint_least16_t;31}3233#elif defined(HAVE_STDINT_H)3435#include <stdint.h>3637namespace gambatte {38using ::uint_least32_t;39using ::uint_least16_t;40}4142#else4344namespace gambatte {45#ifdef CHAR_LEAST_3246typedef unsigned char uint_least32_t;47#elif defined(SHORT_LEAST_32)48typedef unsigned short uint_least32_t;49#elif defined(INT_LEAST_32)50typedef unsigned uint_least32_t;51#else52typedef unsigned long uint_least32_t;53#endif5455#ifdef CHAR_LEAST_1656typedef unsigned char uint_least16_t;57#else58typedef unsigned short uint_least16_t;59#endif60}6162#endif6364#endif656667