Commit 99b54b33 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/39309 (.mod file versioning causes error instead of overwritting the file)

2009-02-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/39309
        * module.c (read_md5_from_module_file): Include mod version
        in had-changed test.

From-SVN: r144461
parent ba9b9144
2009-02-27 Tobias Burnus <burnus@net-b.de>
PR fortran/39309
* module.c (read_md5_from_module_file): Include mod version
in had-changed test.
2009-02-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/39295
......
......@@ -4739,8 +4739,18 @@ read_md5_from_module_file (const char * filename, unsigned char md5[16])
return -1;
/* Read two lines. */
if (fgets (buf, sizeof (buf) - 1, file) == NULL
|| fgets (buf, sizeof (buf) - 1, file) == NULL)
if (fgets (buf, sizeof (buf) - 1, file) == NULL)
{
fclose (file);
return -1;
}
/* The file also needs to be overwritten if the version number changed. */
n = strlen ("GFORTRAN module version " MOD_VERSION " created");
if (strncmp (buf, "GFORTRAN module version " MOD_VERSION " created", n) != 0)
return -1;
if (fgets (buf, sizeof (buf) - 1, file) == NULL)
{
fclose (file);
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment