X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-stat.c;h=b59dbf44c70369104c9a44bc01f8f3929b627aa2;hb=23eecb48e39afd0d267d64d40ba6bf97aa865e13;hp=f6777e8415b5afef35e0648fee780e38ed3dc59a;hpb=3a5041b1c62c2b7c829f47bec2f1789c59844b6c;p=gnulib.git diff --git a/tests/test-stat.c b/tests/test-stat.c index f6777e841..b59dbf44c 100644 --- a/tests/test-stat.c +++ b/tests/test-stat.c @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,26 +20,21 @@ #include +/* Caution: stat may be a function-like macro. Although this + signature check must pass, it may be the signature of the real (and + broken) stat rather than rpl_stat. Most code should not use the + address of stat. */ +#include "signature.h" +SIGNATURE_CHECK (stat, int, (char const *, struct stat *)); + #include #include +#include #include -#include #include -#include "pathmax.h" #include "same-inode.h" - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" #define BASE "test-stat.t" @@ -54,7 +49,7 @@ do_stat (char const *name, struct stat *st) } int -main () +main (void) { - return test_stat_func (do_stat); + return test_stat_func (do_stat, true); }