Newer
Older
snipet / project / trunk / include / sc / sc_stdint.h
/* =============================================================================
 *  sc_errno.h
 *  Copyright (c) 2003 - 2013  Nomura Kei
 * =============================================================================
 */
#ifndef SC_STDINT_H
#define SC_STDINT_H

#ifndef CONFIG_H
#include <config.h>
#endif

#if (HAS_STDINT_H)

#ifdef __cplusplus
#include <cstdint>
#else
#include <stdint.h>
#endif

#else
	typedef signed char		int8_t;
	typedef unsigned char	uint8_t;
	typedef short			int16_t;
	typedef unsigned short	uint16_t;
	typedef long			int32_t;
	typedef unsigned long	uint32_t;

	typedef int8_t			int_least8_t;
	typedef uint8_t			uint_least8_t;
	typedef int16_t			int_least16_t;
	typedef uint16_t		uint_least16_t;
	typedef int32_t			int_least32_t;
	typedef uint32_t		uint_least32_t;

	typedef int				int_fast8_t;
	typedef unsigned int	uint_fast8_t;
	typedef int				int_fast16_t;
	typedef unsigned int	uint_fast16_t;
	typedef long			int_fast32_t;
	typedef unsigned long	uint_fast32_t;

#if defined(__BORLANDC__)
	typedef int32_t			intmax_t;
	typedef uint32_t		uintmax_t;
#else

#if defined(__extension__)
	__extension__ typedef long long int			int64_t;
	__extension__ typedef unsigned long long	uint64_t;
	__extension__ typedef int64_t				int_least64_t;
	__extension__ typedef uint64_t				uint_least64_t;
	__extension__ typedef long long int			intmax_t;
	__extension__ typedef unsigned long long	uintmax_t;
#else
	typedef long long int						int64_t;
	typedef unsigned long long					uint64_t;
	typedef int64_t								int_least64_t;
	typedef uint64_t							uint_least64_t;
	typedef long long int						intmax_t;
	typedef unsigned long long					uintmax_t;
#endif	/* defined(__extension__)	*/
#endif	/* defined(__BORLANDC__)	*/

#endif	/* HAS_STDINT_H				*/

#endif /* SC_STDINT_H */