unixfs: Use realpath instead of canonicalize_file_name for portability reasons.

Michael Jung mjung at iss.tu-darmstadt.de
Thu Feb 2 02:29:11 CST 2006

Not quite sure about this one. The man page on realpath states that it's 
broken by design since some symstems don't have an upper bound on filename 
lengths. canonicalize_file_name uses dynamic memory, but isn't available on 
non GNU systems. We could provide a realpath based canonicalize_file_name 
implementation in libs/port as a fallback, but I guess that would be 

realpath assumes the buffer to be PATH_MAX, but FILENAME_MAX is always as 
least as large as PATH_MAX, so that's ok. See 

Slightly related, this page states that one should not allocate an 
FILENAME_MAX array on the stack, since it might be huge. It's 4096 on linux. 
Do we want to switch this to dynamically allocated memory? IMO it would be 
overkill, though.

Use realpath instead of canonicalize_file_name for portability reasons.

 dlls/shell32/shfldr_unixfs.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6948720212fc07a3a27fa0b80c3824abdbed4af7.diff
Type: text/x-patch
Size: 1109 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060202/b5c92b75/6948720212fc07a3a27fa0b80c3824abdbed4af7.diff

More information about the wine-devel mailing list