summaryrefslogtreecommitdiff
path: root/posix/gawkmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/gawkmisc.c')
-rw-r--r--posix/gawkmisc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c
index 08551da5..7fb5f1ef 100644
--- a/posix/gawkmisc.c
+++ b/posix/gawkmisc.c
@@ -222,6 +222,14 @@ int fd;
/* no-op */
return;
}
+
+/* files_are_same --- return true if files are identical */
+
+int
+files_are_same(struct stat *f1, struct stat *f2)
+{
+ return (f1->st_dev == f2->st_dev && f1->st_ino == f2->st_ino);
+}
#ifdef __CYGWIN__
#include <stdio.h>