Browse Source

+ dummy setjmp/longjmp implementation for WebAssembly

git-svn-id: branches/wasm@48219 -
nickysn 4 years ago
parent
commit
774f6f650d
3 changed files with 29 additions and 2 deletions
  1. 1 0
      .gitattributes
  2. 26 0
      rtl/wasm32/setjump.inc
  3. 2 2
      rtl/wasm32/setjumph.inc

+ 1 - 0
.gitattributes

@@ -12201,6 +12201,7 @@ rtl/wasm32/int64p.inc svneol=native#text/plain
 rtl/wasm32/makefile.cpu svneol=native#text/plain
 rtl/wasm32/math.inc svneol=native#text/plain
 rtl/wasm32/set.inc svneol=native#text/plain
+rtl/wasm32/setjump.inc svneol=native#text/plain
 rtl/wasm32/setjumph.inc svneol=native#text/plain
 rtl/wasm32/wasm32.inc svneol=native#text/plain
 rtl/watcom/Makefile svneol=native#text/plain

+ 26 - 0
rtl/wasm32/setjump.inc

@@ -0,0 +1,26 @@
+{
+
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2008 by the Free Pascal development team.
+
+    SetJmp and LongJmp implementation for exception handling
+
+    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.
+
+ **********************************************************************}
+
+function fpc_setjmp(var S : jmp_buf) : shortint;[Public, alias : 'FPC_SETJMP'];compilerproc;
+  begin
+  end;
+
+
+procedure fpc_longjmp(var S : jmp_buf;value : shortint);[Public, alias : 'FPC_LONGJMP'];compilerproc;
+  begin
+  end;
+
+

+ 2 - 2
rtl/wasm32/setjumph.inc

@@ -19,5 +19,5 @@ type
    end;
    pjmp_buf = ^jmp_buf;
 
-function setjmp(var S : jmp_buf) : shortint;[external name 'FPC_SETJMP'];
-procedure longjmp(var S : jmp_buf;value : shortint);[external name 'FPC_LONGJMP'];
+function setjmp(var S : jmp_buf) : shortint;{[external name 'FPC_SETJMP'];}
+procedure longjmp(var S : jmp_buf;value : shortint);{[external name 'FPC_LONGJMP'];}