[PATCH] D21553: Do not require __STDC_LIMIT_MACROS and others

Paweł Bylica via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 04:06:42 PDT 2016


chfast updated this revision to Diff 61529.
chfast added a comment.

Leave defines config as it was before.


http://reviews.llvm.org/D21553

Files:
  include/llvm/Support/DataTypes.h.cmake

Index: include/llvm/Support/DataTypes.h.cmake
===================================================================
--- include/llvm/Support/DataTypes.h.cmake
+++ include/llvm/Support/DataTypes.h.cmake
@@ -55,17 +55,14 @@
 
 #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 we
-   define it here, we define it on the g++ command line (in Makefile.rules). */
-#if !defined(__STDC_LIMIT_MACROS)
-# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
+#if !defined(UINT32_MAX)
+# error "The standard header <cstdint> is not C++11 compliant. Must #define "\
+        "__STDC_LIMIT_MACROS before #including Support/DataTypes.h"
 #endif
 
-#if !defined(__STDC_CONSTANT_MACROS)
-# error "Must #define __STDC_CONSTANT_MACROS before " \
-        "#including Support/DataTypes.h"
+#if !defined(UINT32_C)
+# error "The standard header <cstdint> is not C++11 compliant. Must #define "\
+        "__STDC_CONSTANT_MACROS before #including Support/DataTypes.h"
 #endif
 
 /* Note that <inttypes.h> includes <stdint.h>, if this is a C99 system. */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21553.61529.patch
Type: text/x-patch
Size: 1261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160622/d0f4dd75/attachment.bin>


More information about the llvm-commits mailing list