X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ffunctional%2Ffdopen.c;h=88f7561d0cd882be96e3b9297fb4a47f5e165826;hb=05b75aa5eb2a9908495c341300a2acc19e9eaf4b;hp=1f4da03458df2dd0265178565fdf8226b512ee44;hpb=2cf89517c5b25c2524fe0c0c01ed277d7307a852;p=libc-test diff --git a/src/functional/fdopen.c b/src/functional/fdopen.c index 1f4da03..88f7561 100644 --- a/src/functional/fdopen.c +++ b/src/functional/fdopen.c @@ -1,6 +1,3 @@ -#ifndef _XOPEN_SOURCE -#define _XOPEN_SOURCE 700 -#endif #include #include #include @@ -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; }