浏览代码

+ signal hooking dummies

git-svn-id: trunk@1103 -
florian 20 年之前
父节点
当前提交
ee9862d231
共有 1 个文件被更改,包括 38 次插入0 次删除
  1. 38 0
      rtl/unix/sysutils.pp

+ 38 - 0
rtl/unix/sysutils.pp

@@ -36,12 +36,50 @@ uses
 
 Procedure AddDisk(const path:string);
 
+{ the following is Kylix compatibility stuff, it should be moved to a
+  special compatibilty unit (FK) }
+  const
+    RTL_SIGINT     = 0;
+    RTL_SIGFPE     = 1;
+    RTL_SIGSEGV    = 2;
+    RTL_SIGILL     = 3;
+    RTL_SIGBUS     = 4;
+    RTL_SIGQUIT    = 5;
+    RTL_SIGLAST    = RTL_SIGQUIT;
+    RTL_SIGDEFAULT = -1;
+
+  type
+    TSignalState = (ssNotHooked, ssHooked, ssOverridden);
+
+function InquireSignal(RtlSigNum: Integer): TSignalState;
+procedure AbandonSignalHandler(RtlSigNum: Integer);
+procedure HookSignal(RtlSigNum: Integer);
+procedure UnhookSignal(RtlSigNum: Integer; OnlyIfHooked: Boolean = True);
 
 implementation
 
 Uses
   {$ifdef FPC_USE_LIBC}initc{$ELSE}Syscall{$ENDIF}, Baseunix, unixutil;
 
+function InquireSignal(RtlSigNum: Integer): TSignalState;
+  begin
+  end;
+
+
+procedure AbandonSignalHandler(RtlSigNum: Integer);
+  begin
+  end;
+
+
+procedure HookSignal(RtlSigNum: Integer);
+  begin
+  end;
+
+
+procedure UnhookSignal(RtlSigNum: Integer; OnlyIfHooked: Boolean = True);
+  begin
+  end;
+
 {$Define OS_FILEISREADONLY} // Specific implementation for Unix.
 
 Function getenv(name:shortstring):Pchar; external name 'FPC_SYSC_FPGETENV';