Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)

From: Chris Lattner <sabre@nondot.org>
Date: Wed, 14 Jul 2004 14:49:01 -0500 (CDT)

The file you need to modify is here:
llvm/include/Support/DataTypes.h.in

There is currently support for building in non-cygwin windows environments
protected by _MSC_VER. You just need to broaden the scope of the #ifndef
to include internix.

Sorry, Chris, but my DataTypes.h.in doesn't seem to be that advanced (due to I'm porting LLVM 1.2). But, when I get one (nearby LLVM 1.3), I'll try to broaden the scope, when I know how to modify .in configuration files.

However, I've found that the min and max values for integral data types, for Interix 3.5 are defined in the system header file: '/usr/include/limits.h':

--- /usr/include/limits.h ---------------------
...
#define SCHAR_MIN (-128) /* min value for a signed char */
#define SCHAR_MAX 127 /* max value for a signed char */
#define UCHAR_MAX 0xff /* max value for a unsigned char */

#if defined(_CHAR_UNSIGNED) || defined(__CHAR_UNSIGNED__)
#define CHAR_MIN 0
#define CHAR_MAX UCHAR_MAX
#else
#define CHAR_MIN SCHAR_MIN /* mim value for a char */
#define CHAR_MAX SCHAR_MAX /* max value for a char */
#endif /* _CHAR_UNSIGNED */

#define SHRT_MIN (-32768) /* min value for (signed) short */
#define SHRT_MAX 32767 /* max value for (signed) short */
#define USHRT_MAX 0xffff /* max value for unsigned short */

#define INT_MIN (-2147483647-1) /* min value for (signed) int */
#define INT_MAX 2147483647 /* max value for (signed) int */
#define UINT_MAX 0xffffffff /* max value for unsigned int */

#define LONG_MIN (-2147483647L-1) /* minimum (signed) long */
#define LONG_MAX 2147483647L /* maximum (signed) long */
#define ULONG_MAX 0xffffffffUL /* maximum unsigned long */

#if defined(_ALL_SOURCE) \
  >> (__STDC__ - 0 == 0) && !defined(_POSIX_C_SOURCE) \
             && !defined(_XOPEN_SOURCE)
/*
* Minimum and maximum values for 64-bit types
* Define all the various well-known flavors of symbols