CppCMS
booster/cstdint.h
00001 //
00002 //  Copyright (C) 2009-2012 Artyom Beilis (Tonkikh)
00003 //
00004 //  Distributed under the Boost Software License, Version 1.0. (See
00005 //  accompanying file LICENSE_1_0.txt or copy at
00006 //  http://www.boost.org/LICENSE_1_0.txt)
00007 //
00008 #ifndef BOOSTER_CSTDINT_H
00009 #define BOOSTER_CSTDINT_H
00010 
00011 #include <booster/build_config.h>
00012 
00013 #if defined(BOOSTER_HAVE_STDINT_H) || defined(BOOSTER_HAVE_INTTYPES_H)
00014 
00015 #  if defined BOOSTER_HAVE_STDINT_H
00016 #     include <stdint.h>
00017 #  elif defined BOOSTER_HAVE_INTTYPES_H
00018 #     include <inttypes.h>
00019 #  endif
00020         namespace booster {
00021                 using ::int8_t;
00022                 using ::uint8_t;
00023                 using ::uint16_t;
00024                 using ::int16_t;
00025                 using ::uint32_t;
00026                 using ::int32_t;
00027                 using ::uint64_t;
00028                 using ::int64_t;
00029         }
00030 
00031 
00032 #else 
00033         namespace booster { 
00034                 //
00035                 // Generally only for broken MSVC
00036                 // And guess
00037                 typedef unsigned char uint8_t;
00038                 typedef signed char int8_t;
00039                 typedef unsigned short uint16_t;
00040                 typedef short int16_t;
00041                 typedef unsigned int uint32_t;
00042                 typedef int int32_t;
00043                 typedef unsigned long long uint64_t;
00044                 typedef long long int64_t;
00045         }
00046 #endif
00047 
00048 #endif // BOOSTER_CSTDINT_H
00049