Explorar el Código

* Moved the common interface part of the win32 and win64 System units to the syswinh.inc include file.

git-svn-id: trunk@44996 -
yury hace 5 años
padre
commit
7b425ed4a6
Se han modificado 4 ficheros con 83 adiciones y 126 borrados
  1. 1 0
      .gitattributes
  2. 77 0
      rtl/win/syswinh.inc
  3. 3 65
      rtl/win32/system.pp
  4. 2 61
      rtl/win64/system.pp

+ 1 - 0
.gitattributes

@@ -12009,6 +12009,7 @@ rtl/win/systhrd.inc svneol=native#text/plain
 rtl/win/systlsdir.inc svneol=native#text/plain
 rtl/win/sysutils.pp svneol=native#text/plain
 rtl/win/syswin.inc svneol=native#text/plain
+rtl/win/syswinh.inc svneol=native#text/plain
 rtl/win/tthread.inc svneol=native#text/plain
 rtl/win/windirs.pp svneol=native#text/plain
 rtl/win/wininc/Makefile svneol=native#text/plain

+ 77 - 0
rtl/win/syswinh.inc

@@ -0,0 +1,77 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 1999-2020 by the Free Pascal development team.
+
+    FPC Pascal system unit header part shared by win32/win64.
+
+    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.
+
+ **********************************************************************}
+
+const
+ LineEnding = #13#10;
+ LFNSupport = true;
+ DirectorySeparator = '\';
+ DriveSeparator = ':';
+ ExtensionSeparator = '.';
+ PathSeparator = ';';
+ AllowDirectorySeparators : set of char = ['\','/'];
+ AllowDriveSeparators : set of char = [':'];
+{ FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
+ maxExitCode = 65535;
+ MaxPathLen = 260;
+ AllFilesMask = '*';
+
+type
+   PEXCEPTION_FRAME = ^TEXCEPTION_FRAME;
+   TEXCEPTION_FRAME = record
+     next : PEXCEPTION_FRAME;
+     handler : pointer;
+   end;
+
+const
+{ Default filehandles }
+  UnusedHandle    : THandle = THandle(-1);
+  StdInputHandle  : THandle = 0;
+  StdOutputHandle : THandle = 0;
+  StdErrorHandle  : THandle = 0;
+  System_exception_frame : PEXCEPTION_FRAME =nil;
+
+  FileNameCaseSensitive : boolean = false;
+  FileNameCasePreserving: boolean = true;
+  CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
+
+  sLineBreak = LineEnding;
+  DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
+
+var
+{ C compatible arguments }
+  argc : longint;
+  argv : ppchar;
+{ Win32 Info }
+  startupinfo : tstartupinfo deprecated;  // Delphi does not have one in interface
+  StartupConsoleMode : dword;
+  cmdshow     : longint;
+  DLLreason : dword;
+  DLLparam : PtrInt;
+const
+  hprevinst: qword=0;
+type
+  TDLL_Entry_Hook = procedure (dllparam : PtrInt);
+
+const
+  Dll_Process_Detach_Hook : TDLL_Entry_Hook = nil;
+  Dll_Thread_Attach_Hook : TDLL_Entry_Hook = nil;
+  Dll_Thread_Detach_Hook : TDLL_Entry_Hook = nil;
+
+Const
+  { it can be discussed whether fmShareDenyNone means read and write or read, write and delete, see
+    also http://bugs.freepascal.org/view.php?id=8898, this allows users to configure the used
+	value
+  }
+  fmShareDenyNoneFlags : DWord = 3;

+ 3 - 65
rtl/win32/system.pp

@@ -45,73 +45,11 @@ interface
 
 { include system-independent routine headers }
 {$I systemh.inc}
-
-const
- LineEnding = #13#10;
- LFNSupport = true;
- DirectorySeparator = '\';
- DriveSeparator = ':';
- ExtensionSeparator = '.';
- PathSeparator = ';';
- AllowDirectorySeparators : set of char = ['\','/'];
- AllowDriveSeparators : set of char = [':'];
-
-{ FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
- maxExitCode = 65535;
- MaxPathLen = 260;
- AllFilesMask = '*';
-
-type
-   PEXCEPTION_FRAME = ^TEXCEPTION_FRAME;
-   TEXCEPTION_FRAME = record
-     next : PEXCEPTION_FRAME;
-     handler : pointer;
-   end;
-
-const
-{ Default filehandles }
-  UnusedHandle    : THandle = THandle(-1);
-  StdInputHandle  : THandle = 0;
-  StdOutputHandle : THandle = 0;
-  StdErrorHandle  : THandle = 0;
-
-  FileNameCaseSensitive : boolean = false;
-  FileNameCasePreserving: boolean = true;
-  CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
-
-  sLineBreak = LineEnding;
-  DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
-
-  System_exception_frame : PEXCEPTION_FRAME =nil;
+{ include common windows headers }
+{$I syswinh.inc}
 
 var
-{ C compatible arguments }
-  argc : longint; public name 'operatingsystem_parameter_argc';
-  argv : ppchar; public name 'operatingsystem_parameter_argv';
-{ Win32 Info }
-  startupinfo : tstartupinfo deprecated;  // Delphi does not have one in interface
-  MainInstance,
-  cmdshow     : longint;
-  DLLreason : dword; public name 'operatingsystem_dllreason';
-  DLLparam : PtrInt; public name 'operatingsystem_dllparam';
-  StartupConsoleMode : DWORD;
-const
-  hprevinst: longint=0;
-
-type
-  TDLL_Entry_Hook = procedure (dllparam : PtrInt);
-
-const
-  Dll_Process_Detach_Hook : TDLL_Entry_Hook = nil;
-  Dll_Thread_Attach_Hook : TDLL_Entry_Hook = nil;
-  Dll_Thread_Detach_Hook : TDLL_Entry_Hook = nil;
-
-Const
-  { it can be discussed whether fmShareDenyNone means read and write or read, write and delete, see
-    also http://bugs.freepascal.org/view.php?id=8898, this allows users to configure the used
-	value
-  }
-  fmShareDenyNoneFlags : DWord = 3;
+  MainInstance : longint;
 
 implementation
 

+ 2 - 61
rtl/win64/system.pp

@@ -42,70 +42,11 @@ interface
 
 { include system-independent routine headers }
 {$I systemh.inc}
-
-const
- LineEnding = #13#10;
- LFNSupport = true;
- DirectorySeparator = '\';
- DriveSeparator = ':';
- ExtensionSeparator = '.';
- PathSeparator = ';';
- AllowDirectorySeparators : set of char = ['\','/'];
- AllowDriveSeparators : set of char = [':'];
-{ FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
- maxExitCode = 65535;
- MaxPathLen = 260;
- AllFilesMask = '*';
-
-type
-   PEXCEPTION_FRAME = ^TEXCEPTION_FRAME;
-   TEXCEPTION_FRAME = record
-     next : PEXCEPTION_FRAME;
-     handler : pointer;
-   end;
-
-const
-{ Default filehandles }
-  UnusedHandle    : THandle = THandle(-1);
-  StdInputHandle  : THandle = 0;
-  StdOutputHandle : THandle = 0;
-  StdErrorHandle  : THandle = 0;
-  System_exception_frame : PEXCEPTION_FRAME =nil;
-
-  FileNameCaseSensitive : boolean = false;
-  FileNameCasePreserving: boolean = true;
-  CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
-
-  sLineBreak = LineEnding;
-  DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
+{ include common windows headers }
+{$I syswinh.inc}
 
 var
-{ C compatible arguments }
-  argc : longint;
-  argv : ppchar;
-{ Win32 Info }
-  startupinfo : tstartupinfo deprecated;  // Delphi does not have one in interface
-  StartupConsoleMode : dword;
   MainInstance : qword;
-  cmdshow     : longint;
-  DLLreason : dword;
-  DLLparam : PtrInt;
-const
-  hprevinst: qword=0;
-type
-  TDLL_Entry_Hook = procedure (dllparam : PtrInt);
-
-const
-  Dll_Process_Detach_Hook : TDLL_Entry_Hook = nil;
-  Dll_Thread_Attach_Hook : TDLL_Entry_Hook = nil;
-  Dll_Thread_Detach_Hook : TDLL_Entry_Hook = nil;
-
-Const
-  { it can be discussed whether fmShareDenyNone means read and write or read, write and delete, see
-    also http://bugs.freepascal.org/view.php?id=8898, this allows users to configure the used
-	value
-  }
-  fmShareDenyNoneFlags : DWord = 3;
 
 implementation