diff options
-rw-r--r-- | src/util/profile/ChangeLog | 7 | ||||
-rw-r--r-- | src/util/profile/prof_file.c | 6 | ||||
-rw-r--r-- | src/util/profile/prof_int.h | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index cab07d02b9..cbb95706e7 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,10 @@ +2005-10-21 Ken Raeburn <raeburn@mit.edu> + + * prof_file.c (profile_update_file_data): Drop test of + STAT_ONCE_PER_SECOND, just do it always. + * prof_int.h (stuct _prf_data_t): Likewise. + (STAT_ONCE_PER_SECOND): Don't define. + 2005-08-20 Ken Raeburn <raeburn@mit.edu> * configure.in: Use K5_AC_INIT instead of AC_INIT. diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index f31347c374..265ccd6cf9 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -304,10 +304,8 @@ errcode_t profile_update_file_data(prf_data_t data) #ifdef HAVE_STAT struct stat st; unsigned long frac; -#ifdef STAT_ONCE_PER_SECOND time_t now; #endif -#endif FILE *f; retval = k5_mutex_lock(&data->lock); @@ -315,21 +313,17 @@ errcode_t profile_update_file_data(prf_data_t data) return retval; #ifdef HAVE_STAT -#ifdef STAT_ONCE_PER_SECOND now = time(0); if (now == data->last_stat && data->root != NULL) { k5_mutex_unlock(&data->lock); return 0; } -#endif if (stat(data->filespec, &st)) { retval = errno; k5_mutex_unlock(&data->lock); return retval; } -#ifdef STAT_ONCE_PER_SECOND data->last_stat = now; -#endif #if defined HAVE_STRUCT_STAT_ST_MTIMENSEC frac = st.st_mtimensec; #elif defined HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC diff --git a/src/util/profile/prof_int.h b/src/util/profile/prof_int.h index 1a56a3f30b..3ff2b0f516 100644 --- a/src/util/profile/prof_int.h +++ b/src/util/profile/prof_int.h @@ -15,8 +15,6 @@ #include "com_err.h" #include "profile.h" -#define STAT_ONCE_PER_SECOND - #if defined(_WIN32) #define SIZEOF_INT 4 #define SIZEOF_SHORT 2 @@ -38,9 +36,7 @@ struct _prf_data_t { prf_magic_t magic; k5_mutex_t lock; struct profile_node *root; -#ifdef STAT_ONCE_PER_SECOND time_t last_stat; -#endif time_t timestamp; /* time tree was last updated from file */ unsigned long frac_ts; /* fractional part of timestamp, if any */ int flags; /* r/w, dirty */ |