*** dir.c.orig Sat Feb 11 17:16:04 2006 --- dir.c Sun Jan 13 15:44:26 2008 *************** *** 19,24 **** --- 19,26 ---- #include "make.h" #include "hash.h" + #define DEV_UNRELIABLE 1 + #ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) *************** *** 234,239 **** --- 236,244 ---- ino_t ino[3]; #else ino_t ino; + #ifdef DEV_UNRELIABLE + int ctime; + #endif #endif #endif /* WINDOWS32 */ struct hash_table dirfiles; /* Files in this directory. */ *************** *** 327,336 **** result = MAKECMP(x->ino, y->ino); if (result) return result; # endif #endif /* WINDOWS32 */ ! return MAKECMP(x->dev, y->dev); } /* Table of directory contents hashed by device and inode number. */ --- 332,346 ---- result = MAKECMP(x->ino, y->ino); if (result) return result; + #ifdef DEV_UNRELIABLE + result = MAKECMP(x->ctime, y->ctime); + if (result) + return result; + #endif # endif #endif /* WINDOWS32 */ ! result = MAKECMP(x->dev, y->dev); } /* Table of directory contents hashed by device and inode number. */ *************** *** 501,506 **** --- 511,519 ---- dc_key.ino[2] = st.st_ino[2]; # else dc_key.ino = st.st_ino; + #ifdef DEV_UNRELIABLE + dc_key.ctime = st.st_ctime; + #endif # endif #endif dc_slot = (struct directory_contents **) hash_find_slot (&directory_contents, &dc_key); *************** *** 544,549 **** --- 557,565 ---- dc->ino[2] = st.st_ino[2]; # else dc->ino = st.st_ino; + #ifdef DEV_UNRELIABLE + dc->ctime = st.st_ctime; + #endif # endif #endif /* WINDOWS32 */ hash_insert_at (&directory_contents, dc, dc_slot);