summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-10 01:28:03 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-10 01:28:03 +0000
commita30adbdf77f957436865d2d88c0ed46ed2bc9246 (patch)
tree842cc6a6f8f9e704fe43acbb3e6082b5dff21624 /gcc/tree.c
parent91b931f99911a9111788d681600e0b9efa7f9c9e (diff)
downloadgcc-a30adbdf77f957436865d2d88c0ed46ed2bc9246.tar.gz
* tree.c (append_random_char): Conditionalize INO for VMS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47827 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index b60fdc74b81..45d18f6acde 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4467,14 +4467,20 @@ append_random_chars (template)
{
struct stat st;
- /* VALUE should be unique for each file and must
- not change between compiles since this can cause
- bootstrap comparison errors. */
+ /* VALUE should be unique for each file and must not change between
+ compiles since this can cause bootstrap comparison errors. */
if (stat (main_input_filename, &st) < 0)
abort ();
- value = st.st_dev ^ st.st_ino ^ st.st_mtime;
+ /* In VMS, ino is an array, so we have to use both values. We
+ conditionalize that. */
+#ifdef VMS
+#define INO_TO_INT(INO) ((int) (INO)[1] << 16 ^ (int) (INO)[2])
+#else
+#define INO_TO_INT(INO) INO
+#endif
+ value = st.st_dev ^ INO_TO_INT (st.st_ino) ^ st.st_mtime;
}
template += strlen (template);