Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

bitcompat.h

Go to the documentation of this file.
00001 #ifdef __WIN32__
00002 # ifndef _WIN32
00003 #  define _WIN32 1
00004 # endif
00005 #endif
00006 
00007 #if defined(_WIN32) && !defined(__GNUC__)
00008 // Windows 32 e 64
00009 typedef signed   char  int8_t;
00010 typedef unsigned char uint8_t;
00011 typedef          short int  int16_t;
00012 typedef unsigned short int uint16_t;
00013 typedef          int  int32_t;
00014 typedef unsigned int uint32_t;
00015 
00016 // fast types
00017 typedef signed   char   int_fast8_t;
00018 typedef          int   int_fast16_t;
00019 typedef          int   int_fast32_t;
00020 typedef unsigned char  uint_fast8_t;
00021 typedef unsigned int  uint_fast16_t;
00022 typedef unsigned int  uint_fast32_t;
00023 
00024 # ifdef _WIN64
00025 // Windows 64
00026 // - 64 bit
00027 typedef          __int64  int64_t;
00028 typedef unsigned __int64 uint64_t;
00029 // - big architectured
00030 typedef  int64_t  int3264_t;
00031 typedef uint64_t uint3264_t;
00032 // - void* to int types
00033 #  ifndef intptr_t
00034 typedef __int64 intptr_t;
00035 #  endif
00036 typedef unsigned __int64 uintptr_t;
00037 # else
00038 // Windows 32
00039 // - 64 bit
00040 #  ifndef __BORLANDC__
00041 // assume microsoft
00042 typedef          __int64  int64_t;
00043 typedef unsigned __int64 uint64_t;
00044 #  endif
00045 # endif
00046 // - big architectured
00047 typedef          int  int3264_t;
00048 typedef unsigned int uint3264_t;
00049 // - void* to int types
00050 #  ifndef intptr_t
00051 typedef int intptr_t;
00052 #  endif
00053 typedef unsigned int uintptr_t;
00054 #endif
00055 
00056 #if defined(_WIN32) && defined(__GNUC__)
00057 # ifndef __MINGW32__
00058 #  include <sys/types.h>
00059 typedef u_int32_t uint32_t;
00060 typedef u_int8_t  uint8_t;
00061 typedef u_int16_t uint16_t;
00062 typedef uint16_t uint_fast16_t;
00063 # else
00064 #  include <stdint.h>
00065 # endif
00066 #endif
00067 
00068 #ifndef _Windows
00069 #ifndef _WIN32
00070 // assume UNIX
00071 #include <inttypes.h>
00072 typedef          long  int3264_t;
00073 typedef unsigned long uint3264_t;
00074 #endif
00075 #endif
00076 
00077 // !!! mancano costanti
00078 // !!! mancano tipi per printf
00079 
00080 // disabilita tipi pericolosi
00081 #define DWORD __@undefined@__
00082 #define INT   __@undefined@__
00083 #define UINT  __@undefined@__
00084 #define LONG  __@undefined@__
00085 #define ULONG __@undefined@__
00086 //#define long  __@undefined@__
00087 
00088 #ifndef BYTEORDER
00089 #  if defined(_WIN32) && defined(_M_IX86)
00090 #    define BYTEORDER 1234
00091 #  endif
00092 #  if defined(__GNUC__) && defined(__i386__)
00093 #    define BYTEORDER 1234
00094 #  endif
00095 #endif

Generated on Mon Jan 13 22:20:33 2003 for perdr by doxygen1.2.15