diff --git a/rtl/objpas/sysutils/sysutilh.inc b/rtl/objpas/sysutils/sysutilh.inc index d414e6b9f9..6a1e2b419c 100644 --- a/rtl/objpas/sysutils/sysutilh.inc +++ b/rtl/objpas/sysutils/sysutilh.inc @@ -473,3 +473,8 @@ Type Function GetCompiledArchitecture : TOSVersion.TArchitecture; Function GetCompiledPlatform : TOSVersion.TPlatform; + +{$IFNDEF HAS_INVALIDHANDLE} +const + INVALID_HANDLE_VALUE = DWORD(-1); +{$ENDIF} diff --git a/rtl/win/sysutils.pp b/rtl/win/sysutils.pp index 5a09c11e7a..6b4abc27e0 100644 --- a/rtl/win/sysutils.pp +++ b/rtl/win/sysutils.pp @@ -49,6 +49,10 @@ uses {$DEFINE OS_FILESETDATEBYNAME} {$DEFINE HAS_FILEGETDATETIMEINFO} +{$DEFINE HAS_INVALIDHANDLE} +const + INVALID_HANDLE_VALUE = {$IFDEF FPC_DOTTEDUNITS}WinApi.{$ENDIF}Windows.INVALID_HANDLE_VALUE; + // this target has an fileflush implementation, don't include dummy {$DEFINE SYSUTILS_HAS_FILEFLUSH_IMPL}