Adjust test for absence mempcpy in Windows.
@@ -15,54 +15,37 @@ extern int memcmp(const void*, const void*, size_t);
extern int strcmp (const char *, const char *);
extern int strncmp (const char *, const char *, size_t);
-
-void test1 (void *ptr)
-{
- if (memcpy(ptr,ptr,8) != ptr)
- abort ();
+void test1 (void *ptr) {
+ if (memcpy (ptr, ptr, 8) != ptr) abort ();
}
-void test2 (char *ptr)
-{
-#ifndef __APPLE__
- if (mempcpy(ptr,ptr,8) != ptr+8)
- abort ();
+void test2 (char *ptr) {
+#if !defined(__APPLE__) && !defined(_WIN32)
+ if (mempcpy (ptr, ptr, 8) != ptr + 8) abort ();
#endif
}
-void test3 (void *ptr)
-{
- if (memmove(ptr,ptr,8) != ptr)
- abort ();
+void test3 (void *ptr) {
+ if (memmove (ptr, ptr, 8) != ptr) abort ();
}
-void test4 (char *ptr)
-{
- if (strcpy(ptr,ptr) != ptr)
- abort ();
+void test4 (char *ptr) {
+ if (strcpy (ptr, ptr) != ptr) abort ();
}
-void test5 (void *ptr)
-{
- if (memcmp(ptr,ptr,8) != 0)
- abort ();
+void test5 (void *ptr) {
+ if (memcmp (ptr, ptr, 8) != 0) abort ();
}
-void test6 (const char *ptr)
-{
- if (strcmp(ptr,ptr) != 0)
- abort ();
+void test6 (const char *ptr) {
+ if (strcmp (ptr, ptr) != 0) abort ();
}
-void test7 (const char *ptr)
-{
- if (strncmp(ptr,ptr,8) != 0)
- abort ();
+void test7 (const char *ptr) {
+ if (strncmp (ptr, ptr, 8) != 0) abort ();
}
-
-int main ()
-{
+int main () {
char buf[10];
test1 (buf);
@@ -75,4 +58,3 @@ int main ()
return 0;
}
-
