defining __STDC_LIMIT_MACROS on the command line is not really necessary
authorChris Lattner <sabre@nondot.org>
Wed, 3 Nov 2004 17:15:45 +0000 (17:15 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 3 Nov 2004 17:15:45 +0000 (17:15 +0000)
for Visual Studio, and is a bit of a pain when you want to include the
LLVM headers from your own project, so I moved the check a bit down into
the Unix case to avoid the hassle... Here is a patch

Patch by Morten Ofstad!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17450 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/DataTypes.h.in

index 4fc2d079ae44c8a0b1fb1b6c70ff14eab544a0c7..d5d1fc697afe43b93e56a3626541640dacbd3c01 100644 (file)
 
 #include "llvm/Config/config.h"
 
+#undef HAVE_SYS_TYPES_H
+#undef HAVE_INTTYPES_H
+#undef HAVE_STDINT_H
+
+#ifndef _MSC_VER
+
 // Note that this header's correct operation depends on __STDC_LIMIT_MACROS
 // being defined.  We would define it here, but in order to prevent Bad Things
 // happening when system headers or C++ STL headers include stdint.h before
 # error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
 #endif
 
-#undef HAVE_SYS_TYPES_H
-#undef HAVE_INTTYPES_H
-#undef HAVE_STDINT_H
-
-#ifndef _MSC_VER
 // Note that <inttypes.h> includes <stdint.h>, if this is a C99 system.
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>