@@ -386,9 +386,18 @@ find_file_in_dir (cpp_reader *pfile, _cpp_file *file,
bool *invalid_pch)
hashval_t hv;
char *copy;
void **pp;
+ bool do_canonical;
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ /* For DOS based file system, we always try to shorten file path
+ * to as it has a shorter constraint on max path length. */
+ do_canonical = true;
+#else
/* We try to canonicalize system headers. */
- if (CPP_OPTION (pfile, canonical_system_headers) && file->dir->sysp)
+ do_canonical = (CPP_OPTION (pfile, canonical_system_headers)
+ && file->dir->sysp);
+#endif
+ if ( do_canonical )
{
char * canonical_path = maybe_shorter_path (path);