i got a question about the code being used in flake. when i tried to compile flake with Microsoft Visual C++, i noticed that flake uses data types such as int32_7 and uint63_t. i also read on the wikipedia about inttypes.h and found out that they have equivalents which are built in the C++ language itself.
so my question is, are there any main diffrences between, let's say, "int32_t" and "long"?
edit: reason that i'm asking is because the Platform SDK does not give an inttypes.h file.
The main difference has to do with 64-bit platforms. Rather than explain it, maybe a snippet from glibc's stdint.h (which is included by inttypes.h) would help. inttypes.h is part of the ISO C99 standard, which is the baseline standard used in Flake.
#ifndef __int8_t_defined
# define __int8_t_defined
typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
# if __WORDSIZE == 64
typedef long int int64_t;
# else
__extension__
typedef long long int int64_t;
# endif
#endif
/* Unsigned. */
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
#ifndef __uint32_t_defined
typedef unsigned int uint32_t;
# define __uint32_t_defined
#endif
#if __WORDSIZE == 64
typedef unsigned long int uint64_t;
#else
__extension__
typedef unsigned long long int uint64_t;
#endif
For MSVC, you can try adding this bit of code somewhere. I will add it myself in the near future...I've been meaning to, but just keep putting it off.
#if defined(_WIN32) && defined(_MSC_VER)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#endif
If you need me to explain more I can.
-Justin
edit: added the msvc stuff