Hi Frank
Attached is a patch for filename.pas to cater for MSYS. Since MSYS is a fork of the Cygwin project, many things that apply to Cygwin apply to MSYS as well.
You can ignore my previous post about front slashes, FileExists, et. al. This patch fixes all those issues. Thanks.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
*** ./p/rts/filename.pas.org Thu Jul 10 04:19:36 2003 --- ./p/rts/filename.pas Wed Oct 15 16:46:24 2003 *************** const *** 106,115 ****
{$ifdef __OS_DOS__}
const OSDosFlag = True; QuotingCharacter = #0; ! PathSeparator = {$ifdef __CYGWIN__} ':' {$else} ';' {$endif}; DirSeparator = ''; DirSeparators = [':', '', '/']; ExtSeparator = '.'; --- 106,119 ----
{$ifdef __OS_DOS__}
+ {$if defined (__CYGWIN__) or defined(__MSYS__)} + {$define __POSIX_WIN32__} + {$endif} + const OSDosFlag = True; QuotingCharacter = #0; ! PathSeparator = {$ifdef __POSIX_WIN32__} ':' {$else} ';' {$endif}; DirSeparator = ''; DirSeparators = [':', '', '/']; ExtSeparator = '.'; *************** function Slash2OSDirSeparator (const s: *** 514,520 **** var i: Integer; begin Result := s; ! {$ifndef __CYGWIN__} if DirSeparator <> '/' then for i := 1 to Length (Result) do if Result[i] = '/' then Result[i] := DirSeparator --- 518,524 ---- var i: Integer; begin Result := s; ! {$ifndef __POSIX_WIN32__} if DirSeparator <> '/' then for i := 1 to Length (Result) do if Result[i] = '/' then Result[i] := DirSeparator *************** end; *** 533,539 **** function Slash2OSDirSeparator_CString (s: CString): CString; var Temp: CString; begin ! {$ifndef __CYGWIN__} if DirSeparator <> '/' then begin Temp := s; --- 537,543 ---- function Slash2OSDirSeparator_CString (s: CString): CString; var Temp: CString; begin ! {$ifndef __POSIX_WIN32__} if DirSeparator <> '/' then begin Temp := s; *************** begin *** 1372,1377 **** --- 1376,1385 ---- and ((Length (Path) = 9) or (Path[10] in ['/', ''])) then Result := '/cygdrive' {$endif} + {$ifdef __MSYS__} + else if (Path[1] in ['/', '']) then + Result := Path [1] + {$endif} else if Path[2] = ':' then Result := Copy (Path, 1, 2) else