PR libstdc++/88066 use <> for includes not ""
authorJonathan Wakely <jwakely@redhat.com>
Tue, 8 Jan 2019 13:25:19 +0000 (13:25 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 8 Jan 2019 13:25:19 +0000 (13:25 +0000)
Using #include "..." to include a header in the same directory fails if
the user compiles with -I-, so always use something like <bits/...> for
internal headers.

I haven't added tests for this, because dg-options adds options to the
end, and the position of -I- matters (if it's at the end then the tests
won't find any headers in the build tree, as they're specified by -I
options earlier in the flags). It's been manually tested though.

PR libstdc++/88066
* include/bits/locale_conv.h: Use <> for includes not "".
* include/ext/random: Likewise.
* include/ext/vstring.h: Likewise.

From-SVN: r267726

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_conv.h
libstdc++-v3/include/ext/random
libstdc++-v3/include/ext/vstring.h

index 84fb8d7d0457ef9b6c591c14af04c94cc0a723fa..3adec7cc818b2c3a7a0c6861799c49e3ef991265 100644 (file)
@@ -1,3 +1,10 @@
+2019-01-08  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/88066
+       * include/bits/locale_conv.h: Use <> for includes not "".
+       * include/ext/random: Likewise.
+       * include/ext/vstring.h: Likewise.
+
 2019-01-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
index 3dffdc4d1b17c481db7fa04b50154f3107032fc0..8438fedb5161bdf134973c420aae082a23d1904a 100644 (file)
 #else
 
 #include <streambuf>
-#include "stringfwd.h"
-#include "allocator.h"
-#include "codecvt.h"
-#include "unique_ptr.h"
+#include <bits/stringfwd.h>
+#include <bits/allocator.h>
+#include <bits/codecvt.h>
+#include <bits/unique_ptr.h>
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
index 91c5a296a795c0487c40a1036cb803af1f33f117..41a2962c8f6e5de9bd5a90e960ba2c8822c364ff 100644 (file)
@@ -3857,8 +3857,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace __gnu_cxx
 
-#include "ext/opt_random.h"
-#include "random.tcc"
+#include <ext/opt_random.h>
+#include <ext/random.tcc>
 
 #endif // _GLIBCXX_USE_C99_STDINT_TR1 && UINT32_C
 
index d83ba02fc1a6af8ee0a6138b5f8787ebde514ffc..ddffebf089392c5574d620b1853151d2e57d2076 100644 (file)
@@ -2960,6 +2960,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
 
 #endif // C++11
 
-#include "vstring.tcc" 
+#include <ext/vstring.tcc>
 
 #endif /* _VSTRING_H */