]> pd.if.org Git - pdclib/blobdiff - platform/win32/functions/_PDCLIB/_PDCLIB_flushbuffer.c
win32: declare _PDCLIB_w32errno in _PDCLIB_flushbuffer.c
[pdclib] / platform / win32 / functions / _PDCLIB / _PDCLIB_flushbuffer.c
index 82e36a0217b11190e02158a0af8d3338baf3dd3c..c0ade01ec18251948f3ef60323f91745b2490f8c 100644 (file)
@@ -17,6 +17,8 @@
 #include <errno.h>
 #include <windows.h>
 
+void _PDCLIB_w32errno( void );
+
 int _PDCLIB_flushbuffer( struct _PDCLIB_file_t * stream )
 {
     if ( ! ( stream->status & _PDCLIB_FBIN ) )
@@ -33,6 +35,7 @@ int _PDCLIB_flushbuffer( struct _PDCLIB_file_t * stream )
         BOOL res = WriteFile( stream->handle, stream->buffer + written, 
                               toWrite, &justWrote, NULL);
         written += justWrote;
+        stream->pos.offset += justWrote;
 
         if(!res) {
             stream->status |=_PDCLIB_ERRORFLAG;