diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9e98057f71..bcf9f40ba3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +19990727-12:35 EDT David G. Holm + * source/rtl/dir.c + ! Corrected two errors that the MSC changes introduced for non-MSC + non-Unix compilers: 1) The intermediate long variable fsize is now + back in place; 2) The use of 'attrib = entry.attrib;' is now #ifdefed + for MSC and the use of 'attrib = _chmod(fullfile,0);' is restored for + non-MSC non-Unix compilers. + 19990727-13:45 GMT+1 Antonio Linares * include/classes.ch + added support for multiple classes definition on the same PRG diff --git a/harbour/source/rtl/dir.c b/harbour/source/rtl/dir.c index 10c69dede8..0bfb5d50dd 100644 --- a/harbour/source/rtl/dir.c +++ b/harbour/source/rtl/dir.c @@ -152,6 +152,7 @@ HARBOUR HB_DIRECTORY( void ) char ttime[9]; char aatrib[8]; int attrib; + long fsize; time_t ftime; char * pos; @@ -301,7 +302,8 @@ HARBOUR HB_DIRECTORY( void ) { /* This might be a problem under Novell when the file is a directory */ /* needs test */ - sprintf(filesize, "%ld", statbuf.st_size); + fsize = statbuf.st_size; + sprintf(filesize, "%ld", fsize); ftime = statbuf.st_mtime; ft = localtime(&ftime); @@ -337,7 +339,11 @@ HARBOUR HB_DIRECTORY( void ) if( S_ISSOCK(statbuf.st_mode) ) strcat( aatrib, "K" ); #else + #ifdef _MSC_VER attrib = entry.attrib; + #else + attrib = _chmod(fullfile,0); + #endif if (attrib & FA_ARCH) strcat(aatrib,"A"); if (attrib & FA_DIREC)