Browse Source

--- Merging r32449 into '.':
U packages/gmp/src/gmp.pas
--- Recording mergeinfo for merge of r32449 into '.':
U .
--- Merging r32452 into '.':
U packages/winunits-base/src/shlobj.pp
--- Recording mergeinfo for merge of r32452 into '.':
G .
--- Merging r32490 into '.':
U packages/paszlib/src/gzio.pas
--- Recording mergeinfo for merge of r32490 into '.':
G .

# revisions: 32449,32452,32490

git-svn-id: branches/fixes_3_0@33365 -

marco 9 years ago
parent
commit
7d34696853

+ 5 - 0
packages/gmp/src/gmp.pas

@@ -125,22 +125,27 @@ type
   // ---- ext types with automatic mem mngmt & cow, ~ fpc string type style -----
   // ---- ext types with automatic mem mngmt & cow, ~ fpc string type style -----
 
 
   IMPBase = interface
   IMPBase = interface
+    ['{390336B5-6B78-47E0-BB0B-48F3AF9D5CCC}']
     function refs: longint;
     function refs: longint;
   end;
   end;
 
 
   MPInteger = interface(IMPBase)
   MPInteger = interface(IMPBase)
+    ['{F6A977E7-B5E6-42BB-981F-E1A7C7EE0D30}']
     function ptr: mpz_ptr;
     function ptr: mpz_ptr;
   end;
   end;
 
 
   MPFloat = interface(IMPBase)
   MPFloat = interface(IMPBase)
+    ['{73F21043-CC71-425E-9825-1EF0FF4B9B85}']
     function ptr: mpf_ptr;
     function ptr: mpf_ptr;
   end;
   end;
 
 
   MPRational = interface(IMPBase)
   MPRational = interface(IMPBase)
+    ['{0ACDDB76-5C1A-48E5-96EF-EA8647680FC1}']
     function ptr: mpq_ptr;
     function ptr: mpq_ptr;
   end;
   end;
 
 
   MPRandState = interface(IMPBase)
   MPRandState = interface(IMPBase)
+    ['{0E7EDBB9-E009-4A29-8BAC-8B967404B7B7}']
     function ptr: randstate_ptr;
     function ptr: randstate_ptr;
   end;
   end;
 
 

+ 8 - 5
packages/paszlib/src/gzio.pas

@@ -136,6 +136,7 @@ var
   doseek,
   doseek,
   exists,
   exists,
   writing : boolean;
   writing : boolean;
+  old_file_mode: byte;
 begin
 begin
 
 
   if (path='') or (mode='') then begin
   if (path='') or (mode='') then begin
@@ -227,20 +228,22 @@ begin
     GetFAttr(s^.gzfile, Attr);
     GetFAttr(s^.gzfile, Attr);
     exists:=(DosError= 0);
     exists:=(DosError= 0);
   {$endif}
   {$endif}
-  
+
   doseek:=false;
   doseek:=false;
   if ((s^.mode='a') and not exists) or (s^.mode='w') then
   if ((s^.mode='a') and not exists) or (s^.mode='w') then
     begin
     begin
-   
-    ReWrite (s^.gzfile,1)  
+    ReWrite (s^.gzfile,1)
     end
     end
   else
   else
     begin
     begin
-      Reset (s^.gzfile,1);  
+      old_file_mode := FileMode;
+      FileMode := 0;
+      Reset (s^.gzfile,1);
+      FileMode := old_file_mode;
       if s^.mode='a' then
       if s^.mode='a' then
         doseek:=true;      // seek AFTER I/O check.
         doseek:=true;      // seek AFTER I/O check.
     end;
     end;
-    
+
   {$POP}
   {$POP}
   if (IOResult <> 0) then begin
   if (IOResult <> 0) then begin
     destroy(s);
     destroy(s);

+ 3 - 0
packages/winunits-base/src/shlobj.pp

@@ -2546,7 +2546,10 @@ type
 function SHGetMalloc(out ppmalloc: IMalloc):HResult;StdCall; external 'shell32' name 'SHGetMalloc';
 function SHGetMalloc(out ppmalloc: IMalloc):HResult;StdCall; external 'shell32' name 'SHGetMalloc';
 function SHGetDesktopFolder(out ppshf:IShellFolder):HResult;StdCall; external 'shell32' name 'SHGetDesktopFolder';
 function SHGetDesktopFolder(out ppshf:IShellFolder):HResult;StdCall; external 'shell32' name 'SHGetDesktopFolder';
 
 
+type LPPCITEMIDLIST = ^LPCITEMIDLIST;
+
 function  SHOpenFolderAndSelectItems(pidlFolder:LPCITEMIDLIST;cidl:UINT;var  apidl: LPCITEMIDLIST; dwflags: DWORD):HResult;StdCall; external 'shell32' name 'SHOpenFolderAndSelectItems';
 function  SHOpenFolderAndSelectItems(pidlFolder:LPCITEMIDLIST;cidl:UINT;var  apidl: LPCITEMIDLIST; dwflags: DWORD):HResult;StdCall; external 'shell32' name 'SHOpenFolderAndSelectItems';
+function  SHOpenFolderAndSelectItems(pidlFolder:LPCITEMIDLIST;cidl:UINT; apidl: LPPCITEMIDLIST; dwflags: DWORD):HResult;StdCall; external 'shell32' name 'SHOpenFolderAndSelectItems';
 //function  SHCreateShellItem( pidlParent:LPCITEMIDLIST; psfparent:IShellFolder; pidl: LPCITEMIDLIST pidl; out ppsi: IShellItem):HResult;StdCall; external 'shell32' name 'SHCreateShellItem';
 //function  SHCreateShellItem( pidlParent:LPCITEMIDLIST; psfparent:IShellFolder; pidl: LPCITEMIDLIST pidl; out ppsi: IShellItem):HResult;StdCall; external 'shell32' name 'SHCreateShellItem';
 function  SHGetSpecialFolderLocation( hwnd:HWND; csidl:longint;out ppidl: LPITEMIDLIST):HResult;StdCall; external 'shell32' name 'SHGetSpecialFolderLocation';
 function  SHGetSpecialFolderLocation( hwnd:HWND; csidl:longint;out ppidl: LPITEMIDLIST):HResult;StdCall; external 'shell32' name 'SHGetSpecialFolderLocation';
 procedure SHFlushSFCache;StdCall; external 'shell32' name 'SHFlushSFCache';
 procedure SHFlushSFCache;StdCall; external 'shell32' name 'SHFlushSFCache';