[PATCH] D21553: Do not require __STDC_LIMIT_MACROS and others

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


This revision was automatically updated to reflect the committed changes.
Closed by commit rL273493: Do not require __STDC_LIMIT_MACROS and others (authored by chfast).

Changed prior to commit:
  http://reviews.llvm.org/D21553?vs=61529&id=61608#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D21553

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

Index: llvm/trunk/include/llvm/Support/DataTypes.h.cmake
===================================================================
--- llvm/trunk/include/llvm/Support/DataTypes.h.cmake
+++ llvm/trunk/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.61608.patch
Type: text/x-patch
Size: 1294 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160622/a8e9dc48/attachment.bin>


More information about the llvm-commits mailing list