mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Find files with long file names under macOS
(cherry picked from commit37b0a3ff8b) FIX: Build under ARM64 (macOS) (cherry picked from commite89064de97)
This commit is contained in:
parent
a9f808e6bc
commit
387457bf6e
1 changed files with 26 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
This unit contains UTF-8 versions of Find(First, Next, Close) functions
|
||||
|
||||
Copyright (C) 2006-2023 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2006-2025 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
|
@ -87,13 +87,37 @@ implementation
|
|||
|
||||
uses
|
||||
LazUTF8, uDebug
|
||||
{$IFDEF LINUX}
|
||||
, InitC
|
||||
{$ENDIF}
|
||||
{$IFDEF MSWINDOWS}
|
||||
, DCWindows, DCDateTimeUtils, uMyWindows
|
||||
{$ENDIF}
|
||||
{$IFDEF UNIX}
|
||||
, InitC, Unix, DCOSUtils, DCFileAttributes, DCConvertEncoding
|
||||
, Unix, DCOSUtils, DCFileAttributes, DCConvertEncoding
|
||||
{$ENDIF};
|
||||
|
||||
{$IF DEFINED(DARWIN) AND DEFINED(CPUX86_64)}
|
||||
const
|
||||
DARWIN_MAXPATHLEN = 1024;
|
||||
|
||||
{$push}{$packrecords c}
|
||||
type
|
||||
dirent = record
|
||||
d_ino: UInt64;
|
||||
d_seekoff: UInt64;
|
||||
d_reclen: UInt16;
|
||||
d_namlen: UInt16;
|
||||
d_type: UInt8;
|
||||
d_name: array[0..Pred(DARWIN_MAXPATHLEN)] of AnsiChar;
|
||||
end;
|
||||
TDirent = dirent;
|
||||
PDirent = ^TDirent;
|
||||
{$pop}
|
||||
|
||||
function fpReadDir(var dirp: TDir): PDirent; cdecl; external clib name 'readdir$INODE64';
|
||||
{$ENDIF}
|
||||
|
||||
{$IF DEFINED(LINUX)}
|
||||
{$define fpgeterrno:= fpgetCerrno}
|
||||
function fpOpenDir(dirname: PAnsiChar): pDir; cdecl; external clib name 'opendir';
|
||||
|
|
@ -271,4 +295,3 @@ end;
|
|||
{$ENDIF}
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue