Make this work with VC++
authorChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 19:01:49 +0000 (19:01 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 4 Jun 2004 19:01:49 +0000 (19:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14012 91177308-0d34-0410-b5e6-96231b3b80d8

include/Support/DataTypes.h.in
include/llvm/Support/DataTypes.h.in

index d01f8c2f2fa0e25a7658a70c3420dc5c6f898235..d2269b306fbfb1d72f1038fdc04eaf17d413a232 100644 (file)
 # error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
 #endif
 
+#ifndef _MSC_VER
 // Note that <inttypes.h> includes <stdint.h>, if this is a C99 system.
 @INCLUDE_INTTYPES_H@
 @INCLUDE_SYS_TYPES_H@
+#else
+// Visual C++ doesn't provide standard integer headers, but it does provide
+// built-in data types.
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#endif
 
 #if !defined(INT64_MAX)
 /* We couldn't determine INT64_MAX; default it. */
index d01f8c2f2fa0e25a7658a70c3420dc5c6f898235..d2269b306fbfb1d72f1038fdc04eaf17d413a232 100644 (file)
 # error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
 #endif
 
+#ifndef _MSC_VER
 // Note that <inttypes.h> includes <stdint.h>, if this is a C99 system.
 @INCLUDE_INTTYPES_H@
 @INCLUDE_SYS_TYPES_H@
+#else
+// Visual C++ doesn't provide standard integer headers, but it does provide
+// built-in data types.
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#endif
 
 #if !defined(INT64_MAX)
 /* We couldn't determine INT64_MAX; default it. */