[PATCH] D56503: [libcxx] Portability fix: add missing includes.

Andrey Maksimov via Phabricator reviews at reviews.llvm.org
Wed Jan 9 10:22:55 PST 2019


amakc11 created this revision.
Herald added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, ldionne.

Some tests use `strcmp()` function, but do not include the `string.h` header directly. As a result, such tests do not compile under some conformant implementations. This patch adds the mentioned header file to such tests.


Repository:
  rCXX libc++

https://reviews.llvm.org/D56503

Files:
  test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp
  test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp


Index: test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp
===================================================================
--- test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp
+++ test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.put/xsputn.pass.cpp
@@ -16,6 +16,7 @@
 
 #include <streambuf>
 #include <cassert>
+#include <string.h>
 
 struct test
     : public std::basic_streambuf<char>
Index: test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp
===================================================================
--- test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp
+++ test/std/input.output/stream.buffers/streambuf/streambuf.virtuals/streambuf.virt.get/xsgetn.pass.cpp
@@ -16,6 +16,7 @@
 
 #include <streambuf>
 #include <cassert>
+#include <string.h>
 
 struct test
     : public std::basic_streambuf<char>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56503.180872.patch
Type: text/x-patch
Size: 1050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190109/7a70d4b3/attachment.bin>


More information about the libcxx-commits mailing list