diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-11 13:22:57 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-11 13:22:57 +0000 |
commit | a69c2678a44d48eee979a3c7b15c5800435f6798 (patch) | |
tree | 1081ad70febc1782c1f9568f4c2a9a38e826a207 /gcc/vmsdbgout.c | |
parent | 67ced5abe9e1f57509d4d338bfff4290ab94cb16 (diff) | |
download | gcc-a69c2678a44d48eee979a3c7b15c5800435f6798.tar.gz |
* vmsdbgout.c (lookup_filename): Adjust creation date for GMT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50582 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/vmsdbgout.c')
-rw-r--r-- | gcc/vmsdbgout.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c index 15318ed14df..245875ce4dd 100644 --- a/gcc/vmsdbgout.c +++ b/gcc/vmsdbgout.c @@ -1455,15 +1455,26 @@ lookup_filename (file_name) if (stat (file_name, &statbuf) == 0) { - cdt = 10000000 * (statbuf.st_ctime + vms_epoch_offset); - ebk = statbuf.st_size / 512 + 1; - ffb = statbuf.st_size - ((statbuf.st_size / 512) * 512); + long gmtoff; #ifdef VMS + struct tm *ts; + + /* Adjust for GMT */ + ts = (struct tm *) localtime (&statbuf.st_ctime); + gmtoff = ts->tm_gmtoff; + + /* VMS has multiple file format types */ rfo = statbuf.st_fab_rfm; #else + /* Is GMT adjustment an issue with a cross-compiler? */ + gmtoff = 0; + /* Assume stream LF type file */ rfo = 2; #endif + cdt = 10000000 * (statbuf.st_ctime + gmtoff + vms_epoch_offset); + ebk = statbuf.st_size / 512 + 1; + ffb = statbuf.st_size - ((statbuf.st_size / 512) * 512); fnam = full_name (file_name); flen = strlen (fnam); } |