This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Conditionalize INO handling for VMS
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 9 Dec 01 20:24:22 EST
- Subject: Conditionalize INO handling for VMS
st_ino is an array in VMS. As Doug said, "VMS" is both a system name
and a set of features, so the usage in #ifdef is no too bad.
If somebody wants to write an autoconf test for an array of INO, I
wouldn't object, but it's not at all clear it's worth the time.
Sun Dec 9 20:19:32 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Douglas B. Rupp <rupp@gnat.com>
* tree.c (append_random_char): Conditionalize INO for VMS.
*** tree.c 2001/12/06 17:58:23 1.227
--- tree.c 2001/12/10 01:23:59
*************** append_random_chars (template)
*** 4468,4479 ****
struct stat st;
! /* 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;
}
--- 4468,4485 ----
struct stat st;
! /* 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 ();
! /* 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;
}