Skip to content
Snippets Groups Projects
Commit 1d2ea7b6 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

bugfix for file->seek@NT

Rev: src/fdlib.c:1.20
parent d25392c8
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "error.h" #include "error.h"
#include <math.h> #include <math.h>
RCSID("$Id: fdlib.c,v 1.19 1998/05/08 03:35:55 hubbe Exp $"); RCSID("$Id: fdlib.c,v 1.20 1998/06/06 03:15:20 hubbe Exp $");
#ifdef HAVE_WINSOCK_H #ifdef HAVE_WINSOCK_H
...@@ -489,11 +489,19 @@ long fd_lseek(FD fd, long pos, int where) ...@@ -489,11 +489,19 @@ long fd_lseek(FD fd, long pos, int where)
errno=ENOTSUPP; errno=ENOTSUPP;
return -1; return -1;
} }
#if FILE_BEGIN != SEEK_SET || FILE_CURRENT != SEEK_CUR || FILE_END != SEEK_END
switch(where)
{
case SEEK_SET: where=FILE_BEGIN; break;
case SEEK_CUR: where=FILE_CURRENT; break;
case SEEK_END: where=FILE_END; break;
}
#endif
ret=da_handle[fd]; ret=da_handle[fd];
mt_unlock(&fd_mutex); mt_unlock(&fd_mutex);
ret=LZSeek((HANDLE)ret, pos, where); ret=SetFilePointer((HANDLE)ret, pos, 0, where);
if(ret<0) if(ret == 0xffffffff)
{ {
errno=GetLastError(); errno=GetLastError();
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment