@@ -29,26 +29,14 @@ cimport pyfmi.fmi3 as FMI3
2929 This is because fseek/ftell is not sufficient as soon as the number of bytes in a result file
3030 exceed the maximum value for long int.
3131"""
32- IF UNAME_SYSNAME == "Windows" :
33- cdef extern from "stdio.h" nogil :
34- ctypedef struct FILE :
35- pass
36- long long _ftelli64 (FILE * stream )
37- int _fseeki64 (FILE * stream , long long offset , int whence )
38- cdef inline int os_specific_fseek (FILE * stream , long long offset , int whence ):
39- return _fseeki64 (stream , offset , whence )
40- cdef inline long long os_specific_ftell (FILE * stream ):
41- return _ftelli64 (stream )
42- ELSE :
43- cdef extern from "stdio.h" nogil :
44- ctypedef struct FILE :
45- pass
46- long long ftello (FILE * stream )
47- int fseeko (FILE * stream , long long offset , int whence )
48- cdef inline int os_specific_fseek (FILE * stream , long long offset , int whence ):
49- return fseeko (stream , offset , whence )
50- cdef inline long long os_specific_ftell (FILE * stream ):
51- return ftello (stream )
32+ cdef extern from "fmi_util_os.h" nogil :
33+ int os_fseek (FILE * stream , long long offset , int whence )
34+ long long os_ftell (FILE * stream )
35+
36+ cdef inline int os_specific_fseek (FILE * stream , long long offset , int whence ) nogil :
37+ return os_fseek (stream , offset , whence )
38+ cdef inline long long os_specific_ftell (FILE * stream ) nogil :
39+ return os_ftell (stream )
5240
5341cdef class DumpDataFMI3 :
5442 cdef np .ndarray time_tmp
0 commit comments