Hi,

Here are the problems fixed in those patchs (thanks to the test suite) :
- correctly define the stack size for BeOS,
- implement a minimum nl_langinfo function to correctly initialize WideString support,
- add fgl unit in the BeOS RTL makefile
- SysOSAlloc now return nil when the system can not allocate the asked memory, - HAS_SYSOSFREE is no more defined with an empty implementation under BeOS. This was preventing FPC to reuse memory.
- there is now a basic implementation of CheckPointer under BeOS.

Olivier
Index: i_beos.pas
===================================================================
--- i_beos.pas	(revision 8949)
+++ i_beos.pas	(working copy)
@@ -83,7 +83,17 @@
                 maxCrecordalign : 4
               );
             first_parm_offset : 8;
-            stacksize    : 8192;
+            { Stack size used to be 256 K under BeOS. So, it was the value 
+              used in previous version of FPC for BeOS (but lost in the road 
+              to 2.* ;-).
+              According to buildtools/gcc/gcc/config/i386/beos-elf.h in the 
+              Haiku's repository, this value was increased to 1Mb since r4.1b3.
+              Under R5, this value is even greater. listarea report a default 
+              size of 16 Mb for the user stack of the main thread.
+              People who still use BeOS nowadays should use R5 (or Haiku), 
+              so i use this new value.  
+            }
+            stacksize    : 16 * 1024 * 1024;
             abi : abi_default
           );
 
Index: unix/cwstring.pp
===================================================================
--- unix/cwstring.pp	(revision 8949)
+++ unix/cwstring.pp	(working copy)
@@ -125,7 +125,15 @@
 function nl_langinfo(__item:nl_item):pchar;
 begin
   {$warning TODO BeOS nl_langinfo or more uptodate port of iconv...}  
-  Result := '';
+  // Now implement the minimum required to correctly initialize WideString support
+  case __item of
+    CODESET : Result := 'UTF-8'; // BeOS use UTF-8
+    else
+    begin
+      Assert(False, 'nl_langinfo was called with an unknown nl_item value');
+      Result := '';
+    end;    
+  end;
 end;
 {$endif}
 
Index: beos/Makefile.fpc
===================================================================
--- beos/Makefile.fpc	(revision 8949)
+++ beos/Makefile.fpc	(working copy)
@@ -11,7 +11,7 @@
 #      beos \
       errors dos dl objects \
       sysconst sysutils \
-      types charset ucomplex typinfo classes math varutils \
+      types charset ucomplex typinfo classes fgl math varutils \
       cpu mmx getopts heaptrc lineinfo lnfodwrf variants \
       rtlconsts syscall unix unixutil strutils termio initc \
       cmem crt video mouse keyboard \
@@ -167,6 +167,9 @@
 #                   $(UNIXINC)/systhrd$(PPUEXT)
         $(COMPILER) -Fi$(OBJPASDIR) -Fi$(OBJPASDIR)/classes classes.pp
 
+fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
+        $(COMPILER) $(OBJPASDIR)/fgl.pp
+
 typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
         $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
 
Index: beos/Makefile
===================================================================
--- beos/Makefile	(revision 8949)
+++ beos/Makefile	(working copy)
@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/08/22]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2007/09/14]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
@@ -246,160 +246,160 @@
 OBJPASDIR=$(RTL)/objpas
 GRAPHDIR=$(INC)/graph
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
+override TARGET_UNITS+=system baseunix unixtype ctypes objpas macpas strings errors dos dl objects sysconst sysutils types charset ucomplex typinfo classes fgl math varutils cpu mmx getopts heaptrc lineinfo lnfodwrf variants rtlconsts syscall unix unixutil strutils termio initc cmem crt video mouse keyboard dateutils fmtbcd sockets dynlibs cwstring
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_LOADERS+=prt0 cprt0 func dllprt
@@ -2504,6 +2504,8 @@
 classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
 		   sysutils$(PPUEXT) $(OBJPASDIR)/typinfo$(PPUEXT) types$(PPUEXT) $(OBJPASDIR)/rtlconsts$(PPUEXT) 
 	$(COMPILER) -Fi$(OBJPASDIR) -Fi$(OBJPASDIR)/classes classes.pp
+fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
+	$(COMPILER) $(OBJPASDIR)/fgl.pp
 typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
 	$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
 math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
Index: beos/sysheap.inc
===================================================================
--- beos/sysheap.inc	(revision 8949)
+++ beos/sysheap.inc	(working copy)
@@ -18,21 +18,19 @@
 
 function SysOSAlloc(size: ptruint): pointer;
 begin
+{  result:=Fpmmap(nil,Size,3,MAP_PRIVATE+MAP_ANONYMOUS,-1,0);}
   result := sbrk2(size);
-{  result:=Fpmmap(nil,Size,3,MAP_PRIVATE+MAP_ANONYMOUS,-1,0);
   if result=pointer(-1) then
     result:=nil
   else
     seterrno(0);
-}
 end;
 
-{$define HAS_SYSOSFREE}
+{ $ define HAS_SYSOSFREE}
 
 procedure SysOSFree(p: pointer; size: ptruint);
 begin
-//  fpmunmap(p, size);
-//  WriteLn('TODO : SysOSFree');
+  //  fpmunmap(p, size);
 end;
 
 
Index: inc/heaptrc.pp
===================================================================
--- inc/heaptrc.pp	(revision 8949)
+++ inc/heaptrc.pp	(working copy)
@@ -906,7 +906,17 @@
    ebss : ptruint; external name '__bss_end__';
 {$endif}
 
+{$ifdef BEOS}
+const
+  B_ERROR = -1;
 
+type
+  area_id   = Longint;
+
+function area_for(addr : Pointer) : area_id;
+            cdecl; external 'root' name 'area_for'; 
+{$endif BEOS}
+
 procedure CheckPointer(p : pointer); [public, alias : 'FPC_CHECKPOINTER'];
 var
   i  : ptruint;
@@ -1000,6 +1010,13 @@
   exit;
   {$endif}
 
+{$ifdef BEOS}
+  // if we find the address in a known area in our current process, 
+  // then it is a valid one
+  if area_for(p) <> B_ERROR then
+    goto _exit;  
+{$endif BEOS}
+
   { first try valid list faster }
 
 {$ifdef EXTRA}
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to