From dcd6bf64fd1b4841398358f67b5298c911b5b624 Mon Sep 17 00:00:00 2001 From: Joshy Date: Wed, 5 Jan 2011 21:26:06 +0000 Subject: [PATCH] Win64 fixes up to FireFox 3.6 (tested on Vista/64) Fixed a bug in parsing dependentlibs.list when edited and saved in Windows. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1425 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/geckoport/nsInit.pas | 8 ++++++-- components/geckoport/nsTypes.pas | 13 +++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/components/geckoport/nsInit.pas b/components/geckoport/nsInit.pas index 04b00efaa..dce1e042f 100755 --- a/components/geckoport/nsInit.pas +++ b/components/geckoport/nsInit.pas @@ -1260,8 +1260,12 @@ begin l := NS_StrLen(buffer); if (buffer[0] = '#') or (l=0) then Continue; - if buffer[l-1] in [#10, #13] then - buffer[l-1]:= #0; + if l>0 then + if buffer[l-1] in [#10, #13] then + buffer[l-1]:= #0; + if l>1 then + if buffer[l-2] in [#10, #13] then + buffer[l-2]:= #0; NS_StrCopy(buffer2, xpcomdir); NS_StrLCat(buffer2, DirectorySeparator, MAX_PATH); NS_StrLCat(buffer2, buffer, MAX_PATH); diff --git a/components/geckoport/nsTypes.pas b/components/geckoport/nsTypes.pas index b7564533a..3407558f8 100644 --- a/components/geckoport/nsTypes.pas +++ b/components/geckoport/nsTypes.pas @@ -56,22 +56,27 @@ type {$IFNDEF FPC} size_t = SizeUint; {$ENDIF} - +{$IFDEF CPU64} + PRSize = PtrUInt; +{$ELSE} PRSize = PRUint32; +{$ENDIF} PRFileDesc = type Pointer; PRLibrary = type Pointer; + nsCoord = PRInt32; + nsPoint = record - x, y: Longint; + x, y: nsCoord; end; nsRect = record - left, top, right, bottom: Longint; + left, top, right, bottom: nsCoord; end; nsMargin = record - left, top, right, bottom: Longint; + left, top, right, bottom: nsCoord; end; TGUIDArray = array[0..16383] of TGUID;