2
0
Эх сурвалжийг харах

Use _lseeki64 and _telli64 on Windows instead.

woollybah 10 жил өмнө
parent
commit
80911ab5c1
1 өөрчлөгдсөн 4 нэмэгдсэн , 2 устгасан
  1. 4 2
      stdc.mod/stdc.c

+ 4 - 2
stdc.mod/stdc.c

@@ -190,11 +190,13 @@ int system_( BBString *cmd ){
 }
 
 int fseek_( FILE* stream, BBLONG offset, int origin ) {
-	return _fseeki64(stream, offset, origin);
+	int f = _fileno(stream);
+	return (_lseeki64(f, offset, origin) >= 0) ? 0 : 1;
 }
 
 BBLONG ftell_( FILE* stream ) {
-	return _ftelli64(stream);
+	int f = _fileno(stream);
+	return _telli64(f);
 }
 
 #else