Browse Source

+ more symbian stuff from Felipe Monteiro de Carvalho

git-svn-id: trunk@7057 -
florian 18 years ago
parent
commit
ef5c7a595d
4 changed files with 62 additions and 13 deletions
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/systems/i_symbian.pas
  3. 34 0
      rtl/symbian/sysosh.inc
  4. 26 12
      rtl/symbian/system.pp

+ 1 - 0
.gitattributes

@@ -5254,6 +5254,7 @@ rtl/symbian/sysdir.inc svneol=native#text/plain
 rtl/symbian/sysfile.inc svneol=native#text/plain
 rtl/symbian/sysfile.inc svneol=native#text/plain
 rtl/symbian/sysheap.inc svneol=native#text/plain
 rtl/symbian/sysheap.inc svneol=native#text/plain
 rtl/symbian/sysos.inc svneol=native#text/plain
 rtl/symbian/sysos.inc svneol=native#text/plain
+rtl/symbian/sysosh.inc svneol=native#text/plain
 rtl/symbian/system.pp svneol=native#text/plain
 rtl/symbian/system.pp svneol=native#text/plain
 rtl/symbian/systhrd.inc svneol=native#text/plain
 rtl/symbian/systhrd.inc svneol=native#text/plain
 rtl/ucmaps/8859-1.txt svneol=native#text/plain
 rtl/ucmaps/8859-1.txt svneol=native#text/plain

+ 1 - 1
compiler/systems/i_symbian.pas

@@ -58,7 +58,7 @@ unit i_symbian;
             Cprefix      : '_';
             Cprefix      : '_';
             newline      : #13#10;
             newline      : #13#10;
             dirsep       : '\';
             dirsep       : '\';
-            assem        : as_i386_pecoff;
+            assem        : as_gas;
             assemextern  : as_gas;
             assemextern  : as_gas;
             link         : nil;
             link         : nil;
             linkextern   : nil;
             linkextern   : nil;

+ 34 - 0
rtl/symbian/sysosh.inc

@@ -0,0 +1,34 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2007 by contributors of the Free Pascal Compiler
+
+    This file implements all the base types and limits required
+    for a minimal POSIX compliant subset required to port the compiler
+    to a new OS.
+
+    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.
+
+ **********************************************************************}
+
+{Platform specific information}
+type
+  THandle = Longint;
+  TThreadID = THandle;
+
+  { pthread_mutex_t }
+  PRTLCriticalSection = ^TRTLCriticalSection;
+  TRTLCriticalSection = record
+    __m_reserved: longint;
+    __m_count: longint;
+    __m_owner: pointer;
+    __m_kind:  longint;
+    __m_lock:  record
+       __status: sizeint;
+      __spinlock: longint;
+    end;
+  end;

+ 26 - 12
rtl/symbian/system.pp

@@ -152,30 +152,38 @@ begin
 end;
 end;
 
 
 {*****************************************************************************
 {*****************************************************************************
-                         Exit code and Entry Point
+                         System Dependent Exit code
 *****************************************************************************}
 *****************************************************************************}
 
 
-procedure PascalMain; stdcall; external name 'PASCALMAIN';
-procedure fpc_do_exit; stdcall; external name 'FPC_DO_EXIT';
+//procedure PascalMain; stdcall; external name 'PASCALMAIN';
+//procedure fpc_do_exit; stdcall; external name 'FPC_DO_EXIT';
 
 
-procedure SysInitStdIO;
+Procedure system_exit;
 begin
 begin
 
 
 end;
 end;
 
 
-procedure _E32Startup; stdcall; public name '_E32Startup';
+var
+  { value of the stack segment
+    to check if the call stack can be written on exceptions }
+  _SS : Cardinal;
+
+function Pascal_E32Main: Integer; cdecl; [public, alias: '_Pascal_E32Main'];
+var
+  ST : pointer;
 begin
 begin
-  IsLibrary:=false;
-  
-  PascalMain;
+  IsLibrary := false;
+
+//  PascalMain;
 
 
   { if we pass here there was no error }
   { if we pass here there was no error }
-  fpc_do_exit;
+  system_exit;
 end;
 end;
 
 
-{*****************************************************************************
-                         Process routines
-*****************************************************************************}
+procedure SysInitStdIO;
+begin
+
+end;
 
 
 (* ProcessID cached to avoid repeated calls to GetCurrentProcess. *)
 (* ProcessID cached to avoid repeated calls to GetCurrentProcess. *)
 
 
@@ -192,5 +200,11 @@ begin
   result := stklen;
   result := stklen;
 end;
 end;
 
 
+{
+const
+   Exe_entry_code : pointer = @Exe_entry;
+   Dll_entry_code : pointer = @Dll_entry;
+}
+
 begin
 begin
 end.
 end.