dovecot: Use CMP_ST_MTIME() instead of #ifdefing nanoseconds our...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 20 01:56:47 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/92bc0a7580f6
changeset: 5783:92bc0a7580f6
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 20 01:08:13 2007 +0300
description:
Use CMP_ST_MTIME() instead of #ifdefing nanoseconds ourself.

diffstat:

1 file changed, 1 insertion(+), 7 deletions(-)
src/lib-storage/index/mbox/mbox-sync.c |    8 +-------

diffs (18 lines):

diff -r 2e6a977b1d6a -r 92bc0a7580f6 src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c	Wed Jun 20 01:07:30 2007 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Wed Jun 20 01:08:13 2007 +0300
@@ -104,13 +104,7 @@ void mbox_sync_file_update_ext_modified(
 
 	if (st.st_size != sync_ctx->last_stat.st_size ||
 	    (sync_ctx->last_stat.st_mtime != 0 &&
-	     (st.st_mtime != sync_ctx->last_stat.st_mtime
-#ifdef HAVE_STAT_TV_NSEC
-	      /* nanoseconds give better precision to this check if they're
-		 supported by the OS */
-	      || st.st_mtim.tv_nsec != sync_ctx->last_stat.st_mtim.tv_nsec
-#endif
-	     )))
+	     !CMP_ST_MTIME(&st, &sync_ctx->last_stat)))
 		sync_ctx->ext_modified = TRUE;
 
 	sync_ctx->last_stat = st;


More information about the dovecot-cvs mailing list