change borland attribute check to _chmod

This commit is contained in:
Paul Tucker
2000-03-12 09:58:49 +00:00
parent 809a2d4969
commit 254247efe4
2 changed files with 17 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
20000312-04:55 EST Paul Tucker <ptucker@sympatico.ca>
* source/rtl/dir.c
use _chmod( f,0 ) to get attribs.
20000312-03:40 GMT+1 Victor Szakats <info@szelvesz.hu>
* include/hbdefs.h
include/hbinit.h

View File

@@ -40,6 +40,7 @@
/*
* ChangeLog:
*
* 1.66 20000312 ptucker Borland use _chmod for attribs
* 1.53 19990917 dholm Moved normal hb_itemReturn() and ...Release()
* calls out of the MSC, IBM & MingW32 #if block.
* 1.49 19990915 dholm Added __MINGW32__ support
@@ -223,6 +224,10 @@ static USHORT osToHarbourMask( USHORT usMask )
usRetMask = usMask;
/* probably access denied when requesting mode */
if( usMask == (USHORT) -1 )
return 0;
#if defined(OS_UNIX_COMPATIBLE)
/* The use of any particular FA_ define here is meaningless */
/* they are essentially placeholders */
@@ -619,15 +624,20 @@ HARBOUR HB_DIRECTORY( void )
if( pos )
strcpy( filename, ++pos );
}
#elif defined(__BORLANDC__)
attrib = _rtl_chmod( fullfile, 0 );
#elif defined(__BORLANDC__)
/* NOTE: _chmod( f, 0 ) => Get attribs
_chmod( f, 1, n ) => Set attribs
chmod() though, _will_ change the attributes
*/
attrib = (USHORT)_chmod( fullfile, 0,0 );
#elif defined(__DJGPP__)
attrib = _chmod( fullfile, 0 );
attrib = (USHORT)_chmod( fullfile, 0 );
#else
attrib = 0;
#endif
attrib = osToHarbourMask( attrib );
if( attrib & FA_DIREC )
{
/* MS says size for a Directory is undefined.