Patchwork [v3] Add missing include checks to ext/random

login
register
mail settings
Submitter Paolo Carlini
Date Sept. 27, 2012, 1:05 a.m.
Message ID <5063A66D.5090907@oracle.com>
Download mbox | patch
Permalink /patch/187251/
State New
Headers show

Comments

Paolo Carlini - Sept. 27, 2012, 1:05 a.m.
Hi,

tested x86_64-linux, committed.

Thanks,
Paolo.

/////////////////////
2012-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/random: Add include checks for c++11 and <cstdint>.

Patch

Index: include/ext/random
===================================================================
--- include/ext/random	(revision 191781)
+++ include/ext/random	(working copy)
@@ -31,12 +31,17 @@ 
 
 #pragma GCC system_header
 
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <bits/c++0x_warning.h>
+#else
+
 #include <random>
 #include <array>
 #ifdef __SSE2__
 # include <x86intrin.h>
 #endif
 
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
 
 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
 {
@@ -1846,4 +1851,8 @@ 
 #include "opt_random.h"
 #include "random.tcc"
 
-#endif /* _EXT_RANDOM */
+#endif // _GLIBCXX_USE_C99_STDINT_TR1
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _EXT_RANDOM