Selaa lähdekoodia

* fixed hello world on sparc/solaris

git-svn-id: trunk@2462 -
florian 19 vuotta sitten
vanhempi
commit
6a03189443
4 muutettua tiedostoa jossa 22 lisäystä ja 8 poistoa
  1. 10 4
      rtl/solaris/ostypes.inc
  2. 3 2
      rtl/solaris/sparc/start.inc
  3. 7 2
      rtl/solaris/sysos.inc
  4. 2 0
      rtl/solaris/system.pp

+ 10 - 4
rtl/solaris/ostypes.inc

@@ -180,12 +180,18 @@ Const
   S_IFWHT = 57344;
   S_ISVTX = 512;
 
-CONST
+Const
  { Constansts for MMAP }
   MAP_PRIVATE   =2;
-  MAP_ANONYMOUS =$1000;
-
-
+  MAP_ANONYMOUS =$100;
+
+type
+  rlim_t = cULong;
+  PRLimit = ^TRLimit;
+  TRLimit = record
+    rlim_cur : rlim_t;
+    rlim_max : rlim_t;
+  end;
 
 {$i signal.inc}
 

+ 3 - 2
rtl/solaris/sparc/start.inc

@@ -89,8 +89,9 @@ asm
         sll     %o2, 2, %o2
         add     %o2, %o1, %o2
 
-        call    __fpstart
-        nop
+
+        // call    __fpstart
+        // nop
 
         call    PASCALMAIN
         nop

+ 7 - 2
rtl/solaris/sysos.inc

@@ -20,10 +20,15 @@ const clib = 'c';
 type libcint=longint;
      plibcint=^libcint;
 
-function geterrnolocation: Plibcint; cdecl;external clib name'__errno_location';
+var errno : libcint; cvar;
 
-function geterrno:libcint; [public, alias: 'FPC_SYS_GETERRNO'];
+function geterrnolocation: Plibcint; cdecl;
+begin
+ geterrnolocation:=@errno;
+end;
 
+
+function geterrno:libcint; [public, alias: 'FPC_SYS_GETERRNO'];
 begin
  geterrno:=geterrnolocation^;
 end;

+ 2 - 0
rtl/solaris/system.pp

@@ -18,6 +18,8 @@ interface
 
 {$define FPC_IS_SYSTEM}
 
+{$linklib m}
+
 { include system-independent routine headers }
 
 {$I sysunixh.inc}