Yukihiro "Matz" Matsumoto
b424dfa331
mruby-dir: increase buffer size to prevent truncation warning
...
increase sandbox path buffer from 1024 to 2048 bytes to accommodate
full path with suffix without truncation.
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-16 15:49:45 +09:00
Yukihiro "Matz" Matsumoto
43695029bc
mruby-dir: add missing unistd.h include for posix systems
...
mkdtemp() requires unistd.h on posix systems like macos and linux.
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-16 15:44:51 +09:00
Yukihiro "Matz" Matsumoto
06eba9653b
mruby-dir: use hal functions in test code for cross-platform compatibility
...
replace posix directory functions with hal interface functions in dirtest.c
to fix windows linking errors. test code now uses mrb_hal_dir_open/read/close
instead of opendir/readdir/closedir, and mrb_hal_dir_* for filesystem
operations.
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-16 15:27:19 +09:00
dearblue
1326017d1d
Omit the _WIN64 definition check
...
Checking the official MSVC documentation, if `_WIN64` is defined, then `_WIN32` is also defined.
https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros
I could not find any documentation on MinGW, but I assume it is not a problem.
2024-12-07 22:47:28 +09:00
dearblue
3aa9a5ee68
Perform GC before deleting directories
...
In some environments, the test will fail because the directory in use cannot be deleted.
This problem was encountered when building 32-bit binary with mingw32 on FreeBSD and running on wine.
2024-09-10 21:17:10 +09:00
Yukihiro "Matz" Matsumoto
87b358a342
Including header files in include/* by <>
2024-03-26 13:59:59 +09:00
Yukihiro "Matz" Matsumoto
7821462571
mruby-dir/dirtest.c: need to include <io.h> for mktemp() on Windows
2022-12-22 22:07:07 +09:00
Yukihiro "Matz" Matsumoto
67addd7da3
mruby-dir/dirtest.c: avoid string allocations for mrb_raisef
2022-12-22 11:36:03 +09:00
Yukihiro "Matz" Matsumoto
1d174404b3
mruby-dir/dirtest.c: refactor mkdir in mrb_dirtest_setup
2022-12-22 11:33:44 +09:00
Yukihiro "Matz" Matsumoto
084871abf3
mruby-dir/dirtest.c: use _mktemp instead of mktemp for Windows
2022-12-22 11:12:32 +09:00
Yukihiro "Matz" Matsumoto
c737519d02
mruby-dir/dirtest.c: add compatibility macro for getcwd
2022-12-22 11:11:49 +09:00
Yukihiro "Matz" Matsumoto
4cbcf743a7
mruby-dir/dirtest.c: wrap function prototypes by extern "C"
2022-12-22 11:11:18 +09:00
Yukihiro "Matz" Matsumoto
783e62e582
mruby-dir/dirtest.c: copy some of dirent header information
...
Instead of including whole "dirent.c" file.
2022-12-22 09:53:16 +09:00
Yukihiro "Matz" Matsumoto
965d1d1554
mruby-dir/dirtest.c: should not include <unistd.h>
2022-12-22 09:27:13 +09:00
Yukihiro "Matz" Matsumoto
0aa8ce5c57
mruby-dir/dirtest.c: did not work for Windows
2022-12-22 09:10:40 +09:00
Yukihiro "Matz" Matsumoto
818212b5db
mruby-dir/dir.rb: rename each to each_child
2022-12-21 14:44:24 +09:00
Yukihiro "Matz" Matsumoto
4b48c86103
mruby-dir: extra spaces and typos are removed
2022-12-20 22:12:21 +09:00
Yukihiro "Matz" Matsumoto
f486069a94
mruby-dir/test: reformat
2022-12-20 21:56:52 +09:00
Yukihiro "Matz" Matsumoto
869a2778a9
mruby-dir/test: remove warnings from lacked assertions
2022-12-20 20:24:28 +09:00
Yukihiro "Matz" Matsumoto
277341f694
Add 'mrbgems/mruby-dir/' from commit '89dceefa1250fb1ae868d4cb52498e9e24293cd1'
...
git-subtree-dir: mrbgems/mruby-dir
git-subtree-mainline: f2d43069f0
git-subtree-split: 89dceefa12
2022-12-20 18:06:36 +09:00