mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 06:28:55 +02:00
Use single main file src/inc/varutils.pp for Windows and other OSes
This commit is contained in:
parent
a347e28dad
commit
8eb0d1eaed
@ -81,6 +81,7 @@ begin
|
||||
AddInclude('varutilh.inc');
|
||||
AddInclude('varerror.inc');
|
||||
AddInclude('varutils.inc',VarUtilsOSes-[win32,win64]);
|
||||
AddInclude('wvarutil.inc',[win32,win64]);
|
||||
AddInclude('cvarutil.inc');
|
||||
end;
|
||||
|
||||
|
@ -14,6 +14,15 @@
|
||||
**********************************************************************}
|
||||
|
||||
{$MODE ObjFPC}
|
||||
|
||||
{$ifndef NO_SMART_LINK}
|
||||
{$smartlink on}
|
||||
{$endif}
|
||||
|
||||
{$if defined (win32) or defined (win64)}
|
||||
{$define USE_WINDOWS_OLE_FUNCTIONS}
|
||||
{$endif}
|
||||
|
||||
{$IFNDEF FPC_DOTTEDUNITS}
|
||||
Unit varutils;
|
||||
{$ENDIF}
|
||||
@ -21,9 +30,21 @@ Unit varutils;
|
||||
Interface
|
||||
|
||||
{$IFDEF FPC_DOTTEDUNITS}
|
||||
Uses System.SysUtils, System.Variants;
|
||||
Uses
|
||||
System.SysUtils,
|
||||
{$ifdef USE_WINDOWS_OLE_FUNCTIONS}
|
||||
System.Types;
|
||||
{$else}
|
||||
System.Variants;
|
||||
[$endif}
|
||||
{$ELSE}
|
||||
uses sysutils, variants;
|
||||
uses
|
||||
sysutils,
|
||||
{$ifdef USE_WINDOWS_OLE_FUNCTIONS}
|
||||
Types;
|
||||
{$else}
|
||||
variants;
|
||||
[$endif}
|
||||
{$ENDIF}
|
||||
// Read definitions.
|
||||
|
||||
@ -35,8 +56,14 @@ Implementation
|
||||
|
||||
{$i cvarutil.inc}
|
||||
|
||||
// Code common to non-win32 platforms.
|
||||
{$ifdef USE_WINDOWS_OLE_FUNCTIONS}
|
||||
// Code common to Windows OS platforms.
|
||||
|
||||
{$i wvarutil.inc}
|
||||
{$else}
|
||||
// Code common to other platforms.
|
||||
|
||||
{$i varutils.inc}
|
||||
{$endif}
|
||||
|
||||
end.
|
||||
|
@ -1,42 +1,3 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 1999-2000 by the Free Pascal development team
|
||||
|
||||
Interface and OS-dependent part of variant support
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{$MODE ObjFPC}
|
||||
|
||||
{$ifndef NO_SMART_LINK}
|
||||
{$smartlink on}
|
||||
{$endif}
|
||||
|
||||
{$IFNDEF FPC_DOTTEDUNITS}
|
||||
Unit VarUtils;
|
||||
{$ENDIF FPC_DOTTEDUNITS}
|
||||
|
||||
Interface
|
||||
|
||||
{$IFDEF FPC_DOTTEDUNITS}
|
||||
Uses System.SysUtils,System.Types;
|
||||
{$ELSE FPC_DOTTEDUNITS}
|
||||
Uses sysutils,Types;
|
||||
{$ENDIF FPC_DOTTEDUNITS}
|
||||
|
||||
{$i varutilh.inc}
|
||||
|
||||
Implementation
|
||||
|
||||
{$i cvarutil.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
Windows external definitions.
|
||||
---------------------------------------------------------------------}
|
||||
@ -78,4 +39,4 @@ function SafeArrayUnlock(psa: PVarArray): HRESULT; stdcall;external oleaut;
|
||||
function VarDateFromStr(const strIn: POleStr; alcid: DWORD; dwFlags: Longint; out dateOut: Double): HRESULT; stdcall; external oleaut; overload;
|
||||
function VarDateFromStr(const strIn: POleStr; alcid: DWORD; dwFlags: Longint; out dateOut: TDateTime): HRESULT; stdcall; external oleaut; overload;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user