add _DEFAULT_SOURCE wherever _BSD_SOURCE was used
[libc-test] / src / functional / string.c
index 5d5d43c..682a1c7 100644 (file)
@@ -1,4 +1,5 @@
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE 1
+#define _BSD_SOURCE 1
 #include <stdio.h>
 #include <string.h>
 #include "test.h"
@@ -78,7 +79,6 @@ int main(void)
        TEST(s, strtok(NULL, " ;"), b+16, "%p != %p");
        TEST_S(s, "foo", "strtok result");
 
-#ifdef HAVE_BSD_STRL
        memset(b, 'x', sizeof b);
        TEST(i, strlcpy(b, "abc", sizeof b - 1), 3, "length %d != %d");
        TEST(i, b[3], 0, "strlcpy did not null-terminate short string (%d)");
@@ -111,6 +111,6 @@ int main(void)
        memcpy(b, "abc\0\0\0x\0", 8);
        TEST(i, strlcat(b, "123", 3), 6, "length %d != %d");
        TEST_S(b, "abc", "strlcat result");
-#endif
+
        return t_status;
 }