Hi,

Please check the attached patch that fixes C_foundfile for non-Windows
systems.

All the best.
Mario
-- 
https://parenteses.org/mario
>From 712525944334a13067fef3be564f5f1767625cf7 Mon Sep 17 00:00:00 2001
From: Mario Domenech Goulart <[email protected]>
Date: Sat, 7 Jun 2025 21:39:17 +0200
Subject: [PATCH] file.scm: s/_wdirent/dirent/ in C_foundfile for non-Windows
 systems

Probably introduced by mistake in 19f49f04830.

Piggyback the removal of an extra whitespace.
---
 file.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/file.scm b/file.scm
index 9911e78a..6ad25359 100644
--- a/file.scm
+++ b/file.scm
@@ -81,14 +81,14 @@ static C_word C_rename(C_word old, C_word new) {
 # define C_opendir(s,h)      C_set_block_item(h, 0, (C_word) _wopendir(C_utf16(s, 0)))
 
 static C_word C_foundfile(C_word e,C_word b,C_word l) {
-   C_char *s = C_utf8(((struct _wdirent  *)C_block_item(e, 0))->d_name);
+   C_char *s = C_utf8(((struct _wdirent *)C_block_item(e, 0))->d_name);
    C_strlcpy(C_c_string(b), s, C_unfix(l));
    return(C_fix(strlen(s)));
 }
 
 #else
 # define C_opendir(s,h)      C_set_block_item(h, 0, (C_word) opendir(C_c_string(s)))
-# define C_foundfile(e,b,l)  (C_strlcpy(C_c_string(b), ((struct _wdirent *)C_block_item(e, 0))->d_name, C_unfix(l)), C_fix(strlen(((struct dirent *) C_block_item(e, 0))->d_name)))
+# define C_foundfile(e,b,l)  (C_strlcpy(C_c_string(b), ((struct dirent *)C_block_item(e, 0))->d_name, C_unfix(l)), C_fix(strlen(((struct dirent *) C_block_item(e, 0))->d_name)))
 #endif
 
 #define C_readdir(h,e)      C_set_block_item(e, 0, (C_word) readdir((DIR *)C_block_item(h, 0)))
-- 
2.47.2

Reply via email to