[libFuzzer] Update tests to use more general functions instead of posix specific.

Replace sleep() posix function by a more portable sleep_for() function
from std. Also, ignore memmem() and strcasestr() on Windows.

Differential Revision: https://reviews.llvm.org/D27729

llvm-svn: 289964
diff --git a/llvm/lib/Fuzzer/test/OutOfMemoryTest.cpp b/llvm/lib/Fuzzer/test/OutOfMemoryTest.cpp
index e5c9f0a..18949c7 100644
--- a/llvm/lib/Fuzzer/test/OutOfMemoryTest.cpp
+++ b/llvm/lib/Fuzzer/test/OutOfMemoryTest.cpp
@@ -8,6 +8,7 @@
 #include <cstddef>
 #include <cstring>
 #include <iostream>
+#include <thread>
 #include <unistd.h>
 
 static volatile char *SinkPtr;
@@ -21,7 +22,7 @@
           char *p = new char[kSize];
           memset(p, 0, kSize);
           SinkPtr = p;
-          sleep(1);
+          std::this_thread::sleep_for(std::chrono::seconds(1));
         }
       }
     }