Clib chsize, fstat, setmode.

set_file_size: watcom-specific implementation

git-svn-id: svn://kolibrios.org@727 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2008-02-10 14:10:44 +00:00
parent 26580c8bd1
commit a73bea0da8
9 changed files with 481 additions and 44 deletions

View File

@@ -44,6 +44,7 @@
#include "rtdata.h"
#include "seterrno.h"
#include "lseek.h"
#include "kolibri.h"
/*
The _lwrite function writes data to the specified file.
@@ -142,8 +143,6 @@ typedef struct
unsigned int offset;
}__file_handle;
int _stdcall write_file (const char *name,const void* buff,unsigned offset, unsigned count,unsigned *reads);
static int os_write( int handle, const void *buffer, unsigned len, unsigned *amt )
/********************************************************************************/
{
@@ -154,11 +153,8 @@ static int os_write( int handle, const void *buffer, unsigned len, unsigned *amt
fh = (__file_handle*) __getOSHandle( handle );
if(write_file(fh->name,buffer,fh->offset,len,amt))
{
rc = __set_errno_nt();
};
rc = write_file(fh->name,buffer,fh->offset,len,amt);
fh->offset+= *amt;
if( *amt != len )
{