:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / msvcrt / io / eof.c
1 //#include <windows.h>
2 #include <msvcrt/io.h>
3
4 int _eof(int _fd)
5 {
6   __int64 cur_pos = _lseeki64(_fd, 0, SEEK_CUR);
7   __int64 end_pos = _lseeki64(_fd, 0, SEEK_END);
8   if ( cur_pos == -1 || end_pos == -1)
9     return -1;
10
11   if (cur_pos == end_pos)
12     return 1;
13
14   return 0;
15 }