Is #663 - Open context for gcc 2.95 port

This commit is contained in:
Geoff McLane 2017-12-25 03:26:53 +01:00
parent a33520ad85
commit ccde058772

View file

@ -1135,15 +1135,17 @@ int tidyDocParseFile( TidyDocImpl* doc, ctmbstr filnam )
fin = fopen( filnam, "rb" ); fin = fopen( filnam, "rb" );
#if PRESERVE_FILE_TIMES #if PRESERVE_FILE_TIMES
struct stat sbuf = {0}; {
struct stat sbuf = { 0 };
/* get last modified time */ /* get last modified time */
TidyClearMemory( &doc->filetimes, sizeof(doc->filetimes) ); TidyClearMemory(&doc->filetimes, sizeof(doc->filetimes));
if ( fin && cfgBool(doc,TidyKeepFileTimes) && if (fin && cfgBool(doc, TidyKeepFileTimes) &&
fstat(fileno(fin), &sbuf) != -1 ) fstat(fileno(fin), &sbuf) != -1)
{ {
doc->filetimes.actime = sbuf.st_atime; doc->filetimes.actime = sbuf.st_atime;
doc->filetimes.modtime = sbuf.st_mtime; doc->filetimes.modtime = sbuf.st_mtime;
} }
}
#endif #endif
if ( fin ) if ( fin )