bugmake - Bugs: bug #32484, FILE_TIMESTAMP_HI_RES is not...

 
 

bug #32484: FILE_TIMESTAMP_HI_RES is not properly set on AIX

Submitted by:  Olexiy Buyanskyy <olexiyb>
Submitted on:  Tue 15 Feb 2011 03:32:07 AM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 15 Feb 2011 10:34:59 PM UTC, comment #2:

Duplicate of bug #32485

Paul D. Smith <psmith>
Project Administrator
Tue 15 Feb 2011 10:27:11 PM UTC, comment #1:

please close this task it's duplicate of bug 32485

Olexiy Buyanskyy <olexiyb>
Tue 15 Feb 2011 03:32:07 AM UTC, original submission:

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

Olexiy Buyanskyy <olexiyb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by olexiyb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Feb 2011 10:34:59 PM UTCpsmithStatusNone=>Duplicate
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1