Repository navigation
Commit 1721364
committed
mirb, mruby-io test: build with current mingw-w64 headers
Both define a static fallback for a POSIX function that Windows lacked,
and mingw-w64 now declares both: mkdtemp() in <stdlib.h> since 14.0,
and strndup() in <string.h> on its master branch, which MSYS2 and
llvm-mingw ship. A static definition after a non-static declaration is
an error with GCC and clang:
mirb_completion.c:30:1: error: static declaration of 'strndup'
follows non-static declaration
mruby_io_test.c:43:1: error: static declaration of 'mkdtemp'
follows non-static declaration
mirb now always uses its own helper, renamed to mirb_strndup(), since
no released mingw-w64 version can be tested for yet. The mruby-io test
keeps its mkdtemp() for MSVC and for mingw-w64 before 14.0, the way it
already does for mkstemp().1 parent d474475 commit 1721364
2 files changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
508 | | - | |
| 507 | + | |
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
0 commit comments