Browse Source

--- Merging r16479 into '.':
U packages/opengl/src/glext.pp
--- Merging r16483 into '.':
U packages/opengl/src/glut.pp
--- Merging r16517 into '.':
U packages/hash/src/md5.pp
--- Merging r16535 into '.':
U packages/opengl/Makefile.fpc
G packages/opengl/src/glut.pp
A packages/opengl/src/freeglut.pp
C packages/opengl/Makefile
A packages/opengl/examples/freeglutdemo.pp
--- Merging r16567 into '.':
U Makefile.fpc
C Makefile
--- Merging r16583 into '.':
U utils/fpdoc/dw_htmlchm.inc
U utils/fpdoc/dglobals.pp
--- Merging r16653 into '.':
U rtl/objpas/fmtbcd.pp
--- Merging r16662 into '.':
U ide/fpdebug.pas
--- Merging r16665 into '.':
U rtl/wince/sysutils.pp
U rtl/win/sysutils.pp
--- Merging r16673 into '.':
U packages/winunits-base/src/comobj.pp
--- Merging r16687 into '.':
U packages/winunits-jedi/src/jwawinnt.pas
--- Merging r16690 into '.':
U utils/fpdoc/fpclasschart.pp
--- Merging r16693 into '.':
U packages/ptc/examples/Makefile.fpc
C packages/ptc/examples/Makefile
--- Merging r16695 into '.':
U packages/hermes/Makefile.fpc
C packages/hermes/Makefile
--- Merging r16696 into '.':
U utils/Makefile.fpc
C utils/Makefile
--- Merging r16697 into '.':
U utils/rmwait/Makefile.fpc
A utils/rmwait/Makefile
--- Merging r16698 into '.':
G utils/Makefile.fpc
C utils/Makefile
--- Merging r16699 into '.':
U utils/rmwait/rmwait.pas
--- Merging r16700 into '.':
G utils/rmwait/rmwait.pas
--- Merging r16701 into '.':
G utils/rmwait/rmwait.pas
--- Merging r16702 into '.':
U rtl/freebsd/ptypes.inc
--- Merging r16703 into '.':
A rtl/openbsd/errnostr.inc
--- Merging r16704 into '.':
U rtl/openbsd/ptypes.inc
--- Merging r16722 into '.':
U compiler/utils/samplecfg
--- Merging r16735 into '.':
U rtl/win/wininc/redef.inc
--- Merging r16740 into '.':
U rtl/objpas/sysutils/sysformt.inc
A tests/test/units/sysutils/tformat.pp
--- Merging r16743 into '.':
U packages/winunits-base/src/activex.pp
--- Merging r16745 into '.':
U packages/fcl-image/src/fpcanvas.inc
--- Merging r16746 into '.':
U packages/ptc/src/win32/directx/directxconsolei.inc
U packages/ptc/src/win32/gdi/gdiconsolei.inc
U packages/ptc/src/win32/base/window.inc
U packages/ptc/src/win32/base/windowd.inc
--- Merging r16754 into '.':
U packages/fcl-res/src/elfwriter.pp
--- Merging r16763 into '.':
A packages/fpvectorial/examples/fpvviewer
A packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi
A packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm
A packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr
A packages/fpvectorial/examples/fpvviewer/diamond.dxf
A packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas
A packages/fpvectorial/examples/fpvviewer/cube.dxf
--- Merging r16765 into '.':
A packages/fpvectorial/src/dxfvectorialreader.pas
U packages/fpvectorial/src/fpvectorial.pas
U packages/fpvectorial/src/pdfvrsintatico.pas
U packages/fpvectorial/src/avisozlib.pas
U packages/fpvectorial/src/avisocncgcodewriter.pas
U packages/fpvectorial/src/cdrvectorialreader.pas
U packages/fpvectorial/src/pdfvrsemantico.pas
U packages/fpvectorial/src/pdfvectorialreader.pas
U packages/fpvectorial/src/pdfvrlexico.pas
U packages/fpvectorial/src/svgvectorialwriter.pas
U packages/fpvectorial/src/fpvectbuildunit.pas
U packages/fpvectorial/src/avisocncgcodereader.pas
UU packages/fpvectorial/src/fpvtocanvas.pas
--- Merging r16771 into '.':
U rtl/unix/clocale.pp
U rtl/solaris/Makefile.fpc
A rtl/solaris/clocale.inc
C rtl/solaris/Makefile
--- Merging r16772 into '.':
U packages/fcl-base/src/base64.pp
Summary of conflicts:
Text conflicts: 7

# revisions: 16479,16483,16517,16535,16567,16583,16653,16662,16665,16673,16687,16690,16693,16695,16696,16697,16698,16699,16700,16701,16702,16703,16704,16722,16735,16740,16743,16745,16746,16754,16763,16765,16771,16772
------------------------------------------------------------------------
r16479 | jonas | 2010-11-29 23:34:24 +0100 (Mon, 29 Nov 2010) | 3 lines
Changed paths:
M /trunk/packages/opengl/src/glext.pp

* renamed constant "a" to GL_DEPTH24_STENCIL8_EXT (accidentally changed
after applying patch from #18054, belongs with r16442)

------------------------------------------------------------------------
------------------------------------------------------------------------
r16483 | jonas | 2010-11-30 13:28:03 +0100 (Tue, 30 Nov 2010) | 4 lines
Changed paths:
M /trunk/packages/opengl/src/glut.pp

* reverted r8795 that saved/set/restored the fpu exception mask before
every glut call, since the gl unit (on which the glut unit depends)
already globally disables all fpu exceptions now (mantis #18107)

------------------------------------------------------------------------
------------------------------------------------------------------------
r16517 | ivost | 2010-12-07 22:23:03 +0100 (Tue, 07 Dec 2010) | 2 lines
Changed paths:
M /trunk/packages/hash/src/md5.pp

* changed output only parameters from var to out

------------------------------------------------------------------------
------------------------------------------------------------------------
r16535 | jonas | 2010-12-10 16:29:19 +0100 (Fri, 10 Dec 2010) | 3 lines
Changed paths:
M /trunk/packages/opengl/Makefile
M /trunk/packages/opengl/Makefile.fpc
A /trunk/packages/opengl/examples/freeglutdemo.pp
A /trunk/packages/opengl/src/freeglut.pp
M /trunk/packages/opengl/src/glut.pp

+ support for the freeglut extensions (patch by Michalis Kamburelis,
mantis #18108)

------------------------------------------------------------------------
------------------------------------------------------------------------
r16567 | marco | 2010-12-15 20:16:48 +0100 (Wed, 15 Dec 2010) | 1 line
Changed paths:
M /trunk/Makefile
M /trunk/Makefile.fpc

* compile win 64-bit IDE default. It works now, and even gdb is starting to work.
------------------------------------------------------------------------
------------------------------------------------------------------------
r16583 | marco | 2010-12-17 19:18:37 +0100 (Fri, 17 Dec 2010) | 2 lines
Changed paths:
M /trunk/utils/fpdoc/dglobals.pp
M /trunk/utils/fpdoc/dw_htmlchm.inc

* Patch from Andrew that allows to set CHM title on the cmdline. (Mantis 18246)

------------------------------------------------------------------------
------------------------------------------------------------------------
r16653 | marco | 2010-12-29 13:33:14 +0100 (Wed, 29 Dec 2010) | 2 lines
Changed paths:
M /trunk/rtl/objpas/fmtbcd.pp

* Patch from LacaK2 to improve decimalpoint localisation. (Mantis 18338)

------------------------------------------------------------------------
------------------------------------------------------------------------
r16662 | pierre | 2010-12-30 15:53:57 +0100 (Thu, 30 Dec 2010) | 1 line
Changed paths:
M /trunk/ide/fpdebug.pas

+ Add $rbp FrameName for x86_64 CPU
------------------------------------------------------------------------
------------------------------------------------------------------------
r16665 | sergei | 2010-12-30 21:40:47 +0100 (Thu, 30 Dec 2010) | 1 line
Changed paths:
M /trunk/rtl/win/sysutils.pp
M /trunk/rtl/wince/sysutils.pp

* Windows RTL: Simplify SysUtils.GetLocalTime(). TSystemTime type for these targets matches one defined in Windows unit, so WinAPI function result can be used directly. Resolves #18346.
------------------------------------------------------------------------
------------------------------------------------------------------------
r16673 | marco | 2010-12-31 16:50:19 +0100 (Fri, 31 Dec 2010) | 1 line
Changed paths:
M /trunk/packages/winunits-base/src/comobj.pp

* tconnectevent added to comobj
------------------------------------------------------------------------
------------------------------------------------------------------------
r16687 | marco | 2011-01-02 19:50:29 +0100 (Sun, 02 Jan 2011) | 1 line
Changed paths:
M /trunk/packages/winunits-jedi/src/jwawinnt.pas

* fix for 18366, maximum_processors for 64-bit
------------------------------------------------------------------------
------------------------------------------------------------------------
r16690 | marco | 2011-01-02 22:09:30 +0100 (Sun, 02 Jan 2011) | 1 line
Changed paths:
M /trunk/utils/fpdoc/fpclasschart.pp

* grapviz output for fpclasschart, mantis 18201
------------------------------------------------------------------------
------------------------------------------------------------------------
r16693 | pierre | 2011-01-03 14:31:27 +0100 (Mon, 03 Jan 2011) | 1 line
Changed paths:
M /trunk/packages/ptc/examples/Makefile
M /trunk/packages/ptc/examples/Makefile.fpc

* Correct keybrd2 => keyboard2
------------------------------------------------------------------------
------------------------------------------------------------------------
r16695 | hajny | 2011-01-03 23:13:33 +0100 (Mon, 03 Jan 2011) | 1 line
Changed paths:
M /trunk/packages/hermes/Makefile
M /trunk/packages/hermes/Makefile.fpc

* old make versions require a separator after colon in rule definitions
------------------------------------------------------------------------
------------------------------------------------------------------------
r16696 | hajny | 2011-01-03 23:17:10 +0100 (Mon, 03 Jan 2011) | 1 line
Changed paths:
M /trunk/utils/Makefile
M /trunk/utils/Makefile.fpc

+ have fpmc built for os2 and emx targets too
------------------------------------------------------------------------
------------------------------------------------------------------------
r16697 | hajny | 2011-01-03 23:24:41 +0100 (Mon, 03 Jan 2011) | 1 line
Changed paths:
A /trunk/utils/rmwait/Makefile
M /trunk/utils/rmwait/Makefile.fpc

+ proper Makefile for rmwait added
------------------------------------------------------------------------
------------------------------------------------------------------------
r16698 | hajny | 2011-01-03 23:29:52 +0100 (Mon, 03 Jan 2011) | 1 line
Changed paths:
M /trunk/utils/Makefile
M /trunk/utils/Makefile.fpc

+ rmwait building now included for os2, emx, go32v2 and windows targets; it should work on Unix targets too but no support for handling of Unix permissions required for proper working of --force is implemented yet
------------------------------------------------------------------------
------------------------------------------------------------------------
r16699 | hajny | 2011-01-03 23:41:01 +0100 (Mon, 03 Jan 2011) | 1 line
Changed paths:
M /trunk/utils/rmwait/rmwait.pas

* added comment about planned support for passing of options via environment variable
------------------------------------------------------------------------
------------------------------------------------------------------------
r16700 | hajny | 2011-01-04 00:19:43 +0100 (Tue, 04 Jan 2011) | 1 line
Changed paths:
M /trunk/utils/rmwait/rmwait.pas

+ support for passing of options via environment variable added
------------------------------------------------------------------------
------------------------------------------------------------------------
r16701 | hajny | 2011-01-04 00:21:15 +0100 (Tue, 04 Jan 2011) | 1 line
Changed paths:
M /trunk/utils/rmwait/rmwait.pas

* avoid warning during compilation
------------------------------------------------------------------------
------------------------------------------------------------------------
r16702 | marco | 2011-01-04 09:31:39 +0100 (Tue, 04 Jan 2011) | 2 lines
Changed paths:
M /trunk/rtl/freebsd/ptypes.inc

* small fix from Jasper Lievens.

------------------------------------------------------------------------
------------------------------------------------------------------------
r16703 | marco | 2011-01-04 10:14:03 +0100 (Tue, 04 Jan 2011) | 2 lines
Changed paths:
A /trunk/rtl/openbsd/errnostr.inc

* errnostr by Jasper Lievens.

------------------------------------------------------------------------
------------------------------------------------------------------------
r16704 | marco | 2011-01-04 10:33:55 +0100 (Tue, 04 Jan 2011) | 2 lines
Changed paths:
M /trunk/rtl/openbsd/ptypes.inc

* ptypes updates from Jasper Lievens.

------------------------------------------------------------------------
------------------------------------------------------------------------
r16722 | joost | 2011-01-06 15:42:57 +0100 (Thu, 06 Jan 2011) | 2 lines
Changed paths:
M /trunk/compiler/utils/samplecfg

* Fixed the order in which the httpd-units are searched for (bug 18405)

------------------------------------------------------------------------
------------------------------------------------------------------------
r16735 | marco | 2011-01-08 13:35:10 +0100 (Sat, 08 Jan 2011) | 3 lines
Changed paths:
M /trunk/rtl/win/wininc/redef.inc

* Also changed the redef version of getprocessaffinity.. to dword_ptr.
Mants 18434

------------------------------------------------------------------------
------------------------------------------------------------------------
r16740 | sergei | 2011-01-08 21:08:16 +0100 (Sat, 08 Jan 2011) | 2 lines
Changed paths:
M /trunk/rtl/objpas/sysutils/sysformt.inc
A /trunk/tests/test/units/sysutils/tformat.pp

* SysUtils.Format: Fixed behavior in case when format specifier contains both index and '*' for width/precision.
+ test
------------------------------------------------------------------------
------------------------------------------------------------------------
r16743 | marco | 2011-01-09 15:58:21 +0100 (Sun, 09 Jan 2011) | 2 lines
Changed paths:
M /trunk/packages/winunits-base/src/activex.pp

* bytelen function added, patch by Cyrax, mantis 18441

------------------------------------------------------------------------
------------------------------------------------------------------------
r16745 | michael | 2011-01-10 15:10:41 +0100 (Mon, 10 Jan 2011) | 1 line
Changed paths:
M /trunk/packages/fcl-image/src/fpcanvas.inc

* Patch from bug #18460
------------------------------------------------------------------------
------------------------------------------------------------------------
r16746 | nickysn | 2011-01-10 16:18:14 +0100 (Mon, 10 Jan 2011) | 1 line
Changed paths:
M /trunk/packages/ptc/src/win32/base/window.inc
M /trunk/packages/ptc/src/win32/base/windowd.inc
M /trunk/packages/ptc/src/win32/directx/directxconsolei.inc
M /trunk/packages/ptc/src/win32/gdi/gdiconsolei.inc

* do not hog the CPU while waiting for an event under Win32
------------------------------------------------------------------------
------------------------------------------------------------------------
r16754 | joost | 2011-01-12 13:03:16 +0100 (Wed, 12 Jan 2011) | 1 line
Changed paths:
M /trunk/packages/fcl-res/src/elfwriter.pp

* Add .note.GNU-stack section to .or files, so that executables do not get an executable stack, bug #16545
------------------------------------------------------------------------
------------------------------------------------------------------------
r16763 | sekelsenmat | 2011-01-14 13:54:17 +0100 (Fri, 14 Jan 2011) | 1 line
Changed paths:
A /trunk/packages/fpvectorial/examples/fpvviewer
A /trunk/packages/fpvectorial/examples/fpvviewer/cube.dxf
A /trunk/packages/fpvectorial/examples/fpvviewer/diamond.dxf
A /trunk/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm
A /trunk/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas
A /trunk/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi
A /trunk/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr

Starts implementing a fpvectorial viewer
------------------------------------------------------------------------
------------------------------------------------------------------------
r16765 | sekelsenmat | 2011-01-14 15:45:03 +0100 (Fri, 14 Jan 2011) | 1 line
Changed paths:
M /trunk/packages/fpvectorial/src/avisocncgcodereader.pas
M /trunk/packages/fpvectorial/src/avisocncgcodewriter.pas
M /trunk/packages/fpvectorial/src/avisozlib.pas
M /trunk/packages/fpvectorial/src/cdrvectorialreader.pas
A /trunk/packages/fpvectorial/src/dxfvectorialreader.pas
M /trunk/packages/fpvectorial/src/fpvectbuildunit.pas
M /trunk/packages/fpvectorial/src/fpvectorial.pas
M /trunk/packages/fpvectorial/src/fpvtocanvas.pas
M /trunk/packages/fpvectorial/src/pdfvectorialreader.pas
M /trunk/packages/fpvectorial/src/pdfvrlexico.pas
M /trunk/packages/fpvectorial/src/pdfvrsemantico.pas
M /trunk/packages/fpvectorial/src/pdfvrsintatico.pas
M /trunk/packages/fpvectorial/src/svgvectorialwriter.pas

Adds a DXF reader and fixes an error in the Canvas output
------------------------------------------------------------------------
------------------------------------------------------------------------
r16771 | marco | 2011-01-16 11:37:02 +0100 (Sun, 16 Jan 2011) | 3 lines
Changed paths:
M /trunk/rtl/solaris/Makefile
M /trunk/rtl/solaris/Makefile.fpc
A /trunk/rtl/solaris/clocale.inc
M /trunk/rtl/unix/clocale.pp

* committed the fpc/ hierarchy parts of the patch in mants 18271:
Adding clocale to Solaris.

------------------------------------------------------------------------
------------------------------------------------------------------------
r16772 | marco | 2011-01-16 13:09:35 +0100 (Sun, 16 Jan 2011) | 2 lines
Changed paths:
M /trunk/packages/fcl-base/src/base64.pp

* procedural encode/decode base64. Useful when base64ing hashes to XMLs etc.

------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@16778 -

marco 14 years ago
parent
commit
7624d5f147
55 changed files with 4583 additions and 1619 deletions
  1. 25 12
      .gitattributes
  2. 2 2
      Makefile
  3. 1 1
      Makefile.fpc
  4. 6 6
      compiler/utils/samplecfg
  5. 5 0
      ide/fpdebug.pas
  6. 50 0
      packages/fcl-base/src/base64.pp
  7. 8 8
      packages/fcl-image/src/fpcanvas.inc
  8. 1 0
      packages/fcl-res/src/elfwriter.pp
  9. 414 0
      packages/fpvectorial/examples/fpvviewer/cube.dxf
  10. 200 0
      packages/fpvectorial/examples/fpvviewer/diamond.dxf
  11. 34 0
      packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm
  12. 53 0
      packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas
  13. 169 0
      packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi
  14. 23 0
      packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr
  15. 300 0
      packages/fpvectorial/src/dxfvectorialreader.pas
  16. 9 4
      packages/fpvectorial/src/fpvtocanvas.pas
  17. 13 13
      packages/hash/src/md5.pp
  18. 14 14
      packages/hermes/Makefile
  19. 13 13
      packages/hermes/Makefile.fpc
  20. 187 1
      packages/opengl/Makefile
  21. 2 0
      packages/opengl/Makefile.fpc
  22. 106 0
      packages/opengl/examples/freeglutdemo.pp
  23. 208 0
      packages/opengl/src/freeglut.pp
  24. 1 1
      packages/opengl/src/glext.pp
  25. 11 1335
      packages/opengl/src/glut.pp
  26. 62 59
      packages/ptc/examples/Makefile
  27. 2 2
      packages/ptc/examples/Makefile.fpc
  28. 10 3
      packages/ptc/src/win32/base/window.inc
  29. 1 1
      packages/ptc/src/win32/base/windowd.inc
  30. 12 2
      packages/ptc/src/win32/directx/directxconsolei.inc
  31. 12 2
      packages/ptc/src/win32/gdi/gdiconsolei.inc
  32. 1 0
      packages/winunits-base/src/activex.pp
  33. 4 0
      packages/winunits-base/src/comobj.pp
  34. 4 0
      packages/winunits-jedi/src/jwawinnt.pas
  35. 1 1
      rtl/freebsd/ptypes.inc
  36. 7 8
      rtl/objpas/fmtbcd.pp
  37. 20 10
      rtl/objpas/sysutils/sysformt.inc
  38. 119 0
      rtl/openbsd/errnostr.inc
  39. 99 13
      rtl/openbsd/ptypes.inc
  40. 61 61
      rtl/solaris/Makefile
  41. 1 1
      rtl/solaris/Makefile.fpc
  42. 135 0
      rtl/solaris/clocale.inc
  43. 3 3
      rtl/unix/clocale.pp
  44. 1 10
      rtl/win/sysutils.pp
  45. 1 1
      rtl/win/wininc/redef.inc
  46. 2 11
      rtl/wince/sysutils.pp
  47. 10 0
      tests/test/units/sysutils/tformat.pp
  48. 64 8
      utils/Makefile
  49. 6 3
      utils/Makefile.fpc
  50. 1 0
      utils/fpdoc/dglobals.pp
  51. 9 1
      utils/fpdoc/dw_htmlchm.inc
  52. 84 2
      utils/fpdoc/fpclasschart.pp
  53. 1958 0
      utils/rmwait/Makefile
  54. 1 1
      utils/rmwait/Makefile.fpc
  55. 37 6
      utils/rmwait/rmwait.pas

+ 25 - 12
.gitattributes

@@ -1903,21 +1903,28 @@ packages/fpvectorial/examples/fpvc_mainform.pas svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.ico -text
 packages/fpvectorial/examples/fpvectorialconverter.ico -text
 packages/fpvectorial/examples/fpvectorialconverter.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.lpr svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.lpr svneol=native#text/plain
+packages/fpvectorial/examples/fpvviewer/cube.dxf svneol=native#text/plain
+packages/fpvectorial/examples/fpvviewer/diamond.dxf svneol=native#text/plain
+packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm svneol=native#text/plain
+packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas svneol=native#text/plain
+packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi svneol=native#text/plain
+packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.pas svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.pas svneol=native#text/plain
 packages/fpvectorial/fpmake.pp svneol=native#text/plain
 packages/fpvectorial/fpmake.pp svneol=native#text/plain
-packages/fpvectorial/src/avisocncgcodereader.pas svneol=native#text/plain
-packages/fpvectorial/src/avisocncgcodewriter.pas svneol=native#text/plain
-packages/fpvectorial/src/avisozlib.pas svneol=native#text/plain
-packages/fpvectorial/src/cdrvectorialreader.pas svneol=native#text/plain
-packages/fpvectorial/src/fpvectbuildunit.pas svneol=native#text/plain
-packages/fpvectorial/src/fpvectorial.pas svneol=native#text/plain
-packages/fpvectorial/src/fpvtocanvas.pas svneol=native#text/plain
-packages/fpvectorial/src/pdfvectorialreader.pas svneol=native#text/plain
-packages/fpvectorial/src/pdfvrlexico.pas svneol=native#text/plain
-packages/fpvectorial/src/pdfvrsemantico.pas svneol=native#text/plain
-packages/fpvectorial/src/pdfvrsintatico.pas svneol=native#text/plain
-packages/fpvectorial/src/svgvectorialwriter.pas svneol=native#text/plain
+packages/fpvectorial/src/avisocncgcodereader.pas svneol=native#text/pascal
+packages/fpvectorial/src/avisocncgcodewriter.pas svneol=native#text/pascal
+packages/fpvectorial/src/avisozlib.pas svneol=native#text/pascal
+packages/fpvectorial/src/cdrvectorialreader.pas svneol=native#text/pascal
+packages/fpvectorial/src/dxfvectorialreader.pas svneol=native#text/pascal
+packages/fpvectorial/src/fpvectbuildunit.pas svneol=native#text/pascal
+packages/fpvectorial/src/fpvectorial.pas svneol=native#text/pascal
+packages/fpvectorial/src/fpvtocanvas.pas svneol=native#text/pascal
+packages/fpvectorial/src/pdfvectorialreader.pas svneol=native#text/pascal
+packages/fpvectorial/src/pdfvrlexico.pas svneol=native#text/pascal
+packages/fpvectorial/src/pdfvrsemantico.pas svneol=native#text/pascal
+packages/fpvectorial/src/pdfvrsintatico.pas svneol=native#text/pascal
+packages/fpvectorial/src/svgvectorialwriter.pas svneol=native#text/pascal
 packages/fuse/Makefile svneol=native#text/plain
 packages/fuse/Makefile svneol=native#text/plain
 packages/fuse/Makefile.fpc svneol=native#text/plain
 packages/fuse/Makefile.fpc svneol=native#text/plain
 packages/fuse/fpmake_disabled.pp svneol=native#text/plain
 packages/fuse/fpmake_disabled.pp svneol=native#text/plain
@@ -4183,6 +4190,7 @@ packages/opengl/Makefile.fpc svneol=native#text/plain
 packages/opengl/examples/Makefile svneol=native#text/plain
 packages/opengl/examples/Makefile svneol=native#text/plain
 packages/opengl/examples/Makefile.fpc svneol=native#text/plain
 packages/opengl/examples/Makefile.fpc svneol=native#text/plain
 packages/opengl/examples/bounce.pp svneol=native#text/plain
 packages/opengl/examples/bounce.pp svneol=native#text/plain
+packages/opengl/examples/freeglutdemo.pp svneol=native#text/plain
 packages/opengl/examples/glutdemo.pp svneol=native#text/plain
 packages/opengl/examples/glutdemo.pp svneol=native#text/plain
 packages/opengl/examples/glutdemova.pp svneol=native#text/plain
 packages/opengl/examples/glutdemova.pp svneol=native#text/plain
 packages/opengl/examples/glxtest.pp svneol=native#text/plain
 packages/opengl/examples/glxtest.pp svneol=native#text/plain
@@ -4191,6 +4199,7 @@ packages/opengl/examples/radblur.pp svneol=native#text/plain
 packages/opengl/fpmake.pp svneol=native#text/plain
 packages/opengl/fpmake.pp svneol=native#text/plain
 packages/opengl/glunits.txt svneol=native#text/plain
 packages/opengl/glunits.txt svneol=native#text/plain
 packages/opengl/readme svneol=native#text/plain
 packages/opengl/readme svneol=native#text/plain
+packages/opengl/src/freeglut.pp svneol=native#text/plain
 packages/opengl/src/gl.pp svneol=native#text/plain
 packages/opengl/src/gl.pp svneol=native#text/plain
 packages/opengl/src/glext.pp svneol=native#text/plain
 packages/opengl/src/glext.pp svneol=native#text/plain
 packages/opengl/src/glu.pp svneol=native#text/plain
 packages/opengl/src/glu.pp svneol=native#text/plain
@@ -6640,6 +6649,7 @@ rtl/openbsd/Makefile svneol=native#text/plain
 rtl/openbsd/Makefile.fpc svneol=native#text/plain
 rtl/openbsd/Makefile.fpc svneol=native#text/plain
 rtl/openbsd/classes.pp svneol=native#text/plain
 rtl/openbsd/classes.pp svneol=native#text/plain
 rtl/openbsd/errno.inc svneol=native#text/plain
 rtl/openbsd/errno.inc svneol=native#text/plain
+rtl/openbsd/errnostr.inc svneol=native#text/plain
 rtl/openbsd/i386/cprt0.as svneol=native#text/plain
 rtl/openbsd/i386/cprt0.as svneol=native#text/plain
 rtl/openbsd/i386/prt0.as svneol=native#text/plain
 rtl/openbsd/i386/prt0.as svneol=native#text/plain
 rtl/openbsd/i386/sighnd.inc svneol=native#text/plain
 rtl/openbsd/i386/sighnd.inc svneol=native#text/plain
@@ -6786,6 +6796,7 @@ rtl/qnx/signal.inc svneol=native#text/plain
 rtl/qnx/system.pp svneol=native#text/plain
 rtl/qnx/system.pp svneol=native#text/plain
 rtl/solaris/Makefile svneol=native#text/plain
 rtl/solaris/Makefile svneol=native#text/plain
 rtl/solaris/Makefile.fpc svneol=native#text/plain
 rtl/solaris/Makefile.fpc svneol=native#text/plain
+rtl/solaris/clocale.inc svneol=native#text/plain
 rtl/solaris/errno.inc svneol=native#text/plain
 rtl/solaris/errno.inc svneol=native#text/plain
 rtl/solaris/errnostr.inc svneol=native#text/plain
 rtl/solaris/errnostr.inc svneol=native#text/plain
 rtl/solaris/i386/sighnd.inc svneol=native#text/plain
 rtl/solaris/i386/sighnd.inc svneol=native#text/plain
@@ -8956,6 +8967,7 @@ tests/test/units/sysutils/tfile1.pp svneol=native#text/plain
 tests/test/units/sysutils/tfile2.pp svneol=native#text/plain
 tests/test/units/sysutils/tfile2.pp svneol=native#text/plain
 tests/test/units/sysutils/tfilename.pp svneol=native#text/plain
 tests/test/units/sysutils/tfilename.pp svneol=native#text/plain
 tests/test/units/sysutils/tfloattostr.pp svneol=native#text/plain
 tests/test/units/sysutils/tfloattostr.pp svneol=native#text/plain
+tests/test/units/sysutils/tformat.pp svneol=native#text/plain
 tests/test/units/sysutils/tlocale.pp svneol=native#text/plain
 tests/test/units/sysutils/tlocale.pp svneol=native#text/plain
 tests/test/units/sysutils/tsscanf.pp svneol=native#text/plain
 tests/test/units/sysutils/tsscanf.pp svneol=native#text/plain
 tests/test/units/sysutils/tstrtobool.pp svneol=native#text/plain
 tests/test/units/sysutils/tstrtobool.pp svneol=native#text/plain
@@ -10904,6 +10916,7 @@ utils/ppdep.pp svneol=native#text/plain
 utils/ptop.pp svneol=native#text/plain
 utils/ptop.pp svneol=native#text/plain
 utils/ptopu.pp svneol=native#text/plain
 utils/ptopu.pp svneol=native#text/plain
 utils/rmcvsdir.pp svneol=native#text/plain
 utils/rmcvsdir.pp svneol=native#text/plain
+utils/rmwait/Makefile svneol=native#text/plain
 utils/rmwait/Makefile.fpc svneol=native#text/plain
 utils/rmwait/Makefile.fpc svneol=native#text/plain
 utils/rmwait/rmwait.pas svneol=native#text/plain
 utils/rmwait/rmwait.pas svneol=native#text/plain
 utils/rstconv.pp svneol=native#text/plain
 utils/rstconv.pp svneol=native#text/plain

+ 2 - 2
Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/08/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/12/14]
 #
 #
 default: help
 default: help
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -365,7 +365,7 @@ BUILDOPTS=FPC=$(PPNEW) RELEASE=1
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 ifndef CROSSCOMPILE
 ifndef CROSSCOMPILE
 ifneq ($(wildcard ide),)
 ifneq ($(wildcard ide),)
-IDETARGETS=go32v2 win32 linux freebsd os2 emx beos haiku
+IDETARGETS=go32v2 win32 win64 linux freebsd os2 emx beos haiku 
 ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),)
 ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),)
 IDE=1
 IDE=1
 endif
 endif

+ 1 - 1
Makefile.fpc

@@ -150,7 +150,7 @@ INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 # Skipped by default for cross compiles, because it depends on libc
 # Skipped by default for cross compiles, because it depends on libc
 ifndef CROSSCOMPILE
 ifndef CROSSCOMPILE
 ifneq ($(wildcard ide),)
 ifneq ($(wildcard ide),)
-IDETARGETS=go32v2 win32 linux freebsd os2 emx beos haiku
+IDETARGETS=go32v2 win32 win64 linux freebsd os2 emx beos haiku 
 ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),)
 ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),)
 IDE=1
 IDE=1
 endif
 endif

+ 6 - 6
compiler/utils/samplecfg

@@ -375,6 +375,12 @@ $CPUCROSSIFDEF2
 #-Fr$FPCPATH/msg/errore.msg
 #-Fr$FPCPATH/msg/errore.msg
 #-Fr$FPCPATH/msg/errorn.msg
 #-Fr$FPCPATH/msg/errorn.msg
 
 
+# searchpath for units and other system dependent things
+-Fu$FPCPATH/units/\$fpctarget
+-Fu$FPCPATH/units/\$fpctarget/*
+-Fu$FPCPATH/units/\$fpctarget/rtl
+#-Fu~/fpc/packages/base/*/units/$fpctarget;~/fpc/fcl/units/$fpctarget;~/fpc/rtl/units/$fpctarget
+
 #IFDEF FPCAPACHE_1_3
 #IFDEF FPCAPACHE_1_3
 -Fu$FPCPATH/units/\$fpctarget/httpd13/
 -Fu$FPCPATH/units/\$fpctarget/httpd13/
 #ELSE
 #ELSE
@@ -385,12 +391,6 @@ $CPUCROSSIFDEF2
 #ENDIF
 #ENDIF
 #ENDIF
 #ENDIF
 
 
-# searchpath for units and other system dependent things
--Fu$FPCPATH/units/\$fpctarget
--Fu$FPCPATH/units/\$fpctarget/*
--Fu$FPCPATH/units/\$fpctarget/rtl
-#-Fu~/fpc/packages/base/*/units/$fpctarget;~/fpc/fcl/units/$fpctarget;~/fpc/rtl/units/$fpctarget
-
 # searchpath for libraries
 # searchpath for libraries
 $GCCDIR
 $GCCDIR
 $GCCDIR2
 $GCCDIR2

+ 5 - 0
ide/fpdebug.pas

@@ -517,6 +517,11 @@ const
   FrameName = '$ebp';
   FrameName = '$ebp';
 {$define FrameNameKnown}
 {$define FrameNameKnown}
 {$endif i386}
 {$endif i386}
+{$ifdef x86_64}
+const
+  FrameName = '$rbp';
+{$define FrameNameKnown}
+{$endif x86_64}
 {$ifdef m68k}
 {$ifdef m68k}
 const
 const
   FrameName = '$fp';
   FrameName = '$fp';

+ 50 - 0
packages/fcl-base/src/base64.pp

@@ -87,6 +87,9 @@ type
   EBase64DecodingException = class(Exception)
   EBase64DecodingException = class(Exception)
   end;
   end;
 
 
+function EncodeStringBase64(const s:string):String;
+function DecodeStringBase64(const s:string):String;
+
 implementation
 implementation
 
 
 uses
 uses
@@ -420,5 +423,52 @@ begin
   raise EStreamError.Create('Invalid stream operation');
   raise EStreamError.Create('Invalid stream operation');
 end;
 end;
 
 
+function DecodeStringBase64(const s:string):String;
+
+var 
+  Instream, 
+  Outstream : TStringStream;
+  Decoder   : TBase64DecodingStream;
+begin
+  Instream:=TStringStream.Create(s);
+  try
+    Outstream:=TStringStream.Create('');
+    try 
+      Decoder:=TBase64DecodingStream.Create(Instream,bdmMIME);
+      try
+         Outstream.CopyFrom(Decoder,Decoder.Size);
+         Outstream.Position:=0;
+         Result:=Outstream.ReadString(Outstream.Size);
+      finally
+        Decoder.Free;
+        end;
+    finally 
+     Outstream.Free;
+     end;
+  finally 
+    Instream.Free;
+    end;
+end;
+
+function EncodeStringBase64(const s:string):String;
+
+var
+  Outstream : TStringStream;
+  Encoder   : TBase64EncodingStream;
+begin
+  Outstream:=TStringStream.Create('');
+  try
+    Encoder:=TBase64EncodingStream.create(outstream);
+    try 
+      Encoder.Write(s[1],Length(s));
+    finally 
+      Encoder.Free;
+      end;
+    Outstream.Position:=0;
+    Result:=Outstream.ReadString(Outstream.Size);
+  finally
+    Outstream.free;
+    end;
+end;
 
 
 end.
 end.

+ 8 - 8
packages/fcl-image/src/fpcanvas.inc

@@ -582,16 +582,16 @@ end;
 
 
 procedure TFPCustomCanvas.CopyRect (x,y:integer; canvas:TFPCustomCanvas;
 procedure TFPCustomCanvas.CopyRect (x,y:integer; canvas:TFPCustomCanvas;
   SourceRect:TRect);
   SourceRect:TRect);
-var xx,r,t : integer;
+var yy,r,t : integer;
 begin
 begin
   SortRect (SourceRect);
   SortRect (SourceRect);
-  with SourceRect do
-    for r := left to right do
-      begin
-      xx := r - left + x;
-      for t := bottom to top do
-        colors[xx,(t - bottom + y)] := canvas.colors[r,t];
-      end;
+  with SourceRect do begin
+    for t := top to bottom do begin
+      yy := t - top + y;
+      for r := left to right do
+        colors[r - left + x,yy] := canvas.colors[r,t];
+    end;
+  end;
 end;
 end;
 
 
 procedure TFPCustomCanvas.Draw (x,y:integer; image:TFPCustomImage);
 procedure TFPCustomCanvas.Draw (x,y:integer; image:TFPCustomImage);

+ 1 - 0
packages/fcl-res/src/elfwriter.pp

@@ -487,6 +487,7 @@ begin
   fSections.Add('.text',SHT_PROGBITS,SHF_ALLOC or SHF_EXECINSTR,aStream.Position,0,4);
   fSections.Add('.text',SHT_PROGBITS,SHF_ALLOC or SHF_EXECINSTR,aStream.Position,0,4);
   fSections.Add('.data',SHT_PROGBITS,SHF_ALLOC or SHF_WRITE,aStream.Position,0,4);
   fSections.Add('.data',SHT_PROGBITS,SHF_ALLOC or SHF_WRITE,aStream.Position,0,4);
   fSections.Add('.bss', SHT_NOBITS,SHF_ALLOC or SHF_WRITE,aStream.Position,0,4);
   fSections.Add('.bss', SHT_NOBITS,SHF_ALLOC or SHF_WRITE,aStream.Position,0,4);
+  fSections.Add('.note.GNU-stack', SHT_PROGBITS,0,aStream.Position,0,1);
 end;
 end;
 
 
 procedure TAbstractElfSubWriter.WriteStrTab(aStream: TStream);
 procedure TAbstractElfSubWriter.WriteStrTab(aStream: TStream);

+ 414 - 0
packages/fpvectorial/examples/fpvviewer/cube.dxf

@@ -0,0 +1,414 @@
+  0
+SECTION
+  2
+HEADER
+999
+cube.dxf created by IVREAD.
+999
+Original data in cube.iv
+  0
+ENDSEC
+  0
+SECTION
+  2
+TABLES
+  0
+ENDSEC
+  0
+SECTION
+  2
+BLOCKS
+  0
+ENDSEC
+  0
+SECTION
+  2
+ENTITIES
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+ -0.5000    
+ 30
+   1.000    
+ 11
+  0.5000    
+ 21
+ -0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+ -0.5000    
+ 30
+   1.000    
+ 11
+  0.5000    
+ 21
+  0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+  0.5000    
+ 30
+   1.000    
+ 11
+ -0.5000    
+ 21
+  0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+  0.5000    
+ 30
+   1.000    
+ 11
+ -0.5000    
+ 21
+ -0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+ -0.5000    
+ 30
+  0.0000E+00
+ 11
+ -0.5000    
+ 21
+ -0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+ -0.5000    
+ 30
+  0.0000E+00
+ 11
+ -0.5000    
+ 21
+  0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+  0.5000    
+ 30
+  0.0000E+00
+ 11
+  0.5000    
+ 21
+  0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+  0.5000    
+ 30
+  0.0000E+00
+ 11
+  0.5000    
+ 21
+ -0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+ -0.5000    
+ 30
+  0.0000E+00
+ 11
+ -0.5000    
+ 21
+ -0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+ -0.5000    
+ 30
+   1.000    
+ 11
+ -0.5000    
+ 21
+  0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+  0.5000    
+ 30
+   1.000    
+ 11
+ -0.5000    
+ 21
+  0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+  0.5000    
+ 30
+  0.0000E+00
+ 11
+ -0.5000    
+ 21
+ -0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+ -0.5000    
+ 30
+   1.000    
+ 11
+  0.5000    
+ 21
+ -0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+ -0.5000    
+ 30
+  0.0000E+00
+ 11
+  0.5000    
+ 21
+  0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+  0.5000    
+ 30
+  0.0000E+00
+ 11
+  0.5000    
+ 21
+  0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+  0.5000    
+ 30
+   1.000    
+ 11
+  0.5000    
+ 21
+ -0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+ -0.5000    
+ 30
+  0.0000E+00
+ 11
+  0.5000    
+ 21
+ -0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+ -0.5000    
+ 30
+  0.0000E+00
+ 11
+  0.5000    
+ 21
+ -0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+ -0.5000    
+ 30
+   1.000    
+ 11
+ -0.5000    
+ 21
+ -0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+ -0.5000    
+ 30
+   1.000    
+ 11
+ -0.5000    
+ 21
+ -0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+  0.5000    
+ 30
+   1.000    
+ 11
+  0.5000    
+ 21
+  0.5000    
+ 31
+   1.000    
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+  0.5000    
+ 30
+   1.000    
+ 11
+  0.5000    
+ 21
+  0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.5000    
+ 20
+  0.5000    
+ 30
+  0.0000E+00
+ 11
+ -0.5000    
+ 21
+  0.5000    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+ -0.5000    
+ 20
+  0.5000    
+ 30
+  0.0000E+00
+ 11
+ -0.5000    
+ 21
+  0.5000    
+ 31
+   1.000    
+  0
+ENDSEC
+  0
+EOF

+ 200 - 0
packages/fpvectorial/examples/fpvviewer/diamond.dxf

@@ -0,0 +1,200 @@
+  0
+SECTION
+  2
+ENTITIES
+  0
+LINE
+  8
+  0
+ 10
+   45.00    
+ 20
+   45.00    
+ 30
+  0.0000E+00
+ 11
+   45.00    
+ 21
+  -45.00    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+   45.00    
+ 20
+  -45.00    
+ 30
+  0.0000E+00
+ 11
+  0.0000E+00
+ 21
+  0.0000E+00
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.0000E+00
+ 20
+  0.0000E+00
+ 30
+  0.0000E+00
+ 11
+  -45.00    
+ 21
+   45.00    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  -45.00    
+ 20
+   45.00    
+ 30
+  0.0000E+00
+ 11
+   45.00    
+ 21
+   45.00    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+   45.00    
+ 20
+   45.00    
+ 30
+  0.0000E+00
+ 11
+  0.0000E+00
+ 21
+  0.0000E+00
+ 31
+  -78.00    
+  0
+LINE
+  8
+  0
+ 10
+  0.0000E+00
+ 20
+  0.0000E+00
+ 30
+  -78.00    
+ 11
+  0.0000E+00
+ 21
+  0.0000E+00
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  0.0000E+00
+ 20
+  0.0000E+00
+ 30
+  0.0000E+00
+ 11
+  -45.00    
+ 21
+  -45.00    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  -45.00    
+ 20
+  -45.00    
+ 30
+  0.0000E+00
+ 11
+   45.00    
+ 21
+   45.00    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+   45.00    
+ 20
+  -45.00    
+ 30
+  0.0000E+00
+ 11
+  -45.00    
+ 21
+  -45.00    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  -45.00    
+ 20
+  -45.00    
+ 30
+  0.0000E+00
+ 11
+  -45.00    
+ 21
+   45.00    
+ 31
+  0.0000E+00
+  0
+LINE
+  8
+  0
+ 10
+  -45.00    
+ 20
+   45.00    
+ 30
+  0.0000E+00
+ 11
+  0.0000E+00
+ 21
+  0.0000E+00
+ 31
+  -78.00    
+  0
+LINE
+  8
+  0
+ 10
+  0.0000E+00
+ 20
+  0.0000E+00
+ 30
+  -78.00    
+ 11
+   45.00    
+ 21
+  -45.00    
+ 31
+  0.0000E+00
+  0
+ENDSEC
+  0
+EOF

+ 34 - 0
packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm

@@ -0,0 +1,34 @@
+object frmFPVViewer: TfrmFPVViewer
+  Left = 349
+  Height = 240
+  Top = 171
+  Width = 240
+  Caption = 'frmFPVViewer'
+  ClientHeight = 240
+  ClientWidth = 240
+  OnCreate = FormCreate
+  OnDestroy = FormDestroy
+  LCLVersion = '0.9.31'
+  object btnView: TButton
+    Left = 8
+    Height = 25
+    Top = 40
+    Width = 224
+    Caption = 'View'
+    OnClick = btnViewClick
+    TabOrder = 0
+  end
+  object editFileName: TFileNameEdit
+    Left = 8
+    Height = 25
+    Top = 8
+    Width = 200
+    DialogOptions = []
+    FilterIndex = 0
+    HideDirectories = False
+    ButtonWidth = 23
+    NumGlyphs = 0
+    MaxLength = 0
+    TabOrder = 1
+  end
+end

+ 53 - 0
packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas

@@ -0,0 +1,53 @@
+unit fpvv_mainform;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  fpvectorial, svgvectorialwriter, Classes, SysUtils, FileUtil, Forms, Controls,
+  Graphics, Dialogs, StdCtrls, EditBtn;
+
+type
+
+  { TfrmFPVViewer }
+
+  TfrmFPVViewer = class(TForm)
+    btnView: TButton;
+    editFileName: TFileNameEdit;
+    procedure btnViewClick(Sender: TObject);
+    procedure FormCreate(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+  private
+    { private declarations }
+  public
+    { public declarations }
+    Vec: TvVectorialDocument;
+  end;
+
+var
+  frmFPVViewer: TfrmFPVViewer;
+
+implementation
+
+{$R *.lfm}
+
+{ TfrmFPVViewer }
+
+procedure TfrmFPVViewer.btnViewClick(Sender: TObject);
+begin
+  Vec.ReadFromFile(editFileName.FileName);
+end;
+
+procedure TfrmFPVViewer.FormCreate(Sender: TObject);
+begin
+  Vec := TvVectorialDocument.Create;
+end;
+
+procedure TfrmFPVViewer.FormDestroy(Sender: TObject);
+begin
+  Vec.Free;
+end;
+
+end.
+

+ 169 - 0
packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi

@@ -0,0 +1,169 @@
+<?xml version="1.0"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="9"/>
+    <General>
+      <MainUnit Value="0"/>
+      <ResourceType Value="res"/>
+      <UseXPManifest Value="True"/>
+      <Icon Value="0"/>
+      <ActiveWindowIndexAtStart Value="0"/>
+    </General>
+    <i18n>
+      <EnableI18N LFM="False"/>
+    </i18n>
+    <VersionInfo>
+      <StringTable ProductVersion=""/>
+    </VersionInfo>
+    <BuildModes Count="1" Active="Default">
+      <Item1 Name="Default" Default="True"/>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+      <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+      <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <FormatVersion Value="1"/>
+        <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
+      </local>
+    </RunParams>
+    <RequiredPackages Count="1">
+      <Item1>
+        <PackageName Value="LCL"/>
+      </Item1>
+    </RequiredPackages>
+    <Units Count="2">
+      <Unit0>
+        <Filename Value="fpvviewer.lpr"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="fpvviewer"/>
+        <EditorIndex Value="1"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="1"/>
+        <CursorPos X="1" Y="1"/>
+        <UsageCount Value="20"/>
+        <Loaded Value="True"/>
+      </Unit0>
+      <Unit1>
+        <Filename Value="fpvv_mainform.pas"/>
+        <IsPartOfProject Value="True"/>
+        <ComponentName Value="frmFPVViewer"/>
+        <ResourceBaseClass Value="Form"/>
+        <UnitName Value="fpvv_mainform"/>
+        <IsVisibleTab Value="True"/>
+        <EditorIndex Value="0"/>
+        <WindowIndex Value="0"/>
+        <TopLine Value="13"/>
+        <CursorPos X="42" Y="39"/>
+        <UsageCount Value="20"/>
+        <Loaded Value="True"/>
+        <LoadedDesigner Value="True"/>
+      </Unit1>
+    </Units>
+    <JumpHistory Count="17" HistoryIndex="16">
+      <Position1>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="11" Column="11" TopLine="1"/>
+      </Position1>
+      <Position2>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="14" Column="11" TopLine="1"/>
+      </Position2>
+      <Position3>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="171" Column="1" TopLine="135"/>
+      </Position3>
+      <Position4>
+        <Filename Value="fpvviewer.lpr"/>
+        <Caret Line="16" Column="9" TopLine="1"/>
+      </Position4>
+      <Position5>
+        <Filename Value="fpvviewer.lpr"/>
+        <Caret Line="8" Column="1" TopLine="1"/>
+      </Position5>
+      <Position6>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="36" Column="1" TopLine="25"/>
+      </Position6>
+      <Position7>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="41" Column="1" TopLine="12"/>
+      </Position7>
+      <Position8>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="8" Column="34" TopLine="1"/>
+      </Position8>
+      <Position9>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="134" Column="17" TopLine="61"/>
+      </Position9>
+      <Position10>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="8" Column="34" TopLine="1"/>
+      </Position10>
+      <Position11>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="163" Column="1" TopLine="126"/>
+      </Position11>
+      <Position12>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="8" Column="34" TopLine="1"/>
+      </Position12>
+      <Position13>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="161" Column="1" TopLine="1"/>
+      </Position13>
+      <Position14>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="8" Column="34" TopLine="1"/>
+      </Position14>
+      <Position15>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="12" Column="14" TopLine="37"/>
+      </Position15>
+      <Position16>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="47" Column="1" TopLine="26"/>
+      </Position16>
+      <Position17>
+        <Filename Value="fpvv_mainform.pas"/>
+        <Caret Line="38" Column="20" TopLine="13"/>
+      </Position17>
+    </JumpHistory>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="9"/>
+    <Target>
+      <Filename Value="fpvviewer"/>
+    </Target>
+    <SearchPaths>
+      <IncludeFiles Value="$(ProjOutDir)"/>
+      <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
+    </SearchPaths>
+    <Linking>
+      <Options>
+        <Win32>
+          <GraphicApplication Value="True"/>
+        </Win32>
+      </Options>
+    </Linking>
+    <Other>
+      <CompilerPath Value="$(CompPath)"/>
+    </Other>
+  </CompilerOptions>
+  <Debugging>
+    <Exceptions Count="3">
+      <Item1>
+        <Name Value="EAbort"/>
+      </Item1>
+      <Item2>
+        <Name Value="ECodetoolError"/>
+      </Item2>
+      <Item3>
+        <Name Value="EFOpenError"/>
+      </Item3>
+    </Exceptions>
+  </Debugging>
+</CONFIG>

+ 23 - 0
packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr

@@ -0,0 +1,23 @@
+{
+FPVectorial example application for viewing vectorial images
+
+Author: Felipe Monteiro de Carvalho
+
+License: Public Domain
+}
+program fpvviewer;
+
+{$mode objfpc}{$H+}
+
+uses
+  Interfaces, // this includes the LCL widgetset
+  Forms, fpvv_mainform;
+
+//{$R *.res}
+
+begin
+  Application.Initialize;
+  Application.CreateForm(TfrmFPVViewer, frmFPVViewer);
+  Application.Run;
+end.
+

+ 300 - 0
packages/fpvectorial/src/dxfvectorialreader.pas

@@ -0,0 +1,300 @@
+{
+Reads DXF files
+
+License: The same modified LGPL as the Free Pascal RTL
+         See the file COPYING.modifiedLGPL for more details
+
+AUTHORS: Felipe Monteiro de Carvalho
+
+DXF is composed by records written in ASCII with the following structure:
+
+0
+SECTION
+section_number
+SECTION_NAME
+<data>
+0
+ENDSEC
+0
+
+after all section end there is:
+
+EOF
+
+}
+unit dxfvectorialreader;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils,
+  fpvectorial;
+
+type
+
+  { Used by tcutils.SeparateString }
+  T10Strings = array[0..9] of shortstring;
+
+  { TvDXFVectorialReader }
+
+  TvDXFVectorialReader = class(TvCustomVectorialReader)
+  private
+    LineStartX, LineStartY, LineStartZ: Double;
+    LineEndX, LineEndY, LineEndZ: Double;
+    function  SeparateString(AString: string; ASeparator: Char): T10Strings;
+    function ReadSection(AStrings: TStrings; var AIndex: Integer; AData: TvVectorialDocument): Boolean;
+    function ReadENTITIES(AStrings: TStrings; var AIndex: Integer; AData: TvVectorialDocument): Boolean;
+    function ReadENTITIES_LINE(AStrings: TStrings; var AIndex: Integer; AData: TvVectorialDocument): Boolean;
+    function  GetCoordinate(AStr: shortstring): Integer;
+    function  GetCoordinateValue(AStr: shortstring): Double;
+  public
+    { General reading methods }
+    procedure ReadFromStrings(AStrings: TStrings; AData: TvVectorialDocument); override;
+  end;
+
+implementation
+
+{$define FPVECTORIALDEBUG}
+
+const
+  { Coordinate constants }
+
+  INT_COORDINATE_NONE = 0;
+  INT_COORDINATE_X = 1;
+  INT_COORDINATE_Y = 2;
+  INT_COORDINATE_Z = 3;
+
+  { GCode constants }
+
+  STR_GCODE_LINEAR_MOVE = 'G01';
+  STR_GCODE_STEPPER_MOVE = 'S01';
+  STR_GCODE_2DBEZIER_MOVE = 'B02';
+  STR_GCODE_3DBEZIER_MOVE = 'B03';
+  STR_GCODE_DRILL_UP = 'P01';
+  STR_GCODE_DRILL_DOWN = 'P02';
+
+{ TvAvisoCNCGCodeReader }
+
+{@@
+  Reads a string and separates it in substring
+  using ASeparator to delimite them.
+
+  Limits:
+
+  Number of substrings: 10 (indexed 0 to 9)
+  Length of each substring: 255 (they are shortstrings)
+}
+function TvDXFVectorialReader.SeparateString(AString: string; ASeparator: Char): T10Strings;
+var
+  i, CurrentPart: Integer;
+begin
+  CurrentPart := 0;
+
+  { Clears the result }
+  for i := 0 to 9 do Result[i] := '';
+
+  { Iterates througth the string, filling strings }
+  for i := 1 to Length(AString) do
+  begin
+    if Copy(AString, i, 1) = ASeparator then
+    begin
+      Inc(CurrentPart);
+
+      { Verifies if the string capacity wasn't exceeded }
+      if CurrentPart > 9 then Exit;
+    end
+    else
+      Result[CurrentPart] := Result[CurrentPart] + Copy(AString, i, 1);
+  end;
+end;
+
+{@@
+  returns   If an end of file marker was found
+}
+function TvDXFVectorialReader.ReadSection(
+  AStrings: TStrings; var AIndex: Integer; AData: TvVectorialDocument): Boolean;
+var
+  DestX, DestY, DestZ: Double;
+  StrSectionNum, StrSectionName: string;
+  IntSectionNum, i: Integer;
+begin
+  Result := False;
+
+  // Check if there is minimal space for a section
+  if AIndex+5 > AStrings.Count then
+  begin
+    {$ifdef FPVECTORIALDEBUG}
+    WriteLn('Not enough space for a section');
+    {$endif}
+    Exit(True);
+  end;
+
+  // Check of the EOF marker
+  StrSectionName := Trim(AStrings.Strings[AIndex+1]);
+  if StrSectionName = 'EOF' then
+  begin
+    {$ifdef FPVECTORIALDEBUG}
+    WriteLn('EOF found');
+    {$endif}
+    Exit(True);
+  end;
+
+  // Now read and process the section name
+  StrSectionNum := AStrings.Strings[AIndex+2];
+  IntSectionNum := StrToInt(Trim(StrSectionNum));
+  StrSectionName := AStrings.Strings[AIndex+3];
+
+  {$ifdef FPVECTORIALDEBUG}
+  WriteLn('TvDXFVectorialReader.ReadSection ' + StrSectionName);
+  {$endif}
+
+  if (StrSectionName = 'HEADER') or
+     (StrSectionName = 'CLASSES') or
+     (StrSectionName = 'TABLES') or
+     (StrSectionName = 'BLOCKS') or
+     (StrSectionName = 'OBJECTS') or
+     (StrSectionName = 'THUMBNAILIMAGE') then
+  begin
+    // We don't care about contents here, so let's just find the last section and get out of here.
+    for i := AIndex + 4 to AStrings.Count - 1 do
+    begin
+      if AStrings.Strings[i] = 'ENDSEC' then
+      begin
+        AIndex := i + 1;
+        Exit;
+      end;
+    end;
+    // If we reached here, the section in incomplete
+    raise Exception.Create('TvDXFVectorialReader.ReadSection: ENDSEC was not found in the SECTION');
+  end
+  else if StrSectionName = 'ENTITIES' then
+  begin
+    AIndex := AIndex + 4;
+    while not ReadENTITIES(AStrings, AIndex, AData) do ;
+  end;
+  {else
+  begin
+  end;}
+end;
+
+function TvDXFVectorialReader.ReadENTITIES(AStrings: TStrings;
+  var AIndex: Integer; AData: TvVectorialDocument): Boolean;
+var
+  StrSectionNum, StrSectionName: string;
+  IntSectionNum, i: Integer;
+begin
+  Result := False;
+
+  // Now read and process the item name
+  StrSectionName := AStrings.Strings[AIndex+1];
+
+  {$ifdef FPVECTORIALDEBUG}
+  WriteLn('TvDXFVectorialReader.ReadENTITIES ', StrSectionName);
+  {$endif}
+
+  if StrSectionName = 'ENDSEC' then
+  begin
+    Inc(AIndex, 2);
+    Exit(True);
+  end
+  else if StrSectionName = 'LINE' then
+  begin
+    // Initial values
+    LineStartX := 0;
+    LineStartY := 0;
+    LineStartZ := 0;
+    LineEndX := 0;
+    LineEndY := 0;
+    LineEndZ := 0;
+
+    // Read the data of the line
+    Inc(AIndex, 2);
+    while not ReadENTITIES_LINE(AStrings, AIndex, AData) do ;
+
+    // And now write it
+    {$ifdef FPVECTORIALDEBUG}
+    WriteLn(Format('Adding Line from %f,%f to %f,%f', [LineStartX, LineStartY, LineEndX, LineEndY]));
+    {$endif}
+    AData.StartPath(LineStartX, LineStartY);
+    AData.AddLineToPath(LineEndX, LineEndY);
+    AData.EndPath();
+  end;
+end;
+
+function TvDXFVectorialReader.ReadENTITIES_LINE(AStrings: TStrings;
+  var AIndex: Integer; AData: TvVectorialDocument): Boolean;
+var
+  StrSectionNum, StrSectionValue: string;
+  IntSectionNum: Integer;
+  FloatSectionValue: double;
+begin
+  Result := False;
+
+  // Now read and process the item name
+  StrSectionNum := AStrings.Strings[AIndex];
+  StrSectionValue := AStrings.Strings[AIndex+1];
+
+  if (StrSectionValue = 'LINE') or
+     (StrSectionValue = 'ENDSEC') then
+  begin
+    Exit(True);
+  end
+  else
+  begin
+    Inc(AIndex, 2);
+
+    IntSectionNum := StrToInt(Trim(StrSectionNum));
+    FloatSectionValue := StrToFloat(Trim(StrSectionValue));
+
+    case IntSectionNum of
+      10: LineStartX := FloatSectionValue;
+      20: LineStartY := FloatSectionValue;
+      30: LineStartZ := FloatSectionValue;
+      11: LineEndX := FloatSectionValue;
+      21: LineEndY := FloatSectionValue;
+      31: LineEndZ := FloatSectionValue;
+    end;
+  end;
+end;
+
+function TvDXFVectorialReader.GetCoordinate(AStr: shortstring): Integer;
+begin
+  Result := INT_COORDINATE_NONE;
+
+  if AStr = '' then Exit
+  else if AStr[1] = 'X' then Result := INT_COORDINATE_X
+  else if AStr[1] = 'Y' then Result := INT_COORDINATE_Y
+  else if AStr[1] = 'Z' then Result := INT_COORDINATE_Z;
+end;
+
+function TvDXFVectorialReader.GetCoordinateValue(AStr: shortstring): Double;
+begin
+  Result := 0.0;
+
+  if Length(AStr) <= 1 then Exit;
+
+  Result := StrToFloat(Copy(AStr, 2, Length(AStr) - 1));
+end;
+
+{@@
+  The information of each separate path is lost in G-Code files
+  Only one path uniting all of them is created when reading G-Code
+}
+procedure TvDXFVectorialReader.ReadFromStrings(AStrings: TStrings;
+  AData: TvVectorialDocument);
+var
+  i: Integer;
+begin
+  i := 0;
+  while i < AStrings.Count - 1 do
+    if ReadSection(AStrings, i, AData) then Break;
+end;
+
+initialization
+
+  RegisterVectorialReader(TvDXFVectorialReader, vfDXF);
+
+end.
+

+ 9 - 4
packages/fpvectorial/src/fpvtocanvas.pas

@@ -61,13 +61,18 @@ begin
       CurSegment := TPathSegment(ASource.Paths[i].Next());
       CurSegment := TPathSegment(ASource.Paths[i].Next());
 
 
       case CurSegment.SegmentType of
       case CurSegment.SegmentType of
+      stMoveTo:
+      begin
+        ADest.MoveTo(
+          Round(ADestX + AMulX * Cur2DSegment.X),
+          Round(ADestY + AMulY * Cur2DSegment.Y)
+          );
+      end;
       st2DLine, st3DLine:
       st2DLine, st3DLine:
       begin
       begin
-        PosX := Round(Cur2DSegment.X);
-        PosY := Round(Cur2DSegment.Y);
         ADest.LineTo(
         ADest.LineTo(
-          Round(ADestX + AMulX * PosX),
-          Round(ADestY + AMulY * PosY)
+          Round(ADestX + AMulX * Cur2DSegment.X),
+          Round(ADestY + AMulY * Cur2DSegment.Y)
           );
           );
       end;
       end;
       { To draw a bezier we need to divide the interval in parts and make
       { To draw a bezier we need to divide the interval in parts and make

+ 13 - 13
packages/hash/src/md5.pp

@@ -79,9 +79,9 @@ type
  * Core raw functions
  * Core raw functions
  ******************************************************************************)
  ******************************************************************************)
 
 
-procedure MDInit(var Context: TMDContext; const Version: TMDVersion);
+procedure MDInit(out Context: TMDContext; const Version: TMDVersion);
 procedure MDUpdate(var Context: TMDContext; var Buf; const BufLen: PtrUInt);
 procedure MDUpdate(var Context: TMDContext; var Buf; const BufLen: PtrUInt);
-procedure MDFinal(var Context: TMDContext; var Digest: TMDDigest);
+procedure MDFinal(var Context: TMDContext; out Digest: TMDDigest);
 
 
 
 
 (******************************************************************************
 (******************************************************************************
@@ -105,17 +105,17 @@ function MDMatch(const Digest1, Digest2: TMDDigest): Boolean;
  * Dedicated raw functions
  * Dedicated raw functions
  ******************************************************************************)
  ******************************************************************************)
 
 
-procedure MD2Init(var Context: TMD2Context); inline;
+procedure MD2Init(out Context: TMD2Context); inline;
 procedure MD2Update(var Context: TMD2Context; var Buf; const BufLen: PtrUInt); external name 'MD_UPDATE';
 procedure MD2Update(var Context: TMD2Context; var Buf; const BufLen: PtrUInt); external name 'MD_UPDATE';
-procedure MD2Final(var Context: TMD2Context; var Digest: TMD2Digest); external name 'MD_FINAL';
+procedure MD2Final(var Context: TMD2Context; out Digest: TMD2Digest); external name 'MD_FINAL';
 
 
-procedure MD4Init(var Context: TMD4Context); inline;
+procedure MD4Init(out Context: TMD4Context); inline;
 procedure MD4Update(var Context: TMD4Context; var Buf; const BufLen: PtrUInt); external name 'MD_UPDATE';
 procedure MD4Update(var Context: TMD4Context; var Buf; const BufLen: PtrUInt); external name 'MD_UPDATE';
-procedure MD4Final(var Context: TMD4Context; var Digest: TMD4Digest); external name 'MD_FINAL';
+procedure MD4Final(var Context: TMD4Context; out Digest: TMD4Digest); external name 'MD_FINAL';
 
 
-procedure MD5Init(var Context: TMD5Context); inline;
+procedure MD5Init(out Context: TMD5Context); inline;
 procedure MD5Update(var Context: TMD5Context; var Buf; const BufLen: PtrUInt); external name 'MD_UPDATE';
 procedure MD5Update(var Context: TMD5Context; var Buf; const BufLen: PtrUInt); external name 'MD_UPDATE';
-procedure MD5Final(var Context: TMD5Context; var Digest: TMD5Digest); external name 'MD_FINAL';
+procedure MD5Final(var Context: TMD5Context; out Digest: TMD5Digest); external name 'MD_FINAL';
 
 
 
 
 (******************************************************************************
 (******************************************************************************
@@ -371,7 +371,7 @@ begin
 end;
 end;
 
 
 
 
-procedure MDInit(var Context: TMDContext; const Version: TMDVersion);
+procedure MDInit(out Context: TMDContext; const Version: TMDVersion);
 begin
 begin
   FillChar(Context, Sizeof(TMDContext), 0);
   FillChar(Context, Sizeof(TMDContext), 0);
   Context.Version := Version;
   Context.Version := Version;
@@ -454,7 +454,7 @@ begin
 end;
 end;
 
 
 
 
-procedure MDFinal(var Context: TMDContext; var Digest: TMDDigest); [public,alias:'MD_FINAL'];
+procedure MDFinal(var Context: TMDContext; out Digest: TMDDigest); [public,alias:'MD_FINAL'];
 const
 const
 {$ifdef FPC_BIG_ENDIAN}
 {$ifdef FPC_BIG_ENDIAN}
   PADDING_MD45: array[0..15] of Cardinal = ($80000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
   PADDING_MD45: array[0..15] of Cardinal = ($80000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
@@ -574,17 +574,17 @@ begin
   Result := (A[0] = B[0]) and (A[1] = B[1]) and (A[2] = B[2]) and (A[3] = B[3]);
   Result := (A[0] = B[0]) and (A[1] = B[1]) and (A[2] = B[2]) and (A[3] = B[3]);
 end;
 end;
 
 
-procedure MD2Init(var Context: TMD2Context);
+procedure MD2Init(out Context: TMD2Context);
 begin
 begin
   MDInit(Context, MD_VERSION_2);
   MDInit(Context, MD_VERSION_2);
 end;
 end;
 
 
-procedure MD4Init(var Context: TMD4Context);
+procedure MD4Init(out Context: TMD4Context);
 begin
 begin
   MDInit(Context, MD_VERSION_4);
   MDInit(Context, MD_VERSION_4);
 end;
 end;
 
 
-procedure MD5Init(var Context: TMD5Context);
+procedure MD5Init(out Context: TMD5Context);
 begin
 begin
   MDInit(Context, MD_VERSION_5);
   MDInit(Context, MD_VERSION_5);
 end;
 end;

+ 14 - 14
packages/hermes/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/11/19]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/01/03]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -2623,29 +2623,29 @@ ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 include fpcmake.loc
 endif
 endif
 .NOTPARALLEL:
 .NOTPARALLEL:
-mmx_clr$(OEXT):src/$(CPU_TARGET)/mmx_clr.as
+mmx_clr$(OEXT): src/$(CPU_TARGET)/mmx_clr.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_clr$(OEXT) src/$(CPU_TARGET)/mmx_clr.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_clr$(OEXT) src/$(CPU_TARGET)/mmx_clr.as
-mmx_main$(OEXT):src/$(CPU_TARGET)/mmx_main.as
+mmx_main$(OEXT): src/$(CPU_TARGET)/mmx_main.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_main$(OEXT) src/$(CPU_TARGET)/mmx_main.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_main$(OEXT) src/$(CPU_TARGET)/mmx_main.as
-mmxp2_32$(OEXT):src/$(CPU_TARGET)/mmxp2_32.as
+mmxp2_32$(OEXT): src/$(CPU_TARGET)/mmxp2_32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp2_32$(OEXT) src/$(CPU_TARGET)/mmxp2_32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp2_32$(OEXT) src/$(CPU_TARGET)/mmxp2_32.as
-mmxp_32$(OEXT):src/$(CPU_TARGET)/mmxp_32.as
+mmxp_32$(OEXT): src/$(CPU_TARGET)/mmxp_32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp_32$(OEXT) src/$(CPU_TARGET)/mmxp_32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp_32$(OEXT) src/$(CPU_TARGET)/mmxp_32.as
-x8616lut$(OEXT):src/$(CPU_TARGET)/x8616lut.as
+x8616lut$(OEXT): src/$(CPU_TARGET)/x8616lut.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x8616lut$(OEXT) src/$(CPU_TARGET)/x8616lut.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x8616lut$(OEXT) src/$(CPU_TARGET)/x8616lut.as
-x86_clr$(OEXT):src/$(CPU_TARGET)/x86_clr.as
+x86_clr$(OEXT): src/$(CPU_TARGET)/x86_clr.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_clr$(OEXT) src/$(CPU_TARGET)/x86_clr.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_clr$(OEXT) src/$(CPU_TARGET)/x86_clr.as
-x86_main$(OEXT):src/$(CPU_TARGET)/x86_main.as
+x86_main$(OEXT): src/$(CPU_TARGET)/x86_main.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_main$(OEXT) src/$(CPU_TARGET)/x86_main.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_main$(OEXT) src/$(CPU_TARGET)/x86_main.as
-x86p_16$(OEXT):src/$(CPU_TARGET)/x86p_16.as
+x86p_16$(OEXT): src/$(CPU_TARGET)/x86p_16.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_16$(OEXT) src/$(CPU_TARGET)/x86p_16.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_16$(OEXT) src/$(CPU_TARGET)/x86p_16.as
-x86p_32$(OEXT):src/$(CPU_TARGET)/x86p_32.as
+x86p_32$(OEXT): src/$(CPU_TARGET)/x86p_32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_32$(OEXT) src/$(CPU_TARGET)/x86p_32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_32$(OEXT) src/$(CPU_TARGET)/x86p_32.as
-x86p_cpy$(OEXT):src/$(CPU_TARGET)/x86p_cpy.as
+x86p_cpy$(OEXT): src/$(CPU_TARGET)/x86p_cpy.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_cpy$(OEXT) src/$(CPU_TARGET)/x86p_cpy.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_cpy$(OEXT) src/$(CPU_TARGET)/x86p_cpy.as
-x86p_i8$(OEXT):src/$(CPU_TARGET)/x86p_i8.as
+x86p_i8$(OEXT): src/$(CPU_TARGET)/x86p_i8.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_i8$(OEXT) src/$(CPU_TARGET)/x86p_i8.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_i8$(OEXT) src/$(CPU_TARGET)/x86p_i8.as
-x86p_s32$(OEXT):src/$(CPU_TARGET)/x86p_s32.as
+x86p_s32$(OEXT): src/$(CPU_TARGET)/x86p_s32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_s32$(OEXT) src/$(CPU_TARGET)/x86p_s32.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_s32$(OEXT) src/$(CPU_TARGET)/x86p_s32.as
-x86pscpy$(OEXT):src/$(CPU_TARGET)/x86pscpy.as
+x86pscpy$(OEXT): src/$(CPU_TARGET)/x86pscpy.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86pscpy$(OEXT) src/$(CPU_TARGET)/x86pscpy.as
 	$(AS) --32 -o $(UNITTARGETDIRPREFIX)x86pscpy$(OEXT) src/$(CPU_TARGET)/x86pscpy.as

+ 13 - 13
packages/hermes/Makefile.fpc

@@ -48,41 +48,41 @@ fpcdir=../..
 
 
 [rules]
 [rules]
 .NOTPARALLEL:
 .NOTPARALLEL:
-mmx_clr$(OEXT):src/$(CPU_TARGET)/mmx_clr.as
+mmx_clr$(OEXT): src/$(CPU_TARGET)/mmx_clr.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_clr$(OEXT) src/$(CPU_TARGET)/mmx_clr.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_clr$(OEXT) src/$(CPU_TARGET)/mmx_clr.as
 
 
-mmx_main$(OEXT):src/$(CPU_TARGET)/mmx_main.as
+mmx_main$(OEXT): src/$(CPU_TARGET)/mmx_main.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_main$(OEXT) src/$(CPU_TARGET)/mmx_main.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmx_main$(OEXT) src/$(CPU_TARGET)/mmx_main.as
 
 
-mmxp2_32$(OEXT):src/$(CPU_TARGET)/mmxp2_32.as
+mmxp2_32$(OEXT): src/$(CPU_TARGET)/mmxp2_32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp2_32$(OEXT) src/$(CPU_TARGET)/mmxp2_32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp2_32$(OEXT) src/$(CPU_TARGET)/mmxp2_32.as
 
 
-mmxp_32$(OEXT):src/$(CPU_TARGET)/mmxp_32.as
+mmxp_32$(OEXT): src/$(CPU_TARGET)/mmxp_32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp_32$(OEXT) src/$(CPU_TARGET)/mmxp_32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)mmxp_32$(OEXT) src/$(CPU_TARGET)/mmxp_32.as
 
 
-x8616lut$(OEXT):src/$(CPU_TARGET)/x8616lut.as
+x8616lut$(OEXT): src/$(CPU_TARGET)/x8616lut.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x8616lut$(OEXT) src/$(CPU_TARGET)/x8616lut.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x8616lut$(OEXT) src/$(CPU_TARGET)/x8616lut.as
 
 
-x86_clr$(OEXT):src/$(CPU_TARGET)/x86_clr.as
+x86_clr$(OEXT): src/$(CPU_TARGET)/x86_clr.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_clr$(OEXT) src/$(CPU_TARGET)/x86_clr.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_clr$(OEXT) src/$(CPU_TARGET)/x86_clr.as
 
 
-x86_main$(OEXT):src/$(CPU_TARGET)/x86_main.as
+x86_main$(OEXT): src/$(CPU_TARGET)/x86_main.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_main$(OEXT) src/$(CPU_TARGET)/x86_main.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86_main$(OEXT) src/$(CPU_TARGET)/x86_main.as
 
 
-x86p_16$(OEXT):src/$(CPU_TARGET)/x86p_16.as
+x86p_16$(OEXT): src/$(CPU_TARGET)/x86p_16.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_16$(OEXT) src/$(CPU_TARGET)/x86p_16.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_16$(OEXT) src/$(CPU_TARGET)/x86p_16.as
 
 
-x86p_32$(OEXT):src/$(CPU_TARGET)/x86p_32.as
+x86p_32$(OEXT): src/$(CPU_TARGET)/x86p_32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_32$(OEXT) src/$(CPU_TARGET)/x86p_32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_32$(OEXT) src/$(CPU_TARGET)/x86p_32.as
 
 
-x86p_cpy$(OEXT):src/$(CPU_TARGET)/x86p_cpy.as
+x86p_cpy$(OEXT): src/$(CPU_TARGET)/x86p_cpy.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_cpy$(OEXT) src/$(CPU_TARGET)/x86p_cpy.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_cpy$(OEXT) src/$(CPU_TARGET)/x86p_cpy.as
 
 
-x86p_i8$(OEXT):src/$(CPU_TARGET)/x86p_i8.as
+x86p_i8$(OEXT): src/$(CPU_TARGET)/x86p_i8.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_i8$(OEXT) src/$(CPU_TARGET)/x86p_i8.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_i8$(OEXT) src/$(CPU_TARGET)/x86p_i8.as
 
 
-x86p_s32$(OEXT):src/$(CPU_TARGET)/x86p_s32.as
+x86p_s32$(OEXT): src/$(CPU_TARGET)/x86p_s32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_s32$(OEXT) src/$(CPU_TARGET)/x86p_s32.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86p_s32$(OEXT) src/$(CPU_TARGET)/x86p_s32.as
 
 
-x86pscpy$(OEXT):src/$(CPU_TARGET)/x86pscpy.as
+x86pscpy$(OEXT): src/$(CPU_TARGET)/x86pscpy.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86pscpy$(OEXT) src/$(CPU_TARGET)/x86pscpy.as
         $(AS) --32 -o $(UNITTARGETDIRPREFIX)x86pscpy$(OEXT) src/$(CPU_TARGET)/x86pscpy.as

+ 187 - 1
packages/opengl/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/08/25]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/12/10]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -447,6 +447,192 @@ ifeq ($(FULL_TARGET),mipsel-linux)
 override TARGET_UNITS+=gl glu glut  glx glext
 override TARGET_UNITS+=gl glu glut  glx glext
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-darwin)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_IMPLICITUNITS+=freeglut
+endif
+ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_EXAMPLEDIRS+=examples
 override TARGET_EXAMPLEDIRS+=examples
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)

+ 2 - 0
packages/opengl/Makefile.fpc

@@ -24,6 +24,8 @@ units_openbsd=glx glext
 units_darwin=glx glext
 units_darwin=glx glext
 exampledirs=examples
 exampledirs=examples
 
 
+implicitunits=freeglut
+
 [install]
 [install]
 fpcpackage=y
 fpcpackage=y
 
 

+ 106 - 0
packages/opengl/examples/freeglutdemo.pp

@@ -0,0 +1,106 @@
+{ Trivial demo of some freeglut extensions, by Michalis Kamburelis,
+  parts based on glutdemo.pp. Public domain.
+
+  freeglut features:
+  - when you press escape key, program returns gracefully to main begin...end.
+  - we show special geometric objects: Sierpinski sponge, cylinder.
+  - mouse wheel up/down can be used to zoom in/out.
+}
+
+{$mode objfpc}
+
+program FreeGlutDemo;
+
+uses
+  GL, GLU, GLUT, FreeGlut;
+
+var
+  T: GLFloat;
+  Zoom: GLFloat = -3;
+
+procedure Display; cdecl;
+const
+  Offset: TGLDouble3 = (0, 0, 0);
+begin
+  glClear(GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT);
+
+  glPushMatrix;
+    glTranslatef(-1, -1, Zoom);
+    glRotatef(T, 0, 1, 0);
+    glutWireCylinder(0.5, 1, 32, 8);
+  glPopMatrix;
+
+  glPushMatrix;
+    glTranslatef(-1,  1, Zoom);
+    glRotatef(T, 0, 1, 0);
+    glutSolidCylinder(0.5, 1, 32, 8);
+  glPopMatrix;
+
+  glPushMatrix;
+    glTranslatef(1, -1, Zoom);
+    glRotatef(T, 0, 1, 0);
+    glutWireSierpinskiSponge(3, @Offset, 1);
+  glPopMatrix;
+
+  glPushMatrix;
+    glTranslatef(1,  1, Zoom);
+    glRotatef(T, 0, 1, 0);
+    glutSolidSierpinskiSponge(3, @Offset, 1);
+  glPopMatrix;
+
+  glutSwapBuffers;
+end;
+
+procedure Timer(Value: Integer); cdecl;
+begin
+  glutPostRedisplay;
+  T := T + 1.0;
+  glutTimerFunc(20, @Timer, 0);
+end;
+
+procedure Key(K: Byte; X, Y: Integer); cdecl;
+begin
+  case K of
+    27: glutLeaveMainLoop(); // using freeglut you can exit cleanly
+  end;
+end;
+
+procedure Wheel(Wheel, Direction, X, Y: Integer); cdecl;
+begin
+  if Wheel = 0 then
+  begin
+    Zoom := Zoom + Direction / 2;
+    glutPostRedisplay();
+  end;
+end;
+
+begin
+  glutInit(@argc, argv);
+  glutInitWindowSize(400, 400);
+  glutInitDisplayMode(GLUT_RGB or GLUT_DOUBLE or GLUT_DEPTH);
+  glutCreateWindow('FreeGlut demo');
+
+  glutDisplayFunc(@Display);
+  glutTimerFunc(20, @Timer, 0);
+  glutKeyboardFunc(@Key);
+  glutMouseWheelFunc(@Wheel);
+
+  glEnable(GL_CULL_FACE); // Enable backface culling
+
+  // Set up depth buffer
+  glEnable(GL_DEPTH_TEST);
+  glDepthFunc(GL_LESS);
+
+  // Set up projection matrix
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity;
+  gluPerspective(90, 1.3, 0.1, 100);
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity;
+
+  glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION);
+
+  WriteLn('Starting...');
+  glutMainLoop;
+  Writeln('glutMainLoop finished');
+end.

+ 208 - 0
packages/opengl/src/freeglut.pp

@@ -0,0 +1,208 @@
+{ FreeGlut extensions, see http://freeglut.sourceforge.net/ .
+  Complements the Glut unit that defines standard Glut functionality.
+  Function entry points will be nil if freeglut is not
+  actually available (or if freeglut version necessary for specific extension
+  is not available).
+
+  Includes all the extensions up to FreeGlut 2.6.0 version.
+  Omitted is only deprecated stuff, and glutGetProcAddress
+  (which is not needed as we have nice glext unit in FPC). }
+
+unit FreeGlut;
+
+{$mode Delphi} {< to keep assignments to proc vars look the same as in glut.pp }
+{$MACRO ON}
+{ Keep this synched with glut.pp "extdecl" definition. }
+{$IFDEF Windows}
+  {$DEFINE extdecl := stdcall}
+{$ELSE}
+  {$DEFINE extdecl := cdecl}
+{$ENDIF}
+
+interface
+
+uses DynLibs, GL, Glut;
+
+type
+  TGLdouble3 = array [0..2] of GLdouble;
+  PGLdouble3 = ^TGLdouble3;
+
+const
+  // Additional GLUT Key definitions for the Special key function
+  GLUT_KEY_NUM_LOCK = $006D;
+  GLUT_KEY_BEGIN    = $006E;
+  GLUT_KEY_DELETE   = $006F;
+
+  // GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
+  GLUT_ACTION_EXIT                 = 0;
+  GLUT_ACTION_GLUTMAINLOOP_RETURNS = 1;
+  GLUT_ACTION_CONTINUE_EXECUTION   = 2;
+
+  // Create a new rendering context when the user opens a new window?
+  GLUT_CREATE_NEW_CONTEXT  = 0;
+  GLUT_USE_CURRENT_CONTEXT = 1;
+
+  // Direct/Indirect rendering context options (has meaning only in Unix/X11)
+  GLUT_FORCE_INDIRECT_CONTEXT  = 0;
+  GLUT_ALLOW_DIRECT_CONTEXT    = 1;
+  GLUT_TRY_DIRECT_CONTEXT      = 2;
+  GLUT_FORCE_DIRECT_CONTEXT    = 3;
+
+  // GLUT API Extension macro definitions -- the glutGet parameters
+  GLUT_INIT_STATE = $007C;
+
+  GLUT_ACTION_ON_WINDOW_CLOSE = $01F9;
+
+  GLUT_WINDOW_BORDER_WIDTH  = $01FA;
+  GLUT_WINDOW_HEADER_HEIGHT = $01FB;
+
+  GLUT_VERSION = $01FC;
+
+  GLUT_RENDERING_CONTEXT = $01FD;
+  GLUT_DIRECT_RENDERING  = $01FE;
+
+  GLUT_FULL_SCREEN = $01FF;
+
+  // New tokens for glutInitDisplayMode.
+  // Only one GLUT_AUXn bit may be used at a time.
+  // Value 0x0400 is defined in OpenGLUT.
+  GLUT_AUX  = $1000;
+
+  GLUT_AUX1 = $1000;
+  GLUT_AUX2 = $2000;
+  GLUT_AUX3 = $4000;
+  GLUT_AUX4 = $8000;
+
+  // Context-related flags
+  GLUT_INIT_MAJOR_VERSION = $0200;
+  GLUT_INIT_MINOR_VERSION = $0201;
+  GLUT_INIT_FLAGS         = $0202;
+  GLUT_INIT_PROFILE       = $0203;
+
+  // Flags for glutInitContextFlags
+  GLUT_DEBUG              = $0001;
+  GLUT_FORWARD_COMPATIBLE = $0002;
+
+  // Flags for glutInitContextProfile
+  GLUT_CORE_PROFILE          = $0001;
+  GLUT_COMPATIBILITY_PROFILE = $0002;
+
+  // GLUT API macro definitions -- the display mode definitions
+  GLUT_CAPTIONLESS = $0400;
+  GLUT_BORDERLESS  = $0800;
+  GLUT_SRGB        = $1000;
+
+var
+  // Process loop function
+  glutMainLoopEvent: procedure; extdecl;
+  glutLeaveMainLoop: procedure; extdecl;
+  glutExit:  procedure; extdecl;
+
+  // Window management functions
+  glutFullScreenToggle: procedure; extdecl;
+
+  // Window-specific callback functions
+  glutMouseWheelFunc: procedure(callback: TGlut4IntCallback); extdecl;
+  glutCloseFunc: procedure(callback: TGlutVoidCallback); extdecl;
+  // A. Donev: Also a destruction callback for menus
+  glutMenuDestroyFunc: procedure(callback: TGlutVoidCallback); extdecl;
+
+  // State setting and retrieval functions
+  glutSetOption: procedure(option_flag: GLenum; value: Integer); extdecl;
+  glutGetModeValues: function(mode: GLenum; size: PInteger): Integer; extdecl;
+  // A.Donev: User-data manipulation
+  glutGetWindowData: function: Pointer; extdecl;
+  glutSetWindowData: procedure(data: Pointer); extdecl;
+  glutGetMenuData: function: Pointer; extdecl;
+  glutSetMenuData: procedure(data: Pointer); extdecl;
+
+  // Font stuff
+  glutBitmapHeight: function(font : pointer): Integer; extdecl;
+  glutStrokeHeight: function(font : pointer): GLfloat; extdecl;
+  glutBitmapString: procedure(font : pointer; const str: PChar); extdecl;
+  glutStrokeString: procedure(font : pointer; const str: PChar); extdecl;
+
+  // Geometry functions
+  glutWireRhombicDodecahedron: procedure; extdecl;
+  glutSolidRhombicDodecahedron: procedure; extdecl;
+  glutWireSierpinskiSponge: procedure(num_levels: Integer; offset: PGLdouble3; scale: GLdouble); extdecl;
+  glutSolidSierpinskiSponge: procedure(num_levels: Integer; offset: PGLdouble3; scale: GLdouble); extdecl;
+  glutWireCylinder: procedure(radius: GLdouble; height: GLdouble; slices: GLint; stacks: GLint); extdecl;
+  glutSolidCylinder: procedure(radius: GLdouble; height: GLdouble; slices: GLint; stacks: GLint); extdecl;
+
+  // Initialization functions
+  glutInitContextVersion: procedure(majorVersion: Integer; minorVersion: Integer); extdecl;
+  glutInitContextFlags: procedure(flags: Integer); extdecl;
+  glutInitContextProfile: procedure(profile: Integer); extdecl;
+
+{ Load all freeglut functions from given library.
+  Called automatically from Glut unit when standard Glut stuff is loaded. }
+procedure LoadFreeGlut(hDLL: TLibHandle);
+
+{ Set to nil all freeglut functions.
+  Called automatically from Glut unit when standard Glut stuff is unloaded. }
+procedure UnloadFreeGlut;
+
+implementation
+
+procedure LoadFreeGlut(hDLL: TLibHandle);
+begin
+  @glutMainLoopEvent := GetProcAddress(hDLL, 'glutMainLoopEvent');
+  @glutLeaveMainLoop := GetProcAddress(hDLL, 'glutLeaveMainLoop');
+  @glutExit := GetProcAddress(hDLL, 'glutExit');
+  @glutFullScreenToggle := GetProcAddress(hDLL, 'glutFullScreenToggle');
+  @glutMouseWheelFunc := GetProcAddress(hDLL, 'glutMouseWheelFunc');
+  @glutCloseFunc := GetProcAddress(hDLL, 'glutCloseFunc');
+  @glutMenuDestroyFunc := GetProcAddress(hDLL, 'glutMenuDestroyFunc');
+  @glutSetOption := GetProcAddress(hDLL, 'glutSetOption');
+  @glutGetModeValues := GetProcAddress(hDLL, 'glutGetModeValues');
+  @glutGetWindowData := GetProcAddress(hDLL, 'glutGetWindowData');
+  @glutSetWindowData := GetProcAddress(hDLL, 'glutSetWindowData');
+  @glutGetMenuData := GetProcAddress(hDLL, 'glutGetMenuData');
+  @glutSetMenuData := GetProcAddress(hDLL, 'glutSetMenuData');
+  @glutBitmapHeight := GetProcAddress(hDLL, 'glutBitmapHeight');
+  @glutStrokeHeight := GetProcAddress(hDLL, 'glutStrokeHeight');
+  @glutBitmapString := GetProcAddress(hDLL, 'glutBitmapString');
+  @glutStrokeString := GetProcAddress(hDLL, 'glutStrokeString');
+  @glutWireRhombicDodecahedron := GetProcAddress(hDLL, 'glutWireRhombicDodecahedron');
+  @glutSolidRhombicDodecahedron := GetProcAddress(hDLL, 'glutSolidRhombicDodecahedron');
+  @glutWireSierpinskiSponge := GetProcAddress(hDLL, 'glutWireSierpinskiSponge');
+  @glutSolidSierpinskiSponge := GetProcAddress(hDLL, 'glutSolidSierpinskiSponge');
+  @glutWireCylinder := GetProcAddress(hDLL, 'glutWireCylinder');
+  @glutSolidCylinder := GetProcAddress(hDLL, 'glutSolidCylinder');
+  @glutInitContextVersion := GetProcAddress(hDLL, 'glutInitContextVersion');
+  @glutInitContextFlags := GetProcAddress(hDLL, 'glutInitContextFlags');
+  @glutInitContextProfile := GetProcAddress(hDLL, 'glutInitContextProfile');
+end;
+
+procedure UnloadFreeGlut;
+begin
+  @glutMainLoopEvent := nil;
+  @glutLeaveMainLoop := nil;
+  @glutExit := nil;
+  @glutFullScreenToggle := nil;
+  @glutMouseWheelFunc := nil;
+  @glutCloseFunc := nil;
+  @glutMenuDestroyFunc := nil;
+  @glutSetOption := nil;
+  @glutGetModeValues := nil;
+  @glutGetWindowData := nil;
+  @glutSetWindowData := nil;
+  @glutGetMenuData := nil;
+  @glutSetMenuData := nil;
+  @glutBitmapHeight := nil;
+  @glutStrokeHeight := nil;
+  @glutBitmapString := nil;
+  @glutStrokeString := nil;
+  @glutWireRhombicDodecahedron := nil;
+  @glutSolidRhombicDodecahedron := nil;
+  @glutWireSierpinskiSponge := nil;
+  @glutSolidSierpinskiSponge := nil;
+  @glutWireCylinder := nil;
+  @glutSolidCylinder := nil;
+  @glutInitContextVersion := nil;
+  @glutInitContextFlags := nil;
+  @glutInitContextProfile := nil;
+end;
+
+end.

+ 1 - 1
packages/opengl/src/glext.pp

@@ -1069,7 +1069,7 @@ function Load_GL_EXT_multi_draw_arrays: Boolean;
 const
 const
   GL_DEPTH_STENCIL_EXT = $84F9;
   GL_DEPTH_STENCIL_EXT = $84F9;
   GL_UNSIGNED_INT_24_8_EXT = $84FA;
   GL_UNSIGNED_INT_24_8_EXT = $84FA;
-  a = $88F0;
+  GL_DEPTH24_STENCIL8_EXT = $88F0;
   GL_TEXTURE_STENCIL_SIZE_EXT = $88F1;
   GL_TEXTURE_STENCIL_SIZE_EXT = $88F1;
 
 
 function Load_GL_EXT_packed_depth_stencil: Boolean;
 function Load_GL_EXT_packed_depth_stencil: Boolean;

File diff suppressed because it is too large
+ 11 - 1335
packages/opengl/src/glut.pp


+ 62 - 59
packages/ptc/examples/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/12/31]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/11/08]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -267,178 +267,181 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(F
 override PACKAGE_NAME=ptc-examples
 override PACKAGE_NAME=ptc-examples
 override PACKAGE_VERSION=2.4.3
 override PACKAGE_VERSION=2.4.3
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keybrd2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
+override TARGET_PROGRAMS+=area buffer clear clip con_info console fire  flower hicolor image keyboard keyboard2 land lights modes mojo palette pixel random save stretch texwarp timer tunnel3d tunnel
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override COMPILER_UNITDIR+=../$(UNITTARGETDIRPREFIX)
 override COMPILER_UNITDIR+=../$(UNITTARGETDIRPREFIX)

+ 2 - 2
packages/ptc/examples/Makefile.fpc

@@ -8,9 +8,9 @@ version=2.4.3
 
 
 [target]
 [target]
 programs=area buffer clear clip con_info console fire  \
 programs=area buffer clear clip con_info console fire  \
-         flower hicolor image keyboard keybrd2 land \
+         flower hicolor image keyboard keyboard2 land \
          lights modes mojo palette pixel random save \
          lights modes mojo palette pixel random save \
-         stretch texwarp timer tunnel3d tunnel  
+         stretch texwarp timer tunnel3d tunnel
 
 
 [compiler]
 [compiler]
 unitdir=../$(UNITTARGETDIRPREFIX)
 unitdir=../$(UNITTARGETDIRPREFIX)

+ 10 - 3
packages/ptc/src/win32/base/window.inc

@@ -126,7 +126,7 @@ begin
   }
   }
 end;
 end;
 
 
-procedure TWin32Window.Update(AForce: Boolean = False);
+procedure TWin32Window.Update(AForce: Boolean = False; AWaitForMessage: Boolean = False);
 var
 var
   message: MSG;
   message: MSG;
 begin
 begin
@@ -137,11 +137,18 @@ begin
     { updated to pump all window messages, and not just for our FWindow;
     { updated to pump all window messages, and not just for our FWindow;
       this fixes keyboard layout switching and maybe other bugs and side effects...
       this fixes keyboard layout switching and maybe other bugs and side effects...
       Seems like Windows wants everything pumped :) }
       Seems like Windows wants everything pumped :) }
-    while PeekMessage(message, {FWindow}0, 0, 0, PM_REMOVE) do
+    if AWaitForMessage then
     begin
     begin
+      GetMessage(message, {FWindow}0, 0, 0);
       TranslateMessage(message);
       TranslateMessage(message);
       DispatchMessage(message);
       DispatchMessage(message);
-    end;
+    end
+    else
+      while PeekMessage(message, {FWindow}0, 0, 0, PM_REMOVE) do
+      begin
+        TranslateMessage(message);
+        DispatchMessage(message);
+      end;
   end
   end
   else
   else
     Sleep(0);
     Sleep(0);

+ 1 - 1
packages/ptc/src/win32/base/windowd.inc

@@ -68,7 +68,7 @@ type
     procedure Cursor(AFlag: Boolean);
     procedure Cursor(AFlag: Boolean);
     procedure ConfineCursor(AFlag: Boolean);
     procedure ConfineCursor(AFlag: Boolean);
     procedure Resize(AWidth, AHeight: Integer);
     procedure Resize(AWidth, AHeight: Integer);
-    procedure Update(AForce: Boolean = False);
+    procedure Update(AForce: Boolean = False; AWaitForMessage: Boolean = False);
     property Handle: HWND read FWindow;
     property Handle: HWND read FWindow;
     property Thread: DWord read GetThread;
     property Thread: DWord read GetThread;
     property Managed: Boolean read FManaged;
     property Managed: Boolean read FManaged;

+ 12 - 2
packages/ptc/src/win32/directx/directxconsolei.inc

@@ -496,36 +496,46 @@ begin
 end;
 end;
 
 
 function TDirectXConsole.NextEvent(var AEvent: TPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean;
 function TDirectXConsole.NextEvent(var AEvent: TPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean;
+var
+  UseGetMessage: Boolean;
 begin
 begin
   CHECK_OPEN('TDirectXConsole.NextEvent');
   CHECK_OPEN('TDirectXConsole.NextEvent');
 //  CHECK_LOCK('TDirectXConsole.NextEvent');
 //  CHECK_LOCK('TDirectXConsole.NextEvent');
 
 
   FreeAndNil(AEvent);
   FreeAndNil(AEvent);
+  UseGetMessage := False;
   repeat
   repeat
     FPrimary.Block;
     FPrimary.Block;
 
 
     { update window }
     { update window }
-    FWindow.Update;
+    FWindow.Update(False, UseGetMessage);
 
 
     { try to find an event that matches the EventMask }
     { try to find an event that matches the EventMask }
     AEvent := FEventQueue.NextEvent(AEventMask);
     AEvent := FEventQueue.NextEvent(AEventMask);
+    if AWait then
+      UseGetMessage := True;
   until (not AWait) or (AEvent <> nil);
   until (not AWait) or (AEvent <> nil);
   Result := AEvent <> nil;
   Result := AEvent <> nil;
 end;
 end;
 
 
 function TDirectXConsole.PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): TPTCEvent;
 function TDirectXConsole.PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): TPTCEvent;
+var
+  UseGetMessage: Boolean;
 begin
 begin
   CHECK_OPEN('TDirectXConsole.PeekEvent');
   CHECK_OPEN('TDirectXConsole.PeekEvent');
 //  CHECK_LOCK('TDirectXConsole.PeekEvent');
 //  CHECK_LOCK('TDirectXConsole.PeekEvent');
 
 
+  UseGetMessage := False;
   repeat
   repeat
     FPrimary.Block;
     FPrimary.Block;
 
 
     { update window }
     { update window }
-    FWindow.Update;
+    FWindow.Update(False, UseGetMessage);
 
 
     { try to find an event that matches the EventMask }
     { try to find an event that matches the EventMask }
     Result := FEventQueue.PeekEvent(AEventMask);
     Result := FEventQueue.PeekEvent(AEventMask);
+    if AWait then
+      UseGetMessage := True;
   until (not AWait) or (Result <> nil);
   until (not AWait) or (Result <> nil);
 end;
 end;
 
 

+ 12 - 2
packages/ptc/src/win32/gdi/gdiconsolei.inc

@@ -484,32 +484,42 @@ begin
 end;
 end;
 
 
 function TGDIConsole.NextEvent(var AEvent: TPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean;
 function TGDIConsole.NextEvent(var AEvent: TPTCEvent; AWait: Boolean; const AEventMask: TPTCEventMask): Boolean;
+var
+  UseGetMessage: Boolean;
 begin
 begin
   CheckOpen('TGDIConsole.NextEvent');
   CheckOpen('TGDIConsole.NextEvent');
 //  CheckUnlocked('TGDIConsole.NextEvent');
 //  CheckUnlocked('TGDIConsole.NextEvent');
 
 
   FreeAndNil(AEvent);
   FreeAndNil(AEvent);
+  UseGetMessage := False;
   repeat
   repeat
     { update window }
     { update window }
-    FWindow.Update;
+    FWindow.Update(False, UseGetMessage);
 
 
     { try to find an event that matches the EventMask }
     { try to find an event that matches the EventMask }
     AEvent := FEventQueue.NextEvent(AEventMask);
     AEvent := FEventQueue.NextEvent(AEventMask);
+    if AWait then
+      UseGetMessage := True;
   until (not AWait) or (AEvent <> Nil);
   until (not AWait) or (AEvent <> Nil);
   Result := AEvent <> nil;
   Result := AEvent <> nil;
 end;
 end;
 
 
 function TGDIConsole.PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): TPTCEvent;
 function TGDIConsole.PeekEvent(AWait: Boolean; const AEventMask: TPTCEventMask): TPTCEvent;
+var
+  UseGetMessage: Boolean;
 begin
 begin
   CheckOpen('TGDIConsole.PeekEvent');
   CheckOpen('TGDIConsole.PeekEvent');
 //  CheckUnlocked('TGDIConsole.PeekEvent');
 //  CheckUnlocked('TGDIConsole.PeekEvent');
 
 
+  UseGetMessage := False;
   repeat
   repeat
     { update window }
     { update window }
-    FWindow.Update;
+    FWindow.Update(False, UseGetMessage);
 
 
     { try to find an event that matches the EventMask }
     { try to find an event that matches the EventMask }
     Result := FEventQueue.PeekEvent(AEventMask);
     Result := FEventQueue.PeekEvent(AEventMask);
+    if AWait then
+      UseGetMessage := True;
   until (not AWait) or (Result <> Nil);
   until (not AWait) or (Result <> Nil);
 end;
 end;
 
 

+ 1 - 0
packages/winunits-base/src/activex.pp

@@ -3841,6 +3841,7 @@ type
   function  SysAllocStringLen(psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysAllocStringLen';
   function  SysAllocStringLen(psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysAllocStringLen';
   procedure SysFreeString(bstr:pointer); stdcall; external oleaut32dll name 'SysFreeString';
   procedure SysFreeString(bstr:pointer); stdcall; external oleaut32dll name 'SysFreeString';
   function  SysStringLen(bstr:pointer):UINT; stdcall; external oleaut32dll name 'SysStringLen';
   function  SysStringLen(bstr:pointer):UINT; stdcall; external oleaut32dll name 'SysStringLen';
+  function  SysStringByteLen(bstr:pointer):UINT; stdcall; external oleaut32dll name 'SysStringByteLen';
   function  SysReAllocString(var bstr:pointer;psz: pointer): Integer; stdcall; external oleaut32dll name 'SysReAllocString';
   function  SysReAllocString(var bstr:pointer;psz: pointer): Integer; stdcall; external oleaut32dll name 'SysReAllocString';
   function  SysReAllocStringLen(var bstr:pointer;psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysReAllocStringLen';
   function  SysReAllocStringLen(var bstr:pointer;psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysReAllocStringLen';
 
 

+ 4 - 0
packages/winunits-base/src/comobj.pp

@@ -28,6 +28,10 @@ unit comobj;
 
 
     type
     type
       EOleError = class(Exception);
       EOleError = class(Exception);
+     
+      // apparantly used by axctrls.
+      // http://lazarus.freepascal.org/index.php/topic,11612.0.html
+      TConnectEvent = procedure(const Sink: IUnknown; Connecting: Boolean) of object;
 
 
       EOleSysError = class(EOleError)
       EOleSysError = class(EOleError)
       private
       private

+ 4 - 0
packages/winunits-jedi/src/jwawinnt.pas

@@ -2935,7 +2935,11 @@ const
   PROCESS_ALL_ACCESS        = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $FFF;
   PROCESS_ALL_ACCESS        = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or $FFF;
   {$EXTERNALSYM PROCESS_ALL_ACCESS}
   {$EXTERNALSYM PROCESS_ALL_ACCESS}
 
 
+  {$ifdef win64}
+  MAXIMUM_PROCESSORS = 64;
+  {$else}
   MAXIMUM_PROCESSORS = 32;
   MAXIMUM_PROCESSORS = 32;
+  {$endif}
   {$EXTERNALSYM MAXIMUM_PROCESSORS}
   {$EXTERNALSYM MAXIMUM_PROCESSORS}
 
 
   THREAD_TERMINATE            = $0001;
   THREAD_TERMINATE            = $0001;

+ 1 - 1
rtl/freebsd/ptypes.inc

@@ -134,7 +134,7 @@ type
    pthread_condattr_t   = ^pthread_condattr_t_rec;
    pthread_condattr_t   = ^pthread_condattr_t_rec;
    pthread_key_t        = cint;
    pthread_key_t        = cint;
    pthread_rwlock_t     = ^pthread_rwlock_t_rec;
    pthread_rwlock_t     = ^pthread_rwlock_t_rec;
-   pthread_rwlockattr_t = ^pthread_rwlock_t_rec;
+   pthread_rwlockattr_t = ^pthread_rwlockattr_t_rec;
 
 
    sem_t_rec		= record end;
    sem_t_rec		= record end;
    sem_t                = ^sem_t_rec;
    sem_t                = ^sem_t_rec;

+ 7 - 8
rtl/objpas/fmtbcd.pp

@@ -1202,7 +1202,7 @@ IMPLEMENTATION
       pack_BCD := True;
       pack_BCD := True;
      end;
      end;
 
 
-  procedure SetDecimals ( var dp,
+  procedure SetDecimals ( out dp,
                               dc : Char );
                               dc : Char );
 
 
     begin
     begin
@@ -1704,6 +1704,7 @@ IMPLEMENTATION
       l :  {$ifopt r+} 0..maxfmtbcdfractionsize + 1 + 1 {$else} Integer {$endif};
       l :  {$ifopt r+} 0..maxfmtbcdfractionsize + 1 + 1 {$else} Integer {$endif};
       i :  {$ifopt r+} low ( bh.FDig )..high ( bh.LDig ) {$else} Integer {$endif};
       i :  {$ifopt r+} low ( bh.FDig )..high ( bh.LDig ) {$else} Integer {$endif};
       pp : {$ifopt r+} low ( bh.FDig ) - 1..1 {$else} Integer {$endif};
       pp : {$ifopt r+} low ( bh.FDig ) - 1..1 {$else} Integer {$endif};
+      dp, dc : Char;
 
 
     begin
     begin
 {$ifdef use_ansistring}
 {$ifdef use_ansistring}
@@ -1712,6 +1713,7 @@ IMPLEMENTATION
       unpack_BCD ( BCD, bh );
       unpack_BCD ( BCD, bh );
       WITH bh do
       WITH bh do
         begin
         begin
+          SetDecimals ( dp, dc );
           l := 0;
           l := 0;
           if Neg
           if Neg
             then begin
             then begin
@@ -1742,9 +1744,9 @@ IMPLEMENTATION
                     then begin
                     then begin
 {$ifndef use_ansistring}
 {$ifndef use_ansistring}
                       Inc ( l );
                       Inc ( l );
-                      result[l] := '.';
+                      result[l] := dp;
 {$else}
 {$else}
-                      result := result + '.';
+                      result := result + dp;
 {$endif}
 {$endif}
                      end;
                      end;
 {$ifndef use_ansistring}
 {$ifndef use_ansistring}
@@ -3755,11 +3757,8 @@ end;
 
 
 function VarToBCD ( const aValue : Variant ) : tBCD;
 function VarToBCD ( const aValue : Variant ) : tBCD;
   begin
   begin
-    if VarIsFmtBCD(aValue) then
-      Result:=TFMTBcdVarData(TVarData(aValue).vPointer).BCD
-    else
-      Result:=VariantToBCD(TVarData(aValue));
-   end;
+    Result:=VariantToBCD(TVarData(aValue));
+  end;
 
 
 
 
 constructor TFMTBcdVarData.create;
 constructor TFMTBcdVarData.create;

+ 20 - 10
rtl/objpas/sysutils/sysformt.inc

@@ -19,8 +19,9 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
 
 
     Procedure ReadInteger;
     Procedure ReadInteger;
 
 
-    var Code: Word;
-
+    var
+      Code: Word;
+      ArgN: SizeInt;
     begin
     begin
       If Value<>-1 then exit; // Was already read.
       If Value<>-1 then exit; // Was already read.
       OldPos:=ChPos;
       OldPos:=ChPos;
@@ -30,16 +31,27 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
         DoFormatError(feInvalidFormat);
         DoFormatError(feInvalidFormat);
       If Fmt[ChPos]='*' then
       If Fmt[ChPos]='*' then
         begin
         begin
-        If (ChPos>OldPos) or (ArgPos>High(Args)) then
+
+        if Index=-1 then
+          ArgN:=Argpos
+        else
+        begin
+          ArgN:=Index;
+          Inc(Index);
+        end;
+
+        If (ChPos>OldPos) or (ArgN>High(Args)) then
           DoFormatError(feInvalidFormat);
           DoFormatError(feInvalidFormat);
-        case Args[ArgPos].Vtype of
-          vtInteger: Value := Args[ArgPos].VInteger;
-          vtInt64: Value := Args[ArgPos].VInt64^;
-          vtQWord: Value := Args[ArgPos].VQWord^;
+
+        ArgPos:=ArgN+1;
+
+        case Args[ArgN].Vtype of
+          vtInteger: Value := Args[ArgN].VInteger;
+          vtInt64: Value := Args[ArgN].VInt64^;
+          vtQWord: Value := Args[ArgN].VQWord^;
         else
         else
           DoFormatError(feInvalidFormat);
           DoFormatError(feInvalidFormat);
         end;
         end;
-        Inc(ArgPos);
         Inc(ChPos);
         Inc(ChPos);
         end
         end
       else
       else
@@ -197,8 +209,6 @@ begin
   result:=true;
   result:=true;
 end;
 end;
 
 
-Const Zero = '000000000000000000000000000000000000000000000000000000000000000';
-
 begin
 begin
   Result:='';
   Result:='';
   Len:=Length(Fmt);
   Len:=Length(Fmt);

+ 119 - 0
rtl/openbsd/errnostr.inc

@@ -0,0 +1,119 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2010 by Jasper Lievisse Adriaanse <[email protected]>
+
+    Contains BSD specific errors for error.pp in rtl/unix
+
+    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.
+
+ **********************************************************************}
+
+const
+  sys_errn=92;
+  sys_errlist:array[0..sys_errn-1] of pchar = (
+        'Success',                             { 0 }
+        'Operation not permitted',             { EPERM }
+        'No such file or directory',           { ENOENT }
+        'No such process',                     { ESRCH }
+        'Interrupted system call',             { EINTR }
+        'I/O error',                           { EIO }
+        'No such device or address',           { ENXIO }
+        'Arg list too long',                   { E2BIG }
+        'Exec format error',                   { ENOEXEC }
+        'Bad file number',                     { EBADF }
+        'No child processes',                  { ECHILD }
+        'Resource deadlock avoided',           { EDEADLK was EAGAIN }
+        'Out of memory',                       { ENOMEM }
+        'Permission denied',                   { EACCES }
+        'Bad address',                         { EFAULT }
+        'Block device required',               { ENOTBLK }
+        'Device or resource busy',             { EBUSY }
+        'File exists',                         { EEXIST }
+        'Cross-device link',                   { EXDEV }
+        'No such device',                      { ENODEV }
+        'Not a directory',                     { ENOTDIR }
+        'Is a directory',                      { EISDIR }
+        'Invalid argument',                    { EINVAL }
+        'File table overflow',                 { ENFILE }
+        'Too many open files',                 { EMFILE }
+        'Not a typewriter',                    { ENOTTY }
+        'Text file busy',                      { ETXTBSY }
+        'File too large',                      { EFBIG }
+        'No space left on device',             { ENOSPC }
+        'Illegal seek',                        { ESPIPE }
+        'Read-only file system',               { EROFS }
+        'Too many links',                      { EMLINK }
+        'Broken pipe',                         { EPIPE }
+// math software
+	'Numerical argument out of domain',    { EDOM }
+	'Result too large',		       { ERANGE }
+// non-blocking and interrupt io
+        'Resource temporarily unavailable',    { EAGAIN }
+        'Operation now in progress',           { EINPROGRESS }
+//      'Operation would block',	       { EAGAIN }
+        'Operation already in progress',       { EALREADY }
+// ipc/network software -- argument errors
+        'Socket operation on non-socket',      { ENOTSOCK }
+        'Destination address required',        { EDESTADDRREQ }
+        'Message too long',                    { EMSGSIZE }
+        'Protocol wrong type for socket',      { EPROTOTYPE }
+        'Protocol not available',              { ENOPROTOOPT }
+        'Protocol not supported',              { EPROTONOSUPPORT }
+        'Socket type not supported',           { ESOCKTNOSUPPORT }
+        'Operation not supported',             { EOPNOTSUPP }
+        'Protocol family not supported',       { EPFNOSUPPORT }
+        'Address family not supported by protocol family', { EAFNOSUPPORT }
+        'Address already in use',              { EADDRINUSE }
+        'Can''t assign requested address',     { EADDRNOTAVAIL }
+// ipc/network software -- operational errors
+        'Network is down',                     { ENETDOWN }
+        'Network is unreachable',              { ENETUNREACH }
+        'Network dropped connection on reset', { ENETRESET }
+        'Software caused connection abort',    { ECONNABORTED }
+        'Connection reset by peer',            { ECONNRESET }
+        'No buffer space available',           { ENOBUFS }
+        'Socket is already connected',         { EISCONN }
+        'Socket is not connected',             { ENOTCONN }
+        'Can''t send after socket shutdown',   { ESHUTDOWN }
+        'Too many references: can''t splice',  { ETOOMANYREFS }
+        'Operation timed out',                 { ETIMEDOUT }
+        'Connection refused',                  { ECONNREFUSED }
+        'Too many levels of symbolic links',   { ELOOP }
+        'File name too long',                  { ENAMETOOLONG }
+        'Host is down',                        { EHOSTDOWN }
+        'No route to host',                    { EHOSTUNREACH }
+        'Directory not empty',                 { ENOTEMPTY }
+// quotas & mush
+        'Too many processes',                  { EPROCLIM }
+        'Too many users',                      { EUSERS }
+        'Disc quota exceeded',                 { EDQUOT }
+// Network File System
+        'Stale NFS file handle',               { ESTALE }
+        'Too many levels of remote in path',   { EREMOTE }
+        'RPC struct is bad',                   { EBADRPC }
+        'RPC version wrong',                   { ERPCMISMATCH }
+        'RPC prog. not avail',                 { EPROGUNAVAIL }
+        'Program version wrong',               { EPROGMISMATCH }
+        'Bad procedure for program',           { EPROCUNAVAIL }
+        'No locks available',                  { ENOLCK }
+        'Function not implemented',            { ENOSYS }
+        'Inappropriate file type or format',   { EFTYPE }
+        'Authentication error',                { EAUTH }
+        'Need authenticator',                  { ENEEDAUTH }
+	'IPsec processing failure',            { EIPSEC }
+	'Attribute not found',                 { ENOATTR }
+        'Illegal byte sequence',               { EILSEQ }
+	'No medium found',                     { ENOMEDIUM }
+	'Wrong Meda Type',                     { EMEDIUMTYPE }
+        'Value too large to be stored in data type', { EOVERFLOW }
+        'Operation canceled',                  { ECANCELED }
+        'Identifier removed',                  { EIDRM }
+        'No message of desired type',          { ENOMSG }
+	'Not supported',                       { ENOTSUP }
+//	'Must be equal to largest errno'       { ELAST }
+);

+ 99 - 13
rtl/openbsd/ptypes.inc

@@ -1,6 +1,6 @@
 {
 {
     This file is part of the Free Pascal run time library.
     This file is part of the Free Pascal run time library.
-    Copyright (c) 2001 by Free Pascal development team
+    Copyright (c) 2001,2010 by Free Pascal development team
 
 
     This file implements all the base types and limits required
     This file implements all the base types and limits required
     for a minimal POSIX compliant subset required to port the compiler
     for a minimal POSIX compliant subset required to port the compiler
@@ -65,6 +65,10 @@ type
     TUid     = Uid_t;
     TUid     = Uid_t;
     pUid     = ^Uid_t;
     pUid     = ^Uid_t;
 
 
+    wint_t   = cint32;
+    wchar_t  = cint32;
+    pwchar_t = ^wchar_t;
+
     clock_t  = culong;
     clock_t  = culong;
     TClock   = clock_t;
     TClock   = clock_t;
     pClock   = ^clock_t;
     pClock   = ^clock_t;
@@ -92,18 +96,31 @@ type
   ptimespec= ^timespec;
   ptimespec= ^timespec;
   Ttimespec= timespec;
   Ttimespec= timespec;
 
 
-   pthread_t            = pointer;
-   pthread_attr_t       = pointer;
+   pthread_t_rec		= record end;
+   pthread_attr_t_rec		= record end;
+//   See pmutext.inc
+//   pthread_mutex_t_rec	= record end;
+   pthread_mutexattr_t_rec	= record end;
+   pthread_cond_t_rec		= record end;
+   pthread_condattr_t_rec	= record end;
+   pthread_once_t_rec		= record end;
+   pthread_rwlock_t_rec   	= record end;
+   pthread_rwlockattr_t_rec	= record end;
+
+   pthread_t            = ^pthread_t_rec;
+   pthread_attr_t       = ^pthread_attr_t_rec;
    pthread_mutex_t      = {$i pmutext.inc}
    pthread_mutex_t      = {$i pmutext.inc}
-   pthread_mutexattr_t  = pointer;
-   pthread_cond_t       = pointer;
-   pthread_condattr_t   = pointer;
+   pthread_mutexattr_t  = ^pthread_mutexattr_t_rec;
+   pthread_cond_t       = ^pthread_cond_t_rec;
+   pthread_condattr_t   = ^pthread_condattr_t_rec;
    pthread_key_t        = cint;
    pthread_key_t        = cint;
-   pthread_rwlock_t     = pointer;
-   pthread_rwlockattr_t = pointer;
+   pthread_once_t	= ^pthread_once_t_rec;
+   pthread_rwlock_t     = ^pthread_rwlock_t_rec;
+   pthread_rwlockattr_t = ^pthread_rwlockattr_t_rec;
 
 
    sem_t                = pointer;
    sem_t                = pointer;
-
+   rlim_t		= int64;
+   TRlim		= rlim_t;
   {
   {
      Mutex types (Single UNIX Specification, Version 2, 1997).
      Mutex types (Single UNIX Specification, Version 2, 1997).
 
 
@@ -127,9 +144,74 @@ type
     _MUTEX_TYPE_MAX
     _MUTEX_TYPE_MAX
   );
   );
 
 
+Const
+     MNAMLEN   = 90;		// length of buffer for returned name
+     MFSNamLen = 16;		// length of fs type name, including nul
+
+type
+  fsid_t  = array[0..1] of cint;
+
+  ufs_args_rec		= record end;
+  mfs_args_rec		= record end;
+  nfs_args_rec		= record end;
+  iso_args_rec		= record end;
+  procfs_args_rec	= record end;
+  msdosfs_args_rec	= record end;
+  ntfs_args_rec		= record end;
+
+  mountinfo = record
+      case byte of
+        0: (ufs_args:     ^ufs_args_rec);
+        1: (mfs_args:     ^mfs_args_rec);
+	2: (ntfs_args:    ^nfsfs_args_rec);
+	3: (isofs_args:   ^isofs_args_rec);
+	4: (procfs_args:  ^procfs_args_rec);
+	5: (msdosfs_args: ^msdosfs_args_rec);
+	6: (ntfs_args:    ^ntfs_args_rec);
+	7: (__align: array[0..159] of char { 64-bit alignment and room to grow }
+    end;
+
+// kernel statfs from mount.h
+  TStatfs = packed record
+    flags,			  { copy of mount flags }
+    bsize,			  { filesystem block size}
+    iosize		: cint;   { optimal transfr block size }
+    blocks,			  { total data block in file system }
+    bfree		: clong;  { blocks free in fs }
+    bavail		: cint64; { block available for non-superuser }
+    files,			  { total file nodes in file system }
+    ffree		: clong;  { free files nodes in fs }
+    favail		: cint64; { free file nodes avail to non-root }
+    fsyncwrites,		  { count of sync writes since mount }
+    fasyncwrites,		  { count of async writes since mount }
+    fsyncreads,			  { count of sync reads since mount }
+    fasyncreads		: clong;  { count of async reads since mount }
+    fsid		: fsid_t; { file system id }
+    namemax		: cint;   { maximum fileystem length }
+    fowner		: tuid;   { user that mounted the fileystem }
+    ctime		: cint;   { last mount [-u] time }
+    fspare3		: array[0..2] of cint; { spare for later }
+    fstypename		: array[0..MFSNamLen-1] of char; { fs type name }
+    mountpoint		: array[0..MNAMLEN-1] of char; { directory on which mounted}
+    mnfromname		: array[0..MNAMLEN-1] of char; { mounted file system }
+    mount_info		: mountinfo; { per-filesystem mount options }
+  end;
+  PStatFS=^TStatFS;
+
+  mbstate_t = record
+      case byte of
+        0: (__mbstate8: array[0..127] of char);
+        1: (_mbstateL: cint64); { for alignment }
+    end;
+  pmbstate_t = ^mbstate_t;
+
+  ITimerVal= Record
+              It_Interval,
+              It_Value      : TimeVal;
+             end;
 
 
 const
 const
-  _PTHREAD_MUTEX_DEFAULT     = _PTHREAD_MUTEX_ERRORCHECK;
+  _PTHREAD_MUTEX_DEFAULT    = _PTHREAD_MUTEX_ERRORCHECK;
   _MUTEX_TYPE_FAST          = _PTHREAD_MUTEX_NORMAL;
   _MUTEX_TYPE_FAST          = _PTHREAD_MUTEX_NORMAL;
   _MUTEX_TYPE_COUNTING_FAST = _PTHREAD_MUTEX_RECURSIVE;
   _MUTEX_TYPE_COUNTING_FAST = _PTHREAD_MUTEX_RECURSIVE;
 
 
@@ -141,8 +223,12 @@ const
     NAME_MAX = 255;        {14}    { Maximum number of bytes in filename }
     NAME_MAX = 255;        {14}    { Maximum number of bytes in filename }
     PATH_MAX = 1024;       {255}   { Maximum number of bytes in pathname }
     PATH_MAX = 1024;       {255}   { Maximum number of bytes in pathname }
 
 
-    SYS_NMLN = 32;              {BSD utsname struct limit}
+    SYS_NMLN = 256;                {BSD utsname struct limit}
 
 
-    SIG_MAXSIG      = 128;      // highest signal version
-    wordsinsigset   = 4;                // words in sigset_t
+    SIG_MAXSIG      = 33;      	   // highest signal version
+    wordsinsigset   = 4;           // words in sigset_t
 
 
+  { For getting/setting priority }
+   Prio_Process = 0;
+   Prio_PGrp    = 1;
+   Prio_User    = 2;

+ 61 - 61
rtl/solaris/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/11/01]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/11/23]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -293,184 +293,184 @@ ifndef USELIBGGI
 USELIBGGI=NO
 USELIBGGI=NO
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres $(CPU_UNITS)
+override TARGET_UNITS+=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas heaptrc lineinfo lnfodwrf baseunix unixutil termio unix initc cmem crt printer sysutils typinfo math fgl classes matrix varutils charset ucomplex getopts errors sockets terminfo dl dynlibs video mouse keyboard variants types dateutils sysconst strutils fmtbcd rtlconsts cthreads convutils stdconvs dos objects cwstring fpintres clocale $(CPU_UNITS)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_IMPLICITUNITS+=exeinfo
 override TARGET_IMPLICITUNITS+=exeinfo

+ 1 - 1
rtl/solaris/Makefile.fpc

@@ -22,7 +22,7 @@ units=$(SYSTEMUNIT) unixtype ctypes strings objpas macpas \
       strutils fmtbcd rtlconsts cthreads \
       strutils fmtbcd rtlconsts cthreads \
       convutils stdconvs \
       convutils stdconvs \
       dos objects \
       dos objects \
-      cwstring fpintres $(CPU_UNITS)
+      cwstring fpintres clocale $(CPU_UNITS)
 
 
 implicitunits=exeinfo
 implicitunits=exeinfo
 
 

+ 135 - 0
rtl/solaris/clocale.inc

@@ -0,0 +1,135 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2008 by the Free Pascal development team.
+
+    Init rtl formating variables based on BSD like libc locales
+
+    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.
+ **********************************************************************}
+
+{ Initial FreeBSD Implementation by Marco van de Voort.
+  Crosschecked with OS X 10.4/ppc headers.
+  To some symbols leading underscores were added. If these values are
+   ever exposed in an interface this has to be reevaluated.
+}
+
+{$IFDEF FPC}
+{$PACKRECORDS C}
+{$ENDIF}
+
+  __LC_ALL          = 0;
+  __LC_COLLATE      = 1;
+  __LC_CTYPE        = 2;
+  __LC_MONETARY     = 3;
+  __LC_NUMERIC      = 4;
+  __LC_TIME         = 5;
+  __LC_MESSAGES     = 6;
+  _LC_LAST         = 7;              { marks end }
+
+
+Type
+     lconv = record
+          decimal_point     : pchar;
+          thousands_sep     : pchar;
+          grouping          : pchar;
+          int_curr_symbol   : pchar;
+          currency_symbol   : pchar;
+          mon_decimal_point : pchar;
+          mon_thousands_sep : pchar;
+          mon_grouping      : pchar;
+          positive_sign     : pchar;
+          negative_sign     : pchar;
+          int_frac_digits   : char;
+          frac_digits       : char;
+          p_cs_precedes     : char;
+          p_sep_by_space    : char;
+          n_cs_precedes     : char;
+          n_sep_by_space    : char;
+          p_sign_posn       : char;
+          n_sign_posn       : char;
+          int_p_cs_precedes : char;
+          int_n_cs_precedes : char;
+          int_p_sep_by_space: char;
+          int_n_sep_by_space: char;
+          int_p_sign_posn   : char;
+          int_n_sign_posn   : char;
+       end;
+     Tlconv = lconv;
+     plconv = ^lconv;
+
+Const
+        CODESET         = 0;     { codeset name }
+        D_T_FMT         = 1;     { string for formatting date and time }
+        D_FMT           = 2;     { date format string }
+        T_FMT           = 3;     { time format string }
+        T_FMT_AMPM      = 4;     { a.m. or p.m. time formatting string }
+        AM_STR          = 5;     { Ante Meridian affix }
+        PM_STR          = 6;     { Post Meridian affix }
+
+{ week day names }
+        DAY_1           = 7;
+        DAY_2           = 8;
+        DAY_3           = 9;
+        DAY_4           = 10;
+        DAY_5           = 11;
+        DAY_6           = 12;
+        DAY_7           = 13;
+
+{ abbreviated week day names }
+        ABDAY_1         = 14;
+        ABDAY_2         = 15;
+        ABDAY_3         = 16;
+        ABDAY_4         = 17;
+        ABDAY_5         = 18;
+        ABDAY_6         = 19;
+        ABDAY_7         = 20;
+
+{ month names }
+        MON_1           = 21;
+        MON_2           = 22;
+        MON_3           = 23;
+        MON_4           = 24;
+        MON_5           = 25;
+        MON_6           = 26;
+        MON_7           = 27;
+        MON_8           = 28;
+        MON_9           = 29;
+        MON_10          = 30;
+        MON_11          = 31;
+        MON_12          = 32;
+
+{ abbreviated month names }
+        ABMON_1         = 33;
+        ABMON_2         = 34;
+        ABMON_3         = 35;
+        ABMON_4         = 36;
+        ABMON_5         = 37;
+        ABMON_6         = 38;
+        ABMON_7         = 39;
+        ABMON_8         = 40;
+        ABMON_9         = 41;
+        ABMON_10        = 42;
+        ABMON_11        = 43;
+        ABMON_12        = 44;
+
+        ERA             = 45;      { era description segments }
+        ERA_D_FMT       = 46;      { era date format string }
+        ERA_D_T_FMT     = 47;      { era date and time format string }
+        ERA_T_FMT       = 48;      { era time format string }
+        ALT_DIGITS      = 49;      { alternative symbols for digits }
+        RADIXCHAR       = 50;      { radix char }
+        THOUSEP         = 51;      { separator for thousands }
+
+        YESEXPR         = 52;      { affirmative response expression }
+        NOEXPR          = 53;      { negative response expression }
+        YESSTR          = 54;      { affirmative response for yes/no queries }
+        NOSTR           = 55;      { negative response for yes/no queries }
+        CRNCYSTR        = 56;      { currency symbol }
+        D_MD_ORDER      = 57;      { month/day order (local extension) }
+
+function localeconv:plconv; cdecl; external clib name 'localeconv';

+ 3 - 3
rtl/unix/clocale.pp

@@ -43,7 +43,7 @@ Uses
   SysUtils, unixtype, initc;
   SysUtils, unixtype, initc;
 
 
 Const
 Const
-{$ifdef BSD}
+{$if defined(BSD) or defined(SUNOS)}
   // Darwin and FreeBSD. Note the lead underscores are added.
   // Darwin and FreeBSD. Note the lead underscores are added.
  {$i clocale.inc}
  {$i clocale.inc}
 {$else}
 {$else}
@@ -224,7 +224,7 @@ const
 var
 var
   i: integer;
   i: integer;
   prec, sep, signp: byte;
   prec, sep, signp: byte;
-  {$ifdef BSD}
+  {$if defined(BSD) or defined(SUNOS)}
    plocale : plconv;
    plocale : plconv;
   {$ENDIF}
   {$ENDIF}
 begin
 begin
@@ -272,7 +272,7 @@ begin
   else
   else
     LongTimeFormat := TransformFormatStr(LongTimeFormat);
     LongTimeFormat := TransformFormatStr(LongTimeFormat);
 
 
-  {$Ifdef BSD}
+  {$if defined(BSD) or defined(SUNOS)}
      plocale:=localeconv;
      plocale:=localeconv;
      // for these fields there is a separate BSD derived POSIX function.
      // for these fields there is a separate BSD derived POSIX function.
      if not assigned(plocale) then exit; // for now.
      if not assigned(plocale) then exit; // for now.

+ 1 - 10
rtl/win/sysutils.pp

@@ -579,17 +579,8 @@ end;
 
 
 
 
 Procedure GetLocalTime(var SystemTime: TSystemTime);
 Procedure GetLocalTime(var SystemTime: TSystemTime);
-Var
-  Syst : Windows.TSystemtime;
 begin
 begin
-  windows.Getlocaltime(@syst);
-  SystemTime.year:=syst.wYear;
-  SystemTime.month:=syst.wMonth;
-  SystemTime.day:=syst.wDay;
-  SystemTime.hour:=syst.wHour;
-  SystemTime.minute:=syst.wMinute;
-  SystemTime.second:=syst.wSecond;
-  SystemTime.millisecond:=syst.wMilliSeconds;
+  windows.Getlocaltime(SystemTime);
 end;
 end;
 
 
 
 

+ 1 - 1
rtl/win/wininc/redef.inc

@@ -571,7 +571,7 @@ function GetPrivateProfileSectionNames(lpszReturnBuffer: LPTSTR; nSize: DWORD; l
 function GetPrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID; uSizeStruct: UINT; szFile: LPCSTR): BOOL; external 'kernel32' name 'GetPrivateProfileStructA';
 function GetPrivateProfileStructA(lpszSection, lpszKey: LPCSTR; lpStruct: LPVOID; uSizeStruct: UINT; szFile: LPCSTR): BOOL; external 'kernel32' name 'GetPrivateProfileStructA';
 function GetPrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID; uSizeStruct: UINT; szFile: LPCWSTR): BOOL; external 'kernel32' name 'GetPrivateProfileStructW';
 function GetPrivateProfileStructW(lpszSection, lpszKey: LPCWSTR; lpStruct: LPVOID; uSizeStruct: UINT; szFile: LPCWSTR): BOOL; external 'kernel32' name 'GetPrivateProfileStructW';
 function GetPrivateProfileStruct(lpszSection, lpszKey: LPCTSTR; lpStruct: LPVOID; uSizeStruct: UINT; szFile: LPCTSTR): BOOL; external 'kernel32' name 'GetPrivateProfileStructA';
 function GetPrivateProfileStruct(lpszSection, lpszKey: LPCTSTR; lpStruct: LPVOID; uSizeStruct: UINT; szFile: LPCTSTR): BOOL; external 'kernel32' name 'GetPrivateProfileStructA';
-function GetProcessAffinityMask(hProcess: THandle; var lpProcessAffinityMask, lpSystemAffinityMask: DWORD): BOOL; external 'kernel32' name 'GetProcessAffinityMask';
+function GetProcessAffinityMask(hProcess: THandle; var lpProcessAffinityMask, lpSystemAffinityMask: DWORD_PTR): BOOL; external 'kernel32' name 'GetProcessAffinityMask';
 function GetProcessHeaps(NumberOfHeaps: DWORD; var ProcessHeaps: THandle): DWORD;external 'kernel32' name 'GetProcessHeaps';
 function GetProcessHeaps(NumberOfHeaps: DWORD; var ProcessHeaps: THandle): DWORD;external 'kernel32' name 'GetProcessHeaps';
 {$ifndef NO_SMART_LINK}
 {$ifndef NO_SMART_LINK}
 function GetProcessPriorityBoost(hThread: THandle; var DisablePriorityBoost: Bool): BOOL;external 'kernel32' name 'GetProcessPriorityBoost';
 function GetProcessPriorityBoost(hThread: THandle; var DisablePriorityBoost: Bool): BOOL;external 'kernel32' name 'GetProcessPriorityBoost';

+ 2 - 11
rtl/wince/sysutils.pp

@@ -458,17 +458,8 @@ end;
 
 
 
 
 Procedure GetLocalTime(var SystemTime: TSystemTime);
 Procedure GetLocalTime(var SystemTime: TSystemTime);
-Var
-  Syst : Windows.TSystemtime;
-begin
-  windows.Getlocaltime(@syst);
-  SystemTime.year:=syst.wYear;
-  SystemTime.month:=syst.wMonth;
-  SystemTime.day:=syst.wDay;
-  SystemTime.hour:=syst.wHour;
-  SystemTime.minute:=syst.wMinute;
-  SystemTime.second:=syst.wSecond;
-  SystemTime.millisecond:=syst.wMilliSeconds;
+begin
+  windows.Getlocaltime(SystemTime);
 end;
 end;
 
 
 
 

+ 10 - 0
tests/test/units/sysutils/tformat.pp

@@ -0,0 +1,10 @@
+uses sysutils;
+
+begin
+  if format('>%1:*s<',[0, 12,'def',-15]) <> '>         def<' then
+    Halt(1);
+  if format('>%1:*s< >%*s<', [0, 12, 'abc', 10, 'def']) <> '>         abc< >       def<' then
+    Halt(2);
+  if format('>%1:*.*s< >%*.*s<', [0, 10,10,'abc', 6,6,'def']) <> '>       abc< >   def<' then
+    Halt(3);
+end.

+ 64 - 8
utils/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/10/20]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/01/03]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -270,13 +270,13 @@ ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc rmwait
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpmc fpcres
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpmc fpcres rmwait
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpmc fpcres rmwait
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres
@@ -309,7 +309,7 @@ ifeq ($(FULL_TARGET),i386-darwin)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres fpcreslipo
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres fpcreslipo
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpmc fpcres rmwait
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
@@ -318,7 +318,7 @@ ifeq ($(FULL_TARGET),i386-netwlibc)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcres rmwait
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
@@ -396,7 +396,7 @@ ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres fpcreslipo
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres fpcreslipo
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpmc fpcres
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpmc fpcres rmwait
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
@@ -411,7 +411,7 @@ ifeq ($(FULL_TARGET),arm-darwin)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres fpcreslipo
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres fpcreslipo
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc  fpcres
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcres rmwait
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc
@@ -2850,6 +2850,7 @@ TARGET_DIRS_H2PAS=1
 TARGET_DIRS_FPRCP=1
 TARGET_DIRS_FPRCP=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPDOC=1
+TARGET_DIRS_RMWAIT=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
 TARGET_DIRS_FPPKG=1
 TARGET_DIRS_FPPKG=1
@@ -2861,6 +2862,7 @@ TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPMC=1
 TARGET_DIRS_FPMC=1
 TARGET_DIRS_FPCRES=1
 TARGET_DIRS_FPCRES=1
+TARGET_DIRS_RMWAIT=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
 TARGET_DIRS_FPPKG=1
 TARGET_DIRS_FPPKG=1
@@ -2870,6 +2872,9 @@ TARGET_DIRS_H2PAS=1
 TARGET_DIRS_FPRCP=1
 TARGET_DIRS_FPRCP=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPDOC=1
+TARGET_DIRS_FPMC=1
+TARGET_DIRS_FPCRES=1
+TARGET_DIRS_RMWAIT=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
 TARGET_DIRS_FPPKG=1
 TARGET_DIRS_FPPKG=1
@@ -2976,6 +2981,9 @@ TARGET_DIRS_H2PAS=1
 TARGET_DIRS_FPRCP=1
 TARGET_DIRS_FPRCP=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPDOC=1
+TARGET_DIRS_FPMC=1
+TARGET_DIRS_FPCRES=1
+TARGET_DIRS_RMWAIT=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
 TARGET_DIRS_FPPKG=1
 TARGET_DIRS_FPPKG=1
@@ -3004,6 +3012,7 @@ TARGET_DIRS_FPRCP=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPCRES=1
 TARGET_DIRS_FPCRES=1
+TARGET_DIRS_RMWAIT=1
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
 TARGET_DIRS_FPPKG=1
 TARGET_DIRS_FPPKG=1
@@ -3256,6 +3265,7 @@ TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPMC=1
 TARGET_DIRS_FPMC=1
 TARGET_DIRS_FPCRES=1
 TARGET_DIRS_FPCRES=1
+TARGET_DIRS_RMWAIT=1
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
 TARGET_DIRS_FPPKG=1
 TARGET_DIRS_FPPKG=1
@@ -3305,6 +3315,7 @@ TARGET_DIRS_FPRCP=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_DXEGEN=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPDOC=1
 TARGET_DIRS_FPCRES=1
 TARGET_DIRS_FPCRES=1
+TARGET_DIRS_RMWAIT=1
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
 TARGET_DIRS_FPPKG=1
 TARGET_DIRS_FPPKG=1
@@ -3770,6 +3781,51 @@ fpcres:
 	$(MAKE) -C fpcres all
 	$(MAKE) -C fpcres all
 .PHONY: fpcres_all fpcres_debug fpcres_smart fpcres_release fpcres_units fpcres_examples fpcres_shared fpcres_install fpcres_sourceinstall fpcres_exampleinstall fpcres_distinstall fpcres_zipinstall fpcres_zipsourceinstall fpcres_zipexampleinstall fpcres_zipdistinstall fpcres_clean fpcres_distclean fpcres_cleanall fpcres_info fpcres_makefiles fpcres
 .PHONY: fpcres_all fpcres_debug fpcres_smart fpcres_release fpcres_units fpcres_examples fpcres_shared fpcres_install fpcres_sourceinstall fpcres_exampleinstall fpcres_distinstall fpcres_zipinstall fpcres_zipsourceinstall fpcres_zipexampleinstall fpcres_zipdistinstall fpcres_clean fpcres_distclean fpcres_cleanall fpcres_info fpcres_makefiles fpcres
 endif
 endif
+ifdef TARGET_DIRS_RMWAIT
+rmwait_all:
+	$(MAKE) -C rmwait all
+rmwait_debug:
+	$(MAKE) -C rmwait debug
+rmwait_smart:
+	$(MAKE) -C rmwait smart
+rmwait_release:
+	$(MAKE) -C rmwait release
+rmwait_units:
+	$(MAKE) -C rmwait units
+rmwait_examples:
+	$(MAKE) -C rmwait examples
+rmwait_shared:
+	$(MAKE) -C rmwait shared
+rmwait_install:
+	$(MAKE) -C rmwait install
+rmwait_sourceinstall:
+	$(MAKE) -C rmwait sourceinstall
+rmwait_exampleinstall:
+	$(MAKE) -C rmwait exampleinstall
+rmwait_distinstall:
+	$(MAKE) -C rmwait distinstall
+rmwait_zipinstall:
+	$(MAKE) -C rmwait zipinstall
+rmwait_zipsourceinstall:
+	$(MAKE) -C rmwait zipsourceinstall
+rmwait_zipexampleinstall:
+	$(MAKE) -C rmwait zipexampleinstall
+rmwait_zipdistinstall:
+	$(MAKE) -C rmwait zipdistinstall
+rmwait_clean:
+	$(MAKE) -C rmwait clean
+rmwait_distclean:
+	$(MAKE) -C rmwait distclean
+rmwait_cleanall:
+	$(MAKE) -C rmwait cleanall
+rmwait_info:
+	$(MAKE) -C rmwait info
+rmwait_makefiles:
+	$(MAKE) -C rmwait makefiles
+rmwait:
+	$(MAKE) -C rmwait all
+.PHONY: rmwait_all rmwait_debug rmwait_smart rmwait_release rmwait_units rmwait_examples rmwait_shared rmwait_install rmwait_sourceinstall rmwait_exampleinstall rmwait_distinstall rmwait_zipinstall rmwait_zipsourceinstall rmwait_zipexampleinstall rmwait_zipdistinstall rmwait_clean rmwait_distclean rmwait_cleanall rmwait_info rmwait_makefiles rmwait
+endif
 ifdef TARGET_DIRS_FPMC
 ifdef TARGET_DIRS_FPMC
 fpmc_all:
 fpmc_all:
 	$(MAKE) -C fpmc all
 	$(MAKE) -C fpmc all

+ 6 - 3
utils/Makefile.fpc

@@ -10,9 +10,9 @@ version=2.4.3
 dirs=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 dirs=fppkg fpcm tply h2pas fprcp dxegen fpdoc
 programs=ppdep ptop rstconv data2inc delp bin2obj postw32 rmcvsdir
 programs=ppdep ptop rstconv data2inc delp bin2obj postw32 rmcvsdir
 programs_linux=grab_vcsa
 programs_linux=grab_vcsa
-dirs_win32=fpmc fpcres
-dirs_win64=fpmc fpcres
-dirs_wince=fpcres
+dirs_win32=fpmc fpcres rmwait
+dirs_win64=fpmc fpcres rmwait
+dirs_wince=fpcres rmwait
 dirs_haiku=fpcres
 dirs_haiku=fpcres
 dirs_linux=fpcres
 dirs_linux=fpcres
 dirs_freebsd=fpcres
 dirs_freebsd=fpcres
@@ -20,6 +20,9 @@ dirs_openbsd=fpcres
 dirs_netbsd=fpcres
 dirs_netbsd=fpcres
 dirs_darwin=fpcres fpcreslipo
 dirs_darwin=fpcres fpcreslipo
 dirs_solaris=fpcres
 dirs_solaris=fpcres
+dirs_os2=fpmc fpcres rmwait
+dirs_emx=fpmc fpcres rmwait
+dirs_go32v2=rmwait
 rsts=rstconv
 rsts=rstconv
 
 
 [require]
 [require]

+ 1 - 0
utils/fpdoc/dglobals.pp

@@ -119,6 +119,7 @@ resourcestring
   SCHMUsageAutoTOC = 'Automatically generate a Table of Contents. Ignores --toc-file';
   SCHMUsageAutoTOC = 'Automatically generate a Table of Contents. Ignores --toc-file';
   SCHMUsageAutoIDX = 'Automatically generate an Index. Ignores --index-file';
   SCHMUsageAutoIDX = 'Automatically generate an Index. Ignores --index-file';
   SCHMUsageMakeSearch = 'Automatically generate a Search Index from filenames that match *.htm*';
   SCHMUsageMakeSearch = 'Automatically generate a Search Index from filenames that match *.htm*';
+  SCHMUsageChmTitle= 'Title of the chm. Defaults to the value from --package';
 
 
   // Linear usage
   // Linear usage
   SLinearUsageDupLinkedDocsP1 = 'Duplicate linked element documentation in';
   SLinearUsageDupLinkedDocsP1 = 'Duplicate linked element documentation in';

+ 9 - 1
utils/fpdoc/dw_htmlchm.inc

@@ -10,6 +10,7 @@ type
     FChm: TChmWriter;
     FChm: TChmWriter;
     FTempUncompressed: TStream;
     FTempUncompressed: TStream;
     FTempUncompressedName: String;
     FTempUncompressedName: String;
+    FChmTitle: String;
     FTOCName,
     FTOCName,
     FIndexName,
     FIndexName,
     FDefaultPage: String;
     FDefaultPage: String;
@@ -450,7 +451,7 @@ begin
   FTempUncompressedName := GetTempFileName+IntToStr(GetProcessID) +'.raw';
   FTempUncompressedName := GetTempFileName+IntToStr(GetProcessID) +'.raw';
   FTempUncompressed := TFileStream.Create(FTempUncompressedName, fmOpenReadWrite  or fmCreate);
   FTempUncompressed := TFileStream.Create(FTempUncompressedName, fmOpenReadWrite  or fmCreate);
   FChm := TChmWriter.Create(FOutChm, False);
   FChm := TChmWriter.Create(FOutChm, False);
-  FChm.Title := Copy(Package.Name, 2, Length(Package.Name));
+  FChm.Title := FChmTitle;
   FChm.TempRawStream := FTempUncompressed;
   FChm.TempRawStream := FTempUncompressed;
   FChm.OnGetFileData := @RetrieveOtherFiles;
   FChm.OnGetFileData := @RetrieveOtherFiles;
   FChm.OnLastFile := @LastFileAdded;
   FChm.OnLastFile := @LastFileAdded;
@@ -512,8 +513,13 @@ begin
     FNoBinIndex := True
     FNoBinIndex := True
   else if Cmd = '--make-searchable' then
   else if Cmd = '--make-searchable' then
     FMakeSearchable := True
     FMakeSearchable := True
+  else if Cmd = '--chm-title' then
+    FChmTitle := arg
   else
   else
     Result:=inherited InterPretOption(Cmd, Arg);
     Result:=inherited InterPretOption(Cmd, Arg);
+
+  if Length(FChmTitle) = 0 then
+    FChmTitle := Copy(Package.Name, 2, Length(Package.Name));
 end;
 end;
 
 
 class procedure TCHMHTMLWriter.Usage(List: TStrings);
 class procedure TCHMHTMLWriter.Usage(List: TStrings);
@@ -535,6 +541,8 @@ begin
   List.Add(SCHMUsageAutoTOC);
   List.Add(SCHMUsageAutoTOC);
   List.add('--make-searchable');
   List.add('--make-searchable');
   List.Add(SCHMUsageMakeSearch);
   List.Add(SCHMUsageMakeSearch);
+  List.Add('--chm-title');
+  List.Add(SCHMUsageChmTitle);
 end;
 end;
 
 
 
 

+ 84 - 2
utils/fpdoc/fpclasschart.pp

@@ -349,8 +349,82 @@ begin
   Close(FFile);
   Close(FFile);
 end;
 end;
 
 
+type
+  { TGraphVizClassChartFormatter }
+
+  TGraphVizClassChartFormatter = class(TClassChartFormatter)
+    FFile : Text;
+    FMode : TClassMode;
+    FIndent : integer;
+    Procedure EmitLine(S : string);
+  Protected
+    procedure DoEmitClass(E : TDomElement); override;
+    procedure DoNextColumn(E: TDomElement); override;
+    procedure DoHeadClass(E: TDomElement); override;
+    procedure StartSubClass(E: TDomElement); override;
+    procedure EndSubClass(E: TDomElement; HasSiblings : Boolean); override;
+    Procedure StartChart; override;
+    Procedure EndChart; override;
+  end;
+
+  { TGraphVizClassChartFormatter }
+
+  procedure TGraphVizClassChartFormatter.EmitLine(S: String);
+  begin
+    Writeln(FFile,StringofChar(' ',Findent*2),S);
+  end;
+
+  procedure TGraphVizClassChartFormatter.DoEmitClass(E: TDomElement);
+  begin
+    Case ClassMode of
+      cmFirstClass : EmitLine(Format('%s -> %s', [E.ParentNode.NodeName, E.NodeName]));
+      cmNormal     : EmitLine(Format('%s -> %s', [E.ParentNode.NodeName, E.NodeName]));
+      cmSubClass   : EmitLine(Format('%s -> %s', [E.ParentNode.NodeName, E.NodeName]));
+      cmHeadClass  : EmitLine(Format('%s -> %s', [E.ParentNode.NodeName, E.NodeName]));
+    end;
+  end;
+
+  procedure TGraphVizClassChartFormatter.DoNextColumn(E: TDomElement);
+  begin
+    Inherited;
+    FIndent:=0;
+  end;
+
+  procedure TGraphVizClassChartFormatter.DoHeadClass(E: TDomElement);
+  begin
+  //  DoNextColumn(E);
+    inherited DoHeadClass(E);
+  end;
+
+
+  procedure TGraphVizClassChartFormatter.EndSubClass(E: TDomElement; HasSiblings : Boolean);
+  begin
+    If FIndent>0 then
+      Dec(Findent);
+  end;
+
+  procedure TGraphVizClassChartFormatter.StartSubClass(E: TDomElement);
+  begin
+    inherited StartSubClass(E);
+    Inc(Findent);
+  end;
+
+  procedure TGraphVizClassChartFormatter.StartChart;
+  begin
+    Assign(FFile,FileName);
+    Rewrite(FFile);
+    EmitLine('digraph G {');
+  end;
+
+  procedure TGraphVizClassChartFormatter.EndChart;
+  begin
+    EmitLine('}');
+    Close(FFile);
+  end;
+
+
 Type
 Type
-  TOutputFormat = (ofxml,ofPostscript);
+  TOutputFormat = (ofXML,ofPostscript, ofGraphViz);
 
 
 Var
 Var
   OutputFormat : TOutputFormat = ofXML;
   OutputFormat : TOutputFormat = ofXML;
@@ -361,7 +435,6 @@ const
   FPCVersion: String = {$I %FPCVERSION%};
   FPCVersion: String = {$I %FPCVERSION%};
   FPCDate: String = {$I %FPCDATE%};
   FPCDate: String = {$I %FPCDATE%};
 
 
-  
 
 
 function TClassTreeEngine.CreateElement(AClass: TPTreeElement; const AName: String;
 function TClassTreeEngine.CreateElement(AClass: TPTreeElement; const AName: String;
   AParent: TPasElement; AVisibility : TPasMemberVisibility;
   AParent: TPasElement; AVisibility : TPasMemberVisibility;
@@ -583,6 +656,14 @@ begin
           finally
           finally
             Free;
             Free;
           end;
           end;
+      ofGraphViz :
+        With TGraphVizClassChartFormatter.Create(XML) do
+          try
+            FileName:=AOutputName;
+            CreateChart;
+          finally
+            Free;
+          end;
     end;
     end;
     Writeln(StdErr,Format(SClassesAdded,[ACount,InputFiles.Count]));
     Writeln(StdErr,Format(SClassesAdded,[ACount,InputFiles.Count]));
   Finally
   Finally
@@ -632,6 +713,7 @@ begin
   Writeln(' --kind=objectkind   Specify object kind. One of object, class, interface.');
   Writeln(' --kind=objectkind   Specify object kind. One of object, class, interface.');
   Writeln(' --lang=language     Use selected language.');
   Writeln(' --lang=language     Use selected language.');
   Writeln(' --output=filename   Send output to file.');
   Writeln(' --output=filename   Send output to file.');
+  Writeln(' --format=name       Kind of output to create: XML, PostScript, GraphViz.');
 end;
 end;
 
 
 procedure ParseOption(const s: String);
 procedure ParseOption(const s: String);

+ 1958 - 0
utils/rmwait/Makefile

@@ -0,0 +1,1958 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/01/03]
+#
+default: all
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku 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 i386-nativent i386-iphonesim 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-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
+BSDs = freebsd netbsd openbsd darwin
+UNIXs = linux $(BSDs) solaris qnx haiku
+LIMIT83fs = go32v2 os2 emx watcom
+OSNeedsComspecToRunBatch = go32v2 watcom
+FORCE:
+.PHONY: FORCE
+override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
+ifneq ($(findstring darwin,$(OSTYPE)),)
+inUnix=1 #darwin
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+ifeq ($(findstring ;,$(PATH)),)
+inUnix=1
+SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
+else
+SEARCHPATH:=$(subst ;, ,$(PATH))
+endif
+endif
+SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
+PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
+ifeq ($(PWD),)
+PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
+ifeq ($(PWD),)
+$(error You need the GNU utils package to use this Makefile)
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=
+endif
+else
+PWD:=$(firstword $(PWD))
+SRCEXEEXT=.exe
+endif
+ifndef inUnix
+ifeq ($(OS),Windows_NT)
+inWinNT=1
+else
+ifdef OS2_SHELL
+inOS2=1
+endif
+endif
+else
+ifneq ($(findstring cygdrive,$(PATH)),)
+inCygWin=1
+endif
+endif
+ifdef inUnix
+SRCBATCHEXT=.sh
+else
+ifdef inOS2
+SRCBATCHEXT=.cmd
+else
+SRCBATCHEXT=.bat
+endif
+endif
+ifdef COMSPEC
+ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)
+ifndef RUNBATCH
+RUNBATCH=$(COMSPEC) /C
+endif
+endif
+endif
+ifdef inUnix
+PATHSEP=/
+else
+PATHSEP:=$(subst /,\,/)
+ifdef inCygWin
+PATHSEP=/
+endif
+endif
+ifdef PWD
+BASEDIR:=$(subst \,/,$(shell $(PWD)))
+ifdef inCygWin
+ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
+BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
+BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
+BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
+endif
+endif
+else
+BASEDIR=.
+endif
+ifdef inOS2
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO=echo
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+endif
+override DEFAULT_FPCDIR=../..
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+ifneq ($(CPU_TARGET),)
+FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)
+else
+FPC:=$(shell $(FPCPROG) -PB)
+endif
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+else
+ifeq ($(strip $(wildcard $(FPC))),)
+FPC:=$(firstword $(FPCPROG))
+endif
+endif
+else
+override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+FOUNDFPC:=$(strip $(wildcard $(FPC)))
+ifeq ($(FOUNDFPC),)
+FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))
+ifeq ($(FOUNDFPC),)
+$(error Compiler $(FPC) not found)
+endif
+endif
+ifndef FPC_COMPILERINFO
+FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)
+endif
+ifndef FPC_VERSION
+FPC_VERSION:=$(word 1,$(FPC_COMPILERINFO))
+endif
+export FPC FPC_VERSION FPC_COMPILERINFO
+unexport CHECKDEPEND ALLDEPENDENCIES
+ifndef CPU_TARGET
+ifdef CPU_TARGET_DEFAULT
+CPU_TARGET=$(CPU_TARGET_DEFAULT)
+endif
+endif
+ifndef OS_TARGET
+ifdef OS_TARGET_DEFAULT
+OS_TARGET=$(OS_TARGET_DEFAULT)
+endif
+endif
+ifneq ($(words $(FPC_COMPILERINFO)),5)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
+FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
+FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
+endif
+ifndef CPU_SOURCE
+CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
+endif
+ifndef CPU_TARGET
+CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))
+endif
+ifndef OS_SOURCE
+OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))
+endif
+ifndef OS_TARGET
+OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
+endif
+FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifeq ($(CPU_TARGET),armeb)
+ARCH=arm
+override FPCOPT+=-Cb
+else
+ifeq ($(CPU_TARGET),armel)
+ARCH=arm
+override FPCOPT+=-CaEABI
+else
+ARCH=$(CPU_TARGET)
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+SOURCESUFFIX=$(OS_SOURCE)
+else
+TARGETSUFFIX=$(FULL_TARGET)
+SOURCESUFFIX=$(FULL_SOURCE)
+endif
+ifneq ($(FULL_TARGET),$(FULL_SOURCE))
+CROSSCOMPILE=1
+endif
+ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
+ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
+$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
+endif
+endif
+ifneq ($(findstring $(OS_TARGET),$(BSDs)),)
+BSDhier=1
+endif
+ifeq ($(OS_TARGET),linux)
+linuxHier=1
+endif
+export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
+ifdef FPCDIR
+override FPCDIR:=$(subst \,/,$(FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+else
+override FPCDIR=wrong
+endif
+ifdef DEFAULT_FPCDIR
+ifeq ($(FPCDIR),wrong)
+override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=wrong
+endif
+endif
+endif
+ifeq ($(FPCDIR),wrong)
+ifdef inUnix
+override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
+ifeq ($(wildcard $(FPCDIR)/units),)
+override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
+endif
+else
+override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(FPCDIR)/..
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR:=$(BASEDIR)
+ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
+override FPCDIR=c:/pp
+endif
+endif
+endif
+endif
+endif
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
+endif
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
+ifeq ($(OS_SOURCE),darwin)
+DARWIN2DARWIN=1
+endif
+endif
+ifndef BINUTILSPREFIX
+ifndef CROSSBINDIR
+ifdef CROSSCOMPILE
+ifndef DARWIN2DARWIN
+BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+endif
+endif
+endif
+endif
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
+ifeq ($(UNITSDIR),)
+UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
+endif
+PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-darwin)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+override TARGET_PROGRAMS+=rmwait
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_PROGRAMS+=rmwait
+endif
+override INSTALL_FPCPACKAGE=y
+ifdef REQUIRE_UNITSDIR
+override UNITSDIR+=$(REQUIRE_UNITSDIR)
+endif
+ifdef REQUIRE_PACKAGESDIR
+override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)
+endif
+ifdef ZIPINSTALL
+ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)
+UNIXHier=1
+endif
+else
+ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)
+UNIXHier=1
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef PREFIX
+INSTALL_PREFIX=$(PREFIX)
+endif
+endif
+ifndef INSTALL_PREFIX
+ifdef UNIXHier
+INSTALL_PREFIX=/usr/local
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=/pp
+else
+INSTALL_BASEDIR:=/$(PACKAGE_NAME)
+endif
+endif
+endif
+export INSTALL_PREFIX
+ifdef INSTALL_FPCSUBDIR
+export INSTALL_FPCSUBDIR
+endif
+ifndef DIST_DESTDIR
+DIST_DESTDIR:=$(BASEDIR)
+endif
+export DIST_DESTDIR
+ifndef COMPILER_UNITTARGETDIR
+ifdef PACKAGEDIR_MAIN
+COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)
+else
+COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)
+endif
+endif
+ifndef COMPILER_TARGETDIR
+COMPILER_TARGETDIR=.
+endif
+ifndef INSTALL_BASEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)
+endif
+else
+INSTALL_BASEDIR:=$(INSTALL_PREFIX)
+endif
+endif
+ifndef INSTALL_BINDIR
+ifdef UNIXHier
+INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
+else
+INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
+ifdef INSTALL_FPCPACKAGE
+ifdef CROSSCOMPILE
+ifdef CROSSINSTALL
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+else
+INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)
+endif
+endif
+endif
+endif
+ifndef INSTALL_UNITDIR
+INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)
+ifdef INSTALL_FPCPACKAGE
+ifdef PACKAGE_NAME
+INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)
+endif
+endif
+endif
+ifndef INSTALL_LIBDIR
+ifdef UNIXHier
+INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib
+else
+INSTALL_LIBDIR:=$(INSTALL_UNITDIR)
+endif
+endif
+ifndef INSTALL_SOURCEDIR
+ifdef UNIXHier
+ifdef BSDhier
+SRCPREFIXDIR=share/src
+else
+ifdef linuxHier
+SRCPREFIXDIR=share/src
+else
+SRCPREFIXDIR=src
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+ifdef INSTALL_FPCSUBDIR
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)
+endif
+else
+INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source
+endif
+endif
+endif
+ifndef INSTALL_DOCDIR
+ifdef UNIXHier
+ifdef BSDhier
+DOCPREFIXDIR=share/doc
+else
+ifdef linuxHier
+DOCPREFIXDIR=share/doc
+else
+DOCPREFIXDIR=doc
+endif
+endif
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)
+else
+INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc
+endif
+endif
+endif
+ifndef INSTALL_EXAMPLEDIR
+ifdef UNIXHier
+ifdef INSTALL_FPCPACKAGE
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION)/$(PACKAGE_NAME)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/$(PACKAGE_NAME)
+endif
+endif
+else
+ifdef BSDhier
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+ifdef linuxHier
+INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
+endif
+endif
+endif
+else
+ifdef INSTALL_FPCPACKAGE
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)
+else
+INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples
+endif
+endif
+endif
+ifndef INSTALL_DATADIR
+INSTALL_DATADIR=$(INSTALL_BASEDIR)
+endif
+ifndef INSTALL_SHAREDDIR
+INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib
+endif
+ifdef CROSSCOMPILE
+ifndef CROSSBINDIR
+CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))
+ifeq ($(CROSSBINDIR),)
+CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$(FULL_SOURCE))
+endif
+endif
+else
+CROSSBINDIR=
+endif
+BATCHEXT=.bat
+LOADEREXT=.as
+EXEEXT=.exe
+PPLEXT=.ppl
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.so
+SHAREDLIBPREFIX=libfp
+STATICLIBPREFIX=libp
+IMPORTLIBPREFIX=libimp
+RSTEXT=.rst
+ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),go32v1)
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+OEXT=.obj
+ASMEXT=.asm
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=wat
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),emx)
+BATCHEXT=.cmd
+AOUTEXT=.out
+STATICLIBPREFIX=
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=emx
+ECHO=echo
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),morphos)
+EXEEXT=
+SHAREDLIBEXT=.library
+SHORTSUFFIX=mos
+endif
+ifeq ($(OS_TARGET),atari)
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),haiku)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=hai
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nw
+IMPORTLIBPREFIX=imp
+endif
+ifeq ($(OS_TARGET),netwlibc)
+EXEEXT=.nlm
+STATICLIBPREFIX=
+SHORTSUFFIX=nwl
+IMPORTLIBPREFIX=imp
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+IMPORTLIBPREFIX=imp
+endif
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=dwn
+endif
+ifeq ($(OS_TARGET),gba)
+EXEEXT=.gba
+SHAREDLIBEXT=.so
+SHORTSUFFIX=gba
+endif
+ifeq ($(OS_TARGET),symbian)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=symbian
+endif
+ifeq ($(OS_TARGET),NativeNT)
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=nativent
+endif
+else
+ifeq ($(OS_TARGET),go32v1)
+PPUEXT=.pp1
+OEXT=.o1
+ASMEXT=.s1
+SMARTEXT=.sl1
+STATICLIBEXT=.a1
+SHAREDLIBEXT=.so1
+STATICLIBPREFIX=
+SHORTSUFFIX=v1
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),go32v2)
+STATICLIBPREFIX=
+SHORTSUFFIX=dos
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),watcom)
+STATICLIBPREFIX=
+SHORTSUFFIX=wat
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),linux)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=lnx
+endif
+ifeq ($(OS_TARGET),freebsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=fbs
+endif
+ifeq ($(OS_TARGET),netbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=nbs
+endif
+ifeq ($(OS_TARGET),openbsd)
+BATCHEXT=.sh
+EXEEXT=
+HASSHAREDLIB=1
+SHORTSUFFIX=obs
+endif
+ifeq ($(OS_TARGET),win32)
+PPUEXT=.ppw
+OEXT=.ow
+ASMEXT=.sw
+SMARTEXT=.slw
+STATICLIBEXT=.aw
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=w32
+endif
+ifeq ($(OS_TARGET),os2)
+BATCHEXT=.cmd
+PPUEXT=.ppo
+ASMEXT=.so2
+OEXT=.oo2
+AOUTEXT=.out
+SMARTEXT=.sl2
+STATICLIBPREFIX=
+STATICLIBEXT=.ao2
+SHAREDLIBEXT=.dll
+SHORTSUFFIX=os2
+ECHO=echo
+IMPORTLIBPREFIX=
+endif
+ifeq ($(OS_TARGET),amiga)
+EXEEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.library
+SHORTSUFFIX=amg
+endif
+ifeq ($(OS_TARGET),atari)
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=.ttp
+SHORTSUFFIX=ata
+endif
+ifeq ($(OS_TARGET),beos)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=be
+endif
+ifeq ($(OS_TARGET),solaris)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=sun
+endif
+ifeq ($(OS_TARGET),qnx)
+BATCHEXT=.sh
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+SHORTSUFFIX=qnx
+endif
+ifeq ($(OS_TARGET),netware)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nw
+IMPORTLIBPREFIX=imp
+endif
+ifeq ($(OS_TARGET),netwlibc)
+STATICLIBPREFIX=
+PPUEXT=.ppu
+OEXT=.o
+ASMEXT=.s
+SMARTEXT=.sl
+STATICLIBEXT=.a
+SHAREDLIBEXT=.nlm
+EXEEXT=.nlm
+SHORTSUFFIX=nwl
+IMPORTLIBPREFIX=imp
+endif
+ifeq ($(OS_TARGET),macos)
+BATCHEXT=
+PPUEXT=.ppu
+ASMEXT=.s
+OEXT=.o
+SMARTEXT=.sl
+STATICLIBEXT=.a
+EXEEXT=
+DEBUGSYMEXT=.xcoff
+SHORTSUFFIX=mac
+IMPORTLIBPREFIX=imp
+endif
+endif
+ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
+FPCMADE=fpcmade.$(SHORTSUFFIX)
+ZIPSUFFIX=$(SHORTSUFFIX)
+ZIPCROSSPREFIX=
+ZIPSOURCESUFFIX=src
+ZIPEXAMPLESUFFIX=exm
+else
+FPCMADE=fpcmade.$(TARGETSUFFIX)
+ZIPSOURCESUFFIX=.source
+ZIPEXAMPLESUFFIX=.examples
+ifdef CROSSCOMPILE
+ZIPSUFFIX=.$(SOURCESUFFIX)
+ZIPCROSSPREFIX=$(TARGETSUFFIX)-
+else
+ZIPSUFFIX=.$(TARGETSUFFIX)
+ZIPCROSSPREFIX=
+endif
+endif
+ifndef ECHO
+ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ECHO),)
+ECHO= __missing_command_ECHO
+else
+ECHO:=$(firstword $(ECHO))
+endif
+else
+ECHO:=$(firstword $(ECHO))
+endif
+endif
+export ECHO
+ifndef DATE
+DATE:=$(strip $(wildcard $(addsuffix /gdate$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE:=$(strip $(wildcard $(addsuffix /date$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(DATE),)
+DATE= __missing_command_DATE
+else
+DATE:=$(firstword $(DATE))
+endif
+else
+DATE:=$(firstword $(DATE))
+endif
+endif
+export DATE
+ifndef GINSTALL
+GINSTALL:=$(strip $(wildcard $(addsuffix /ginstall$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL:=$(strip $(wildcard $(addsuffix /install$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(GINSTALL),)
+GINSTALL= __missing_command_GINSTALL
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+else
+GINSTALL:=$(firstword $(GINSTALL))
+endif
+endif
+export GINSTALL
+ifndef CPPROG
+CPPROG:=$(strip $(wildcard $(addsuffix /cp$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(CPPROG),)
+CPPROG= __missing_command_CPPROG
+else
+CPPROG:=$(firstword $(CPPROG))
+endif
+endif
+export CPPROG
+ifndef RMPROG
+RMPROG:=$(strip $(wildcard $(addsuffix /rm$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(RMPROG),)
+RMPROG= __missing_command_RMPROG
+else
+RMPROG:=$(firstword $(RMPROG))
+endif
+endif
+export RMPROG
+ifndef MVPROG
+MVPROG:=$(strip $(wildcard $(addsuffix /mv$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MVPROG),)
+MVPROG= __missing_command_MVPROG
+else
+MVPROG:=$(firstword $(MVPROG))
+endif
+endif
+export MVPROG
+ifndef MKDIRPROG
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /gmkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG:=$(strip $(wildcard $(addsuffix /mkdir$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(MKDIRPROG),)
+MKDIRPROG= __missing_command_MKDIRPROG
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+else
+MKDIRPROG:=$(firstword $(MKDIRPROG))
+endif
+endif
+export MKDIRPROG
+ifndef ECHOREDIR
+ifndef inUnix
+ECHOREDIR=echo
+else
+ECHOREDIR=$(ECHO)
+endif
+endif
+ifndef COPY
+COPY:=$(CPPROG) -fp
+endif
+ifndef COPYTREE
+COPYTREE:=$(CPPROG) -Rfp
+endif
+ifndef MKDIRTREE
+MKDIRTREE:=$(MKDIRPROG) -p
+endif
+ifndef MOVE
+MOVE:=$(MVPROG) -f
+endif
+ifndef DEL
+DEL:=$(RMPROG) -f
+endif
+ifndef DELTREE
+DELTREE:=$(RMPROG) -rf
+endif
+ifndef INSTALL
+ifdef inUnix
+INSTALL:=$(GINSTALL) -c -m 644
+else
+INSTALL:=$(COPY)
+endif
+endif
+ifndef INSTALLEXE
+ifdef inUnix
+INSTALLEXE:=$(GINSTALL) -c -m 755
+else
+INSTALLEXE:=$(COPY)
+endif
+endif
+ifndef MKDIR
+MKDIR:=$(GINSTALL) -m 755 -d
+endif
+export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE= __missing_command_PPUMOVE
+else
+PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+export PPUMOVE
+ifndef FPCMAKE
+FPCMAKE:=$(strip $(wildcard $(addsuffix /fpcmake$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(FPCMAKE),)
+FPCMAKE= __missing_command_FPCMAKE
+else
+FPCMAKE:=$(firstword $(FPCMAKE))
+endif
+endif
+export FPCMAKE
+ifndef ZIPPROG
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(ZIPPROG),)
+ZIPPROG= __missing_command_ZIPPROG
+else
+ZIPPROG:=$(firstword $(ZIPPROG))
+endif
+endif
+export ZIPPROG
+ifndef TARPROG
+TARPROG:=$(strip $(wildcard $(addsuffix /gtar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(TARPROG),)
+TARPROG= __missing_command_TARPROG
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+else
+TARPROG:=$(firstword $(TARPROG))
+endif
+endif
+export TARPROG
+ASNAME=$(BINUTILSPREFIX)as
+LDNAME=$(BINUTILSPREFIX)ld
+ARNAME=$(BINUTILSPREFIX)ar
+RCNAME=$(BINUTILSPREFIX)rc
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),win32)
+ifeq ($(CROSSBINDIR),)
+ASNAME=asw
+LDNAME=ldw
+ARNAME=arw
+endif
+endif
+endif
+ifndef ASPROG
+ifdef CROSSBINDIR
+ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
+else
+ASPROG=$(ASNAME)
+endif
+endif
+ifndef LDPROG
+ifdef CROSSBINDIR
+LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)
+else
+LDPROG=$(LDNAME)
+endif
+endif
+ifndef RCPROG
+ifdef CROSSBINDIR
+RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)
+else
+RCPROG=$(RCNAME)
+endif
+endif
+ifndef ARPROG
+ifdef CROSSBINDIR
+ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)
+else
+ARPROG=$(ARNAME)
+endif
+endif
+AS=$(ASPROG)
+LD=$(LDPROG)
+RC=$(RCPROG)
+AR=$(ARPROG)
+PPAS=ppas$(SRCBATCHEXT)
+ifdef inUnix
+LDCONFIG=ldconfig
+else
+LDCONFIG=
+endif
+ifdef DATE
+DATESTR:=$(shell $(DATE) +%Y%m%d)
+else
+DATESTR=
+endif
+ifndef UPXPROG
+ifeq ($(OS_TARGET),go32v2)
+UPXPROG:=1
+endif
+ifeq ($(OS_TARGET),win32)
+UPXPROG:=1
+endif
+ifdef UPXPROG
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+ifeq ($(UPXPROG),)
+UPXPROG=
+else
+UPXPROG:=$(firstword $(UPXPROG))
+endif
+else
+UPXPROG=
+endif
+endif
+export UPXPROG
+ZIPOPT=-9
+ZIPEXT=.zip
+ifeq ($(USETAR),bz2)
+TAROPT=vj
+TAREXT=.tar.bz2
+else
+TAROPT=vz
+TAREXT=.tar.gz
+endif
+override REQUIRE_PACKAGES=rtl 
+ifeq ($(FULL_TARGET),i386-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+REQUIRE_PACKAGES_RTL=1
+endif
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_RTL),)
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+ifdef CHECKDEPEND
+$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
+	$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+ifndef NOCPUDEF
+override FPCOPTDEF=$(ARCH)
+endif
+ifneq ($(OS_TARGET),$(OS_SOURCE))
+override FPCOPT+=-T$(OS_TARGET)
+endif
+ifneq ($(CPU_TARGET),$(CPU_SOURCE))
+override FPCOPT+=-P$(ARCH)
+endif
+ifeq ($(OS_SOURCE),openbsd)
+override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
+endif
+ifndef CROSSBOOTSTRAP
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-XP$(BINUTILSPREFIX)
+endif
+ifneq ($(BINUTILSPREFIX),)
+override FPCOPT+=-Xr$(RLINKPATH)
+endif
+endif
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+endif
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+endif
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+endif
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+endif
+ifdef LINKSMART
+override FPCOPT+=-XX
+endif
+ifdef CREATESMART
+override FPCOPT+=-CX
+endif
+ifdef DEBUG
+override FPCOPT+=-gl
+override FPCOPTDEF+=DEBUG
+endif
+ifdef RELEASE
+ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(CPU_TARGET),i386)
+FPCCPUOPT:=-OG2p3
+endif
+ifeq ($(CPU_TARGET),powerpc)
+FPCCPUOPT:=-O1r
+endif
+else
+FPCCPUOPT:=-O2
+endif
+override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n
+override FPCOPTDEF+=RELEASE
+endif
+ifdef STRIP
+override FPCOPT+=-Xs
+endif
+ifdef OPTIMIZE
+override FPCOPT+=-O2
+endif
+ifdef VERBOSE
+override FPCOPT+=-vwni
+endif
+ifdef COMPILER_OPTIONS
+override FPCOPT+=$(COMPILER_OPTIONS)
+endif
+ifdef COMPILER_UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))
+endif
+ifdef COMPILER_LIBRARYDIR
+override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))
+endif
+ifdef COMPILER_OBJECTDIR
+override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))
+endif
+ifdef COMPILER_INCLUDEDIR
+override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))
+endif
+ifdef CROSSBINDIR
+override FPCOPT+=-FD$(CROSSBINDIR)
+endif
+ifdef COMPILER_TARGETDIR
+override FPCOPT+=-FE$(COMPILER_TARGETDIR)
+ifeq ($(COMPILER_TARGETDIR),.)
+override TARGETDIRPREFIX=
+else
+override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/
+endif
+endif
+ifdef COMPILER_UNITTARGETDIR
+override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)
+ifeq ($(COMPILER_UNITTARGETDIR),.)
+override UNITTARGETDIRPREFIX=
+else
+override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/
+endif
+else
+ifdef COMPILER_TARGETDIR
+override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)
+override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
+endif
+endif
+ifdef CREATESHARED
+override FPCOPT+=-Cg
+ifeq ($(CPU_TARGET),i386)
+override FPCOPT+=-Aas
+endif
+endif
+ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
+ifeq ($(OS_TARGET),linux)
+ifeq ($(CPU_TARGET),x86_64)
+override FPCOPT+=-Cg
+endif
+endif
+endif
+ifdef LINKSHARED
+endif
+ifdef OPT
+override FPCOPT+=$(OPT)
+endif
+ifdef FPCOPTDEF
+override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))
+endif
+ifdef CFGFILE
+override FPCOPT+=@$(CFGFILE)
+endif
+ifdef USEENV
+override FPCEXTCMD:=$(FPCOPT)
+override FPCOPT:=!FPCEXTCMD
+export FPCEXTCMD
+endif
+override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
+override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
+ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
+override ACROSSCOMPILE=1
+endif
+ifdef ACROSSCOMPILE
+override FPCOPT+=$(CROSSOPT)
+endif
+override COMPILER:=$(FPC) $(FPCOPT)
+ifeq (,$(findstring -s ,$(COMPILER)))
+EXECPPAS=
+else
+ifeq ($(FULL_SOURCE),$(FULL_TARGET))
+ifdef RUNBATCH
+EXECPPAS:=@$(RUNBATCH) $(PPAS)
+else
+EXECPPAS:=@$(PPAS)
+endif
+endif
+endif
+.PHONY: fpc_exes
+ifndef CROSSINSTALL
+ifneq ($(TARGET_PROGRAMS),)
+override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))
+override EXEOFILES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS)))
+override ALLTARGET+=fpc_exes
+override INSTALLEXEFILES+=$(EXEFILES)
+override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
+ifeq ($(OS_TARGET),os2)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+ifeq ($(OS_TARGET),emx)
+override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))
+endif
+endif
+endif
+fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)
+ifdef TARGET_RSTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared
+$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)
+	@$(ECHOREDIR) Compiled > $(FPCMADE)
+fpc_all: $(FPCMADE)
+fpc_smart:
+	$(MAKE) all LINKSMART=1 CREATESMART=1
+fpc_debug:
+	$(MAKE) all DEBUG=1
+fpc_release:
+	$(MAKE) all RELEASE=1
+.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res
+$(COMPILER_UNITTARGETDIR):
+	$(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+$(COMPILER_TARGETDIR):
+	$(MKDIRTREE) $(COMPILER_TARGETDIR)
+%$(PPUEXT): %.pp
+	$(COMPILER) $<
+	$(EXECPPAS)
+%$(PPUEXT): %.pas
+	$(COMPILER) $<
+	$(EXECPPAS)
+%$(EXEEXT): %.pp
+	$(COMPILER) $<
+	$(EXECPPAS)
+%$(EXEEXT): %.pas
+	$(COMPILER) $<
+	$(EXECPPAS)
+%$(EXEEXT): %.lpr
+	$(COMPILER) $<
+	$(EXECPPAS)
+%$(EXEEXT): %.dpr
+	$(COMPILER) $<
+	$(EXECPPAS)
+%.res: %.rc
+	windres -i $< -o $@
+vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)
+vpath %.inc $(COMPILER_INCLUDEDIR)
+vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)
+vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)
+.PHONY: fpc_shared
+override INSTALLTARGET+=fpc_shared_install
+ifndef SHARED_LIBVERSION
+SHARED_LIBVERSION=$(FPC_VERSION)
+endif
+ifndef SHARED_LIBNAME
+SHARED_LIBNAME=$(PACKAGE_NAME)
+endif
+ifndef SHARED_FULLNAME
+SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSION)$(SHAREDLIBEXT)
+endif
+ifndef SHARED_LIBUNITS
+SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)
+override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_LIBUNITS))
+endif
+fpc_shared:
+ifdef HASSHAREDLIB
+	$(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1
+ifneq ($(SHARED_BUILD),n)
+	$(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)
+endif
+else
+	@$(ECHO) Shared Libraries not supported
+endif
+fpc_shared_install:
+ifneq ($(SHARED_BUILD),n)
+ifneq ($(SHARED_LIBUNITS),)
+ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)
+	$(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INSTALL_SHAREDDIR)
+endif
+endif
+endif
+.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall
+ifdef INSTALL_UNITS
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
+endif
+ifdef INSTALL_BUILDUNIT
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
+endif
+ifdef INSTALLPPUFILES
+override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
+ifneq ($(UNITTARGETDIRPREFIX),)
+override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPUFILES)))
+override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(notdir $(INSTALLPPULINKFILES))))
+endif
+override INSTALL_CREATEPACKAGEFPC=1
+endif
+ifdef INSTALLEXEFILES
+ifneq ($(TARGETDIRPREFIX),)
+override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(INSTALLEXEFILES)))
+endif
+endif
+fpc_install: all $(INSTALLTARGET)
+ifdef INSTALLEXEFILES
+	$(MKDIR) $(INSTALL_BINDIR)
+ifdef UPXPROG
+	-$(UPXPROG) $(INSTALLEXEFILES)
+endif
+	$(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
+endif
+ifdef INSTALL_CREATEPACKAGEFPC
+ifdef FPCMAKE
+ifdef PACKAGE_VERSION
+ifneq ($(wildcard Makefile.fpc),)
+	$(FPCMAKE) -p -T$(CPU_TARGET)-$(OS_TARGET) Makefile.fpc
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) Package.fpc $(INSTALL_UNITDIR)
+endif
+endif
+endif
+endif
+ifdef INSTALLPPUFILES
+	$(MKDIR) $(INSTALL_UNITDIR)
+	$(INSTALL) $(INSTALLPPUFILES) $(INSTALL_UNITDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+	$(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)
+endif
+ifneq ($(wildcard $(LIB_FULLNAME)),)
+	$(MKDIR) $(INSTALL_LIBDIR)
+	$(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIBDIR)
+ifdef inUnix
+	ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)
+endif
+endif
+endif
+ifdef INSTALL_FILES
+	$(MKDIR) $(INSTALL_DATADIR)
+	$(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)
+endif
+fpc_sourceinstall: distclean
+	$(MKDIR) $(INSTALL_SOURCEDIR)
+	$(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)
+fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))
+ifdef HASEXAMPLES
+	$(MKDIR) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef EXAMPLESOURCEFILES
+	$(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)
+endif
+ifdef TARGET_EXAMPLEDIRS
+	$(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
+endif
+.PHONY: fpc_clean fpc_cleanall fpc_distclean
+ifdef EXEFILES
+override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+endif
+ifdef CLEAN_PROGRAMS
+override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(EXEEXT), $(CLEAN_PROGRAMS)))
+endif
+ifdef CLEAN_UNITS
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))
+endif
+ifdef CLEANPPUFILES
+override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))
+ifdef DEBUGSYMEXT
+override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPPUFILES))
+endif
+override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
+override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)))
+endif
+fpc_clean: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+	-$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+ifdef CLEAN_FILES
+	-$(DEL) $(CLEAN_FILES)
+endif
+ifdef LIB_NAME
+	-$(DEL) $(LIB_NAME) $(LIB_FULLNAME)
+endif
+	-$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+	-$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)
+fpc_cleanall: $(CLEANTARGET)
+ifdef CLEANEXEFILES
+	-$(DEL) $(CLEANEXEFILES)
+endif
+ifdef COMPILER_UNITTARGETDIR
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+endif
+ifneq ($(CLEANPPULINKFILES),)
+	-$(DEL) $(CLEANPPULINKFILES)
+endif
+ifdef CLEANRSTFILES
+	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+endif
+endif
+ifdef CLEAN_FILES
+	-$(DEL) $(CLEAN_FILES)
+endif
+	-$(DELTREE) units
+	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
+ifneq ($(PPUEXT),.ppu)
+	-$(DEL) *.o *.ppu *.a
+endif
+	-$(DELTREE) *$(SMARTEXT)
+	-$(DEL) fpcmade.* Package.fpc $(PPAS) script.res link.res $(FPCEXTFILE) $(REDIRFILE)
+	-$(DEL) *_ppas$(BATCHEXT)
+ifdef AOUTEXT
+	-$(DEL) *$(AOUTEXT)
+endif
+ifdef DEBUGSYMEXT
+	-$(DEL) *$(DEBUGSYMEXT)
+endif
+fpc_distclean: cleanall
+.PHONY: fpc_baseinfo
+override INFORULES+=fpc_baseinfo
+fpc_baseinfo:
+	@$(ECHO)
+	@$(ECHO)  == Package info ==
+	@$(ECHO)  Package Name..... $(PACKAGE_NAME)
+	@$(ECHO)  Package Version.. $(PACKAGE_VERSION)
+	@$(ECHO)
+	@$(ECHO)  == Configuration info ==
+	@$(ECHO)
+	@$(ECHO)  FPC.......... $(FPC)
+	@$(ECHO)  FPC Version.. $(FPC_VERSION)
+	@$(ECHO)  Source CPU... $(CPU_SOURCE)
+	@$(ECHO)  Target CPU... $(CPU_TARGET)
+	@$(ECHO)  Source OS.... $(OS_SOURCE)
+	@$(ECHO)  Target OS.... $(OS_TARGET)
+	@$(ECHO)  Full Source.. $(FULL_SOURCE)
+	@$(ECHO)  Full Target.. $(FULL_TARGET)
+	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
+	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
+	@$(ECHO)
+	@$(ECHO)  == Directory info ==
+	@$(ECHO)
+	@$(ECHO)  Required pkgs... $(REQUIRE_PACKAGES)
+	@$(ECHO)
+	@$(ECHO)  Basedir......... $(BASEDIR)
+	@$(ECHO)  FPCDir.......... $(FPCDIR)
+	@$(ECHO)  CrossBinDir..... $(CROSSBINDIR)
+	@$(ECHO)  UnitsDir........ $(UNITSDIR)
+	@$(ECHO)  PackagesDir..... $(PACKAGESDIR)
+	@$(ECHO)
+	@$(ECHO)  GCC library..... $(GCCLIBDIR)
+	@$(ECHO)  Other library... $(OTHERLIBDIR)
+	@$(ECHO)
+	@$(ECHO)  == Tools info ==
+	@$(ECHO)
+	@$(ECHO)  As........ $(AS)
+	@$(ECHO)  Ld........ $(LD)
+	@$(ECHO)  Ar........ $(AR)
+	@$(ECHO)  Rc........ $(RC)
+	@$(ECHO)
+	@$(ECHO)  Mv........ $(MVPROG)
+	@$(ECHO)  Cp........ $(CPPROG)
+	@$(ECHO)  Rm........ $(RMPROG)
+	@$(ECHO)  GInstall.. $(GINSTALL)
+	@$(ECHO)  Echo...... $(ECHO)
+	@$(ECHO)  Shell..... $(SHELL)
+	@$(ECHO)  Date...... $(DATE)
+	@$(ECHO)  FPCMake... $(FPCMAKE)
+	@$(ECHO)  PPUMove... $(PPUMOVE)
+	@$(ECHO)  Upx....... $(UPXPROG)
+	@$(ECHO)  Zip....... $(ZIPPROG)
+	@$(ECHO)
+	@$(ECHO)  == Object info ==
+	@$(ECHO)
+	@$(ECHO)  Target Loaders........ $(TARGET_LOADERS)
+	@$(ECHO)  Target Units.......... $(TARGET_UNITS)
+	@$(ECHO)  Target Implicit Units. $(TARGET_IMPLICITUNITS)
+	@$(ECHO)  Target Programs....... $(TARGET_PROGRAMS)
+	@$(ECHO)  Target Dirs........... $(TARGET_DIRS)
+	@$(ECHO)  Target Examples....... $(TARGET_EXAMPLES)
+	@$(ECHO)  Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)
+	@$(ECHO)
+	@$(ECHO)  Clean Units......... $(CLEAN_UNITS)
+	@$(ECHO)  Clean Files......... $(CLEAN_FILES)
+	@$(ECHO)
+	@$(ECHO)  Install Units....... $(INSTALL_UNITS)
+	@$(ECHO)  Install Files....... $(INSTALL_FILES)
+	@$(ECHO)
+	@$(ECHO)  == Install info ==
+	@$(ECHO)
+	@$(ECHO)  DateStr.............. $(DATESTR)
+	@$(ECHO)  ZipName.............. $(ZIPNAME)
+	@$(ECHO)  ZipPrefix............ $(ZIPPREFIX)
+	@$(ECHO)  ZipCrossPrefix....... $(ZIPCROSSPREFIX)
+	@$(ECHO)  ZipSuffix............ $(ZIPSUFFIX)
+	@$(ECHO)  FullZipName.......... $(FULLZIPNAME)
+	@$(ECHO)  Install FPC Package.. $(INSTALL_FPCPACKAGE)
+	@$(ECHO)
+	@$(ECHO)  Install base dir..... $(INSTALL_BASEDIR)
+	@$(ECHO)  Install binary dir... $(INSTALL_BINDIR)
+	@$(ECHO)  Install library dir.. $(INSTALL_LIBDIR)
+	@$(ECHO)  Install units dir.... $(INSTALL_UNITDIR)
+	@$(ECHO)  Install source dir... $(INSTALL_SOURCEDIR)
+	@$(ECHO)  Install doc dir...... $(INSTALL_DOCDIR)
+	@$(ECHO)  Install example dir.. $(INSTALL_EXAMPLEDIR)
+	@$(ECHO)  Install data dir..... $(INSTALL_DATADIR)
+	@$(ECHO)
+	@$(ECHO)  Dist destination dir. $(DIST_DESTDIR)
+	@$(ECHO)  Dist zip name........ $(DIST_ZIPNAME)
+	@$(ECHO)
+.PHONY: fpc_info
+fpc_info: $(INFORULES)
+.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2 \
+	fpc_makefile_dirs
+fpc_makefile:
+	$(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc
+fpc_makefile_sub1:
+ifdef TARGET_DIRS
+	$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_DIRS))
+endif
+ifdef TARGET_EXAMPLEDIRS
+	$(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGET_EXAMPLEDIRS))
+endif
+fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_EXAMPLEDIRS))
+fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
+fpc_makefiles: fpc_makefile fpc_makefile_dirs
+all: fpc_all
+debug: fpc_debug
+smart: fpc_smart
+release: fpc_release
+units: fpc_units
+examples:
+shared: fpc_shared
+install: fpc_install
+sourceinstall: fpc_sourceinstall
+exampleinstall: fpc_exampleinstall
+distinstall:
+zipinstall:
+zipsourceinstall:
+zipexampleinstall:
+zipdistinstall:
+clean: fpc_clean
+distclean: fpc_distclean
+cleanall: fpc_cleanall
+info: fpc_info
+makefiles: fpc_makefiles
+.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall clean distclean cleanall info makefiles
+ifneq ($(wildcard fpcmake.loc),)
+include fpcmake.loc
+endif
+rmwait$(EXEEXT): rmwait.pas

+ 1 - 1
utils/rmwait/Makefile.fpc

@@ -12,4 +12,4 @@ fpcpackage=y
 fpcdir=../..
 fpcdir=../..
 
 
 [rules]
 [rules]
-rmwait$(EXEEXT): rmwait.pp
+rmwait$(EXEEXT): rmwait.pas

+ 37 - 6
utils/rmwait/rmwait.pas

@@ -1,6 +1,6 @@
 {
 {
     rmwait - remove (delete) file(s) with optional retries
     rmwait - remove (delete) file(s) with optional retries
-    Copyright (C) 2009 by Tomas Hajny, member of the Free Pascal team
+    Copyright (C) 2009-2011 by Tomas Hajny, member of the Free Pascal team
 
 
     This tool tries to mimic behaviour of GNU rm, but it provides
     This tool tries to mimic behaviour of GNU rm, but it provides
     the additional feature of retries and it also fixes some issues
     the additional feature of retries and it also fixes some issues
@@ -45,6 +45,7 @@ const
   OptRetries: longint = 1;
   OptRetries: longint = 1;
   OptWait: longint = 5;
   OptWait: longint = 5;
   OptsStop: boolean = false;
   OptsStop: boolean = false;
+  RmWaitEnvVarName = 'RMWAIT_OPTS';
 
 
 
 
 var
 var
@@ -194,7 +195,11 @@ begin
 {$I+}
 {$I+}
         Inc (Tries);
         Inc (Tries);
         if (R = 5) and (Tries <= OptRetries) then
         if (R = 5) and (Tries <= OptRetries) then
+         begin
+          VerbLine ('Removal attempt failed, waiting ' + StrF (OptWait) + ' seconds before trying again...');
           Wait (OptWait);
           Wait (OptWait);
+         end;
+
       until (R <> 5) or (Tries > OptRetries);
       until (R <> 5) or (Tries > OptRetries);
       case R of
       case R of
         0: ;
         0: ;
@@ -251,7 +256,7 @@ end;
 procedure Syntax;
 procedure Syntax;
 begin
 begin
   WriteLn;
   WriteLn;
-  WriteLn ('RMWait - remove (delete) file(s) with optional retries');
+  WriteLn ('RmWait - remove (delete) file(s) with optional retries');
   WriteLn;
   WriteLn;
   WriteLn ('Syntax:');
   WriteLn ('Syntax:');
   WriteLn (ParamStr (0) + ' [<options>...] [<file specifications>...]');
   WriteLn (ParamStr (0) + ' [<options>...] [<file specifications>...]');
@@ -271,6 +276,8 @@ begin
   WriteLn ('                                 individual attempts (default 5 seconds)');
   WriteLn ('                                 individual attempts (default 5 seconds)');
   WriteLn (' --                              stop processing of options');
   WriteLn (' --                              stop processing of options');
   WriteLn;
   WriteLn;
+  WriteLn ('Options may also be passed via environment variable RMWAIT_OPTS.');
+  WriteLn;
   WriteLn ('To remove a file whose name starts with a ''-'', for example ''-file'',');
   WriteLn ('To remove a file whose name starts with a ''-'', for example ''-file'',');
   WriteLn ('use one of these commands:');
   WriteLn ('use one of these commands:');
   WriteLn (' rm -- -file');
   WriteLn (' rm -- -file');
@@ -388,7 +395,7 @@ begin
 end;
 end;
 
 
 
 
-procedure NewExit; far;
+procedure NewExit; {$IFNDEF FPC} far;{$ENDIF FPC}
 begin
 begin
   ExitProc := OldExit;
   ExitProc := OldExit;
   if (ErrorAddr <> nil) or (ExitCode <> 0) then
   if (ErrorAddr <> nil) or (ExitCode <> 0) then
@@ -483,7 +490,7 @@ begin
        OptVerbose := true
        OptVerbose := true
       else if S = 'VERSION' then
       else if S = 'VERSION' then
        begin
        begin
-        WriteLn ('rmwait - version 20091101');
+        WriteLn ('rmwait - version 20110104');
         Halt;
         Halt;
        end
        end
       else if Copy (S, 1, 3) = 'TRY' then
       else if Copy (S, 1, 3) = 'TRY' then
@@ -517,8 +524,8 @@ begin
 end;
 end;
 
 
 var
 var
-  J, K: longint;
-  Par: string;
+  J, K, L: longint;
+  EnvOpts, Par: string;
 
 
 begin
 begin
 {$IFDEF OS2}
 {$IFDEF OS2}
@@ -528,6 +535,30 @@ begin
   OldExit := ExitProc;
   OldExit := ExitProc;
   ExitProc := @NewExit;
   ExitProc := @NewExit;
 
 
+  EnvOpts := GetEnv (RmWaitEnvVarName);
+  K := 1;
+  while (K < Length (EnvOpts)) and not OptsStop do
+   begin
+    while (EnvOpts [K] = ' ') and (K < Length (EnvOpts)) do
+     Inc (K);
+    if EnvOpts [K] = '-' then
+     begin
+      L := Succ (K);
+      while ((L <= Length (EnvOpts)) and (EnvOpts [L] <> ' ')) do
+       Inc (L);
+      Par := Copy (EnvOpts, K, L - K);
+      ProcessOpts (Par);
+      K := Succ (L);
+     end
+    else
+     Syntax;
+    if OptsStop then
+     begin
+      EnvOpts := '';
+      OptsStop := false;
+     end;
+   end;
+
   J := ParamCount;
   J := ParamCount;
   if J = 0 then
   if J = 0 then
     Syntax
     Syntax

Some files were not shown because too many files changed in this diff