Hi list,

seek.c:

#include <windows.h>
#include <stdio.h>

#define O_RFLAG GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL

int main(void)
{
HANDLE hFile;
LARGE_INTEGER liDistanceToMove;
 LARGE_INTEGER liNewFilePointer;

hFile = CreateFile("seek.c", O_RFLAG, NULL);

liDistanceToMove.QuadPart = 0;
if (SetFilePointerEx(hFile, liDistanceToMove, &liNewFilePointer, FILE_END)
!= FALSE) {
 printf("size:%I64d\n", liNewFilePointer.QuadPart);
}
CloseHandle(hFile);
 return 0;
}


x86_64-pc-mingw32-gcc.exe seek.c
a.exe:
size:508

(tcc x86_64: http://repo.or.cz/w/tinycc.git, 2010-01-14)
tcc seek.c
tcc: error: undefined symbol 'SetFilePointerEx'

write SetFilePointerEx to kernel32.def:

tcc seek.c
-no error

seek.exe:
seek.exe has stopped working

---
Gabor
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to