Skip to content

Commit 6882d15

Browse files
committed
inc/crt/sys/types.bi: Provide off_t on Windows too, like MinGW
Both MinGW.org and MinGW-w64 headers provide the off_t type, which is also used by many C libraries. I.e. we need it for FB bindings. Not to be confused with the msvcrt _off_t type, which apparently is always 32bit, while the POSIX off_t depends on _FILE_OFFSET_BITS.
1 parent 000c280 commit 6882d15

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Version 1.01.0
2323
ncurses 5.9
2424
PDCurses 3.4
2525
zlib 1.2.8
26+
crt/sys/types.bi now provides off_t on Windows, like MinGW.org and MinGW-w64
2627

2728
[fixed]
2829
- 1.00.0 regression: DRAW x/y pen position was reset during X<address> subcommands, instead of being preserved and passed to/from the subcommands

inc/crt/sys/win32/types.bi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,17 @@ type _pid_t as integer
1717
type _mode_t as ushort
1818
type _sigset_t as integer
1919
type _ssize_t as integer
20+
type off32_t as long
21+
type off64_t as longint
22+
23+
#ifdef _FILE_OFFSET_BITS
24+
#if _FILE_OFFSET_BITS = 64
25+
type off_t as off64_t
26+
#else
27+
type off_t as off32_t
28+
#endif
29+
#else
30+
type off_t as long
31+
#endif
2032

2133
#endif

0 commit comments

Comments
 (0)