From patchwork Thu Sep 9 11:24:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v3] libstdc++/45613 Date: Thu, 09 Sep 2010 01:24:43 -0000 From: Paolo Carlini X-Patchwork-Id: 64287 Message-Id: <4C88C3FB.6050409@oracle.com> To: "gcc-patches@gcc.gnu.org" Cc: libstdc++ Hi, tested x86_64-linux, committed. Paolo. ///////////// 2010-09-09 Paolo Carlini PR libstdc++/45613 * include/bits/random.tcc: Add missing include guards. * include/bits/random.h: Likewise. * include/tr1/random.tcc: Likewise. 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 // 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 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