summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/vmsdbgout.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-09 20:02:13 +0000
committerobrien <obrien@FreeBSD.org>2002-05-09 20:02:13 +0000
commitc8f5fc7032940ad6633f932ac40cade82ec4d0cc (patch)
tree29a0f0a6c79a69ecc64f612947a0fe5904311713 /contrib/gcc/vmsdbgout.c
parentc9ab9ae440a8066b2c2b85b157b1fdadcf09916a (diff)
downloadFreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.zip
FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.tar.gz
Gcc 3.1.0 pre-release from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT.
Diffstat (limited to 'contrib/gcc/vmsdbgout.c')
-rw-r--r--contrib/gcc/vmsdbgout.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/contrib/gcc/vmsdbgout.c b/contrib/gcc/vmsdbgout.c
index 8b19775..7332389 100644
--- a/contrib/gcc/vmsdbgout.c
+++ b/contrib/gcc/vmsdbgout.c
@@ -1458,15 +1458,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);
}
@@ -1639,7 +1650,7 @@ vmsdbgout_init (main_input_filename)
module_producer
= (char *) xmalloc (strlen (language_string) + 1
- + strlen (version_string + 1));
+ + strlen (version_string) + 1);
sprintf (module_producer, "%s %s", language_string, version_string);
ASM_GENERATE_INTERNAL_LABEL (text_end_label, TEXT_END_LABEL, 0);
OpenPOWER on IntegriCloud