add regex REG_ICASE test for austingroupbug #872
[libc-test] / src / functional / fdopen.c
index 1f4da03..88f7561 100644 (file)
@@ -1,6 +1,3 @@
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 700
-#endif
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -11,7 +8,7 @@
 #define TEST(c) do { \
        errno = 0; \
        if (!(c)) \
-               error("%s failed (errno = %d)\n", #c, errno); \
+               t_error("%s failed (errno = %d)\n", #c, errno); \
 } while(0)
 
 int main(void)
@@ -29,10 +26,10 @@ int main(void)
                TEST(fseeko(f, 0, SEEK_SET)==0);
                TEST(fgets(foo, sizeof foo, f));
                if (strcmp(foo,"hello") != 0)
-                       error("fgets read back: \"%s\"; wanted: \"hello\"\n", foo);
+                       t_error("fgets read back: \"%s\"; wanted: \"hello\"\n", foo);
                fclose(f);
        }
        if (fd > 2)
                TEST(unlink(tmp) != -1);
-       return test_status;
+       return t_status;
 }