URL: <http://savannah.gnu.org/bugs/?32484>
Summary: FILE_TIMESTAMP_HI_RES is not properly set on AIX Project: make Submitted by: olexiyb Submitted on: Tue 15 Feb 2011 03:32:07 AM GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.81 Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: This is kind of follow up of http://www.mail-archive.com/bug-make@gnu.org/msg02239.html I think this is true bug in make for AIX. IBM has support of nanoseconds https://www-304.ibm.com/support/docview.wss?uid=isg3T1012054 it's kept in st_mtime_n. As a proof I wrote small program #include <limits.h> #include <errno.h> #include <stdio.h> #include <sys/stat.h> int main(int argc, char **argv) { char resolved_path[PATH_MAX]; if (argc != 2) { printf("Usage: modtime <path>\n"); return 1; } else { struct stat fstat = {0}; if (stat(argv[1], &fstat) == 0) { printf("Mod time=[%d] [%d]\n", fstat.st_mtime, fstat.st_mtime_n); return 0; } if (errno) { fprintf(stderr, "modtime: %s: %s\n", argv[1], strerror(errno)); return errno; } } return 255; } and run 10 times > for i in 1 2 3 4 5 6 7 8 9;do modtime GNUmakefile;touch GNUmakefile;done Mod time=[1297728298] [440567462] Mod time=[1297728301] [911431115] Mod time=[1297728301] [916699492] Mod time=[1297728301] [921435220] Mod time=[1297728301] [931440190] Mod time=[1297728301] [936699695] Mod time=[1297728301] [941444402] Mod time=[1297728301] [951448241] Mod time=[1297728301] [957170600] As you can see st_mtime stayed the same, but nano seconds were changed. In order to fix this we need to do proper check of FILE_TIMESTAMP_HI_RES on aix system in configure and modify filedef.h #if FILE_TIMESTAMP_HI_RES #if defined(__IBMCPP__) || defined(_AIX) || defined(_AIX_) # define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \ file_timestamp_cons (fname, (st).st_mtime, (st).st_mtime_n) #else # define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \ file_timestamp_cons (fname, (st).st_mtime, (st).st_mtim.ST_MTIM_NSEC) #endif #else # define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \ file_timestamp_cons (fname, (st).st_mtime, 0) #endif _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?32484> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make