Browse Source

--- Merging r16156 into '.':
C packages/Makefile.fpc
--- Merging r16171 into '.':
U rtl/objpas/classes/classesh.inc
--- Merging r16187 into '.':
U rtl/objpas/classes/stringl.inc
--- Merging r16188 into '.':
U tests/test/units/fpcunit/testclasses.lpi
U tests/test/units/fpcunit/tclist.pp
U tests/test/units/fpcunit/testclasses.lpr
--- Merging r16206 into '.':
C packages/Makefile
G packages/Makefile.fpc
--- Merging r16224 into '.':
U rtl/objpas/types.pp
--- Merging r16226 into '.':
G rtl/objpas/types.pp
--- Merging r16228 into '.':
U packages/pthreads/src/pthrbsd.inc
--- Merging r16235 into '.':
G rtl/objpas/types.pp
--- Merging r16257 into '.':
U packages/fcl-db/src/base/bufdataset.pas
--- Merging r16267 into '.':
U packages/pthreads/src/pthrlinux.inc
--- Merging r16279 into '.':
U rtl/objpas/sysutils/sysutilh.inc
--- Merging r16282 into '.':
U rtl/win/sysutils.pp
--- Merging r16292 into '.':
G rtl/win/sysutils.pp
--- Merging r16295 into '.':
U packages/fcl-db/src/sqldb/sqldb.pp
Summary of conflicts:
Text conflicts: 2

# revisions: 16156,16171,16187,16188,16206,16224,16226,16228,16235,16257,16267,16279,16282,16292,16295
------------------------------------------------------------------------
r16156 | sekelsenmat | 2010-10-13 23:25:09 +0200 (Wed, 13 Oct 2010) | 1 line
Changed paths:
M /trunk/packages/Makefile.fpc

Adds OpenAL to the list of packages to be built for x86-darwin
------------------------------------------------------------------------
------------------------------------------------------------------------
r16171 | marco | 2010-10-16 00:15:57 +0200 (Sat, 16 Oct 2010) | 2 lines
Changed paths:
M /trunk/rtl/objpas/classes/classesh.inc

* TThread.Resume and suspend deprecated (see user changes trunk)

------------------------------------------------------------------------
------------------------------------------------------------------------
r16187 | sekelsenmat | 2010-10-19 17:50:13 +0200 (Tue, 19 Oct 2010) | 1 line
Changed paths:
M /trunk/rtl/objpas/classes/stringl.inc

Fixes a potential crash in TStrings.SaveToStream
------------------------------------------------------------------------
------------------------------------------------------------------------
r16188 | michael | 2010-10-19 21:48:23 +0200 (Tue, 19 Oct 2010) | 1 line
Changed paths:
M /trunk/tests/test/units/fpcunit/tclist.pp
M /trunk/tests/test/units/fpcunit/testclasses.lpi
M /trunk/tests/test/units/fpcunit/testclasses.lpr

* Applied patch from Graeme
------------------------------------------------------------------------
------------------------------------------------------------------------
r16206 | karoly | 2010-10-23 15:06:16 +0200 (Sat, 23 Oct 2010) | 2 lines
Changed paths:
M /trunk/packages/Makefile
M /trunk/packages/Makefile.fpc

+ enabled SDL package for MorphOS

------------------------------------------------------------------------
------------------------------------------------------------------------
r16224 | sekelsenmat | 2010-10-26 16:49:35 +0200 (Tue, 26 Oct 2010) | 1 line
Changed paths:
M /trunk/rtl/objpas/types.pp

Makes IntersectRect more robust. See bug #17722
------------------------------------------------------------------------
------------------------------------------------------------------------
r16226 | sekelsenmat | 2010-10-26 17:49:25 +0200 (Tue, 26 Oct 2010) | 1 line
Changed paths:
M /trunk/rtl/objpas/types.pp

Makes IntersectRect more efficient
------------------------------------------------------------------------
------------------------------------------------------------------------
r16228 | marco | 2010-10-26 22:37:24 +0200 (Tue, 26 Oct 2010) | 2 lines
Changed paths:
M /trunk/packages/pthreads/src/pthrbsd.inc

* PSemaphore

------------------------------------------------------------------------
------------------------------------------------------------------------
r16235 | sergei | 2010-10-28 06:18:53 +0200 (Thu, 28 Oct 2010) | 1 line
Changed paths:
M /trunk/rtl/objpas/types.pp

* types.pp, applied a fix similar to r16224,16226 also to UnionRect function. It is very similar to IntersectRect and parameter aliasing issue applies to it as well (see Mantis #17722).
------------------------------------------------------------------------
------------------------------------------------------------------------
r16257 | joost | 2010-10-29 21:13:42 +0200 (Fri, 29 Oct 2010) | 1 line
Changed paths:
M /trunk/packages/fcl-db/src/base/bufdataset.pas

* Patch from José Mejuto so that TBufDataset.SetRecNo takes the active index into account, bug #15460
------------------------------------------------------------------------
------------------------------------------------------------------------
r16267 | tom_at_work | 2010-10-30 20:19:11 +0200 (Sat, 30 Oct 2010) | 1 line
Changed paths:
M /trunk/packages/pthreads/src/pthrlinux.inc

* fix definition of function pointer to be passed to pthread_create
------------------------------------------------------------------------
------------------------------------------------------------------------
r16279 | florian | 2010-10-31 18:57:54 +0100 (Sun, 31 Oct 2010) | 2 lines
Changed paths:
M /trunk/rtl/objpas/sysutils/sysutilh.inc

* made Byte/Word/Long/Int64Rec endian safe
+ Int128/OWordRec
------------------------------------------------------------------------
------------------------------------------------------------------------
r16282 | sergei | 2010-11-01 01:38:51 +0100 (Mon, 01 Nov 2010) | 1 line
Changed paths:
M /trunk/rtl/win/sysutils.pp

* win/sysutils.pp, removed an unused variable (forgotten part of r13838)
------------------------------------------------------------------------
------------------------------------------------------------------------
r16292 | sergei | 2010-11-02 08:11:17 +0100 (Tue, 02 Nov 2010) | 1 line
Changed paths:
M /trunk/rtl/win/sysutils.pp

* win/sysutils.pp: removed private WinAPI function declarations. Since this unit uses Windows unit, there's no point in re-declaring stuff.
------------------------------------------------------------------------
------------------------------------------------------------------------
r16295 | michael | 2010-11-02 10:46:07 +0100 (Tue, 02 Nov 2010) | 1 line
Changed paths:
M /trunk/packages/fcl-db/src/sqldb/sqldb.pp

* Fixed SetInsertSQL/SetDeleteSQL
------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@16433 -

marco 14 years ago
parent
commit
b24ff8fef3

+ 4 - 2
packages/Makefile

@@ -304,7 +304,7 @@ ifeq ($(FULL_TARGET),i386-wdosx)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes  fv fcl-web fastcgi fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick libpng gdbm tcl syslog libcurl bfd aspell utmp fftw pcap openssl numlib iconvenc gmp fcl-extra univint graph sdl opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms  gnome1 httpd13 httpd20 httpd22 imlib opengles objcrtl opencl
+override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes  fv fcl-web fastcgi fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick libpng gdbm tcl syslog libcurl bfd aspell utmp fftw pcap openssl numlib iconvenc gmp fcl-extra univint graph sdl opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms  gnome1 httpd13 httpd20 httpd22 imlib opengles objcrtl opencl openal
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes  fv zlib libpng x11 tcl fpgtk rexx os2units gtk1 imlib
@@ -364,7 +364,7 @@ ifeq ($(FULL_TARGET),powerpc-darwin)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes  fv fcl-web fastcgi fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick libpng gdbm tcl syslog libcurl bfd aspell utmp fftw pcap openssl numlib iconvenc gmp fcl-extra univint graph sdl opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms gnome1 httpd13 httpd20 httpd22 imlib objcrtl
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes  fv opengl
+override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes  fv opengl sdl
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-xml fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-fpcunit fcl-json fcl-js fcl-process unzip regexpr chm fcl-res libgd symbolic bzip2 hermes
@@ -2346,6 +2346,7 @@ TARGET_DIRS_IMLIB=1
 TARGET_DIRS_OPENGLES=1
 TARGET_DIRS_OBJCRTL=1
 TARGET_DIRS_OPENCL=1
+TARGET_DIRS_OPENAL=1
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 TARGET_DIRS_HASH=1
@@ -3242,6 +3243,7 @@ TARGET_DIRS_BZIP2=1
 TARGET_DIRS_HERMES=1
 TARGET_DIRS_FV=1
 TARGET_DIRS_OPENGL=1
+TARGET_DIRS_SDL=1
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 TARGET_DIRS_HASH=1

+ 2 - 2
packages/Makefile.fpc

@@ -27,7 +27,7 @@ dirs_freebsd=fv fcl-web fastcgi fcl-async ibase mysql ncurses zlib oracle odbc p
                users iconvenc gmp fcl-extra libxml
 dirs_darwin=fv fcl-web fastcgi fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick \
                 libpng gdbm tcl syslog libcurl bfd aspell utmp fftw pcap openssl numlib iconvenc gmp fcl-extra univint
-dirs_i386_darwin=graph sdl opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms  gnome1 httpd13 httpd20 httpd22 imlib opengles objcrtl opencl
+dirs_i386_darwin=graph sdl opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms  gnome1 httpd13 httpd20 httpd22 imlib opengles objcrtl opencl openal
 dirs_powerpc_darwin=graph sdl opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms gnome1 httpd13 httpd20 httpd22 imlib objcrtl
 dirs_x86_64_darwin=opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms gnome1 httpd13 httpd20 httpd22 imlib
 dirs_powerpc64_darwin=opengl x11 cairo gtk1 gtk2 librsvg fpgtk xforms gnome1 httpd13 httpd20 httpd22 imlib
@@ -60,7 +60,7 @@ dirs_netwlibc=fv zlib unzip
 dirs_palmos=palmunits
 dirs_go32v2=fv graph unzip gdbint
 dirs_amiga=amunits
-dirs_morphos=fv opengl
+dirs_morphos=fv opengl sdl
 
 [install]
 fpcpackage=y

+ 1 - 1
packages/fcl-db/src/base/bufdataset.pas

@@ -2257,7 +2257,7 @@ begin
     end;
   TmpRecBuffer := (FCurrentIndex as TDoubleLinkedBufIndex).FFirstRecBuf;
   for recnr := 1 to value-1 do
-    TmpRecBuffer := TmpRecBuffer^.next;
+    TmpRecBuffer := TmpRecBuffer[FCurrentIndex.IndNr].next;
   GotoBookmark(@TmpRecBuffer);
 end;
 

+ 2 - 2
packages/fcl-db/src/sqldb/sqldb.pp

@@ -1606,12 +1606,12 @@ end;
 
 procedure TCustomSQLQuery.SetDeleteSQL(const AValue: TStringlist);
 begin
-  FDeleteQry.Assign(AValue);
+  FDeleteSQL.Assign(AValue);
 end;
 
 procedure TCustomSQLQuery.SetInsertSQL(const AValue: TStringlist);
 begin
-  FInsertQry.Assign(AValue);
+  FInsertSQL.Assign(AValue);
 end;
 
 Procedure TCustomSQLQuery.SetDataSource(AVAlue : TDatasource);

+ 1 - 1
packages/pthreads/src/pthrbsd.inc

@@ -124,7 +124,7 @@ const
 
      psem_t = ^sem_t;
      TSemaphore         = sem_t;
-     PSemaphore   = ^TSemaphore;
+     PSemaphore   = psem_t;
 
     {
      Primitive system data type definitions required by P1003.1c.

+ 1 - 1
packages/pthreads/src/pthrlinux.inc

@@ -90,7 +90,7 @@ type
 
   // procedural types used in parameters to pthread functions
 
-  TStartRoutine = function (_para1:pointer): cint; cdecl;
+  TStartRoutine = function (_para1:pointer): Pointer; cdecl;
   TKeyValueDestructor = procedure(ValueInKey: Pointer); cdecl;
   TInitOnceProc = Procedure;cdecl;
   TForkHandler = procedure; cdecl;

+ 2 - 2
rtl/objpas/classes/classesh.inc

@@ -1510,8 +1510,8 @@ type
     destructor Destroy; override;
     procedure AfterConstruction; override;
     procedure Start;
-    procedure Resume;
-    procedure Suspend;
+    procedure Resume; deprecated;
+    procedure Suspend; deprecated;
     procedure Terminate;
     function WaitFor: Integer;
     class procedure Synchronize(AThread: TThread; AMethod: TThreadMethod);

+ 1 - 0
rtl/objpas/classes/stringl.inc

@@ -851,6 +851,7 @@ Var
   S : String;
 begin
   S:=Text;
+  if S = '' then Exit;
   Stream.WriteBuffer(Pointer(S)^,Length(S));
 end;
 

+ 39 - 3
rtl/objpas/sysutils/sysutilh.inc

@@ -41,21 +41,57 @@ type
 
    LongRec = packed record
       case Integer of
+{$ifdef FPC_LITTLE_ENDIAN}
         0 : (Lo,Hi : Word);
+{$else FPC_LITTLE_ENDIAN}
+        0 : (Hi,Lo : Word);
+{$endif FPC_LITTLE_ENDIAN}
         1 : (Bytes : Array[0..3] of Byte);
    end;
 
    WordRec = packed record
+{$ifdef FPC_LITTLE_ENDIAN}
      Lo,Hi : Byte;
+{$else FPC_LITTLE_ENDIAN}
+     Hi,Lo : Byte;
+{$endif FPC_LITTLE_ENDIAN}
    end;
 
    Int64Rec = packed record
       case integer of
+{$ifdef FPC_LITTLE_ENDIAN}
         0 : (Lo,Hi : Cardinal);
+{$else FPC_LITTLE_ENDIAN}
+        0 : (Hi,Lo : Cardinal);
+{$endif FPC_LITTLE_ENDIAN}
         1 : (Words : Array[0..3] of Word);
         2 : (Bytes : Array[0..7] of Byte);
    end;
 
+   Int128Rec = packed record
+      case integer of
+{$ifdef FPC_LITTLE_ENDIAN}
+        0 : (Lo,Hi : QWord);
+{$else FPC_LITTLE_ENDIAN}
+        0 : (Hi,Lo : QWord);
+{$endif FPC_LITTLE_ENDIAN}
+        1 : (DWords : Array[0..3] of DWord);
+        2 : (Words : Array[0..7] of Word);
+        3 : (Bytes : Array[0..15] of Byte);
+   end;
+
+   OWordRec = packed record
+      case integer of
+{$ifdef FPC_LITTLE_ENDIAN}
+        0 : (Lo,Hi : QWord);
+{$else FPC_LITTLE_ENDIAN}
+        0 : (Hi,Lo : QWord);
+{$endif FPC_LITTLE_ENDIAN}
+        1 : (DWords : Array[0..3] of DWord);
+        2 : (Words : Array[0..7] of Word);
+        3 : (Bytes : Array[0..15] of Byte);
+   end;
+
    PByteArray = ^TByteArray;
    TByteArray = Array[0..32767] of Byte;
 
@@ -226,7 +262,7 @@ Type
   { unicode string functions }
   {$i sysunih.inc}
 {$endif FPC_HAS_UNICODESTRING}
-  
+
   { Read filename handling functions declaration }
   {$i finah.inc}
 
@@ -246,9 +282,9 @@ Type
 
   function SafeLoadLibrary(const FileName: AnsiString;
     ErrorMode: DWord = {$ifdef windows}SEM_NOOPENFILEERRORBOX{$else windows}0{$endif windows}): HMODULE;
-    
+
   function GetModuleName(Module: HMODULE): string;
-  
+
 { some packages and unit related constants for compatibility }
 
 const

+ 38 - 30
rtl/objpas/types.pp

@@ -344,50 +344,58 @@ end;
 
 
 function IntersectRect(var Rect : TRect;const R1,R2 : TRect) : Boolean;
-
+var
+  lRect: TRect;
 begin
-  Rect:=R1;
-  with R2 do
-    begin
-    if Left>R1.Left then
-      Rect.Left:=Left;
-    if Top>R1.Top then
-      Rect.Top:=Top;
-    if Right<R1.Right then
-      Rect.Right:=Right;
-    if Bottom<R1.Bottom then
-      Rect.Bottom:=Bottom;
-    end;
-  if IsRectEmpty(Rect) then
-    begin
+  lRect := R1;
+  if R2.Left > R1.Left then
+    lRect.Left := R2.Left;
+  if R2.Top > R1.Top then
+    lRect.Top := R2.Top;
+  if R2.Right < R1.Right then
+    lRect.Right := R2.Right;
+  if R2.Bottom < R1.Bottom then
+    lRect.Bottom := R2.Bottom;
+
+  // The var parameter is only assigned in the end to avoid problems
+  // when passing the same rectangle in the var and const parameters.
+  // See http://bugs.freepascal.org/view.php?id=17722
+  if IsRectEmpty(lRect) then
+  begin
     FillChar(Rect,SizeOf(Rect),0);
     IntersectRect:=false;
-    end
+  end
   else
+  begin
     IntersectRect:=true;
+    Rect := lRect;
+  end;	
 end;
 
 function UnionRect(var Rect : TRect;const R1,R2 : TRect) : Boolean;
+var
+  lRect: TRect;
 begin
-  Rect:=R1;
-  with R2 do
-    begin
-    if Left<R1.Left then
-      Rect.Left:=Left;
-    if Top<R1.Top then
-      Rect.Top:=Top;
-    if Right>R1.Right then
-      Rect.Right:=Right;
-    if Bottom>R1.Bottom then
-      Rect.Bottom:=Bottom;
-    end;
+  lRect:=R1;
+  if R2.Left<R1.Left then
+    lRect.Left:=R2.Left;
+  if R2.Top<R1.Top then
+    lRect.Top:=R2.Top;
+  if R2.Right>R1.Right then
+    lRect.Right:=R2.Right;
+  if R2.Bottom>R1.Bottom then
+    lRect.Bottom:=R2.Bottom;
+
   if IsRectEmpty(Rect) then
-    begin
+  begin
     FillChar(Rect,SizeOf(Rect),0);
     UnionRect:=false;
-    end
+  end
   else
+  begin
+    Rect:=lRect;
     UnionRect:=true;
+  end;  
 end;
 
 function IsRectEmpty(const Rect : TRect) : Boolean;

+ 3 - 34
rtl/win/sysutils.pp

@@ -156,15 +156,10 @@ function ConvertEraString(Count ,Year,Month,Day : integer) : string; forward;
 { Include platform independent implementation part }
 {$i sysutils.inc}
 
-function SysGetTempFileName(lpPathName:LPCSTR;
-                            lpPrefixString:LPCSTR;
-                            uUnique:UINT;
-                            lpTempFileName:LPSTR):UINT;stdcall;external 'kernel32' name 'GetTempFileNameA';
-
 function GetTempFileName(Dir,Prefix: PChar; uUnique: DWORD; TempFileName: PChar):DWORD;
 
 begin
-  Result:=SysGetTempFileName(Dir,Prefix,uUnique,TempFileName);
+  Result:= Windows.GetTempFileNameA(Dir,Prefix,uUnique,TempFileName);
 end;
 
 
@@ -217,11 +212,6 @@ end;
                               File Functions
 ****************************************************************************}
 
-var
-  SetFilePointerEx : function(hFile : THandle;
-    liDistanceToMove : int64;lpNewFilePointer : pint64;
-    dwMoveMethod : DWord) : ByteBool;stdcall;
-
 Function FileOpen (Const FileName : string; Mode : Integer) : THandle;
 const
   AccessMode: array[0..2] of Cardinal  = (
@@ -487,9 +477,6 @@ end;
                               Disk Functions
 ****************************************************************************}
 
-function GetDiskFreeSpace(drive:pchar;var sector_cluster,bytes_sector,
-                          freeclusters,totalclusters:longint):longbool;
-         stdcall;external 'kernel32' name 'GetDiskFreeSpaceA';
 type
    TGetDiskFreeSpaceEx = function(drive:pchar;var availableforcaller,total,free):longbool;stdcall;
 
@@ -500,7 +487,7 @@ function diskfree(drive : byte) : int64;
 var
   disk : array[1..4] of char;
   secs,bytes,
-  free,total : longint;
+  free,total : dword;
   qwtotal,qwfree,qwcaller : int64;
 begin
   if drive=0 then
@@ -536,7 +523,7 @@ function disksize(drive : byte) : int64;
 var
   disk : array[1..4] of char;
   secs,bytes,
-  free,total : longint;
+  free,total : dword;
   qwtotal,qwfree,qwcaller : int64;
 begin
   if drive=0 then
@@ -892,14 +879,6 @@ end;
                            Target Dependent
 ****************************************************************************}
 
-function FormatMessageA(dwFlags     : DWORD;
-                        lpSource    : Pointer;
-                        dwMessageId : DWORD;
-                        dwLanguageId: DWORD;
-                        lpBuffer    : PCHAR;
-                        nSize       : DWORD;
-                        Arguments   : Pointer): DWORD; stdcall;external 'kernel32' name 'FormatMessageA';
-
 function SysErrorMessage(ErrorCode: Integer): String;
 const
   MaxMsgSize = Format_Message_Max_Width_Mask;
@@ -1102,16 +1081,6 @@ begin
     end;
 end;
 
-
-function FreeLibrary(hLibModule : THANDLE) : longbool;
-  stdcall;external 'kernel32' name 'FreeLibrary';
-function GetVersionEx(var VersionInformation:TOSVERSIONINFO) : longbool;
-  stdcall;external 'kernel32' name 'GetVersionExA';
-function LoadLibrary(lpLibFileName : pchar):THandle;
-  stdcall;external 'kernel32' name 'LoadLibraryA';
-function GetProcAddress(hModule : THandle;lpProcName : pchar) : pointer;
-  stdcall;external 'kernel32' name 'GetProcAddress';
-
 Const
   CSIDL_PROGRAMS                = $0002; { %SYSTEMDRIVE%\Program Files                                      }
   CSIDL_PERSONAL                = $0005; { %USERPROFILE%\My Documents                                       }

+ 1 - 1
tests/test/units/fpcunit/tclist.pp

@@ -75,9 +75,9 @@ type
   { TMyList }
 
   TMyList = Class(TList)
-    procedure Notify(Ptr: Pointer; Action: TListNotification); override;
     FLastPointer : Pointer;
     FLastAction : TListNotification;
+    procedure Notify(Ptr: Pointer; Action: TListNotification); override;
   end;
   
 

+ 28 - 175
tests/test/units/fpcunit/testclasses.lpi

@@ -1,19 +1,22 @@
 <?xml version="1.0"?>
 <CONFIG>
   <ProjectOptions>
-    <PathDelim Value="/"/>
-    <Version Value="6"/>
+    <Version Value="8"/>
     <General>
+      <Flags>
+        <SaveOnlyProjectUnits Value="True"/>
+        <LRSInOutputDirectory Value="False"/>
+      </Flags>
+      <SessionStorage Value="InProjectDir"/>
       <MainUnit Value="0"/>
-      <IconPath Value="./"/>
       <TargetFileExt Value=""/>
-      <Title Value="findnested"/>
-      <ActiveEditorIndexAtStart Value="1"/>
+      <Title Value="Test classes"/>
+      <UseAppBundle Value="False"/>
     </General>
     <VersionInfo>
-      <ProjectVersion Value=""/>
       <Language Value=""/>
       <CharSet Value=""/>
+      <StringTable ProductVersion="" CompanyName="" FileDescription="" FileVersion="" InternalName="" OriginalFilename="" ProductName=""/>
     </VersionInfo>
     <PublishOptions>
       <Version Value="2"/>
@@ -35,215 +38,68 @@
         <PackageName Value="FCL"/>
       </Item2>
     </RequiredPackages>
-    <Units Count="21">
+    <Units Count="9">
       <Unit0>
         <Filename Value="testclasses.lpr"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="testclasses"/>
-        <CursorPos X="63" Y="7"/>
-        <TopLine Value="1"/>
-        <EditorIndex Value="0"/>
-        <UsageCount Value="92"/>
-        <Loaded Value="True"/>
       </Unit0>
       <Unit1>
         <Filename Value="tcfindnested.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tcfindnested"/>
-        <CursorPos X="14" Y="17"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="92"/>
       </Unit1>
       <Unit2>
         <Filename Value="tcstringlist.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tcstringlist"/>
-        <CursorPos X="1" Y="1"/>
-        <TopLine Value="25"/>
-        <UsageCount Value="92"/>
       </Unit2>
       <Unit3>
         <Filename Value="tccollection.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tccollection"/>
-        <CursorPos X="1" Y="1"/>
-        <TopLine Value="436"/>
-        <UsageCount Value="92"/>
       </Unit3>
       <Unit4>
         <Filename Value="tclist.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tclist"/>
-        <CursorPos X="27" Y="67"/>
-        <TopLine Value="51"/>
-        <EditorIndex Value="3"/>
-        <UsageCount Value="92"/>
-        <Loaded Value="True"/>
       </Unit4>
       <Unit5>
         <Filename Value="tcpersistent.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tcpersistent"/>
-        <CursorPos X="1" Y="1"/>
-        <TopLine Value="1"/>
-        <EditorIndex Value="4"/>
-        <UsageCount Value="92"/>
-        <Loaded Value="True"/>
       </Unit5>
       <Unit6>
         <Filename Value="tclinkedlist.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tclinkedlist"/>
-        <CursorPos X="30" Y="46"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="92"/>
       </Unit6>
       <Unit7>
-        <Filename Value="../../../../fpc/rtl/objpas/classes/classesh.inc"/>
-        <CursorPos X="14" Y="432"/>
-        <TopLine Value="401"/>
-        <UsageCount Value="3"/>
-      </Unit7>
-      <Unit8>
-        <Filename Value="../../../../fpc/rtl/objpas/classes/collect.inc"/>
-        <CursorPos X="51" Y="319"/>
-        <TopLine Value="293"/>
-        <UsageCount Value="3"/>
-      </Unit8>
-      <Unit9>
-        <Filename Value="../objpas/classes/stringl.inc"/>
-        <CursorPos X="25" Y="800"/>
-        <TopLine Value="787"/>
-        <UsageCount Value="4"/>
-      </Unit9>
-      <Unit10>
-        <Filename Value="../../../lazarus/components/fpcunit/console/consoletestrunner.pas"/>
-        <UnitName Value="consoletestrunner"/>
-        <CursorPos X="38" Y="309"/>
-        <TopLine Value="45"/>
-        <UsageCount Value="4"/>
-      </Unit10>
-      <Unit11>
-        <Filename Value="../../packages/fcl-fpcunit/src/testutils.pp"/>
-        <UnitName Value="testutils"/>
-        <CursorPos X="59" Y="10"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="45"/>
-      </Unit11>
-      <Unit12>
-        <Filename Value="../../packages/fcl-fpcunit/src/fpcunit.pp"/>
-        <UnitName Value="fpcunit"/>
-        <CursorPos X="1" Y="1042"/>
-        <TopLine Value="1020"/>
-        <EditorIndex Value="2"/>
-        <UsageCount Value="46"/>
-        <Loaded Value="True"/>
-      </Unit12>
-      <Unit13>
-        <Filename Value="../../packages/fcl-fpcunit/src/testregistry.pp"/>
-        <UnitName Value="testregistry"/>
-        <CursorPos X="1" Y="117"/>
-        <TopLine Value="94"/>
-        <UsageCount Value="45"/>
-      </Unit13>
-      <Unit14>
-        <Filename Value="../inc/system.inc"/>
-        <CursorPos X="1" Y="730"/>
-        <TopLine Value="707"/>
-        <UsageCount Value="4"/>
-      </Unit14>
-      <Unit15>
-        <Filename Value="../objpas/classes/classesh.inc"/>
-        <CursorPos X="15" Y="601"/>
-        <TopLine Value="579"/>
-        <UsageCount Value="4"/>
-      </Unit15>
-      <Unit16>
-        <Filename Value="../../../lazarus/components/fpcunit/console/fpcunitconsolerunner.pas"/>
-        <UnitName Value="fpcunitconsolerunner"/>
-        <CursorPos X="62" Y="14"/>
-        <TopLine Value="1"/>
-        <UsageCount Value="22"/>
-      </Unit16>
-      <Unit17>
         <Filename Value="tccompstreaming.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tccompstreaming"/>
-        <CursorPos X="34" Y="779"/>
-        <TopLine Value="777"/>
-        <EditorIndex Value="1"/>
-        <UsageCount Value="22"/>
-        <Loaded Value="True"/>
-      </Unit17>
-      <Unit18>
-        <Filename Value="../objpas/typinfo.pp"/>
-        <UnitName Value="typinfo"/>
-        <CursorPos X="38" Y="248"/>
-        <TopLine Value="244"/>
-        <UsageCount Value="11"/>
-      </Unit18>
-      <Unit19>
+      </Unit7>
+      <Unit8>
         <Filename Value="tcresref.pp"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="tcresref"/>
-        <CursorPos X="12" Y="492"/>
-        <TopLine Value="484"/>
-        <EditorIndex Value="5"/>
-        <UsageCount Value="22"/>
-        <Loaded Value="True"/>
-      </Unit19>
-      <Unit20>
-        <Filename Value="resref.inc"/>
-        <CursorPos X="25" Y="185"/>
-        <TopLine Value="174"/>
-        <EditorIndex Value="6"/>
-        <UsageCount Value="11"/>
-        <Loaded Value="True"/>
-      </Unit20>
+      </Unit8>
     </Units>
-    <JumpHistory Count="9" HistoryIndex="8">
-      <Position1>
-        <Filename Value="tcresref.pp"/>
-        <Caret Line="201" Column="36" TopLine="151"/>
-      </Position1>
-      <Position2>
-        <Filename Value="resref.inc"/>
-        <Caret Line="278" Column="34" TopLine="238"/>
-      </Position2>
-      <Position3>
-        <Filename Value="resref.inc"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
-      </Position3>
-      <Position4>
-        <Filename Value="resref.inc"/>
-        <Caret Line="151" Column="1" TopLine="115"/>
-      </Position4>
-      <Position5>
-        <Filename Value="resref.inc"/>
-        <Caret Line="152" Column="46" TopLine="126"/>
-      </Position5>
-      <Position6>
-        <Filename Value="resref.inc"/>
-        <Caret Line="403" Column="49" TopLine="403"/>
-      </Position6>
-      <Position7>
-        <Filename Value="resref.inc"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
-      </Position7>
-      <Position8>
-        <Filename Value="tclist.pp"/>
-        <Caret Line="187" Column="9" TopLine="187"/>
-      </Position8>
-      <Position9>
-        <Filename Value="tcpersistent.pp"/>
-        <Caret Line="51" Column="15" TopLine="26"/>
-      </Position9>
-    </JumpHistory>
   </ProjectOptions>
   <CompilerOptions>
-    <Version Value="5"/>
+    <Version Value="9"/>
+    <Target>
+      <Filename Value="testclasses_textrunner$(ExeExt)"/>
+    </Target>
+    <SearchPaths>
+      <UnitOutputDirectory Value="units/$(TargetCPU)-$(TargetOS)"/>
+    </SearchPaths>
+    <Parsing>
+      <SyntaxOptions>
+        <UseAnsiStrings Value="False"/>
+      </SyntaxOptions>
+    </Parsing>
     <CodeGeneration>
-      <Generate Value="Faster"/>
       <TargetCPU Value="x86_64"/>
     </CodeGeneration>
     <Linking>
@@ -253,18 +109,15 @@
       </Debugging>
     </Linking>
     <Other>
+      <CompilerMessages>
+        <UseMsgFile Value="True"/>
+      </CompilerMessages>
       <CustomOptions Value="
 "/>
       <CompilerPath Value="$(CompPath)"/>
     </Other>
   </CompilerOptions>
   <Debugging>
-    <BreakPoints Count="1">
-      <Item1>
-        <Source Value="tcfindnested.pp"/>
-        <Line Value="98"/>
-      </Item1>
-    </BreakPoints>
     <Exceptions Count="2">
       <Item1>
         <Name Value="ECodetoolError"/>

+ 1 - 1
tests/test/units/fpcunit/testclasses.lpr

@@ -23,7 +23,7 @@ var
 begin
   Application := TMyTestRunner.Create(nil);
   Application.Initialize;
-  Application.Title:='Test classes';
+  Application.Title := 'Test classes';
   Application.Run;
   Application.Free;
 end.