tests: add fstatat64.test and newfstatat.test

* configure.ac (AC_CHECK_FUNCS): Add fstatat, ftruncate, and futimens.
* tests/fstatat.c: New file.
* tests/fstatat64.c: Likewise.
* tests/newfstatat.c: Likewise.
* tests/fstatat64.test: New test.
* tests/newfstatat.test: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add fstatat64 and newfstatat.
(fstatat64_CFLAGS, newstatat_CFLAGS): Define.
(TESTS): Add fstatat64.test and newfstatat.test.
(EXTRA_DIST): Add fstatat.c.
* tests/.gitignore: Add fstatat64 and newfstatat.
diff --git a/tests/newfstatat.c b/tests/newfstatat.c
new file mode 100644
index 0000000..2f45402
--- /dev/null
+++ b/tests/newfstatat.c
@@ -0,0 +1,12 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <sys/syscall.h>
+
+#undef FSTATAT_NAME
+#ifdef __NR_newfstatat
+# define FSTATAT_NAME "newfstatat"
+#endif
+
+#include "fstatat.c"