From 21425e303cfea217dcb86c174b297f53e651c13c Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 7 Jun 2005 20:48:31 +0000 Subject: [PATCH] + Removed HASVARIANT define git-svn-id: trunk@244 - --- rtl/atari/system.pas | 2 -- rtl/beos/system.pp | 2 -- rtl/bsd/system.pp | 2 -- rtl/emx/system.pas | 2 -- rtl/go32v2/system.pp | 2 -- rtl/inc/compproc.inc | 2 -- rtl/inc/objpash.inc | 2 -- rtl/inc/rtti.inc | 8 -------- rtl/inc/system.inc | 2 -- rtl/inc/systemh.inc | 4 ---- rtl/linux/system.pp | 2 -- rtl/macos/system.pp | 2 -- rtl/morphos/system.pp | 2 -- rtl/netware/system.pp | 2 -- rtl/netwlibc/system.pp | 2 -- rtl/objpas/cvarutil.inc | 2 -- rtl/objpas/typinfo.pp | 3 --- rtl/objpas/varutilh.inc | 2 -- rtl/objpas/varutils.inc | 2 -- rtl/os2/system.pas | 2 -- rtl/solaris/system.pp | 2 -- rtl/watcom/system.pp | 2 -- rtl/win32/system.pp | 2 -- rtl/win32/varutils.pp | 2 -- rtl/win32/wininc/struct.inc | 38 ------------------------------------- 25 files changed, 95 deletions(-) diff --git a/rtl/atari/system.pas b/rtl/atari/system.pas index 42ba03d171..62cf110ce2 100644 --- a/rtl/atari/system.pas +++ b/rtl/atari/system.pas @@ -766,7 +766,5 @@ begin errno := 0; { Setup command line arguments } argc:=GetParamCount(args); -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} end. diff --git a/rtl/beos/system.pp b/rtl/beos/system.pp index a76287c961..9e73ff5f23 100644 --- a/rtl/beos/system.pp +++ b/rtl/beos/system.pp @@ -539,8 +539,6 @@ begin (* This should be changed to a real value during *) (* thread driver initialization if appropriate. *) ThreadID := 1; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; end. diff --git a/rtl/bsd/system.pp b/rtl/bsd/system.pp index bf0ae742e0..a05ca7870a 100644 --- a/rtl/bsd/system.pp +++ b/rtl/bsd/system.pp @@ -254,8 +254,6 @@ Begin SetupCmdLine; { threading } InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; End. diff --git a/rtl/emx/system.pas b/rtl/emx/system.pas index a026bedada..5aea2e4881 100644 --- a/rtl/emx/system.pas +++ b/rtl/emx/system.pas @@ -571,9 +571,7 @@ begin InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} if os_Mode in [osDOS,osDPMI] then DosEnvInit; diff --git a/rtl/go32v2/system.pp b/rtl/go32v2/system.pp index 716ebc4e47..e5806b3574 100644 --- a/rtl/go32v2/system.pp +++ b/rtl/go32v2/system.pp @@ -648,8 +648,6 @@ Begin InitDPMIExcp; InstallDefaultHandlers; {$endif EXCEPTIONS_IN_SYSTEM} -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; End. diff --git a/rtl/inc/compproc.inc b/rtl/inc/compproc.inc index 5479681747..2e8e691322 100644 --- a/rtl/inc/compproc.inc +++ b/rtl/inc/compproc.inc @@ -202,7 +202,6 @@ Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); compil Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); compilerproc; Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); compilerproc; -{$ifdef HASVARIANT} procedure fpc_variant_copy(d,s : pointer);compilerproc; procedure fpc_write_text_variant(Len : Longint;var f : Text;const v : variant); compilerproc; function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc; @@ -211,7 +210,6 @@ function fpc_variant_to_interface(const v : variant) : iinterface;compilerproc; function fpc_interface_to_variant(const i : iinterface) : variant;compilerproc; procedure fpc_vararray_get(var d : variant;const s : variant;indices : psizeint;len : sizeint);compilerproc; procedure fpc_vararray_put(var d : variant;const s : variant;indices : psizeint;len : sizeint);compilerproc; -{$endif HASVARIANT} Procedure fpc_Read_End(var f:Text); compilerproc; Procedure fpc_ReadLn_End(var f : Text); compilerproc; diff --git a/rtl/inc/objpash.inc b/rtl/inc/objpash.inc index 3655215b57..eacb2dec72 100644 --- a/rtl/inc/objpash.inc +++ b/rtl/inc/objpash.inc @@ -296,9 +296,7 @@ {$ifdef HASCURRENCY} vtCurrency : (VCurrency: PCurrency); {$endif HASCURRENCY} -{$ifdef HASVARIANT} vtVariant : (VVariant: PVariant); -{$endif HASVARIANT} vtInterface : (VInterface: Pointer); vtWideString : (VWideString: Pointer); vtInt64 : (VInt64: PInt64); diff --git a/rtl/inc/rtti.inc b/rtl/inc/rtti.inc index 4f8a415c19..ff1bd4a1d5 100644 --- a/rtl/inc/rtti.inc +++ b/rtl/inc/rtti.inc @@ -136,10 +136,8 @@ begin tkObject, tkRecord: recordrtti(data,typeinfo,@int_initialize); -{$ifdef HASVARIANT} tkVariant: variant_init(PVarData(Data)^); -{$endif HASVARIANT} end; end; @@ -169,10 +167,8 @@ begin end; tkDynArray: fpc_dynarray_decr_ref(PPointer(Data)^,TypeInfo); -{$ifdef HASVARIANT} tkVariant: variant_clear(PVarData(Data)^); -{$endif HASVARIANT} end; end; @@ -193,10 +189,8 @@ begin fpc_dynarray_incr_ref(PPointer(Data)^); tkInterface: Intf_Incr_Ref(PPointer(Data)^); -{$ifdef HASVARIANT} tkVariant: variant_addref(pvardata(Data)^); -{$endif HASVARIANT} end; end; @@ -222,10 +216,8 @@ begin fpc_dynarray_decr_ref(PPointer(Data)^,TypeInfo); tkInterface: Intf_Decr_Ref(PPointer(Data)^); -{$ifdef HASVARIANT} tkVariant: variant_clear(pvardata(data)^); -{$endif HASVARIANT} end; end; diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 90eca003d3..c90e57edfd 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -279,9 +279,7 @@ end; Variant support *****************************************************************************} -{$ifdef HASVARIANT} {$i variant.inc} -{$endif HASVARIANT} {**************************************************************************** Run-Time Type Information (RTTI) ****************************************************************************} diff --git a/rtl/inc/systemh.inc b/rtl/inc/systemh.inc index 87d4e01075..40cb18e6e3 100644 --- a/rtl/inc/systemh.inc +++ b/rtl/inc/systemh.inc @@ -262,10 +262,8 @@ Type PDate = ^TDateTime; PError = ^Error; -{$ifdef HASVARIANT} PVariant = ^Variant; POleVariant = ^OleVariant; -{$endif HASVARIANT} PWideChar = ^WideChar; PPWideChar = ^PWideChar; @@ -712,9 +710,7 @@ const Variant support *****************************************************************************} -{$ifdef HASVARIANT} {$i varianth.inc} -{$endif HASVARIANT} {***************************************************************************** Internal helper routines support diff --git a/rtl/linux/system.pp b/rtl/linux/system.pp index 0803106bcb..9386af3d3b 100644 --- a/rtl/linux/system.pp +++ b/rtl/linux/system.pp @@ -243,8 +243,6 @@ Begin InOutRes:=0; { threading } InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; End. diff --git a/rtl/macos/system.pp b/rtl/macos/system.pp index c54b30650f..822efaae26 100644 --- a/rtl/macos/system.pp +++ b/rtl/macos/system.pp @@ -542,9 +542,7 @@ begin InOutRes:=0; errno:=0; InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; if StandAlone = 0 then diff --git a/rtl/morphos/system.pp b/rtl/morphos/system.pp index 548d2ace66..33f51312f5 100644 --- a/rtl/morphos/system.pp +++ b/rtl/morphos/system.pp @@ -325,8 +325,6 @@ begin { Arguments } GenerateArgs; InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; end. diff --git a/rtl/netware/system.pp b/rtl/netware/system.pp index dbe224cfe2..de61b76b17 100644 --- a/rtl/netware/system.pp +++ b/rtl/netware/system.pp @@ -479,8 +479,6 @@ Begin IsConsole := TRUE; ExitCode := 0; InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; End. diff --git a/rtl/netwlibc/system.pp b/rtl/netwlibc/system.pp index 17e16eefa8..2637fe38e6 100644 --- a/rtl/netwlibc/system.pp +++ b/rtl/netwlibc/system.pp @@ -550,8 +550,6 @@ Begin IsConsole := TRUE; ExitCode := 0; InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; End. diff --git a/rtl/objpas/cvarutil.inc b/rtl/objpas/cvarutil.inc index 1189afde9b..23c6f71dc7 100644 --- a/rtl/objpas/cvarutil.inc +++ b/rtl/objpas/cvarutil.inc @@ -12,7 +12,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************} -{$ifdef HASVARIANT} Resourcestring @@ -633,5 +632,4 @@ begin end; end; -{$endif HASVARIANT} diff --git a/rtl/objpas/typinfo.pp b/rtl/objpas/typinfo.pp index f9e2a77a5a..fa94f0d62d 100644 --- a/rtl/objpas/typinfo.pp +++ b/rtl/objpas/typinfo.pp @@ -29,9 +29,6 @@ unit typinfo; // temporary types: type -{$ifndef HASVARIANT} - Variant = Pointer; -{$endif} {$MINENUMSIZE 1 this saves a lot of memory } // if you change one of the following enumeration types diff --git a/rtl/objpas/varutilh.inc b/rtl/objpas/varutilh.inc index 9ba90dc461..f90a395016 100644 --- a/rtl/objpas/varutilh.inc +++ b/rtl/objpas/varutilh.inc @@ -16,7 +16,6 @@ **********************************************************************} -{$ifdef HASVARIANT} Type EVarianterror = Class(Exception) ErrCode : longint; @@ -99,5 +98,4 @@ const ARR_DISPATCH = $0400; ARR_VARIANT = $0800; -{$endif HASVARIANT} diff --git a/rtl/objpas/varutils.inc b/rtl/objpas/varutils.inc index f8fc8415f4..f76aaae820 100644 --- a/rtl/objpas/varutils.inc +++ b/rtl/objpas/varutils.inc @@ -13,7 +13,6 @@ **********************************************************************} -{$ifdef HASVARIANT} { --------------------------------------------------------------------- Some general stuff: Error handling and so on. ---------------------------------------------------------------------} @@ -718,4 +717,3 @@ begin Result:=psa^.ElementSize; end; -{$endif HASVARIANT} diff --git a/rtl/os2/system.pas b/rtl/os2/system.pas index b3e5b2578d..ae5d6b9502 100644 --- a/rtl/os2/system.pas +++ b/rtl/os2/system.pas @@ -757,9 +757,7 @@ begin DefaultFileType := ''; InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} {$IFDEF EXTDUMPGROW} { Int_HeapSize := high (cardinal);} diff --git a/rtl/solaris/system.pp b/rtl/solaris/system.pp index 930f6a4665..eadee43d88 100644 --- a/rtl/solaris/system.pp +++ b/rtl/solaris/system.pp @@ -224,8 +224,6 @@ Begin { Arguments } SetupCmdLine; InitSystemThreads; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; End. diff --git a/rtl/watcom/system.pp b/rtl/watcom/system.pp index f390dfadcc..660fe4157a 100644 --- a/rtl/watcom/system.pp +++ b/rtl/watcom/system.pp @@ -1529,8 +1529,6 @@ Begin InitDPMIExcp; InstallDefaultHandlers; {$endif EXCEPTIONS_IN_SYSTEM} -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; End. diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index ac7bfdd205..221e49e934 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -1092,9 +1092,7 @@ begin InitSystemThreads; { Reset internal error variable } errno:=0; -{$ifdef HASVARIANT} initvariantmanager; -{$endif HASVARIANT} initwidestringmanager; InitWin32Widestrings end. diff --git a/rtl/win32/varutils.pp b/rtl/win32/varutils.pp index 330e3b619b..25193c1850 100644 --- a/rtl/win32/varutils.pp +++ b/rtl/win32/varutils.pp @@ -35,7 +35,6 @@ Implementation Windows external definitions. ---------------------------------------------------------------------} -{$ifdef HASVARIANT} const oleaut = 'oleaut32.dll'; @@ -69,6 +68,5 @@ function SafeArrayPutElement(psa: PVarArray; Indices: PVarArrayCoorArray; const function SafeArrayRedim(psa: PVarArray; const NewBound: TVarArrayBound): HRESULT; stdcall;external oleaut; function SafeArrayUnaccessData(psa: PVarArray): HRESULT; stdcall;external oleaut; function SafeArrayUnlock(psa: PVarArray): HRESULT; stdcall;external oleaut; -{$endif HASVARIANT} end. diff --git a/rtl/win32/wininc/struct.inc b/rtl/win32/wininc/struct.inc index 264353fdbe..8a20740d10 100644 --- a/rtl/win32/wininc/struct.inc +++ b/rtl/win32/wininc/struct.inc @@ -6651,44 +6651,6 @@ TWOHandleArray = array[0..MAXIMUM_WAIT_OBJECTS-1] of HANDLE; PWOHandleArray = ^TWOHandleArray; -{$ifndef HASVARIANT} - { This causes trouble with a compiler which has real variant support FK } - { Variant support } - TVarType = Word; - PVariant = ^TVariant; - -{ This variant type definition doesn't contain _all_ possible variant - types - some are not possible atm with FPC, e.g. VT_BSTR to mention - This is part of the variant definition used by Windows API not that Borland - TVarRec one which is already partially implemented. - Needed for some COM objects } - - TVariant = record - vt: TVarType; - wReserved1: Word; - wReserved2: Word; - wReserved3: Word; - case Integer of - VT_UI1: (bVal: Byte); - VT_I2: (iVal: Smallint); - VT_I4: (lVal: Longint); - VT_R4: (fltVal: Single); - VT_R8: (dblVal: Double); - VT_BOOL: (vbool: WordBool); - VT_ERROR: (scode: HResult); - VT_BYREF or VT_UI1: (pbVal: ^Byte); - VT_BYREF or VT_I2: (piVal: ^Smallint); - VT_BYREF or VT_I4: (plVal: ^Longint); - VT_BYREF or VT_R4: (pfltVal: ^Single); - VT_BYREF or VT_R8: (pdblVal: ^Double); - VT_BYREF or VT_BOOL: (pbool: ^WordBool); - VT_BYREF or VT_ERROR: (pscode: ^HResult); - VT_BYREF: (byRef: Pointer); - end; - - VARIANT = TVariant; -{$endif HASVARIANT} - MMRESULT = Longint; type