Pārlūkot izejas kodu

--- Merging r23055 into '.':
U compiler/cfileutl.pas
--- Merging r25328 into '.':
U compiler/systems/t_bsd.pas
--- Merging r25330 into '.':
G compiler/systems/t_bsd.pas

# revisions: 23055,25328,25330
r23055 | jonas | 2012-11-24 14:15:54 +0100 (Sat, 24 Nov 2012) | 1 line
Changed paths:
M /trunk/compiler/cfileutl.pas

* make ansistring unique before starting to change it using a pchar
r25328 | jonas | 2013-08-22 21:55:57 +0200 (Thu, 22 Aug 2013) | 2 lines
Changed paths:
M /trunk/compiler/systems/t_bsd.pas

* initialise result of GetDarwinPrtobjName() in case GetDarwinCrt1ObjName()
returns an empty string
r25330 | jonas | 2013-08-22 23:37:06 +0200 (Thu, 22 Aug 2013) | 2 lines
Changed paths:
M /trunk/compiler/systems/t_bsd.pas

* don't overwrite result of librarysearchpath.FindFile() in
GetDarwinPrtobjName() if it found something

git-svn-id: branches/fixes_2_6@25916 -

marco 11 gadi atpakaļ
vecāks
revīzija
cd1c43bd46
2 mainītis faili ar 9 papildinājumiem un 3 dzēšanām
  1. 2 0
      compiler/cfileutl.pas
  2. 7 3
      compiler/systems/t_bsd.pas

+ 2 - 0
compiler/cfileutl.pas

@@ -697,6 +697,8 @@ end;
         P: PChar;
       begin
         Result := s;
+        { make result unique since we're going to change it via a pchar }
+        uniquestring(result);
         L := Length(Result);
         if L=0 then
           exit;

+ 7 - 3
compiler/systems/t_bsd.pas

@@ -295,9 +295,13 @@ var
   startupfile: TCmdStr;
 begin
   startupfile:=GetDarwinCrt1ObjName(isdll);
-  if (startupfile<>'') and
-     not librarysearchpath.FindFile(startupfile,false,result) then
-    result:='/usr/lib/'+startupfile;
+  if startupfile<>'' then
+    begin
+     if not librarysearchpath.FindFile(startupfile,false,result) then
+       result:='/usr/lib/'+startupfile
+    end
+  else
+    result:='';
   result:=maybequoted(result);
 end;