Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
dlight/utils.c
Henrik Hautakoski c1b99a9e7e Adding utils.c.
2013-02-08 21:54:54 +01:00

13 lines
229 B
C

#include <sys/stat.h>
#include "utils.h"
int file_cmp(const char *a, const char *b) {
struct stat sa, sb;
if (stat(a, &sa) < 0 || stat(b, &sb) < 0)
return 0;
return sa.st_dev == sb.st_dev &&
sa.st_ino == sb.st_ino;
}