diff options
author | 2004-12-09 10:21:45 -0700 | |
---|---|---|
committer | 2005-04-07 21:05:45 -0700 | |
commit | fd46a87b9e1d032863c41f54009e5e6386862f8b (patch) | |
tree | d9eb25525e6fa4f8fe4f0e7b9ed6a83c8572b23f /compat.h | |
parent | Make "last_reg" be entry-point global rather than bb-global. (diff) | |
download | sparse-fd46a87b9e1d032863c41f54009e5e6386862f8b.tar.gz sparse-fd46a87b9e1d032863c41f54009e5e6386862f8b.tar.bz2 sparse-fd46a87b9e1d032863c41f54009e5e6386862f8b.zip |
Remove stat-based file identity tests.
Replace it with a simple pathname comparison instead.
The pathname check is not only portable (no need for any
compatibility helper functions), but we can do it much
earlier, and thus make the check much cheaper by avoiding
three extra system calls when it triggers (open/fstat/close).
And the pathname test seems to match all the cases anyway.
Diffstat (limited to 'compat.h')
-rw-r--r-- | compat.h | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -9,8 +9,6 @@ * Missing in mingw * - "string to long double" (C99 strtold()) * Missing in Solaris and mingw - * - checking for file identity (POSIX st_dev && st_ino comparison) - * mingw needs to check the name (st_dev/st_ino are zero) */ struct stream; struct stat; @@ -26,6 +24,5 @@ struct stat; void *blob_alloc(unsigned long size); void blob_free(void *addr, unsigned long size); long double string_to_ld(const char *nptr, char **endptr); -int identical_files(struct stream* s, struct stat *st, const char * name); #endif |