Patchwork [v3] libstdc++/45613

login
register
mail settings
Submitter Paolo Carlini
Date Sept. 9, 2010, 11:24 a.m.
Message ID <4C88C3FB.6050409@oracle.com>
Download mbox | patch
Permalink /patch/64287/
State New
Headers show

Comments

Paolo Carlini - Sept. 9, 2010, 11:24 a.m.
Hi,

tested x86_64-linux, committed.

Paolo.

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

	PR libstdc++/45613
	* include/bits/random.tcc: Add missing include guards.
	* include/bits/random.h: Likewise.
	* include/tr1/random.tcc: Likewise.

Patch

Index: include/bits/random.tcc
===================================================================
--- include/bits/random.tcc	(revision 164072)
+++ include/bits/random.tcc	(working copy)
@@ -27,6 +27,9 @@ 
  *  You should not attempt to use it directly.
  */
 
+#ifndef _RANDOM_TCC
+#define _RANDOM_TCC 1
+
 #include <numeric> // std::accumulate and std::partial_sum
 
 namespace std
@@ -2815,3 +2818,5 @@ 
       return __sum / __tmp;
     }
 }
+
+#endif
Index: include/bits/random.h
===================================================================
--- include/bits/random.h	(revision 164072)
+++ include/bits/random.h	(working copy)
@@ -28,6 +28,9 @@ 
  *  You should not attempt to use it directly.
  */
 
+#ifndef _RANDOM_H
+#define _RANDOM_H 1
+
 #include <vector>
 
 namespace std
@@ -5337,6 +5340,6 @@ 
   /* @} */ // group random_utilities
 
   /* @} */ // group random
-
 }
 
+#endif
Index: include/tr1/random.tcc
===================================================================
--- include/tr1/random.tcc	(revision 164072)
+++ include/tr1/random.tcc	(working copy)
@@ -28,6 +28,9 @@ 
  *  You should not attempt to use it directly.
  */
 
+#ifndef _GLIBCXX_TR1_RANDOM_TCC
+#define _GLIBCXX_TR1_RANDOM_TCC 1
+
 namespace std
 {
 namespace tr1
@@ -1708,3 +1711,5 @@ 
     }
 }
 }
+
+#endif