source: libcf++/trunk/include/cf/types.h@ 4

Last change on this file since 4 was 4, checked in by cheese, 9 years ago

#1 commit prototype

File size: 1.0 KB
Line 
1/**
2 * @file types.h
3 * @author myusgun@gmail.com
4 * @brief common header
5 */
6#ifndef __types_h__
7#define __types_h__
8
9#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
10# define _ON_WINDOWS
11# define __func__ __FUNCTION__
12# define snprintf _snprintf
13#endif
14
15namespace cf
16{
17 typedef void void_t;
18 typedef char char_t;
19 typedef unsigned char uchar_t;
20 typedef signed char int8_t;
21 typedef uchar_t uint8_t;
22 typedef signed short int16_t;
23 typedef unsigned short uint16_t;
24 typedef signed int int32_t;
25 typedef unsigned int uint32_t;
26 typedef long long_t;
27 typedef unsigned long ulong_t;
28 typedef bool bool_t;
29#ifdef _ON_WINDOWS
30 typedef signed __int64 int64_t;
31 typedef unsigned __int64 uint64_t;
32#else
33 typedef signed long long int64_t;
34 typedef unsigned long long uint64_t;
35#endif
36
37#ifdef _ON_WINDOWS
38 typedef uint32_t size_t;
39# ifdef _WIN64
40 typedef uint64_t socket_t;
41# else
42 typedef uint32_t socket_t;
43# endif
44#else
45 typedef ulong_t size_t;
46 typedef int32_t socket_t;
47#endif
48};
49
50#endif // #ifndef __types_h__
Note: See TracBrowser for help on using the repository browser.