File tree Expand file tree Collapse file tree 5 files changed +11
-0
lines changed
Expand file tree Collapse file tree 5 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ typedef int32_t mp_int_t; // must be pointer size
4646typedef uint32_t mp_uint_t ; // must be pointer size
4747typedef void * machine_ptr_t ; // must be of pointer size
4848typedef const void * machine_const_ptr_t ; // must be of pointer size
49+ typedef long mp_off_t ;
4950
5051// extra built in names to add to the global namespace
5152extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj ;
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ typedef int32_t mp_int_t; // must be pointer size
2929typedef uint32_t mp_uint_t ; // must be pointer size
3030typedef void * machine_ptr_t ; // must be of pointer size
3131typedef const void * machine_const_ptr_t ; // must be of pointer size
32+ typedef long mp_off_t ;
3233
3334// extra built in names to add to the global namespace
3435extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj ;
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ typedef int32_t mp_int_t; // must be pointer size
5555typedef unsigned int mp_uint_t ; // must be pointer size
5656typedef void * machine_ptr_t ; // must be of pointer size
5757typedef const void * machine_const_ptr_t ; // must be of pointer size
58+ typedef long mp_off_t ;
5859
5960// We have inlined IRQ functions for efficiency (they are generally
6061// 1 machine instruction).
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ typedef unsigned int mp_uint_t; // must be pointer size
4848typedef void * machine_ptr_t ; // must be of pointer size
4949typedef const void * machine_const_ptr_t ; // must be of pointer size
5050typedef double machine_float_t ;
51+ typedef long mp_off_t ;
5152
5253// We need to provide a declaration/definition of alloca()
5354#ifdef __FreeBSD__
Original file line number Diff line number Diff line change @@ -92,6 +92,13 @@ typedef unsigned int mp_uint_t; // must be pointer size
9292// define standard endianness macros.
9393#define MP_ENDIANNESS_LITTLE (1)
9494
95+ // Cannot include <sys/types.h>, as it may lead to symbol name clashes
96+ #if _FILE_OFFSET_BITS == 64 && !defined(__LP64__ )
97+ typedef long long mp_off_t ;
98+ #else
99+ typedef long mp_off_t ;
100+ #endif
101+
95102typedef void * machine_ptr_t ; // must be of pointer size
96103typedef const void * machine_const_ptr_t ; // must be of pointer size
97104
You can’t perform that action at this time.
0 commit comments