-
- /* At this point, we know it's a PCH file, so it ought to be long enough
- that we can read a c_pch_validity structure. */
- if (read (fd, &v, sizeof (v)) != sizeof (v))
- fatal_error ("can't read %s: %m", name);
-
- strings_length = (v.host_machine_length + v.target_machine_length
- + v.version_length);
- if (read (fd, short_strings, strings_length) != strings_length)
- fatal_error ("can't read %s: %m", name);
- if (v.host_machine_length != strlen (host_machine)
- || memcmp (host_machine, short_strings, strlen (host_machine)) != 0)
- {
- if (cpp_get_options (pfile)->warn_invalid_pch)
- cpp_error (pfile, DL_WARNING,
- "%s: created on host `%.*s', but used on host `%s'", name,
- v.host_machine_length, short_strings, host_machine);
- return 2;
- }
- if (v.target_machine_length != strlen (target_machine)
- || memcmp (target_machine, short_strings + v.host_machine_length,
- strlen (target_machine)) != 0)