11 #ifndef CAL_PLATFORM_H
12 #define CAL_PLATFORM_H
18 #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
19 #pragma warning(disable : 4251)
20 #pragma warning(disable : 4786)
23 #if !defined(_WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
24 #define stricmp strcasecmp
27 #if defined(_MSC_VER) && _MSC_VER <= 1200
35 #if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
39 #define CAL3D_API __declspec(dllexport)
41 #define CAL3D_API __declspec(dllimport)
55 #if defined(__i386__) || \
56 defined(__ia64__) || \
58 defined(__alpha__) || defined(__alpha) || \
60 (defined(__mips__) && defined(__MIPSEL__)) || \
61 defined(__SYMBIAN32__) || \
62 defined(__x86_64__) || \
63 defined(__LITTLE_ENDIAN__)
65 #define CAL3D_LITTLE_ENDIAN
69 #define CAL3D_BIG_ENDIAN
110 static bool readBytes(std::istream& input,
void *pBuffer,
int length);
111 static bool readFloat(std::istream& input,
float& value);
112 static bool readInteger(std::istream& input,
int& value);
113 static bool readString(std::istream& input, std::string& strValue);
115 static bool readBytes(
char* input,
void *pBuffer,
int length);
116 static bool readFloat(
char* input,
float& value);
117 static bool readInteger(
char* input,
int& value);
118 static bool readString(
char* input, std::string& strValue);
120 static bool writeBytes(std::ostream& output,
const void *pBuffer,
int length);
121 static bool writeFloat(std::ostream& output,
float value);
122 static bool writeInteger(std::ostream& output,
int value);
123 static bool writeString(std::ostream& output,
const std::string& strValue);