summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
commit160cc1e115eeb75638dce6effdd16b2bc810ddb4 (patch)
treeb791a95695a7cf674e61a6153139c6f9c6c491fa
parent3843727e74b31bbf2a34e7e3b89ee422269f770e (diff)
parent413a6aa6469e6c297780217a27ca91363c637944 (diff)
downloadfpc-avr.tar.gz
* rebase to trunk@17295avr
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/avr@17296 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/aasmbase.pas4
-rw-r--r--compiler/aggas.pas12
-rw-r--r--compiler/aoptobj.pas8
-rw-r--r--compiler/arm/cgcpu.pas2
-rw-r--r--compiler/arm/cpuinfo.pas17
-rw-r--r--compiler/cclasses.pas3
-rw-r--r--compiler/cgobj.pas54
-rw-r--r--compiler/comprsrc.pas6
-rw-r--r--compiler/cstreams.pas36
-rw-r--r--compiler/cwindirs.pp123
-rw-r--r--compiler/defcmp.pas4
-rw-r--r--compiler/finput.pas45
-rw-r--r--compiler/fmodule.pas16
-rw-r--r--compiler/globals.pas32
-rw-r--r--compiler/globtype.pas7
-rw-r--r--compiler/i386/ag386nsm.pas2
-rw-r--r--compiler/i386/cgcpu.pas38
-rw-r--r--compiler/i386/i386att.inc79
-rw-r--r--compiler/i386/i386atts.inc79
-rw-r--r--compiler/i386/i386int.inc79
-rw-r--r--compiler/i386/i386nop.inc2
-rw-r--r--compiler/i386/i386op.inc79
-rw-r--r--compiler/i386/i386prop.inc77
-rw-r--r--compiler/i386/i386tab.inc1272
-rw-r--r--compiler/link.pas5
-rw-r--r--compiler/msg/errorct.msg2
-rw-r--r--compiler/msg/errord.msg622
-rw-r--r--compiler/msg/errorda.msg2
-rw-r--r--compiler/msg/errordu.msg2
-rw-r--r--compiler/msg/errore.msg6
-rw-r--r--compiler/msg/errores.msg2
-rw-r--r--compiler/msg/errorf.msg2
-rw-r--r--compiler/msg/errorfi.msg2
-rw-r--r--compiler/msg/errorhe.msg2
-rw-r--r--compiler/msg/errorheu.msg2
-rw-r--r--compiler/msg/errorid.msg2
-rw-r--r--compiler/msg/errorn.msg2
-rw-r--r--compiler/msg/errorpl.msg2
-rw-r--r--compiler/msg/errorpli.msg2
-rw-r--r--compiler/msg/errorpt.msg2
-rw-r--r--compiler/msg/errorptu.msg2
-rw-r--r--compiler/msg/errorr.msg2
-rw-r--r--compiler/msg/errorru.msg2
-rw-r--r--compiler/msg/errorues.msg2
-rw-r--r--compiler/msgidx.inc6
-rw-r--r--compiler/msgtxt.inc747
-rw-r--r--compiler/ncal.pas22
-rw-r--r--compiler/ncgcal.pas11
-rw-r--r--compiler/ncgmem.pas197
-rw-r--r--compiler/ncgrtti.pas3
-rw-r--r--compiler/ncgutil.pas144
-rw-r--r--compiler/nset.pas11
-rw-r--r--compiler/ogbase.pas11
-rw-r--r--compiler/ogcoff.pas38
-rw-r--r--compiler/ogelf.pas52
-rw-r--r--compiler/ogmacho.pas1
-rw-r--r--compiler/ognlm.pas1516
-rw-r--r--compiler/owar.pas4
-rw-r--r--compiler/owbase.pas8
-rw-r--r--compiler/paramgr.pas6
-rw-r--r--compiler/pdecl.pas7
-rw-r--r--compiler/pdecobj.pas3
-rw-r--r--compiler/pdecsub.pas17
-rw-r--r--compiler/pdecvar.pas30
-rw-r--r--compiler/pexpr.pas12
-rw-r--r--compiler/pinline.pas6
-rw-r--r--compiler/pmodules.pas23
-rw-r--r--compiler/powerpc/agppcmpw.pas1
-rw-r--r--compiler/ppu.pas111
-rw-r--r--compiler/procinfo.pas65
-rw-r--r--compiler/psub.pas25
-rw-r--r--compiler/ptype.pas145
-rw-r--r--compiler/regvars.pas2
-rw-r--r--compiler/symconst.pas3
-rw-r--r--compiler/symdef.pas34
-rw-r--r--compiler/symsym.pas5
-rw-r--r--compiler/symtable.pas1
-rw-r--r--compiler/symtype.pas11
-rw-r--r--compiler/systems.pas3
-rw-r--r--compiler/systems/i_nwm.pas10
-rw-r--r--compiler/systems/i_wii.pas2
-rw-r--r--compiler/systems/t_embed.pas2
-rw-r--r--compiler/systems/t_nwm.pas437
-rw-r--r--compiler/systems/t_wii.pas3
-rw-r--r--compiler/tokens.pas2
-rw-r--r--compiler/utils/samplecfg548
-rw-r--r--compiler/x86/agx86int.pas6
-rw-r--r--compiler/x86/x86ins.dat435
-rw-r--r--compiler/x86_64/cgcpu.pas9
-rw-r--r--compiler/x86_64/x8664ats.inc79
-rw-r--r--compiler/x86_64/x8664att.inc79
-rw-r--r--compiler/x86_64/x8664int.inc79
-rw-r--r--compiler/x86_64/x8664nop.inc2
-rw-r--r--compiler/x86_64/x8664op.inc79
-rw-r--r--compiler/x86_64/x8664pro.inc77
-rw-r--r--compiler/x86_64/x8664tab.inc1293
-rw-r--r--packages/Makefile12
-rw-r--r--packages/Makefile.fpc10
-rw-r--r--packages/cdrom/src/cdromlin.inc55
-rw-r--r--packages/cdrom/src/lincd.pp64
-rw-r--r--packages/cocoaint/utils/uikit-skel/src/uikit/UIKit.inc3
-rw-r--r--packages/fcl-base/src/eventlog.pp13
-rw-r--r--packages/fcl-base/src/inifiles.pp6
-rw-r--r--packages/fcl-db/src/base/fields.inc25
-rw-r--r--packages/fcl-db/src/memds/memds.pp59
-rw-r--r--packages/fcl-db/src/sqldb/mysql/mysql50conn.pas1
-rw-r--r--packages/fcl-db/src/sqldb/mysql/mysql51conn.pas2
-rw-r--r--packages/fcl-db/src/sqldb/mysql/mysqlconn.inc10
-rw-r--r--packages/fcl-db/src/sqldb/postgres/pqconnection.pp16
-rw-r--r--packages/fcl-db/tests/sqldbtoolsunit.pas10
-rw-r--r--packages/fcl-db/tests/testfieldtypes.pas12
-rw-r--r--packages/fcl-image/Makefile36
-rw-r--r--packages/fcl-image/Makefile.fpc1
-rw-r--r--packages/fcl-image/src/fpcanvas.inc69
-rw-r--r--packages/fcl-image/src/fpcanvas.pp21
-rw-r--r--packages/fcl-image/src/fpfont.inc11
-rw-r--r--packages/fcl-json/Makefile25
-rw-r--r--packages/fcl-passrc/examples/test_parser.pp1924
-rw-r--r--packages/fcl-passrc/examples/testunit1.pp713
-rw-r--r--packages/fcl-passrc/src/pastree.pp60
-rw-r--r--packages/fcl-passrc/src/pparser.pp138
-rw-r--r--packages/fcl-process/Makefile98
-rw-r--r--packages/fcl-registry/src/regini.inc48
-rw-r--r--packages/fcl-registry/src/registry.pp7
-rw-r--r--packages/fcl-registry/src/xmlreg.pp34
-rw-r--r--packages/fcl-registry/tests/testbasics.pp43
-rw-r--r--packages/fcl-stl/Makefile2427
-rw-r--r--packages/fcl-stl/Makefile.fpc23
-rw-r--r--packages/fcl-stl/doc/arrayutils.tex47
-rw-r--r--packages/fcl-stl/doc/deque.tex81
-rw-r--r--packages/fcl-stl/doc/dequeexample.pp24
-rw-r--r--packages/fcl-stl/doc/main.tex63
-rw-r--r--packages/fcl-stl/doc/makra.tex263
-rw-r--r--packages/fcl-stl/doc/map.tex87
-rw-r--r--packages/fcl-stl/doc/mapexample.pp24
-rw-r--r--packages/fcl-stl/doc/priorityqueue.tex44
-rw-r--r--packages/fcl-stl/doc/priorityqueueexample.pp30
-rw-r--r--packages/fcl-stl/doc/queue.tex39
-rw-r--r--packages/fcl-stl/doc/queueexample.pp17
-rw-r--r--packages/fcl-stl/doc/set.tex76
-rw-r--r--packages/fcl-stl/doc/setexample.pp24
-rw-r--r--packages/fcl-stl/doc/sortingexample.pp20
-rw-r--r--packages/fcl-stl/doc/stack.tex39
-rw-r--r--packages/fcl-stl/doc/stackexample.pp17
-rw-r--r--packages/fcl-stl/doc/util.tex9
-rw-r--r--packages/fcl-stl/doc/vector.tex73
-rw-r--r--packages/fcl-stl/doc/vectorexample.pp21
-rw-r--r--packages/fcl-stl/src/garrayutils.pp254
-rw-r--r--packages/fcl-stl/src/gdeque.pp204
-rw-r--r--packages/fcl-stl/src/gmap.pp163
-rw-r--r--packages/fcl-stl/src/gpriorityqueue.pp141
-rw-r--r--packages/fcl-stl/src/gqueue.pp75
-rw-r--r--packages/fcl-stl/src/gset.pp423
-rw-r--r--packages/fcl-stl/src/gstack.pp73
-rw-r--r--packages/fcl-stl/src/gutil.pp39
-rw-r--r--packages/fcl-stl/src/gvector.pp173
-rwxr-xr-xpackages/fcl-stl/tests/clean2
-rw-r--r--packages/fcl-stl/tests/garrayutilstest.pp116
-rw-r--r--packages/fcl-stl/tests/gdequetest.pp55
-rw-r--r--packages/fcl-stl/tests/gmaptest.pp84
-rw-r--r--packages/fcl-stl/tests/gmaptestzal.pp84
-rw-r--r--packages/fcl-stl/tests/gpriorityqueuetest.pp47
-rw-r--r--packages/fcl-stl/tests/gqueuetest.pp43
-rw-r--r--packages/fcl-stl/tests/gsetrefcounttest.pp59
-rw-r--r--packages/fcl-stl/tests/gsettest.pp110
-rw-r--r--packages/fcl-stl/tests/gstacktest.pp43
-rw-r--r--packages/fcl-stl/tests/gvectortest.pp111
-rwxr-xr-xpackages/fcl-stl/tests/run-all-tests4
-rw-r--r--packages/fcl-stl/tests/suiteconfig.pp27
-rw-r--r--packages/fcl-stl/tests/testrunner.pp138
-rw-r--r--packages/fcl-web/Makefile2438
-rw-r--r--packages/fcl-web/Makefile.fpc48
-rw-r--r--packages/fcl-web/Makefile.org30
-rw-r--r--packages/fcl-web/examples/combined/combined.html20
-rw-r--r--packages/fcl-web/examples/combined/combined.icobin0 -> 137040 bytes
-rw-r--r--packages/fcl-web/examples/combined/combined.ini4
-rw-r--r--packages/fcl-web/examples/combined/combined.lpi116
-rw-r--r--packages/fcl-web/examples/combined/combined.lpr15
-rw-r--r--packages/fcl-web/examples/combined/combined.resbin0 -> 138128 bytes
-rw-r--r--packages/fcl-web/examples/combined/combined.sql11
-rw-r--r--packages/fcl-web/examples/combined/login.js105
-rw-r--r--packages/fcl-web/examples/combined/login.pngbin0 -> 13618 bytes
-rw-r--r--packages/fcl-web/examples/combined/users.html18
-rw-r--r--packages/fcl-web/examples/combined/users.js108
-rw-r--r--packages/fcl-web/examples/combined/users.sql15
-rw-r--r--packages/fcl-web/examples/combined/wmlogin.lfm76
-rw-r--r--packages/fcl-web/examples/combined/wmlogin.pp129
-rw-r--r--packages/fcl-web/examples/combined/wmusers.lfm94
-rw-r--r--packages/fcl-web/examples/combined/wmusers.lrs35
-rw-r--r--packages/fcl-web/examples/combined/wmusers.pp145
-rw-r--r--packages/fcl-web/fpmake.pp2
-rw-r--r--packages/fcl-web/src/base/custfcgi.pp330
-rw-r--r--packages/fcl-web/src/base/custweb.pp1
-rw-r--r--packages/fcl-web/src/base/fphtml.pp197
-rw-r--r--packages/fcl-web/src/base/webpage.pp114
-rw-r--r--packages/fcl-web/src/base/websession.pp1
-rw-r--r--packages/fcl-web/src/jsonrpc/fpextdirect.pp1
-rw-r--r--packages/fcl-web/src/jsonrpc/fpjsonrpc.pp6
-rw-r--r--packages/fcl-web/src/webdata/extjsjson.pp29
-rw-r--r--packages/fcl-web/src/webdata/fpwebdata.pp21
-rw-r--r--packages/fcl-web/src/webdata/sqldbwebdata.pp27
-rw-r--r--packages/fcl-xml/src/dom.pp2
-rw-r--r--packages/fpmkunit/src/fpmkunit.pp30
-rw-r--r--packages/fpvectorial/src/avisocncgcodewriter.pas44
-rw-r--r--packages/fpvectorial/src/dxfvectorialreader.pas270
-rw-r--r--packages/fpvectorial/src/fpvectorial.pas32
-rw-r--r--packages/fpvectorial/src/fpvtocanvas.pas209
-rw-r--r--packages/gdbint/src/gdbint.pp27
-rw-r--r--packages/libogcfpc/Makefile.fpc2
-rw-r--r--packages/libogcfpc/examples/devices/Makefile94
-rw-r--r--packages/libogcfpc/examples/devices/Makefile.fpc2
-rw-r--r--packages/libogcfpc/examples/devices/network/Makefile322
-rw-r--r--packages/libogcfpc/examples/devices/network/Makefile.fpc2
-rw-r--r--packages/libogcfpc/examples/devices/usbgecko/Makefile322
-rw-r--r--packages/libogcfpc/examples/devices/usbgecko/Makefile.fpc2
-rw-r--r--packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile2
-rw-r--r--packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile.fpc2
-rw-r--r--packages/libogcfpc/examples/devices/usbkeyboard/Makefile322
-rw-r--r--packages/libogcfpc/examples/devices/usbkeyboard/Makefile.fpc2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile33
-rw-r--r--packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile.fpc37
-rw-r--r--packages/libogcfpc/examples/graphics/gx/gxSprites/gxsprites.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/lesson1.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/lesson2.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/lesson3.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/lesson4.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/lesson5.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile33
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile.fpc35
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/lesson6.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile33
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile.fpc35
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/lesson7.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile33
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile.fpc35
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/lesson8.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile37
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile.fpc39
-rw-r--r--packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/lesson9.pp2
-rw-r--r--packages/libogcfpc/examples/graphics/gx/triangle/triangle.pp2
-rw-r--r--packages/libogcfpc/fpmake.pp2
-rw-r--r--packages/libogcfpc/src/gccore.inc34
-rw-r--r--packages/libogcfpc/src/ogc/lwp_heap.inc85
-rw-r--r--packages/libogcfpc/src/ogc/lwp_mutex.inc99
-rw-r--r--packages/libogcfpc/src/ogc/lwp_priority.inc49
-rw-r--r--packages/libogcfpc/src/ogc/lwp_threads.inc97
-rw-r--r--packages/libogcfpc/src/ogc/lwp_watchdog.inc83
-rw-r--r--packages/libogcfpc/src/ogc/machine/processor.inc32
-rw-r--r--packages/odbc/src/odbcsql.inc4
-rw-r--r--packages/opencl/src/cl.pp7
-rw-r--r--packages/opencl/src/cl_gl.pp7
-rw-r--r--packages/winunits-base/src/activex.pp5
-rw-r--r--packages/winunits-base/src/uxtheme.pp8
-rw-r--r--packages/zlib/src/zlib.pp4
-rw-r--r--rtl/arm/arm.inc3
-rw-r--r--rtl/arm/thumb2.inc10
-rw-r--r--rtl/freebsd/freebsd.pas8
-rw-r--r--rtl/freebsd/ptypes.inc86
-rw-r--r--rtl/freebsd/sysnr.inc224
-rw-r--r--rtl/inc/aliases.inc2
-rw-r--r--rtl/inc/astrings.inc17
-rw-r--r--rtl/inc/compproc.inc15
-rw-r--r--rtl/inc/dynarr.inc7
-rw-r--r--rtl/inc/exeinfo.pp143
-rw-r--r--rtl/inc/rtti.inc207
-rw-r--r--rtl/inc/sstrings.inc4
-rw-r--r--rtl/inc/system.fpd6
-rw-r--r--rtl/inc/system.inc16
-rw-r--r--rtl/inc/systemh.inc1
-rw-r--r--rtl/inc/threadvr.inc33
-rw-r--r--rtl/inc/ucomplex.pp6
-rw-r--r--rtl/inc/ustrings.inc10
-rw-r--r--rtl/inc/variants.pp46
-rw-r--r--rtl/inc/wstrings.inc10
-rw-r--r--rtl/linux/arm/dllprt0.as25
-rw-r--r--rtl/linux/system.pp10
-rw-r--r--rtl/morphos/Makefile128
-rw-r--r--rtl/morphos/Makefile.fpc4
-rw-r--r--rtl/netware/Makefile214
-rw-r--r--rtl/netware/Makefile.fpc15
-rw-r--r--rtl/netware/nwpre.imp6
-rw-r--r--rtl/netware/nwpre.pp323
-rw-r--r--rtl/netware/system.pp16
-rw-r--r--rtl/objpas/classes/classesh.inc6
-rw-r--r--rtl/objpas/classes/streams.inc39
-rw-r--r--rtl/objpas/cvarutil.inc36
-rw-r--r--rtl/objpas/dateutil.inc136
-rw-r--r--rtl/objpas/fmtbcd.pp166
-rw-r--r--rtl/objpas/sysutils/dati.inc13
-rw-r--r--rtl/objpas/sysutils/sysformt.inc12
-rw-r--r--rtl/objpas/sysutils/sysstr.inc5
-rw-r--r--rtl/objpas/sysutils/sysutilh.inc2
-rw-r--r--rtl/os2/sysutils.pp6
-rw-r--r--rtl/unix/aliasptp.inc1
-rw-r--r--rtl/unix/clocale.pp82
-rw-r--r--rtl/unix/sysutils.pp4
-rw-r--r--rtl/win/sysutils.pp108
-rw-r--r--rtl/win/syswin.inc5
-rw-r--r--rtl/win/tthread.inc11
-rw-r--r--rtl/win/windirs.pp120
-rw-r--r--rtl/win/wininc/func.inc2
-rw-r--r--rtl/win/wininc/messages.inc9
-rw-r--r--rtl/win/wininc/redef.inc2
-rw-r--r--rtl/win/wininc/struct.inc81
-rw-r--r--rtl/win32/Makefile126
-rw-r--r--rtl/win32/Makefile.fpc2
-rw-r--r--rtl/win32/buildrtl.pp2
-rw-r--r--rtl/win32/system.pp12
-rw-r--r--rtl/win64/Makefile126
-rw-r--r--rtl/win64/Makefile.fpc2
-rw-r--r--rtl/win64/buildrtl.pp2
-rw-r--r--rtl/win64/system.pp12
-rw-r--r--rtl/x86_64/cpu.pp45
-rw-r--r--rtl/x86_64/x86_64.inc695
-rw-r--r--tests/Makefile61
-rw-r--r--tests/Makefile.fpc56
-rw-r--r--tests/tbf/tb0220.pp8
-rw-r--r--tests/test/cg/obj/win32/i386/cpptcl2.obin0 -> 406 bytes
-rw-r--r--tests/test/cg/obj/win32/i386/tcext6.obin0 -> 3369 bytes
-rw-r--r--tests/test/taes1.pp190
-rw-r--r--tests/test/tarray8.pp27
-rw-r--r--tests/test/tarray9.pp122
-rw-r--r--tests/test/tclass13.pp12
-rw-r--r--tests/test/tclass13a.pp17
-rw-r--r--tests/test/tclass13b.pp23
-rw-r--r--tests/test/tindex.pp36
-rw-r--r--tests/test/tsec1.pp6
-rw-r--r--tests/test/units/system/tmem.pp74
-rw-r--r--tests/webtbs/tw16040.pp66
-rw-r--r--tests/webtbs/tw18567.pp (renamed from tests/webtbs/tw18567)0
-rw-r--r--tests/webtbs/tw18702.pp38
-rw-r--r--tests/webtbs/tw18859.pp38
-rw-r--r--utils/fpcm/fpcmake.inc4765
-rw-r--r--utils/fpcm/fpcmake.ini7
-rw-r--r--utils/fpcm/fpcmmain.pp10
-rw-r--r--utils/fpcmkcfg/Makefile19
-rw-r--r--utils/fpcmkcfg/Makefile.fpc2
-rw-r--r--utils/fpcmkcfg/default.cft5
-rw-r--r--utils/fpcmkcfg/default.inc7
-rw-r--r--utils/fpcmkcfg/fpc.cft74
-rw-r--r--utils/fpcmkcfg/fpccfg.inc164
-rw-r--r--utils/fpcmkcfg/fpcfg.inc95
-rw-r--r--utils/fpcmkcfg/fpcmkcfg.pp75
-rw-r--r--utils/fpcmkcfg/fpinc.cfg27
-rw-r--r--utils/fpcmkcfg/fppkg.cfg2
-rw-r--r--utils/fpcmkcfg/fppkg.inc4
-rw-r--r--utils/fpdoc/dglobals.pp2
-rw-r--r--utils/fppkg/fprepos.pp2
-rw-r--r--utils/fppkg/pkgoptions.pp8
349 files changed, 25546 insertions, 9281 deletions
diff --git a/compiler/aasmbase.pas b/compiler/aasmbase.pas
index bb49dac49a..f3afa4465d 100644
--- a/compiler/aasmbase.pas
+++ b/compiler/aasmbase.pas
@@ -40,7 +40,7 @@ interface
TAsmsymbind=(
AB_NONE,AB_EXTERNAL,AB_COMMON,AB_LOCAL,AB_GLOBAL,AB_WEAK_EXTERNAL,
{ global in the current program/library, but not visible outside it }
- AB_PRIVATE_EXTERN,AB_LAZY);
+ AB_PRIVATE_EXTERN,AB_LAZY,AB_IMPORT);
TAsmsymtype=(
AT_NONE,AT_FUNCTION,AT_DATA,AT_SECTION,AT_LABEL,
@@ -61,6 +61,8 @@ interface
type
TAsmSectiontype=(sec_none,
+ { this section type allows to define a user named section }
+ sec_user,
sec_code,
sec_data,
{ read-only, but may contain relocations }
diff --git a/compiler/aggas.pas b/compiler/aggas.pas
index 81846462bb..683208cdba 100644
--- a/compiler/aggas.pas
+++ b/compiler/aggas.pas
@@ -259,7 +259,7 @@ implementation
function TGNUAssembler.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
const
- secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
+ secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
'.text',
'.data',
{ why doesn't .rodata work? (FK) }
@@ -277,7 +277,7 @@ implementation
{$if defined(m68k)} { Amiga/m68k GNU AS doesn't seem to like .rodata (KB) }
'.data',
{$else}
- '.rodata',
+ '.rodata',
{$endif}
'.bss',
'.threadvar',
@@ -331,7 +331,7 @@ implementation
'.obcj_nlcatlist',
'.objc_protolist'
);
- secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
+ secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
'.text',
'.data.rel',
'.data.rel',
@@ -419,6 +419,10 @@ implementation
(target_info.system=system_i386_go32v2) then
secname:='.data';
+ { section type user gives the user full controll on the section name }
+ if atype=sec_user then
+ secname:=aname;
+
{ For bss we need to set some flags that are target dependent,
it is easier to disable it for smartlinking. It doesn't take up
filespace }
@@ -426,6 +430,7 @@ implementation
create_smartlink_sections and
(aname<>'') and
(atype<>sec_toc) and
+ (atype<>sec_user) and
{ on embedded systems every byte counts, so smartlink bss too }
((atype<>sec_bss) or (target_info.system in systems_embedded)) then
begin
@@ -1514,6 +1519,7 @@ implementation
(* Translation table - replace unsupported section types with basic ones. *)
SecXTable: array[TAsmSectionType] of TAsmSectionType = (
sec_none,
+ sec_none,
sec_code,
sec_data,
sec_data (* sec_rodata *),
diff --git a/compiler/aoptobj.pas b/compiler/aoptobj.pas
index 703a12b030..63a4edfd44 100644
--- a/compiler/aoptobj.pas
+++ b/compiler/aoptobj.pas
@@ -991,6 +991,7 @@ Unit AoptObj;
strpnew('next label reused'))));
{$endif finaldestdebug}
l.increfs;
+ tasmlabel(hp.oper[0]^.ref^.symbol).decrefs;
hp.oper[0]^.ref^.symbol := l;
if not GetFinalDestination(hp,succ(level)) then
exit;
@@ -1037,6 +1038,12 @@ Unit AoptObj;
(hp1.typ <> ait_label) do
if not(hp1.typ in ([ait_label,ait_align]+skipinstr)) then
begin
+ if (hp1.typ = ait_instruction) and
+ taicpu(hp1).is_jmp and
+ (taicpu(hp1).oper[0]^.typ = top_ref) and
+ assigned(taicpu(hp1).oper[0]^.ref^.symbol) and
+ (taicpu(hp1).oper[0]^.ref^.symbol is TAsmLabel) then
+ TAsmLabel(taicpu(hp1).oper[0]^.ref^.symbol).decrefs;
asml.remove(hp1);
hp1.free;
end
@@ -1051,6 +1058,7 @@ Unit AoptObj;
begin
hp2:=tai(hp1.next);
asml.remove(p);
+ tasmlabel(taicpu(p).oper[0]^.ref^.symbol).decrefs;
p.free;
p:=hp2;
continue;
diff --git a/compiler/arm/cgcpu.pas b/compiler/arm/cgcpu.pas
index c4feae5fc2..dfb75b83b8 100644
--- a/compiler/arm/cgcpu.pas
+++ b/compiler/arm/cgcpu.pas
@@ -3479,6 +3479,8 @@ unit cgcpu;
begin
{ restore int registers and return }
list.concat(taicpu.op_reg_reg(A_MOV, NR_STACK_POINTER_REG, NR_FRAME_POINTER_REG));
+ { Add 4 to SP to make it point to an "imaginary PC" which the paramanager assumes is there(for normal ARM) }
+ list.concat(taicpu.op_reg_const(A_ADD, NR_STACK_POINTER_REG, 4));
reference_reset(ref,4);
ref.index:=NR_STACK_POINTER_REG;
diff --git a/compiler/arm/cpuinfo.pas b/compiler/arm/cpuinfo.pas
index 727f6a990d..e61bb46494 100644
--- a/compiler/arm/cpuinfo.pas
+++ b/compiler/arm/cpuinfo.pas
@@ -99,7 +99,9 @@ Const
pocall_softfloat,
{ same as stdcall (requires that all const records are passed by
reference, but that's already done for stdcall) }
- pocall_mwpascal
+ pocall_mwpascal,
+ { used for interrupt handling }
+ pocall_interrupt
];
cputypestr : array[tcputype] of string[8] = ('',
@@ -147,6 +149,19 @@ Const
'STELLARIS'
);
+ interruptvectors : array[tcontrollertype] of longint =
+ (0,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 12+59, { XL-density }
+ 12 { No model specified }
+ );
+
vfp_scalar = [fpu_vfpv2,fpu_vfpv3];
{ Supported optimizations, only used for information }
diff --git a/compiler/cclasses.pas b/compiler/cclasses.pas
index d568f33d31..9eb8f7159a 100644
--- a/compiler/cclasses.pas
+++ b/compiler/cclasses.pas
@@ -2208,6 +2208,9 @@ end;
function TCmdStrListItem.GetCopy:TLinkedListItem;
begin
Result:=(inherited GetCopy);
+ { TLinkedListItem.GetCopy performs a "move" to copy all data -> reinit
+ the ansistring, so the refcount is properly increased }
+ Initialize(TCmdStrListItem(Result).FPStr);
TCmdStrListItem(Result).FPStr:=FPstr;
end;
diff --git a/compiler/cgobj.pas b/compiler/cgobj.pas
index 820927579f..af43bb64e8 100644
--- a/compiler/cgobj.pas
+++ b/compiler/cgobj.pas
@@ -451,6 +451,8 @@ unit cgobj;
procedure g_incrrefcount(list : TAsmList;t: tdef; const ref: treference);
procedure g_decrrefcount(list : TAsmList;t: tdef; const ref: treference);
+ procedure g_array_rtti_helper(list: TAsmList; t: tdef; const ref: treference; const highloc: tlocation;
+ const name: string);
procedure g_initialize(list : TAsmList;t : tdef;const ref : treference);
procedure g_finalize(list : TAsmList;t : tdef;const ref : treference);
@@ -3509,6 +3511,8 @@ implementation
end
else
begin
+ if is_open_array(t) then
+ InternalError(201103054);
reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
a_loadaddr_ref_cgpara(list,href,cgpara2);
a_loadaddr_ref_cgpara(list,ref,cgpara1);
@@ -3574,6 +3578,8 @@ implementation
end
else
begin
+ if is_open_array(t) then
+ InternalError(201103053);
reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
a_loadaddr_ref_cgpara(list,href,cgpara2);
a_loadaddr_ref_cgpara(list,ref,cgpara1);
@@ -3587,6 +3593,50 @@ implementation
cgpara1.done;
end;
+ procedure tcg.g_array_rtti_helper(list: TAsmList; t: tdef; const ref: treference; const highloc: tlocation; const name: string);
+ var
+ cgpara1,cgpara2,cgpara3: TCGPara;
+ href: TReference;
+ hreg, lenreg: TRegister;
+ begin
+ cgpara1.init;
+ cgpara2.init;
+ cgpara3.init;
+ paramanager.getintparaloc(pocall_default,1,cgpara1);
+ paramanager.getintparaloc(pocall_default,2,cgpara2);
+ paramanager.getintparaloc(pocall_default,3,cgpara3);
+
+ reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
+ if highloc.loc=LOC_CONSTANT then
+ a_load_const_cgpara(list,OS_INT,highloc.value+1,cgpara3)
+ else
+ begin
+ if highloc.loc in [LOC_REGISTER,LOC_CREGISTER] then
+ hreg:=highloc.register
+ else
+ begin
+ hreg:=getintregister(list,OS_INT);
+ a_load_loc_reg(list,OS_INT,highloc,hreg);
+ end;
+ { increment, converts high(x) to length(x) }
+ lenreg:=getintregister(list,OS_INT);
+ a_op_const_reg_reg(list,OP_ADD,OS_INT,1,hreg,lenreg);
+ a_load_reg_cgpara(list,OS_INT,lenreg,cgpara3);
+ end;
+
+ a_loadaddr_ref_cgpara(list,href,cgpara2);
+ a_loadaddr_ref_cgpara(list,ref,cgpara1);
+ paramanager.freecgpara(list,cgpara1);
+ paramanager.freecgpara(list,cgpara2);
+ paramanager.freecgpara(list,cgpara3);
+ allocallcpuregisters(list);
+ a_call_name(list,name,false);
+ deallocallcpuregisters(list);
+
+ cgpara3.done;
+ cgpara2.done;
+ cgpara1.done;
+ end;
procedure tcg.g_initialize(list : TAsmList;t : tdef;const ref : treference);
var
@@ -3605,6 +3655,8 @@ implementation
a_load_const_ref(list,OS_ADDR,0,ref)
else
begin
+ if is_open_array(t) then
+ InternalError(201103052);
reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
a_loadaddr_ref_cgpara(list,href,cgpara2);
a_loadaddr_ref_cgpara(list,ref,cgpara1);
@@ -3638,6 +3690,8 @@ implementation
end
else
begin
+ if is_open_array(t) then
+ InternalError(201103051);
reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
a_loadaddr_ref_cgpara(list,href,cgpara2);
a_loadaddr_ref_cgpara(list,ref,cgpara1);
diff --git a/compiler/comprsrc.pas b/compiler/comprsrc.pas
index a0dbaffec2..62bbbe0818 100644
--- a/compiler/comprsrc.pas
+++ b/compiler/comprsrc.pas
@@ -377,18 +377,18 @@ end;
function CopyResFile(inf,outf : TCmdStr) : boolean;
var
- src,dst : TCFileStream;
+ src,dst : TCCustomFileStream;
begin
{ Copy .res file to units output dir. }
Result:=false;
- src:=TCFileStream.Create(inf,fmOpenRead or fmShareDenyNone);
+ src:=CFileStreamClass.Create(inf,fmOpenRead or fmShareDenyNone);
if CStreamError<>0 then
begin
Message1(exec_e_cant_open_resource_file, src.FileName);
Include(current_settings.globalswitches, cs_link_nolink);
exit;
end;
- dst:=TCFileStream.Create(current_module.outputpath^+outf,fmCreate);
+ dst:=CFileStreamClass.Create(current_module.outputpath^+outf,fmCreate);
if CStreamError<>0 then
begin
Message1(exec_e_cant_write_resource_file, dst.FileName);
diff --git a/compiler/cstreams.pas b/compiler/cstreams.pas
index 415345adab..ddd6e9c615 100644
--- a/compiler/cstreams.pas
+++ b/compiler/cstreams.pas
@@ -100,23 +100,38 @@ type
property Size: Longint read GetSize write SetSize;
end;
+{ TCCustomFileStream class }
+
+ TCCustomFileStream = class(TCStream)
+ protected
+ FFileName : String;
+ public
+ constructor Create(const AFileName: string;{shortstring!} Mode: Word); virtual; abstract;
+ function EOF: boolean; virtual; abstract;
+ property FileName : String Read FFilename;
+ end;
+
{ TFileStream class }
- TCFileStream = class(TCStream)
+ TCFileStream = class(TCCustomFileStream)
Private
- FFileName : String;
FHandle: File;
protected
procedure SetSize(NewSize: Longint); override;
public
- constructor Create(const AFileName: string; Mode: Word);
+ constructor Create(const AFileName: string; Mode: Word); override;
destructor Destroy; override;
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
function Seek(Offset: Longint; Origin: Word): Longint; override;
- property FileName : String Read FFilename;
+ function EOF: boolean; override;
end;
+ TCFileStreamClass = class of TCCustomFileStream;
+var
+ CFileStreamClass: TCFileStreamClass = TCFileStream;
+
+type
{ TCustomMemoryStream abstract class }
TCCustomMemoryStream = class(TCStream)
@@ -441,6 +456,11 @@ begin
Result:=l;
end;
+function TCFileStream.EOF: boolean;
+begin
+ EOF:=system.eof(FHandle);
+end;
+
{****************************************************************************}
{* TCustomMemoryStream *}
@@ -489,11 +509,11 @@ end;
procedure TCCustomMemoryStream.SaveToFile(const FileName: string);
-Var S : TCFileStream;
+Var S : TCCustomFileStream;
begin
Try
- S:=TCFileStream.Create (FileName,fmCreate);
+ S:=CFileStreamClass.Create (FileName,fmCreate);
SaveToStream(S);
finally
S.free;
@@ -574,11 +594,11 @@ end;
procedure TCMemoryStream.LoadFromFile(const FileName: string);
-Var S : TCFileStream;
+Var S : TCCustomFileStream;
begin
Try
- S:=TCFileStream.Create (FileName,fmOpenRead);
+ S:=CFileStreamClass.Create (FileName,fmOpenRead);
LoadFromStream(S);
finally
S.free;
diff --git a/compiler/cwindirs.pp b/compiler/cwindirs.pp
new file mode 100644
index 0000000000..077697d2a8
--- /dev/null
+++ b/compiler/cwindirs.pp
@@ -0,0 +1,123 @@
+{ this unit is temporarily included in the compiler sources till stable releases with
+ windirs from the rtl are shipped
+}
+unit cwindirs;
+
+{$mode objfpc}
+{$H+}
+
+interface
+
+uses
+ windows,
+ strings;
+
+Const
+ CSIDL_PROGRAMS = $0002; { %SYSTEMDRIVE%\Program Files }
+ CSIDL_PERSONAL = $0005; { %USERPROFILE%\My Documents }
+ CSIDL_FAVORITES = $0006; { %USERPROFILE%\Favorites }
+ CSIDL_STARTUP = $0007; { %USERPROFILE%\Start menu\Programs\Startup }
+ CSIDL_RECENT = $0008; { %USERPROFILE%\Recent }
+ CSIDL_SENDTO = $0009; { %USERPROFILE%\Sendto }
+ CSIDL_STARTMENU = $000B; { %USERPROFILE%\Start menu }
+ CSIDL_MYMUSIC = $000D; { %USERPROFILE%\Documents\My Music }
+ CSIDL_MYVIDEO = $000E; { %USERPROFILE%\Documents\My Videos }
+ CSIDL_DESKTOPDIRECTORY = $0010; { %USERPROFILE%\Desktop }
+ CSIDL_NETHOOD = $0013; { %USERPROFILE%\NetHood }
+ CSIDL_TEMPLATES = $0015; { %USERPROFILE%\Templates }
+ CSIDL_COMMON_STARTMENU = $0016; { %PROFILEPATH%\All users\Start menu }
+ CSIDL_COMMON_PROGRAMS = $0017; { %PROFILEPATH%\All users\Start menu\Programs }
+ CSIDL_COMMON_STARTUP = $0018; { %PROFILEPATH%\All users\Start menu\Programs\Startup }
+ CSIDL_COMMON_DESKTOPDIRECTORY = $0019; { %PROFILEPATH%\All users\Desktop }
+ CSIDL_APPDATA = $001A; { %USERPROFILE%\Application Data (roaming) }
+ CSIDL_PRINTHOOD = $001B; { %USERPROFILE%\Printhood }
+ CSIDL_LOCAL_APPDATA = $001C; { %USERPROFILE%\Local Settings\Application Data (non roaming) }
+ CSIDL_COMMON_FAVORITES = $001F; { %PROFILEPATH%\All users\Favorites }
+ CSIDL_INTERNET_CACHE = $0020; { %USERPROFILE%\Local Settings\Temporary Internet Files }
+ CSIDL_COOKIES = $0021; { %USERPROFILE%\Cookies }
+ CSIDL_HISTORY = $0022; { %USERPROFILE%\Local settings\History }
+ CSIDL_COMMON_APPDATA = $0023; { %PROFILESPATH%\All Users\Application Data }
+ CSIDL_WINDOWS = $0024; { %SYSTEMROOT% }
+ CSIDL_SYSTEM = $0025; { %SYSTEMROOT%\SYSTEM32 (may be system on 95/98/ME) }
+ CSIDL_PROGRAM_FILES = $0026; { %SYSTEMDRIVE%\Program Files }
+ CSIDL_MYPICTURES = $0027; { %USERPROFILE%\My Documents\My Pictures }
+ CSIDL_PROFILE = $0028; { %USERPROFILE% }
+ CSIDL_PROGRAM_FILES_COMMON = $002B; { %SYSTEMDRIVE%\Program Files\Common }
+ CSIDL_COMMON_TEMPLATES = $002D; { %PROFILEPATH%\All Users\Templates }
+ CSIDL_COMMON_DOCUMENTS = $002E; { %PROFILEPATH%\All Users\Documents }
+ CSIDL_COMMON_ADMINTOOLS = $002F; { %PROFILEPATH%\All Users\Start Menu\Programs\Administrative Tools }
+ CSIDL_ADMINTOOLS = $0030; { %USERPROFILE%\Start Menu\Programs\Administrative Tools }
+ CSIDL_COMMON_MUSIC = $0035; { %PROFILEPATH%\All Users\Documents\my music }
+ CSIDL_COMMON_PICTURES = $0036; { %PROFILEPATH%\All Users\Documents\my pictures }
+ CSIDL_COMMON_VIDEO = $0037; { %PROFILEPATH%\All Users\Documents\my videos }
+ CSIDL_CDBURN_AREA = $003B; { %USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning }
+ CSIDL_PROFILES = $003E; { %PROFILEPATH% }
+
+ CSIDL_FLAG_CREATE = $8000; { (force creation of requested folder if it doesn't exist yet) }
+
+Function GetWindowsSpecialDir(ID : Integer) : String;
+
+implementation
+
+uses
+ sysutils;
+
+Type
+ PFNSHGetFolderPath = Function(Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall;
+
+
+var
+ SHGetFolderPath : PFNSHGetFolderPath = Nil;
+ CFGDLLHandle : THandle = 0;
+
+Procedure InitDLL;
+
+Var
+ pathBuf: array[0..MAX_PATH-1] of char;
+ pathLength: Integer;
+begin
+ { Load shfolder.dll using a full path, in order to prevent spoofing (Mantis #18185)
+ Don't bother loading shell32.dll because shfolder.dll itself redirects SHGetFolderPath
+ to shell32.dll whenever possible. }
+ pathLength:=GetSystemDirectory(pathBuf, MAX_PATH);
+ if (pathLength>0) and (pathLength<MAX_PATH-14) then { 14=length('\shfolder.dll'#0) }
+ begin
+ StrLCopy(@pathBuf[pathLength],'\shfolder.dll',MAX_PATH-pathLength-1);
+ CFGDLLHandle:=LoadLibrary(pathBuf);
+
+ if (CFGDLLHandle<>0) then
+ begin
+ Pointer(ShGetFolderPath):=GetProcAddress(CFGDLLHandle,'SHGetFolderPathA');
+ If @ShGetFolderPath=nil then
+ begin
+ FreeLibrary(CFGDLLHandle);
+ CFGDllHandle:=0;
+ end;
+ end;
+ end;
+ If (@ShGetFolderPath=Nil) then
+ Raise Exception.Create('Could not determine SHGetFolderPath Function');
+end;
+
+Function GetWindowsSpecialDir(ID : Integer) : String;
+
+Var
+ APath : Array[0..MAX_PATH] of char;
+
+begin
+ Result:='';
+ if (CFGDLLHandle=0) then
+ InitDLL;
+ If (SHGetFolderPath<>Nil) then
+ begin
+ if SHGetFolderPath(0,ID or CSIDL_FLAG_CREATE,0,0,@APATH[0])=S_OK then
+ Result:=IncludeTrailingPathDelimiter(StrPas(@APath[0]));
+ end;
+end;
+
+Initialization
+Finalization
+ if CFGDLLHandle<>0 then
+ FreeLibrary(CFGDllHandle);
+end.
+
diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas
index 6c0f27f793..f917a15a55 100644
--- a/compiler/defcmp.pas
+++ b/compiler/defcmp.pas
@@ -1260,7 +1260,9 @@ implementation
find_real_objcclass_definition(tobjectdef(def_to),false)) then
begin
doconv:=tc_equal;
- eq:=te_equal;
+ { exact, not equal, because can change between interface
+ and implementation }
+ eq:=te_exact;
end
{ object pascal objects }
else if (def_from.typ=objectdef) and
diff --git a/compiler/finput.pas b/compiler/finput.pas
index 47db6f7869..f385fcce0a 100644
--- a/compiler/finput.pas
+++ b/compiler/finput.pas
@@ -26,7 +26,7 @@ unit finput;
interface
uses
- cutils,cclasses;
+ cutils,cclasses,cstreams;
const
InputFileBufSize=32*1024+1;
@@ -91,7 +91,7 @@ interface
function fileclose: boolean; override;
procedure filegettime; override;
private
- f : file; { current file handle }
+ f : TCCustomFileStream; { current file handle }
end;
tinputfilemanager = class
@@ -457,47 +457,46 @@ uses
exit;
end;
{ Open file }
- ofm:=filemode;
- filemode:=0;
- Assign(f,filename);
- {$I-}
- reset(f,1);
- {$I+}
- filemode:=ofm;
- fileopen:=(ioresult=0);
+ fileopen:=false;
+ try
+ f:=CFileStreamClass.Create(filename,fmOpenRead);
+ fileopen:=true;
+ except
+ end;
end;
function tdosinputfile.fileseek(pos: longint): boolean;
begin
- {$I-}
- seek(f,Pos);
- {$I+}
- fileseek:=(ioresult=0);
+ fileseek:=false;
+ try
+ f.position:=Pos;
+ fileseek:=true;
+ except
+ end;
end;
function tdosinputfile.fileread(var databuf; maxsize: longint): longint;
- var
- w : longint;
begin
- blockread(f,databuf,maxsize,w);
- fileread:=w;
+ fileread:=f.Read(databuf,maxsize);
end;
function tdosinputfile.fileeof: boolean;
begin
- fileeof:=eof(f);
+ fileeof:=f.eof();
end;
function tdosinputfile.fileclose: boolean;
begin
- {$I-}
- system.close(f);
- {$I+}
- fileclose:=(ioresult=0);
+ fileclose:=false;
+ try
+ f.Free;
+ fileclose:=true;
+ except
+ end;
end;
diff --git a/compiler/fmodule.pas b/compiler/fmodule.pas
index ef9d14fa2d..cf7f602d78 100644
--- a/compiler/fmodule.pas
+++ b/compiler/fmodule.pas
@@ -544,7 +544,6 @@ implementation
destructor tmodule.Destroy;
var
i : longint;
- hpi : tprocinfo;
begin
if assigned(unitmap) then
freemem(unitmap);
@@ -582,12 +581,7 @@ implementation
current_specializedef:=nil;
end;
{ release procinfo tree }
- while assigned(procinfo) do
- begin
- hpi:=tprocinfo(procinfo).parent;
- tprocinfo(procinfo).free;
- procinfo:=hpi;
- end;
+ tprocinfo(procinfo).destroy_tree;
end;
DoneDebugInfo(self);
used_units.free;
@@ -642,7 +636,6 @@ implementation
procedure tmodule.reset;
var
- hpi : tprocinfo;
i : longint;
begin
if assigned(scanner) then
@@ -664,12 +657,7 @@ implementation
current_specializedef:=nil;
end;
{ release procinfo tree }
- while assigned(procinfo) do
- begin
- hpi:=tprocinfo(procinfo).parent;
- tprocinfo(procinfo).free;
- procinfo:=hpi;
- end;
+ tprocinfo(procinfo).destroy_tree;
end;
if assigned(asmdata) then
begin
diff --git a/compiler/globals.pas b/compiler/globals.pas
index 1c243c40f5..61e11d53e8 100644
--- a/compiler/globals.pas
+++ b/compiler/globals.pas
@@ -26,7 +26,7 @@ unit globals;
interface
uses
-{$ifdef win32}
+{$ifdef windows}
windows,
{$endif}
{$ifdef os2}
@@ -477,6 +477,13 @@ implementation
{$ifdef macos}
macutils,
{$endif}
+{$ifdef mswindows}
+{$ifdef VER2_4}
+ cwindirs,
+{$else VER2_4}
+ windirs,
+{$endif VER2_4}
+{$endif}
comphook;
{****************************************************************************
@@ -718,7 +725,18 @@ implementation
Default Macro Handling
****************************************************************************}
+
procedure DefaultReplacements(var s:ansistring);
+{$ifdef mswindows}
+ procedure ReplaceSpecialFolder(const MacroName: string; const ID: integer);
+ begin
+ // Only try to receive the special folders (and thus dynamically
+ // load shfolder.dll) when that's needed.
+ if pos(MacroName,s)>0 then
+ Replace(s,MacroName,GetWindowsSpecialDir(ID));
+ end;
+
+{$endif mswindows}
var
envstr: string;
envvalue: pchar;
@@ -734,6 +752,15 @@ implementation
Replace(s,'$FPCTARGET',target_os_string)
else
Replace(s,'$FPCTARGET',target_full_string);
+{$ifdef mswindows}
+ ReplaceSpecialFolder('$LOCAL_APPDATA',CSIDL_LOCAL_APPDATA);
+ ReplaceSpecialFolder('$APPDATA',CSIDL_APPDATA);
+ ReplaceSpecialFolder('$COMMON_APPDATA',CSIDL_COMMON_APPDATA);
+ ReplaceSpecialFolder('$PERSONAL',CSIDL_PERSONAL);
+ ReplaceSpecialFolder('$PROGRAM_FILES',CSIDL_PROGRAM_FILES);
+ ReplaceSpecialFolder('$PROGRAM_FILES_COMMON',CSIDL_PROGRAM_FILES_COMMON);
+ ReplaceSpecialFolder('$PROFILE',CSIDL_PROFILE);
+{$endif mswindows}
{ Replace environment variables between dollar signs }
i := pos('$',s);
while i>0 do
@@ -980,7 +1007,8 @@ implementation
'SAFECALL',
'STDCALL',
'SOFTFLOAT',
- 'MWPASCAL'
+ 'MWPASCAL',
+ 'INTERRUPT'
);
var
t : tproccalloption;
diff --git a/compiler/globtype.pas b/compiler/globtype.pas
index 8f114da397..f74b907019 100644
--- a/compiler/globtype.pas
+++ b/compiler/globtype.pas
@@ -360,7 +360,9 @@ interface
pocall_softfloat,
{ Metrowerks Pascal. Special case on Mac OS (X): passes all }
{ constant records by reference. }
- pocall_mwpascal
+ pocall_mwpascal,
+ { Special interrupt handler for embedded systems }
+ pocall_interrupt
);
tproccalloptions = set of tproccalloption;
@@ -377,7 +379,8 @@ interface
'SafeCall',
'StdCall',
'SoftFloat',
- 'MWPascal'
+ 'MWPascal',
+ 'Interrupt'
);
{ Default calling convention }
diff --git a/compiler/i386/ag386nsm.pas b/compiler/i386/ag386nsm.pas
index aacdd133d2..eff3a08a5c 100644
--- a/compiler/i386/ag386nsm.pas
+++ b/compiler/i386/ag386nsm.pas
@@ -445,7 +445,7 @@ interface
procedure T386NasmAssembler.WriteSection(atype:TAsmSectiontype;const aname:string);
const
- secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
+ secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
'.text',
'.data',
'.data',
diff --git a/compiler/i386/cgcpu.pas b/compiler/i386/cgcpu.pas
index d82649f464..0fddb88fb1 100644
--- a/compiler/i386/cgcpu.pas
+++ b/compiler/i386/cgcpu.pas
@@ -371,6 +371,9 @@ unit cgcpu;
getcpuregister(list,NR_EDI);
a_load_loc_reg(list,OS_INT,lenloc,NR_EDI);
list.concat(Taicpu.op_reg(A_INC,S_L,NR_EDI));
+ { Now EDI contains (high+1). Copy it to ECX for later use. }
+ getcpuregister(list,NR_ECX);
+ list.concat(Taicpu.op_reg_reg(A_MOV,S_L,NR_EDI,NR_ECX));
if (elesize<>1) then
begin
if ispowerof2(elesize, power) then
@@ -394,43 +397,22 @@ unit cgcpu;
a_jmp_always(list,again);
a_label(list,ok);
- list.concat(Taicpu.op_reg_reg(A_SUB,S_L,NR_EDI,NR_ESP));
- ungetcpuregister(list,NR_EDI);
- { now reload EDI }
- getcpuregister(list,NR_EDI);
- a_load_loc_reg(list,OS_INT,lenloc,NR_EDI);
- list.concat(Taicpu.op_reg(A_INC,S_L,NR_EDI));
-
- if (elesize<>1) then
- begin
- if ispowerof2(elesize, power) then
- list.concat(Taicpu.op_const_reg(A_SHL,S_L,power,NR_EDI))
- else
- list.concat(Taicpu.op_const_reg(A_IMUL,S_L,elesize,NR_EDI));
- end;
- end
- else
+ end;
{$endif __NOWINPECOFF__}
- list.concat(Taicpu.op_reg_reg(A_SUB,S_L,NR_EDI,NR_ESP));
+ { If we were probing pages, EDI=(size mod pagesize) and ESP is decremented
+ by (size div pagesize)*pagesize, otherwise EDI=size.
+ Either way, subtracting EDI from ESP will set ESP to desired final value. }
+ list.concat(Taicpu.op_reg_reg(A_SUB,S_L,NR_EDI,NR_ESP));
{ align stack on 4 bytes }
list.concat(Taicpu.op_const_reg(A_AND,S_L,aint($fffffff4),NR_ESP));
{ load destination, don't use a_load_reg_reg, that will add a move instruction
that can confuse the reg allocator }
list.concat(Taicpu.Op_reg_reg(A_MOV,S_L,NR_ESP,NR_EDI));
- { Allocate other registers }
- getcpuregister(list,NR_ECX);
+ { Allocate ESI and load it with source }
getcpuregister(list,NR_ESI);
-
- { load count }
- a_load_loc_reg(list,OS_INT,lenloc,NR_ECX);
-
- { load source }
a_loadaddr_ref_reg(list,ref,NR_ESI);
- { scheduled .... }
- list.concat(Taicpu.op_reg(A_INC,S_L,NR_ECX));
-
{ calculate size }
len:=elesize;
opsize:=S_B;
@@ -446,7 +428,7 @@ unit cgcpu;
len:=len shr 1;
end;
- if len<>0 then
+ if len>1 then
begin
if ispowerof2(len, power) then
list.concat(Taicpu.op_const_reg(A_SHL,S_L,power,NR_ECX))
diff --git a/compiler/i386/i386att.inc b/compiler/i386/i386att.inc
index 04e9e8387e..b34c6193fe 100644
--- a/compiler/i386/i386att.inc
+++ b/compiler/i386/i386att.inc
@@ -602,5 +602,82 @@
'insertq',
'extrq',
'lzcnt',
-'popcnt'
+'pabsb',
+'pabsw',
+'pabsd',
+'palignr',
+'phaddw',
+'phaddd',
+'phaddsw',
+'phsubw',
+'phsubd',
+'phsubsw',
+'pmaddubsw',
+'pmulhrsw',
+'pshufb',
+'psignb',
+'psignw',
+'psignd',
+'blendps',
+'blendpd',
+'blendvps',
+'blendvpd',
+'dpps',
+'dppd',
+'extractps',
+'insertps',
+'movntdqa',
+'mpsadbw',
+'packusdw',
+'pblendvb',
+'pblendw',
+'pcmpeqq',
+'pextrb',
+'pextrd',
+'pextrq',
+'phminposuw',
+'pinsrb',
+'pinsrd',
+'pinsrq',
+'pmaxsb',
+'pmaxsd',
+'pmaxud',
+'pmaxuw',
+'pminsb',
+'pminsd',
+'pminuw',
+'pminud',
+'pmovsxbw',
+'pmovsxbd',
+'pmovsxbq',
+'pmovsxwd',
+'pmovsxwq',
+'pmovsxdq',
+'pmovzxbw',
+'pmovzxbd',
+'pmovzxbq',
+'pmovzxwd',
+'pmovzxwq',
+'pmovzxdq',
+'pmuldq',
+'ptest',
+'roundps',
+'roundpd',
+'roundss',
+'roundsd',
+'pcmpestri',
+'pcmpestrm',
+'pcmpistri',
+'pcmpistrm',
+'pcmpgtq',
+'popcnt',
+'aesenc',
+'aesenclast',
+'aesdec',
+'aesdeclast',
+'aesimc',
+'aeskeygen',
+'stosq',
+'lodsq',
+'cmpsq'
);
diff --git a/compiler/i386/i386atts.inc b/compiler/i386/i386atts.inc
index f8a8d8d702..f012e395d6 100644
--- a/compiler/i386/i386atts.inc
+++ b/compiler/i386/i386atts.inc
@@ -602,5 +602,82 @@ attsufNONE,
attsufNONE,
attsufNONE,
attsufINT,
-attsufINT
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE
);
diff --git a/compiler/i386/i386int.inc b/compiler/i386/i386int.inc
index 3e030b7150..a661e19278 100644
--- a/compiler/i386/i386int.inc
+++ b/compiler/i386/i386int.inc
@@ -602,5 +602,82 @@
'insertq',
'extrq',
'lzcnt',
-'popcnt'
+'pabsb',
+'pabsw',
+'pabsd',
+'palignr',
+'phaddw',
+'phaddd',
+'phaddsw',
+'phsubw',
+'phsubd',
+'phsubsw',
+'pmaddubsw',
+'pmulhrsw',
+'pshufb',
+'psignb',
+'psignw',
+'psignd',
+'blendps',
+'blendpd',
+'blendvps',
+'blendvpd',
+'dpps',
+'dppd',
+'extractps',
+'insertps',
+'movntdqa',
+'mpsadbw',
+'packusdw',
+'pblendvb',
+'pblendw',
+'pcmpeqq',
+'pextrb',
+'pextrd',
+'pextrq',
+'phminposuw',
+'pinsrb',
+'pinsrd',
+'pinsrq',
+'pmaxsb',
+'pmaxsd',
+'pmaxud',
+'pmaxuw',
+'pminsb',
+'pminsd',
+'pminuw',
+'pminud',
+'pmovsxbw',
+'pmovsxbd',
+'pmovsxbq',
+'pmovsxwd',
+'pmovsxwq',
+'pmovsxdq',
+'pmovzxbw',
+'pmovzxbd',
+'pmovzxbq',
+'pmovzxwd',
+'pmovzxwq',
+'pmovzxdq',
+'pmuldq',
+'ptest',
+'roundps',
+'roundpd',
+'roundss',
+'roundsd',
+'pcmpestri',
+'pcmpestrm',
+'pcmpistri',
+'pcmpistrm',
+'pcmpgtq',
+'popcnt',
+'aesenc',
+'aesenclast',
+'aesdec',
+'aesdeclast',
+'aesimc',
+'aeskeygen',
+'stosq',
+'lodsq',
+'cmpsq'
);
diff --git a/compiler/i386/i386nop.inc b/compiler/i386/i386nop.inc
index 5fe2125afc..9adbc468ce 100644
--- a/compiler/i386/i386nop.inc
+++ b/compiler/i386/i386nop.inc
@@ -1,2 +1,2 @@
{ don't edit, this file is generated from x86ins.dat }
-1380;
+1560;
diff --git a/compiler/i386/i386op.inc b/compiler/i386/i386op.inc
index 2077fbebdf..7386f7fcd5 100644
--- a/compiler/i386/i386op.inc
+++ b/compiler/i386/i386op.inc
@@ -602,5 +602,82 @@ A_MOVNTSD,
A_INSERTQ,
A_EXTRQ,
A_LZCNT,
-A_POPCNT
+A_PABSB,
+A_PABSW,
+A_PABSD,
+A_PALIGNR,
+A_PHADDW,
+A_PHADDD,
+A_PHADDSW,
+A_PHSUBW,
+A_PHSUBD,
+A_PHSUBSW,
+A_PMADDUBSW,
+A_PMULHRSW,
+A_PSHUFB,
+A_PSIGNB,
+A_PSIGNW,
+A_PSIGND,
+A_BLENDPS,
+A_BLENDPD,
+A_BLENDVPS,
+A_BLENDVPD,
+A_DPPS,
+A_DPPD,
+A_EXTRACTPS,
+A_INSERTPS,
+A_MOVNTDQA,
+A_MPSADBW,
+A_PACKUSDW,
+A_PBLENDVB,
+A_PBLENDW,
+A_PCMPEQQ,
+A_PEXTRB,
+A_PEXTRD,
+A_PEXTRQ,
+A_PHMINPOSUW,
+A_PINSRB,
+A_PINSRD,
+A_PINSRQ,
+A_PMAXSB,
+A_PMAXSD,
+A_PMAXUD,
+A_PMAXUW,
+A_PMINSB,
+A_PMINSD,
+A_PMINUW,
+A_PMINUD,
+A_PMOVSXBW,
+A_PMOVSXBD,
+A_PMOVSXBQ,
+A_PMOVSXWD,
+A_PMOVSXWQ,
+A_PMOVSXDQ,
+A_PMOVZXBW,
+A_PMOVZXBD,
+A_PMOVZXBQ,
+A_PMOVZXWD,
+A_PMOVZXWQ,
+A_PMOVZXDQ,
+A_PMULDQ,
+A_PTEST,
+A_ROUNDPS,
+A_ROUNDPD,
+A_ROUNDSS,
+A_ROUNDSD,
+A_PCMPESTRI,
+A_PCMPESTRM,
+A_PCMPISTRI,
+A_PCMPISTRM,
+A_PCMPGTQ,
+A_POPCNT,
+A_AESENC,
+A_AESENCLAST,
+A_AESDEC,
+A_AESDECLAST,
+A_AESIMC,
+A_AESKEYGEN,
+A_STOSQ,
+A_LODSQ,
+A_CMPSQ
);
diff --git a/compiler/i386/i386prop.inc b/compiler/i386/i386prop.inc
index 75aab26425..87dd25a2ac 100644
--- a/compiler/i386/i386prop.inc
+++ b/compiler/i386/i386prop.inc
@@ -602,5 +602,82 @@
(Ch: (Ch_All, Ch_None, Ch_None)),
(Ch: (Ch_All, Ch_None, Ch_None)),
(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RRAX, Ch_WMemEDI, Ch_RWRDI)),
+(Ch: (Ch_WRAX, Ch_RWRSI, Ch_None)),
(Ch: (Ch_All, Ch_None, Ch_None))
);
diff --git a/compiler/i386/i386tab.inc b/compiler/i386/i386tab.inc
index 8c249e8c35..24bce17dff 100644
--- a/compiler/i386/i386tab.inc
+++ b/compiler/i386/i386tab.inc
@@ -7796,7 +7796,14 @@
ops : 3;
optypes : (ot_reg32,ot_xmmreg,ot_immediate);
code : #1#102#211#2#15#197#72#22;
- flags : if_willamette or if_sse2 or if_sb or if_ar2
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRW;
+ ops : 3;
+ optypes : (ot_memory or ot_bits32,ot_xmmreg,ot_immediate);
+ code : #1#102#192#211#3#15#58#21#65#22;
+ flags : if_sse4
),
(
opcode : A_PINSRW;
@@ -9608,7 +9615,7 @@
opcode : A_MOVNTSD;
ops : 2;
optypes : (ot_memory,ot_xmmreg,ot_none);
- code : #192#220#213#211#2#15#43#0#65;
+ code : #192#220#213#211#2#15#43#65;
flags : if_sse4
),
(
@@ -9647,17 +9654,1270 @@
flags : if_386 or if_sm or if_sse4
),
(
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_immediate);
+ code : #217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_mmxreg,ot_memory,ot_immediate);
+ code : #193#217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPS;
+ ops : 3;
+ optypes : (ot_xmmreg or ot_signed,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#12#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPS;
+ ops : 3;
+ optypes : (ot_xmmreg or ot_signed,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#12#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#2#15#58#253#1#13#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#2#15#58#253#1#13#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPS;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#20#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPS;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#20#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#21#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#21#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#64#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#64#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#65#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#65#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_EXTRACTPS;
+ ops : 3;
+ optypes : (ot_memory,ot_xmmreg,ot_immediate);
+ code : #1#102#213#3#15#58#23#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_EXTRACTPS;
+ ops : 3;
+ optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_immediate);
+ code : #1#102#192#3#15#58#23#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_INSERTPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#33#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_INSERTPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#33#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_MOVNTDQA;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#42#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_MPSADBW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#66#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_MPSADBW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#66#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PACKUSDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#43#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PACKUSDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#43#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDVB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#16#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDVB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#16#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_signed);
+ code : #1#102#217#3#15#58#14#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate or ot_signed);
+ code : #1#102#193#217#3#15#58#14#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPEQQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#41#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPEQQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#41#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRB;
+ ops : 3;
+ optypes : (ot_reg32,ot_xmmreg,ot_immediate);
+ code : #1#102#211#3#15#58#20#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRB;
+ ops : 3;
+ optypes : (ot_memory or ot_bits8,ot_xmmreg,ot_immediate);
+ code : #1#102#192#211#3#15#58#20#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRD;
+ ops : 3;
+ optypes : (ot_reg32,ot_xmmreg,ot_immediate);
+ code : #1#102#211#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRD;
+ ops : 3;
+ optypes : (ot_memory or ot_bits32,ot_xmmreg,ot_immediate);
+ code : #1#102#192#211#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRQ;
+ ops : 3;
+ optypes : (ot_reg64,ot_xmmreg,ot_immediate);
+ code : #1#102#214#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRQ;
+ ops : 3;
+ optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_immediate);
+ code : #1#102#192#214#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHMINPOSUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#65#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHMINPOSUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#65#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRB;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_reg32,ot_immediate);
+ code : #1#102#217#3#15#58#32#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRB;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory or ot_bits8,ot_immediate);
+ code : #1#102#193#217#3#15#58#32#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_reg32,ot_immediate);
+ code : #1#102#217#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_immediate);
+ code : #1#102#193#217#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRQ;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_reg64,ot_immediate);
+ code : #1#102#214#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRQ;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_immediate);
+ code : #1#102#193#214#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#60#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#60#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#61#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#61#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#63#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#63#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#62#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#62#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#56#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#56#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#57#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#57#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#58#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#58#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#59#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#59#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#32#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#32#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#33#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#33#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#34#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#34#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#35#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#35#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#36#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#36#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#37#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#37#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#48#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#48#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#49#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#49#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#50#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#50#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#51#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#51#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#52#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#52#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#53#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#53#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#40#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#40#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PTEST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#23#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#8#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#8#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#9#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#9#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#10#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#10#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#11#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#11#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#97#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#97#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#96#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#96#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#99#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#99#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#98#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#98#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPGTQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#55#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPGTQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#55#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_POPCNT;
+ ops : 2;
+ optypes : (ot_reg16,ot_regmem or ot_bits16,ot_none);
+ code : #1#243#193#208#2#15#184#72;
+ flags : if_386 or if_sm or if_sse4
+ ),
+ (
opcode : A_POPCNT;
ops : 2;
- optypes : (ot_reg16,ot_regmem,ot_none);
- code : #208#219#193#211#2#15#184#72;
+ optypes : (ot_reg32,ot_regmem or ot_bits32,ot_none);
+ code : #1#243#193#208#2#15#184#72;
flags : if_386 or if_sm or if_sse4
),
(
opcode : A_POPCNT;
ops : 2;
- optypes : (ot_reg32 or ot_bits64,ot_regmem,ot_none);
- code : #209#219#193#211#2#15#184#72;
+ optypes : (ot_reg64,ot_regmem or ot_bits64,ot_none);
+ code : #1#243#193#208#2#15#184#72;
flags : if_386 or if_sm or if_sse4
+ ),
+ (
+ opcode : A_AESENC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#220#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESENC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#220#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESENCLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#221#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESENCLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#221#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDEC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#222#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDEC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#222#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDECLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#223#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDECLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#223#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESIMC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#219#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESIMC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#219#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESKEYGEN;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#223#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESKEYGEN;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#223#72#22;
+ flags : if_sse4
)
);
diff --git a/compiler/link.pas b/compiler/link.pas
index b5ff4fae58..56f05043c6 100644
--- a/compiler/link.pas
+++ b/compiler/link.pas
@@ -150,7 +150,7 @@ Implementation
begin
result:=0;
bufsize:=64*1024;
- fs:=TCFileStream.Create(fn,fmOpenRead or fmShareDenyNone);
+ fs:=CFileStreamClass.Create(fn,fmOpenRead or fmShareDenyNone);
if CStreamError<>0 then
begin
fs.Free;
@@ -1051,6 +1051,9 @@ Implementation
if ErrorCount>0 then
goto myexit;
+ { parse linker options specific for output format }
+ exeoutput.ParseScript (linkscript);
+
{ Create .exe sections and add .o sections }
ParseScript_Order;
exeoutput.RemoveUnreferencedSections;
diff --git a/compiler/msg/errorct.msg b/compiler/msg/errorct.msg
index 19e6f74a51..458e5b54b9 100644
--- a/compiler/msg/errorct.msg
+++ b/compiler/msg/errorct.msg
@@ -2100,7 +2100,7 @@ option_code_page_not_available=11039_E_La pàgina del codi no està disponible
#
option_logo=11023_[
Free Pascal Compiler versió $FPCFULLVERSION [$FPCDATE] per $FPCCPU
-Copyright (c) 1993-2010 per Florian Klaempfl
+Copyright (c) 1993-2011 per Florian Klaempfl
]
#
diff --git a/compiler/msg/errord.msg b/compiler/msg/errord.msg
index 2b363c466c..2328a7e208 100644
--- a/compiler/msg/errord.msg
+++ b/compiler/msg/errord.msg
@@ -66,7 +66,7 @@ general_d_sourceos=01001_D_Quellbetriebssystem: $1
general_i_targetos=01002_I_Zielbetriebssystem: $1
% When the \var{-vd} switch is used, this line tells you what the target
% operating system is.
-general_t_exepath=01003_T_Der Pfad der ausfhrbaren Datei ist: $1
+general_t_exepath=01003_T_Der Pfad der ausfhrbaren Datei ist: $1
% When the \var{-vt} switch is used, this line tells you where the compiler
% looks for its binaries.
general_t_unitpath=01004_T_Der Unitpfad ist: $1
@@ -83,7 +83,7 @@ general_t_objectpath=01007_T_Der Objektdateienpfad: $1
% When the \var{-vt} switch is used, this line tells you where the compiler
% looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
% You can set this path with the \var{-Fo} option.
-general_i_abslines_compiled=01008_I_$1 Zeilen bersetzt, $2 Sekunden$3
+general_i_abslines_compiled=01008_I_$1 Zeilen bersetzt, $2 Sekunden$3
% When the \var{-vi} switch is used, the compiler reports the number
% of lines compiled, and the time it took to compile them (real time,
% not program time).
@@ -152,7 +152,7 @@ scan_f_end_of_file=02000_F_Unerwartetes Dateiende
% \item An include file ends in the middle of a statement.
% \item A comment was not closed.
% \end{itemize}
-scan_f_string_exceeds_line=02001_F_Zeichenkette geht ber Zeilenende hinaus
+scan_f_string_exceeds_line=02001_F_Zeichenkette geht ber Zeilenende hinaus
% You forgot probably to include the closing ' in a string, so it occupies
% multiple lines.
scan_f_illegal_char=02002_F_Unzul„ssiges Zeichen "$1" ($2)
@@ -170,13 +170,13 @@ scan_w_comment_level=02005_W_Kommentarschachtelungstiefe $1 gefunden
% and Delphi, and can be a possible source of errors.
scan_n_ignored_switch=02008_N_Compilerschalter $1 wurde ignoriert
% With \var{-vn} on, the compiler warns if it ignores a switch.
-scan_w_illegal_switch=02009_W_Compilerschalter $1 ist ungltig
+scan_w_illegal_switch=02009_W_Compilerschalter $1 ist ungltig
% You included a compiler switch (i.e. \var{\{\$... \}}) which the compiler
% does not recognise.
scan_w_switch_is_global=02010_W_Dieser Compilerschalter hat globale Auswirkung
% The compiler switch is misplaced, and should be located at
% the start of the unit or program.
-scan_e_illegal_char_const=02011_E_Ungltige Char-Konstante
+scan_e_illegal_char_const=02011_E_Ungltige Char-Konstante
% This happens when you specify a character with its ASCII code, as in
% \var{\#96}, but the number is either illegal, or out of range.
scan_f_cannot_open_input=02012_F_Datei $1 kann nicht ge”ffnet werden
@@ -185,15 +185,15 @@ scan_f_cannot_open_input=02012_F_Datei $1 kann nicht ge”ffnet werden
scan_f_cannot_open_includefile=02013_F_Includedatei $1 kann nicht ge”ffnet werden
% \fpc cannot find the source file you specified in a \var{\{\$include ..\}}
% statement.
-scan_e_illegal_pack_records=02015_E_Ungltige Record Ausrichtung "$1"
+scan_e_illegal_pack_records=02015_E_Ungltige Record Ausrichtung "$1"
% You are specifying \var{\{\$PACKRECORDS n\} } or \var{\{\$ALIGN n\} }
% with an illegal value for \var{n}. For \$PACKRECORDS valid alignments are 1, 2, 4, 8, 16, 32, C,
% NORMAL, DEFAULT, and for \$ALIGN valid alignments are 1, 2, 4, 8, 16, 32, ON,
% OFF. Under mode MacPas \$ALIGN also supports MAC68K, POWER and RESET.
-scan_e_illegal_pack_enum=02016_E_Ungltige minimale Gr”sse der Aufz„hlung "$1"
+scan_e_illegal_pack_enum=02016_E_Ungltige minimale Gr”sse der Aufz„hlung "$1"
% You are specifying the \var{\{\$PACKENUM n\}} with an illegal value for
% \var{n}. Only 1,2,4, NORMAL or DEFAULT is valid here.
-scan_e_endif_expected=02017_E_$ENDIF erwartet fr $1 $2 definiert in $3 Zeile $4
+scan_e_endif_expected=02017_E_$ENDIF erwartet fr $1 $2 definiert in $3 Zeile $4
% Your conditional compilation statements are unbalanced.
scan_e_preproc_syntax_error=02018_E_Syntaxfehler im Argument einer $if Direktive
% There is an error in the expression following the \var{\{\$if ..\}}, \var{\{\$ifc \}}
@@ -217,15 +217,15 @@ scan_h_user_defined=02026_H_Benutzerdefiniert: $1
% A user defined hint was encountered. See also the \progref
scan_i_user_defined=02027_I_Benutzerdefiniert: $1
% User defined information was encountered. See also the \progref
-scan_e_keyword_cant_be_a_macro=02028_E_Ein Makro, welches den selben Namen wie ein Schlsselwort hat, wird ignoriert
+scan_e_keyword_cant_be_a_macro=02028_E_Ein Makro, welches den selben Namen wie ein Schlsselwort hat, wird ignoriert
% You cannot redefine keywords with macros.
-scan_f_macro_buffer_overflow=02029_F_Makropufferberlauf w„hrend des Lesens oder Expandierens eines Makros
+scan_f_macro_buffer_overflow=02029_F_Makropufferberlauf w„hrend des Lesens oder Expandierens eines Makros
% Your macro or it's result was too long for the compiler.
-scan_w_macro_too_deep=02030_W_Expansion des Makros berschreitet eine Makroschachtelungstiefe von 16
+scan_w_macro_too_deep=02030_W_Expansion des Makros berschreitet eine Makroschachtelungstiefe von 16
% When expanding a macro macros have been nested to a level of 16.
% The compiler will expand no further, since this may be a sign that
% recursion is used.
-scan_w_wrong_styled_switch=02031_W_Compilerschalter innerhalb von Kommentaren der Form // werden nicht unterstzt
+scan_w_wrong_styled_switch=02031_W_Compilerschalter innerhalb von Kommentaren der Form // werden nicht unterstzt
% Compiler switches should be in normal Pascal style comments.
scan_d_handling_switch=02032_DL_Bearbeite Schalter "$1"
% When you set debugging info on (\var{-vd}) the compiler tells you when it
@@ -252,32 +252,32 @@ scan_c_skipping_until=02039_CL_Quelltext wird ignoriert bis...
% When you turn on conditional messages(\var{-vc}), the compiler tells you
% where it encounters conditional statements, and whether it is skipping or
% compiling parts.
-scan_i_press_enter=02040_I_Drcken Sie <Return> um fortzusetzen
+scan_i_press_enter=02040_I_Drcken Sie <Return> um fortzusetzen
% When the \var{-vi} switch is used, the compiler stops compilation
% and waits for the \var{Enter} key to be pressed when it encounters
% a \var{\{\$STOP\}} directive.
-scan_w_unsupported_switch=02041_W_Nicht untersttzter Schalter $1
+scan_w_unsupported_switch=02041_W_Nicht untersttzter Schalter $1
% When warings are turned on (\var{-vw}), the compiler warns you about
% unsupported switches. This means that the switch is used in Delphi or
% Turbo Pascal, but not in \fpc.
-scan_w_illegal_directive=02042_W_Ungltige Compilerdirektive $1
+scan_w_illegal_directive=02042_W_Ungltige Compilerdirektive $1
% When warings are turned on (\var{-vw}), the compiler warns you about
% unrecognised switches. For a list of recognised switches, see the \progref
-scan_t_back_in=02043_TL_Wieder zurck in $1
+scan_t_back_in=02043_TL_Wieder zurck in $1
% When you use the \var{-vt} switch, the compiler tells you when it has finished
% reading an include file.
-scan_w_unsupported_app_type=02044_W_Nicht untersttzter Anwendungstyp: $1
+scan_w_unsupported_app_type=02044_W_Nicht untersttzter Anwendungstyp: $1
% You get this warning if you specify an unknown application type
% with the directive \var{\{\$APPTYPE\}}.
-scan_w_app_type_not_support=02045_W_APPTYPE wird vom Zielbetriebssystem nicht untersttzt
+scan_w_app_type_not_support=02045_W_APPTYPE wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$APPTYPE\}} directive is supported by win32 applications only.
-scan_w_description_not_support=02046_W_Der Compilerschalter DESCRIPTION wird vom Zielbetriebssystem nicht untersttzt
+scan_w_description_not_support=02046_W_Der Compilerschalter DESCRIPTION wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$DESCRIPTION\}} directive is not supported on this target OS.
-scan_n_version_not_support=02047_N_VERSION wird vom Zielbetriebssystem nicht untersttzt
+scan_n_version_not_support=02047_N_VERSION wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$VERSION\}} directive is not supported on this target OS.
scan_n_only_exe_version=02048_N_VERSION kann in Units nicht verwendet werden
% The \var{\{\$VERSION\}} directive is only used for executable or DLL sources.
-scan_w_wrong_version_ignored=02049_W_Falsches Format fr VERSION-Direktive $1
+scan_w_wrong_version_ignored=02049_W_Falsches Format fr VERSION-Direktive $1
% The \var{\{\$VERSION\}} directive format is major_version.minor_version
% where major_version and minor_version are words.
scan_e_illegal_asmmode_specifier=02050_E_Unbekannter Assemblermodusname: "$1"
@@ -287,27 +287,27 @@ scan_w_no_asm_reader_switch_inside_asm=02051_W_ASM-Leser-Schalter ist innerhalb
% It is not possible to switch from one assembler reader to another
% inside an assembler block. The new reader will be used for next
% assembler statement only.
-scan_e_wrong_switch_toggle=02052_E_Parameter fr Schalter falsch, verwenden Sie ON/OFF oder +/-
+scan_e_wrong_switch_toggle=02052_E_Parameter fr Schalter falsch, verwenden Sie ON/OFF oder +/-
% You need to use ON or OFF or a + or - to toggle the switch.
-scan_e_resourcefiles_not_supported=02053_E_Resourcedateien werden vom aktuellen Zielbetriebssystem nicht untersttzt
+scan_e_resourcefiles_not_supported=02053_E_Resourcedateien werden vom aktuellen Zielbetriebssystem nicht untersttzt
% The target you are compiling for doesn't support resource files.
scan_w_include_env_not_found=02054_W_$1 ist keine Umgebungsvariable
% The included environment variable can't be found in the environment; it will
% be replaced by an empty string instead.
-scan_e_invalid_maxfpureg_value=02055_E_Nicht erlaubter Wert fr MAXFPUREGISTER-Direktive
+scan_e_invalid_maxfpureg_value=02055_E_Nicht erlaubter Wert fr MAXFPUREGISTER-Direktive
% Valid values for this directive are 0..8 and NORMAL/DEFAULT.
-scan_w_only_one_resourcefile_supported=02056_W_Nur ein Resourcedatei wird vom aktuellen Zielbetriebssystem untersttzt
+scan_w_only_one_resourcefile_supported=02056_W_Nur ein Resourcedatei wird vom aktuellen Zielbetriebssystem untersttzt
% Only one resource file can be supported for this target - this is the case of
% OS/2 (EMX) currently. The first one found is used, the others are discarded.
-scan_w_macro_support_turned_off=02057_W_Makrountersttzung ist ausgeschaltet
+scan_w_macro_support_turned_off=02057_W_Makrountersttzung ist ausgeschaltet
% A macro declaration has been found, but macro support is currently off,
% so the declaration will be ignored. To turn macro support on compile with
% -Sm on the command line or add \{\$MACRO ON\} in the source.
-scan_e_invalid_interface_type=02058_E_Unbekannter Interfacetyp. Untersttzt wird COM, CORBA und DEFAULT
+scan_e_invalid_interface_type=02058_E_Unbekannter Interfacetyp. Untersttzt wird COM, CORBA und DEFAULT
% The interface type that was specified is not supported.
-scan_w_appid_not_support=02059_W_APPID wird nur von PalmOS untersttzt
+scan_w_appid_not_support=02059_W_APPID wird nur von PalmOS untersttzt
% The \var{\{\$APPID\}} directive is only supported for the PalmOS target.
-scan_w_appname_not_support=02060_W_APPNAME wird nur von PalmOS untersttzt
+scan_w_appname_not_support=02060_W_APPNAME wird nur von PalmOS untersttzt
% The \var{\{\$APPNAME\}} directive is only supported for the PalmOS target.
scan_e_string_exceeds_255_chars=02061_E_Zeichenkettenkonstanten k”nnen maximal 255 Zeichen lang sein
% A single string constant can contain at most 255 chars. Try splitting up the
@@ -331,45 +331,45 @@ scan_e_error_macro_undefined=02068_E_Die Compile time Variable oder das Makro "$
% Thus the conditional compile time expression cannot be evaluated. Only in mode MacPas.
scan_e_utf8_bigger_than_65535=02069_E_Der UTF-8 Kode ist gr”sser als 65535
% \fpc handles UTF-8 strings internally as widestrings, i.e. the char codes are limited to 65535.
-scan_e_utf8_malformed=02070_E_Ungltige UTF-8 Zeichenkette
+scan_e_utf8_malformed=02070_E_Ungltige UTF-8 Zeichenkette
% The given string isn't a valid UTF-8 string.
scan_c_switching_to_utf8=02071_C_UTF-8 Signatur gefunden, verwende UTF-8 Kode
% The compiler found a UTF-8 encoding signature (\$ef, \$bb, \$bf) at the beginning of a file,
% so it interprets it as a UTF-8 file.
scan_e_compile_time_typeerror=02072_E_Compile time Ausdruck: Erwartete $1 aber erhielt $2 bei $3
% The type-check of a compile time expression failed.
-scan_n_app_type_not_support=02073_N_APPTYPE wird vom Zielbetriebssystem nicht untersttzt
+scan_n_app_type_not_support=02073_N_APPTYPE wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$APPTYPE\}} directive is supported by certain operating systems only.
-scan_e_illegal_optimization_specifier=02074_E_"$1" ist eine ungltige Optimierung
+scan_e_illegal_optimization_specifier=02074_E_"$1" ist eine ungltige Optimierung
% You specified an optimization with the \var{\{\$OPTIMIZATION xxx\}} directive,
% and the compiler didn't recognize the optimization you specified.
-scan_w_setpeflags_not_support=02075_W_SETPEFLAGS wird vom Zielbetriebssystem nicht untersttzt
+scan_w_setpeflags_not_support=02075_W_SETPEFLAGS wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$SETPEFLAGS\}} directive is not supported by the target OS.
-scan_w_imagebase_not_support=02076_W_IMAGEBASE wird vom Zielbetriebssystem nicht untersttzt
+scan_w_imagebase_not_support=02076_W_IMAGEBASE wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$IMAGEBASE\}} directive is not supported by the target OS.
-scan_w_minstacksize_not_support=02077_W_MINSTACKSIZE wird vom Zielbetriebssystem nicht untersttzt
+scan_w_minstacksize_not_support=02077_W_MINSTACKSIZE wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$IMAGEBASE\}} directive is not supported by the target OS.
-scan_w_maxstacksize_not_support=02078_W_MAXSTACKSIZE wird vom Zielbetriebssystem nicht untersttzt
+scan_w_maxstacksize_not_support=02078_W_MAXSTACKSIZE wird vom Zielbetriebssystem nicht untersttzt
% The \var{\{\$MAXSTACKSIZE\}} directive is not supported by the target OS.
-scanner_e_illegal_warn_state=02079_E_Ungltiger Wert "$1" fr die $WARN Direktive
+scanner_e_illegal_warn_state=02079_E_Ungltiger Wert "$1" fr die $WARN Direktive
% Only ON and OFF can be used as state with a \var{\{\$WARN\}} compiler directive.
-scan_e_only_packset=02080_E_Ungltiger Wert fr das set packing
+scan_e_only_packset=02080_E_Ungltiger Wert fr das set packing
% Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameters.
scan_w_pic_ignored=02081_W_PIC Direktive oder Schalter wird ignoriert
% Several targets, such as \windows, do not support nor need PIC,
% so the PIC directive and switch are ignored.
-scan_w_unsupported_switch_by_target=02082_W_Der Schalter "$1" wird vom derzeit ausgew„hlten Zielbetriebssystem nicht untersttzt
+scan_w_unsupported_switch_by_target=02082_W_Der Schalter "$1" wird vom derzeit ausgew„hlten Zielbetriebssystem nicht untersttzt
% Some compiler switches like \$E are not supported by all targets.
-scan_w_frameworks_darwin_only=02084_W_Framework-bezogene Optionen werden nur fr Darwin/Mac OS X untersttzt
+scan_w_frameworks_darwin_only=02084_W_Framework-bezogene Optionen werden nur fr Darwin/Mac OS X untersttzt
% Frameworks are not a known concept, or at least not supported by FPC,
% on operating systems other than Darwin/Mac OS X.
-scan_e_illegal_minfpconstprec=02085_E_"$1" ist eine ungltige minimale Pr„zision von Fliesskommakonstanten
+scan_e_illegal_minfpconstprec=02085_E_"$1" ist eine ungltige minimale Pr„zision von Fliesskommakonstanten
% Valid minimal precisions for floating point constants are default, 32 and 64,
% which mean respectively minimal (usually 32 bit), 32 bit and 64 bit precision.
-scan_w_multiple_main_name_overrides=02086_W_Der Name der "main" Prozedur wird mehrfach berschrieben. Es war bisher auf "$1" gesetzt
+scan_w_multiple_main_name_overrides=02086_W_Der Name der "main" Prozedur wird mehrfach berschrieben. Es war bisher auf "$1" gesetzt
% The name for the main entry procedure is specified more than once. Only the last
% name will be used.
-scanner_w_illegal_warn_identifier=02087_W_Ungltige Bezeichner "$1" fr die $WARN Direktive
+scanner_w_illegal_warn_identifier=02087_W_Ungltige Bezeichner "$1" fr die $WARN Direktive
% Identifier is not known by a \var{\{\$WARN\}} compiler directive.
%
% \end{description}
@@ -388,22 +388,22 @@ scanner_w_illegal_warn_identifier=02087_W_Ungltige Bezeichner "$1" fr die $WAR
parser_e_syntax_error=03000_E_Parser - Syntaxfehler
% An error against the Turbo Pascal language was encountered. This typically
% happens when an illegal character is found in the source file.
-parser_e_dont_nest_interrupt=03004_E_INTERRUPT-Prozeduren drfen nicht verschachtelt sein
+parser_e_dont_nest_interrupt=03004_E_INTERRUPT-Prozeduren drfen nicht verschachtelt sein
% An \VAR{INTERRUPT} procedure must be global.
parser_w_proc_directive_ignored=03005_W_Prozedurtyp $1 wird ignoriert
% The specified procedure directive is ignored by FPC programs.
parser_e_no_overload_for_all_procs=03006_E_Nicht alle Deklarationen von "$1" sind mit OVERLOAD deklariert
% When you want to use overloading using the \var{OVERLOAD} directive, then
% all declarations need to have \var{OVERLOAD} specified.
-parser_e_export_name_double=03008_E_Doppelter Name fr exportierte Funktion $1
+parser_e_export_name_double=03008_E_Doppelter Name fr exportierte Funktion $1
% Exported function names inside a specific DLL must all be different.
-parser_e_export_ordinal_double=03009_E_Doppelter Index fr exportierte Funktion $1
+parser_e_export_ordinal_double=03009_E_Doppelter Index fr exportierte Funktion $1
% Exported function names inside a specific DLL must all be different.
-parser_e_export_invalid_index=03010_E_Ungltiger Index for exportierte Funktion
+parser_e_export_invalid_index=03010_E_Ungltiger Index for exportierte Funktion
% DLL function index must be in the range \var{1..\$FFFF}.
-parser_w_parser_reloc_no_debug=03011_W_Fr relozierbare DLL oder ausfhrbare Datei $1 funktionieren keine Debug-Information, deaktiviert.
+parser_w_parser_reloc_no_debug=03011_W_Fr relozierbare DLL oder ausfhrbare Datei $1 funktionieren keine Debug-Information, deaktiviert.
% It is currently not possible to include debug information in a relocatable DLL.
-parser_w_parser_win32_debug_needs_WN=03012_W_Um Win32-Code debuggen zu k”nnen mssen die Relozierungen mit -WN option abgeschaltet werden.
+parser_w_parser_win32_debug_needs_WN=03012_W_Um Win32-Code debuggen zu k”nnen mssen die Relozierungen mit -WN option abgeschaltet werden.
% Stabs debug info is wrong for relocatable DLL or EXES. Use -WN
% if you want to debug win32 executables.
parser_e_constructorname_must_be_init=03013_E_Konstruktor-Name muss INIT sein
@@ -412,7 +412,7 @@ parser_e_constructorname_must_be_init=03013_E_Konstruktor-Name muss INIT sein
parser_e_destructorname_must_be_done=03014_E_Destruktor-Name muss DONE sein
% You are declaring a constructor with a name which isn't \var{done}, and the
% \var{-Ss} switch is in effect. See the switch \seeo{Ss}.
-parser_e_proc_inline_not_supported=03016_E_Schlsselwort INLINE nicht untersttzt
+parser_e_proc_inline_not_supported=03016_E_Schlsselwort INLINE nicht untersttzt
% You tried to compile a program with C++ style inlining, and forgot to
% specify the \var{-Si} option (\seeo{Si}). The compiler doesn't support C++
% styled inlining by default.
@@ -438,7 +438,7 @@ parser_f_no_anonym_objects=03022_F_Anonyme Klassendefinitionen sind nicht zul„ss
parser_n_object_has_no_vmt=03023_N_Das Objekt "$1" besitzt keine VMT
% This is a note indicating that the declared object has no
% virtual method table.
-parser_e_illegal_parameter_list=03024_E_Ungltige Parameterliste
+parser_e_illegal_parameter_list=03024_E_Ungltige Parameterliste
% You are calling a function with parameters that are of a different type than
% the declared parameters of the function.
parser_e_wrong_parameter_size=03026_E_Falsche Anzahl an Parameter im Aufruf von "$1" angegeben
@@ -457,7 +457,7 @@ parser_e_header_dont_match_forward=03029_E_Funktionskopf unterscheidet sich von
parser_e_header_different_var_names=03030_E_Funktionskopf von "$1" passt nicht zur Forward-Deklaration, Variablename „ndert sich: $2 => $3
% You declared the function in the \var{interface} part, or with the
% \var{forward} directive, but defined it with a different parameter list.
-parser_n_duplicate_enum=03031_N_Werte in Aufz„hlungen mssen aufsteigend sein
+parser_n_duplicate_enum=03031_N_Werte in Aufz„hlungen mssen aufsteigend sein
% \fpc allows enumeration constructions as in C. Examine the following
% two declarations:
% \begin{verbatim}
@@ -471,9 +471,9 @@ parser_e_no_with_for_variable_in_other_segments=03033_E_WITH kann nicht auf Vari
% but this is not possible if the variable belongs to another segment.
parser_e_too_much_lexlevel=03034_E_Funktionsverschachtelung gr”sser als 31
% You can nest function definitions only 31 levels deep.
-parser_e_range_check_error=03035_E_Bereichsprfungsfehler bei Konstantenbestimmung
+parser_e_range_check_error=03035_E_Bereichsprfungsfehler bei Konstantenbestimmung
% The constants are out of their allowed range.
-parser_w_range_check_error=03036_W_Bereichsprfungsfehler bei Konstantenbestimmung
+parser_w_range_check_error=03036_W_Bereichsprfungsfehler bei Konstantenbestimmung
% The constants are out of their allowed range.
parser_e_double_caselabel=03037_E_doppelter CASE-Wert
% You are specifying the same label 2 times in a \var{case} statement.
@@ -488,7 +488,7 @@ parser_e_no_overloaded_procvars=03040_E_Funktionsvariablen von Overload-Funktion
parser_e_invalid_string_size=03041_E_Stringl„nge muss ein Wert zwischen 1 und 255 sein
% The length of a string in Pascal is limited to 255 characters. You are
% trying to declare a string with length less than 1 or greater than 255.
-parser_w_use_extended_syntax_for_objects=03042_W_Benutzen Sie die erweiterte Syntax von NEW und DISPOSE fr Objekt-Instanzen
+parser_w_use_extended_syntax_for_objects=03042_W_Benutzen Sie die erweiterte Syntax von NEW und DISPOSE fr Objekt-Instanzen
% If you have a pointer \var{a} to an object type, then the statement
% \var{new(a)} will not initialize the object (i.e. the constructor isn't
% called), although space will be allocated. You should issue the
@@ -519,14 +519,14 @@ parser_e_header_dont_match_any_member=03048_E_Funktionskopf passt zu keiner Meth
parser_d_procedure_start=03049_DL_Procedure/Function $1
% When using the \var{-vd} switch, the compiler tells you when it starts
% processing a procedure or function implementation.
-parser_e_error_in_real=03050_E_Ungltige Fliesskommakonstante
+parser_e_error_in_real=03050_E_Ungltige Fliesskommakonstante
% The compiler expects a floating point expression, and gets something else.
parser_e_fail_only_in_constructor=03051_E_FAIL darf nur in Konstruktoren verwendet werden
% You are using the \var{FAIL} instruction outside a constructor method.
parser_e_no_paras_for_destructor=03052_E_Destruktoren k”nnen keine Parameter haben
% You are declaring a destructor with a parameter list. Destructor methods
% cannot have parameters.
-parser_e_only_class_members_via_class_ref=03053_E_Nur Klassenmethoden, Klasseneigenschaften und Klassenvariablen k”nnen ber den Klassennamen angesprochen werden
+parser_e_only_class_members_via_class_ref=03053_E_Nur Klassenmethoden, Klasseneigenschaften und Klassenvariablen k”nnen ber den Klassennamen angesprochen werden
% This error occurs in a situation like the following:
% \begin{verbatim}
% Type :
@@ -561,14 +561,14 @@ parser_w_should_use_override=03057_W_Eine Inherit-Methode wird durch $1 verdeckt
% overridden in the descendant class with the \var{override} directive. If you
% don't specify the \var{override} directive, you will hide the parent method;
% you will not override it.
-parser_e_nothing_to_be_overridden=03058_E_Es gibt keine Vorg„ngerklasse mit einer Methode, die damit berschrieben werden k”nnte: $1
+parser_e_nothing_to_be_overridden=03058_E_Es gibt keine Vorg„ngerklasse mit einer Methode, die damit berschrieben werden k”nnte: $1
% You try to \var{override} a virtual method of a parent class that doesn't
% exist.
parser_e_no_procedure_to_access_property=03059_E_Es gibt keine Member-Funktion um auf diese Property zuzugreifen
% You specified no \var{read} directive for a property.
parser_w_stored_not_implemented=03060_W_Die Stored Property - Direktive ist noch nicht implementiert
% This message is no longer used, as the \var{stored} directive has been implemented.
-parser_e_ill_property_access_sym=03061_E_Ungltiges Symbol fr den Zugriff auf die Property
+parser_e_ill_property_access_sym=03061_E_Ungltiges Symbol fr den Zugriff auf die Property
% There is an error in the \var{read} or \var{write} directives for an array
% property. When you declare an array property, you can only access it with
% procedures and functions. The following code would cause such an error.
@@ -578,7 +578,7 @@ parser_e_ill_property_access_sym=03061_E_Ungltiges Symbol fr den Zugriff auf d
% property x [i : integer]: integer read I write i;
% \end{verbatim}
%
-parser_e_cant_access_protected_member=03062_E_Kann an dieser Stelle nicht auf das geschtzte Feld des Objekts zugreifen
+parser_e_cant_access_protected_member=03062_E_Kann an dieser Stelle nicht auf das geschtzte Feld des Objekts zugreifen
% Fields that are declared in a \var{protected} section of an object or class
% declaration cannot be accessed outside the module where the object is
% defined, or outside descendent object methods.
@@ -586,16 +586,16 @@ parser_e_cant_access_private_member=03063_E_Kann an dieser Stelle nicht auf das
% Fields that are declared in a \var{private} section of an object or class
% declaration cannot be accessed outside the module where the class is
% defined.
-parser_e_overridden_methods_not_same_ret=03066_E_šberschriebene, virtuelle Methoden mssen den gleichen Ergebnistyp haben: "$2" wird berschrieben von "$1"
+parser_e_overridden_methods_not_same_ret=03066_E_šberschriebene, virtuelle Methoden mssen den gleichen Ergebnistyp haben: "$2" wird berschrieben von "$1"
% If you declare overridden methods in a class definition, they must
% have the same return type.
-parser_e_dont_nest_export=03067_E_Mit EXPORT deklarierte Funktionen drfen nicht verschachtelt sein
+parser_e_dont_nest_export=03067_E_Mit EXPORT deklarierte Funktionen drfen nicht verschachtelt sein
% You cannot declare a function or procedure within a function or procedure
% that was declared as an export procedure.
-parser_e_methods_dont_be_export=03068_E_Methoden drfen nicht EXPORTiert werden
+parser_e_methods_dont_be_export=03068_E_Methoden drfen nicht EXPORTiert werden
% You cannot declare a procedure that is a method for an object as
% \var{export}ed. That is, your methods cannot be called from a C program.
-parser_e_call_by_ref_without_typeconv=03069_E_Aufrufe mit VAR-Parametern fr Argument-Nr. $1 mssen exakt stimmen: "$2" gefunden, "$3" erwartet
+parser_e_call_by_ref_without_typeconv=03069_E_Aufrufe mit VAR-Parametern fr Argument-Nr. $1 mssen exakt stimmen: "$2" gefunden, "$3" erwartet
% When calling a function declared with \var{var} parameters, the variables in
% the function call must be of exactly the same type. There is no automatic
% type conversion.
@@ -605,12 +605,12 @@ parser_e_no_super_class=03070_E_Klasse ist keine Elternklasse zur aktuellen Klas
parser_e_self_not_in_method=03071_E_SELF ist nur in Methoden erlaubt
% You are trying to use the \var{self} parameter outside an object's method.
% Only methods get passed the \var{self} parameters.
-parser_e_generic_methods_only_in_methods=03072_E_Methoden drfen nur in anderen Methoden direkt mit dem Klassen-Typbezeichner aufgerufen werden
+parser_e_generic_methods_only_in_methods=03072_E_Methoden drfen nur in anderen Methoden direkt mit dem Klassen-Typbezeichner aufgerufen werden
% A construction like \var{sometype.somemethod} is only allowed in a method.
parser_e_illegal_colon_qualifier=03073_E_Unzul„ssige Verwendung von ':'
% You are using the format \var{:} (colon) 2 times on an expression that
% is not a real expression.
-parser_e_illegal_set_expr=03074_E_Bereichsprfungsfehler im SET-Konstruktor oder doppeltes Set-Element
+parser_e_illegal_set_expr=03074_E_Bereichsprfungsfehler im SET-Konstruktor oder doppeltes Set-Element
% The declaration of a set contains an error. Either one of the elements is
% outside the range of the set type, or two of the elements are in fact
% the same.
@@ -632,17 +632,17 @@ parser_e_false_with_expr=03079_E_Typ des Ausdrucks muss eine Klasse oder ein Rec
% A \var{with} statement needs an argument that is of the type \var{record}
% or \var{class}. You are using \var{with} on an expression that is not of
% this type.
-parser_e_void_function=03080_E_Prozeduren k”nnen keinen Wert zurckliefern
+parser_e_void_function=03080_E_Prozeduren k”nnen keinen Wert zurckliefern
% In \fpc, you can specify a return value for a function when using
% the \var{exit} statement. This error occurs when you try to do this with a
% procedure. Procedures cannot return a value.
-parser_e_only_methods_allowed=03081_E_Konstruktoren, Destruktoren und Klassenoperatoren mssen Methoden sein
+parser_e_only_methods_allowed=03081_E_Konstruktoren, Destruktoren und Klassenoperatoren mssen Methoden sein
% You're declaring a procedure as destructor, constructor or class operator, when the
% procedure isn't a class method.
parser_e_operator_not_overloaded=03082_E_Operator besitzt kein Overload
% You're trying to use an overloaded operator when it isn't overloaded for
% this type.
-parser_e_no_such_assignment=03083_E_Es ist nicht m”glich, die Zuweisung fr gleiche Typen zu berladen
+parser_e_no_such_assignment=03083_E_Es ist nicht m”glich, die Zuweisung fr gleiche Typen zu berladen
% You cannot overload assignment for types
% that the compiler considers as equal.
parser_e_overload_impossible=03084_E_Unm”gliche Operator-.berladung
@@ -651,7 +651,7 @@ parser_e_overload_impossible=03084_E_Unm”gliche Operator-.berladung
parser_e_no_reraise_possible=03085_E_Ausl”sen einer Exception an dieser Stelle nicht m”glich
% You are trying to re-raise an exception where it is not allowed. You can only
% re-raise exceptions in an \var{except} block.
-parser_e_no_new_or_dispose_for_classes=03086_E_Die erweiterte Syntax von New oder Dispose ist fr Klassen unzul„ssig
+parser_e_no_new_or_dispose_for_classes=03086_E_Die erweiterte Syntax von New oder Dispose ist fr Klassen unzul„ssig
% You cannot generate an instance of a class with the extended syntax of
% \var{new}. The constructor must be used for that. For the same reason, you
% cannot call \var{Dispose} to de-allocate an instance of a class, the
@@ -659,19 +659,19 @@ parser_e_no_new_or_dispose_for_classes=03086_E_Die erweiterte Syntax von New ode
parser_e_procedure_overloading_is_off=03088_E_Das šberladen von Prozeduren ist ausgeschaltet
% When using the \var{-So} switch, procedure overloading is switched off.
% Turbo Pascal does not support function overloading.
-parser_e_overload_operator_failed=03089_E_Es ist nicht m”glich, dieesen Operator zu berladen. Verwandte berladbare Operatoren sind "$1"
+parser_e_overload_operator_failed=03089_E_Es ist nicht m”glich, dieesen Operator zu berladen. Verwandte berladbare Operatoren sind "$1"
% You are trying to overload an operator which cannot be overloaded.
% The following operators can be overloaded :
% \begin{verbatim}
% +, -, *, /, =, >, <, <=, >=, is, as, in, **, :=
% \end{verbatim}
-parser_e_comparative_operator_return_boolean=03090_E_Vergleichsoperator muss einen booleschen Wert zurckgeben
+parser_e_comparative_operator_return_boolean=03090_E_Vergleichsoperator muss einen booleschen Wert zurckgeben
% When overloading the \var{=} operator, the function must return a boolean
% value.
parser_e_only_virtual_methods_abstract=03091_E_Nur virtuelle Methoden k”nnen abstrakt sein
% You are declaring a method as abstract, when it isn't declared to be
% virtual.
-parser_f_unsupported_feature=03092_F_Benutzung einer nicht untersttzten Erweiterung!
+parser_f_unsupported_feature=03092_F_Benutzung einer nicht untersttzten Erweiterung!
% You're trying to force the compiler into doing something it cannot do yet.
parser_e_mix_of_classes_and_objects=03093_E_Das Mischen von Klassen und Objekten ist unzul„ssig
% You cannot derive \var{objects}, \var{classes}, \var{cppclasses} and \var{interfaces} intertwined. E.g.
@@ -696,10 +696,10 @@ parser_e_absolute_only_to_var_or_const=03096_E_ABSOLUTE kann nur auf Variablen u
%
parser_e_initialized_only_one_var=03097_E_Es kann nur EINE Variable initialisiert werden
% You cannot specify more than one variable with a initial value in Delphi mode.
-parser_e_abstract_no_definition=03098_E_Abstrakte Methoden drfen keine Definition (mit Rumpf) haben
+parser_e_abstract_no_definition=03098_E_Abstrakte Methoden drfen keine Definition (mit Rumpf) haben
% Abstract methods can only be declared, you cannot implement them. They
% should be overridden by a descendant class.
-parser_e_overloaded_must_be_all_global=03099_E_Diese berladene Funktion darf nicht lokal sein (muss Exportiert werden)
+parser_e_overloaded_must_be_all_global=03099_E_Diese berladene Funktion darf nicht lokal sein (muss Exportiert werden)
% You are defining an overloaded function in the implementation part of a unit,
% but there is no corresponding declaration in the interface part of the unit.
parser_w_virtual_without_constructor=03100_W_Virtuelle Methoden wurden ohne Konstruktor verwendet in $1
@@ -725,7 +725,7 @@ parser_u_parsing_implementation=03106_UL_Parse Implementation von $1
parser_d_compiling_second_time=03107_DL_šbersetze $1 zum zweiten Mal
% When you request debug messages (\var{-vd}) the compiler tells you what
% units it recompiles for the second time.
-parser_e_no_property_found_to_override=03109_E_Es gibt keine Property diesen Namens, die berschrieben werden k”nnte
+parser_e_no_property_found_to_override=03109_E_Es gibt keine Property diesen Namens, die berschrieben werden k”nnte
% You want to overrride a property of a parent class, when there is, in fact,
% no such property in the parent class.
parser_e_only_one_default_property=03110_E_Es ist nur eine einzelne Default-Property erlaubt, vererbte Default-Property in Klasse $1 gefunden
@@ -733,10 +733,10 @@ parser_e_only_one_default_property=03110_E_Es ist nur eine einzelne Default-Prop
% default property, and a class can have only one default property.
parser_e_property_need_paras=03111_E_Die Default-Property muss eine Array-Property sein
% Only array properties of classes can be made \var{default} properties.
-parser_e_constructor_cannot_be_not_virtual=03112_E_Virtuelle Konstruktoren werden nur im Klassen-Objektmodell untersttzt
+parser_e_constructor_cannot_be_not_virtual=03112_E_Virtuelle Konstruktoren werden nur im Klassen-Objektmodell untersttzt
% You cannot have virtual constructors in objects. You can only have them
% in classes.
-parser_e_no_default_property_available=03113_E_Keine Default-Property verfgbar
+parser_e_no_default_property_available=03113_E_Keine Default-Property verfgbar
% You try to access a default property of a class, but this class (or one of
% its ancestors) doesn't have a default property.
parser_e_cant_have_published=03114_E_Die Klasse kann keinen PUBLISHED Bereich haben, benutzen Sie den {$M+} Schalter
@@ -753,7 +753,7 @@ parser_e_forward_declaration_must_be_resolved=03115_E_Forward-Deklaration der Kl
% end;
% \end{verbatim}
% where \var{ParentClass} is declared but not defined.
-parser_e_no_local_operator=03116_E_Lokale Operatoren werden nicht untersttzt
+parser_e_no_local_operator=03116_E_Lokale Operatoren werden nicht untersttzt
% You cannot overload locally, i.e. inside procedures or function
% definitions.
parser_e_proc_dir_not_allowed_in_interface=03117_E_Prozedur-Direktive $1 unzul„ssig im Interface-Bereich
@@ -771,7 +771,7 @@ parser_e_function_already_declared_public_forward=03120_E_Funktion ist bereits a
% declaration in the \var{implementation} section.
parser_e_not_external_and_export=03121_E_Kann nicht EXPORT und EXTERNAL gleichzeitig benutzen
% These two procedure directives are mutually exclusive.
-parser_w_not_supported_for_inline=03123_W_$1 noch nicht innerhalb von inline Prozeduren/Funktionen untersttzt
+parser_w_not_supported_for_inline=03123_W_$1 noch nicht innerhalb von inline Prozeduren/Funktionen untersttzt
% Inline procedures don't support this declaration.
parser_w_inlining_disabled=03124_W_Inlining deaktiviert
% Inlining of procedures is disabled.
@@ -780,7 +780,7 @@ parser_i_writing_browser_log=03125_I_Schreibe Browser-Log $1
% writes the browser log (generated with the \var{\{\$Y+\}} switch).
parser_h_maybe_deref_caret_missing=03126_H_M”glicherweise fehlt eine Zeiger-Dereferenzierung
% The compiler thinks that a pointer may need a dereference.
-parser_f_assembler_reader_not_supported=03127_F_Gew„hlter Assembler-Leser nicht untersttzt
+parser_f_assembler_reader_not_supported=03127_F_Gew„hlter Assembler-Leser nicht untersttzt
% The selected assembler reader (with \var{\{\$ASMMODE xxx\}} is not
% supported. The compiler can be compiled with or without support for a
% particular assembler reader.
@@ -809,7 +809,7 @@ parser_e_empty_import_name=03136_E_Leerer Importname angegeben
% Some targets need a name for the imported procedure or a \var{cdecl} specifier.
parser_e_division_by_zero=03138_E_Division durch Null
% A division by zero was encounted.
-parser_e_invalid_float_operation=03139_E_Ungltige Fliesskomma-Operation
+parser_e_invalid_float_operation=03139_E_Ungltige Fliesskomma-Operation
% An operation on two real type values produced an overflow or a division
% by zero.
parser_e_array_lower_less_than_upper_bound=03140_E_Obere Grenze des Bereichs ist kleiner als die untere Grenze
@@ -821,7 +821,7 @@ parser_w_string_too_long=03141_W_String "$1" ist l„nger als $2
parser_e_string_larger_array=03142_E_Stringl„nge ist gr”sser als die L„nge des "array of char"
% The size of the constant string is larger than the size you specified in
% the \var{Array[x..y] of char} definition.
-parser_e_ill_msg_expr=03143_E_Ungltiger Ausdruck nach der 'Message'-Direktive
+parser_e_ill_msg_expr=03143_E_Ungltiger Ausdruck nach der 'Message'-Direktive
% \fpc supports only integer or string values as message constants.
parser_e_ill_msg_param=03144_E_Message-Handler akzeptieren nur einen "Call by Reference" Parameter
% A method declared with the \var{message} directive as message handler
@@ -837,7 +837,7 @@ parser_e_threadvars_only_sg=03147_E_Threadvariablen k”nnen nur statisch oder glo
% local to a procedure. Local variables are always local to a thread,
% because every thread has its own stack and local variables
% are stored on the stack.
-parser_f_direct_assembler_not_allowed=03148_F_Direkter Assembler wird f+r bin„res Ausgabeformat nicht untersttzt
+parser_f_direct_assembler_not_allowed=03148_F_Direkter Assembler wird f+r bin„res Ausgabeformat nicht untersttzt
% You can't use direct assembler when using a binary writer. Choose an
% other output format or use another assembler reader.
parser_w_no_objpas_use_mode=03149_W_Laden Sie die OBJPAS Unit nicht manuell, benutzen Sie statdessen {$mode objfpc} oder {$mode delphi}
@@ -851,7 +851,7 @@ parser_e_cant_use_inittable_here=03151_E_Datentypen, die ein Initialiserung oder
% Some data types (e.g. \var{ansistring}) need initialization/finalization
% code which is implicitly generated by the compiler. Such data types
% can't be used in the variant part of a record.
-parser_e_resourcestring_only_sg=03152_E_Resourcestrings drfen nur statisch oder global sein
+parser_e_resourcestring_only_sg=03152_E_Resourcestrings drfen nur statisch oder global sein
% Resourcestring cannot be declared local, only global or using the static
% directive.
parser_e_exit_with_argument_not__possible=03153_E_EXIT mit Argument darf hier nicht verwendet werden
@@ -864,7 +864,7 @@ parser_e_ill_property_storage_sym=03155_E_Dieses Symbol ist als Speichersymbol u
% You can't use this type of symbol as storage specifier in property
% declaration. You can use only methods with the result type boolean,
% boolean class fields or boolean constants.
-parser_e_only_publishable_classes_can_be_published=03156_E_Nur Klassen, die im "$M+"-Modus bersetzt wurden, drfen published sein
+parser_e_only_publishable_classes_can_be_published=03156_E_Nur Klassen, die im "$M+"-Modus bersetzt wurden, drfen published sein
% A class-typed field in the published section of a class can only be a class which was
% compiled in \var{\{\$M+\}} or which is derived from such a class. Normally
% such a class should be derived from \var{TPersistent}.
@@ -880,24 +880,24 @@ parser_e_proc_directive_expected=03157_E_Prozedurdirektive erwartet
% p : procedure;stdcall=nil;
% p : procedure stdcall=nil;
% \end{verbatim}
-parser_e_invalid_property_index_value=03158_E_Der Wert fr einen Property-Index muss ordinalen Typs sein
+parser_e_invalid_property_index_value=03158_E_Der Wert fr einen Property-Index muss ordinalen Typs sein
% The value you use to index a property must be of an ordinal type, for
% example an integer or enumerated type.
parser_e_procname_to_short_for_export=03159_E_Prozedurname zu kurz um exportiert zu werden
% The length of the procedure/function name must be at least 2 characters
% long. This is because of a bug in dlltool which doesn't parse the .def
% file correctly with a name of length 1.
-parser_e_dlltool_unit_var_problem=03160_E_Es kann kein DEFFILE-Eintrag fr unit-globale Variablen erzeugt werden
+parser_e_dlltool_unit_var_problem=03160_E_Es kann kein DEFFILE-Eintrag fr unit-globale Variablen erzeugt werden
parser_e_dlltool_unit_var_problem2=03161_E_šbersetze ohne "-WD"-Option
% You need to compile this file without the -WD switch on the
% command line.
-parser_f_need_objfpc_or_delphi_mode=03162_F_Es muss der Modus ObjFPC (-S2) oder Delphi (-Sd) aktiv sein, um dieses Modul zu bersetzen
+parser_f_need_objfpc_or_delphi_mode=03162_F_Es muss der Modus ObjFPC (-S2) oder Delphi (-Sd) aktiv sein, um dieses Modul zu bersetzen
% You need to use \var{\{\$MODE OBJFPC\}} or \var{\{\$MODE DELPHI\}} to compile this file.
% Or use the corresponding command line switch, either \var{-Mobjfpc} or \var{-MDelphi.}
parser_e_no_export_with_index_for_target=03163_E_Der Index darf nicht kleiner als $1 sein
% Exporting of functions or procedures with a specified index is not
% supported on this target.
-parser_e_no_export_of_variables_for_target=03164_E_Das Ziel $1 untersttzt das Exportieren von Variablen nicht
+parser_e_no_export_of_variables_for_target=03164_E_Das Ziel $1 untersttzt das Exportieren von Variablen nicht
% Exporting of variables is not supported on this target.
parser_e_improper_guid_syntax=03165_E_Falscher GUID-Syntax
% The GUID indication does not have the proper syntax. It should be of the form
@@ -975,11 +975,11 @@ parser_e_default_value_only_one_para=03184_E_Der Default Value kann nur einem Pa
% \begin{verbatim}
% Procedure MyProcedure (A : Integer = 0; B : Integer = 0);
% \end{verbatim}
-parser_e_default_value_expected_for_para=03185_E_Standard Parameter fr "$1" ben”tigt
+parser_e_default_value_expected_for_para=03185_E_Standard Parameter fr "$1" ben”tigt
% The specified parameter requires a default value.
-parser_w_unsupported_feature=03186_W_Verwendung eines nicht untersttzten Features!
+parser_w_unsupported_feature=03186_W_Verwendung eines nicht untersttzten Features!
% You're trying to force the compiler into doing something it cannot do yet.
-parser_h_c_arrays_are_references=03187_H_C Arrays werden "by reference" bergeben
+parser_h_c_arrays_are_references=03187_H_C Arrays werden "by reference" bergeben
% Any array passed to a C function is passed
% by a pointer (i.e. by reference).
parser_e_C_array_of_const_must_be_last=03188_E_C array of const muss letztes Argument sein
@@ -992,7 +992,7 @@ parser_h_type_redef=03189_H_Erneute Definition des Typs "$1"
% be, a potential source of errors.
parser_w_cdecl_has_no_high=03190_W_cdecl'ared Functionen haben keinen high Parameter
% Functions declared with the \var{cdecl} modifier do not pass an extra implicit parameter.
-parser_w_cdecl_no_openstring=03191_W_cdecl'ared Functionen untersttzen keine open strings
+parser_w_cdecl_no_openstring=03191_W_cdecl'ared Functionen untersttzen keine open strings
% Openstring is not supported for functions that have the \var{cdecl} modifier.
parser_e_initialized_not_for_threadvar=03192_E_Als threadvar deklarierte Variable kann nicht initialisiert werden
% Variables declared as threadvar cannot be initialized with a default value.
@@ -1045,13 +1045,13 @@ parser_e_goto_outside_proc=03201_E_Goto Statements zwischen verschiedenen Prozed
parser_f_too_complex_proc=03202_F_Prozedur zu komplex, sie erfordert zu viele Register
% Your procedure body is too long for the compiler. You should split the
% procedure into multiple smaller procedures.
-parser_e_illegal_expression=03203_E_Ungltiger Ausdruck
+parser_e_illegal_expression=03203_E_Ungltiger Ausdruck
% This can occur under many circumstances. Usually when trying to evaluate
% constant expressions.
-parser_e_invalid_integer=03204_E_Ungltiger integer Ausdruck
+parser_e_invalid_integer=03204_E_Ungltiger integer Ausdruck
% You made an expression which isn't an integer, and the compiler expects the
% result to be an integer.
-parser_e_invalid_qualifier=03205_E_Ungltiger Qualifier
+parser_e_invalid_qualifier=03205_E_Ungltiger Qualifier
% One of the following is happening :
% \begin{itemize}
% \item You're trying to access a field of a variable that is not a record.
@@ -1063,7 +1063,7 @@ parser_e_upper_lower_than_lower=03206_E_High Range Limit < low Range Limit
% the range.
parser_e_macpas_exit_wrong_param=03207_E_Exits Parameter muss der Name der Prozedur sein, in der es benutzt wird
% Non local exit is not allowed. This error occurs only in mode MacPas.
-parser_e_illegal_assignment_to_count_var=03208_E_Ungltige Zuweisung zur for-loop Variable "$1"
+parser_e_illegal_assignment_to_count_var=03208_E_Ungltige Zuweisung zur for-loop Variable "$1"
% The type of a \var{for} loop variable must be an ordinal type.
% Loop variables cannot be reals or strings. You also cannot assign values to
% loop variables inside the loop (Except in Delphi and TP modes). Use a while or
@@ -1092,13 +1092,13 @@ parser_e_dispinterface_cant_have_parent=03216_E_Ein DISPINTERFACE kann keine Elt
% A DISPINTERFACE is a special type of interface which can't have a parent class. Dispinterface always derive from IDispatch type.
parser_e_dispinterface_needs_a_guid=03217_E_Ein DISPINTERFACE ben”tigt einen GUID
% A DISPINTERFACE always needs an interface identification (a GUID).
-parser_w_overridden_methods_not_same_ret=03218_W_šberschriebene Methoden mssen einen entsprechenden Rckgabetyp haben. Dieser Code kann abstrzen, weil er von einem Delphi Parser Bug abh„ngt (Methode "$2" wird durch "$1" berschrieben, die einen anderen Rckgabetyp hat).
+parser_w_overridden_methods_not_same_ret=03218_W_šberschriebene Methoden mssen einen entsprechenden Rckgabetyp haben. Dieser Code kann abstrzen, weil er von einem Delphi Parser Bug abh„ngt (Methode "$2" wird durch "$1" berschrieben, die einen anderen Rckgabetyp hat).
% If you declare overridden methods in a class definition, they must
% have the same return type. Some versions of Delphi allow you to change the
% return type of interface methods, and even to change procedures into
% functions, but the resulting code may crash depending on the types used
% and the way the methods are called.
-parser_e_dispid_must_be_ord_const=03219_E_Dispatch IDs mssen ganzzahlige Konstanten sein
+parser_e_dispid_must_be_ord_const=03219_E_Dispatch IDs mssen ganzzahlige Konstanten sein
% The \var{dispid} keyword must be followed by an ordinal constant (the dispid index).
parser_e_array_range_out_of_bounds=03220_E_Der Bereich des Array ist zu gross
% Regardless of the size taken up by its elements, an array cannot have more
@@ -1127,10 +1127,10 @@ parser_w_no_lineinfo_use_switch=03226_W_Die LINEINFO Unit nicht manuell laden. V
% automatically adds the correct unit for reading the selected type of debugging
% information. The unit that needs to be used depends on the type of
% debug information used when compiling the binary.
-parser_e_no_funcret_specified=03227_E_Kein Funktionsergebnistyp fr Funktion "$1" angegeben
+parser_e_no_funcret_specified=03227_E_Kein Funktionsergebnistyp fr Funktion "$1" angegeben
% The first time you declare a function you have to declare it completely,
% including all parameters and the result type.
-parser_e_special_onlygenerics=03228_E_Spezialisierung wird nur fr generische Typen untersttzt
+parser_e_special_onlygenerics=03228_E_Spezialisierung wird nur fr generische Typen untersttzt
% Types which are not generics can't be specialized.
parser_e_no_generics_as_params=03229_E_Generische Typen k”nnen bei der Spezialisierung generischer Typen nicht als Parameter benutzt werden
% When specializing a generic, only non-generic types can be used as parameters.
@@ -1143,7 +1143,7 @@ parser_e_label_outside_proc=03231_E_Die Address von Labels, die ausserhalb des a
% current procedure.
parser_e_initialized_not_for_external=03233_E_Extern deklarierte Variablen k”nnen nicht intialisiert werden
% Variables declared as external cannot be initialized with a default value.
-parser_e_illegal_function_result=03234_E_Ungltiger Funktionsergebnistyp
+parser_e_illegal_function_result=03234_E_Ungltiger Funktionsergebnistyp
% Some types like file types cannot be used as function result.
parser_e_no_common_type=03235_E_"$1" und "$2" haben keinen gemeinsamen Typ
% To perform an operation on integers, the compiler converts both operands
@@ -1151,7 +1151,7 @@ parser_e_no_common_type=03235_E_"$1" und "$2" haben keinen gemeinsamen Typ
% common type of the operands, the compiler takes the minimum of the minimal values
% of both types, and the maximum of the maximal values of both types. The common
% type is then minimum..maximum.
-parser_e_no_generics_as_types=03236_E_Generische Typen k”nnen nicht ohne Spezialisierung als Typ fr eine Variable verwendet werden
+parser_e_no_generics_as_types=03236_E_Generische Typen k”nnen nicht ohne Spezialisierung als Typ fr eine Variable verwendet werden
% Generics must be always specialized before being used as variable type.
parser_w_register_list_ignored=03237_W_Registerliste wird in reinen Assemblerroutinen ignoriert
% When using pure assembler routines, the list with modified registers is ignored.
@@ -1167,18 +1167,18 @@ parser_e_implements_must_not_have_stored_specifier=03242_E_Die Implements-Eigens
% A property which implements an interface may not have a stored specifier.
parser_e_implements_uses_non_implemented_interface=03243_E_Die Implements-Eigenschaft benutzt das nicht implementierte Interface "$1"
% The interface which is implemented by a property is not an interface implemented by the class.
-parser_e_unsupported_real=03244_E_Fliesskommavariablen werden fr dieses Ziel nicht untersttzt
+parser_e_unsupported_real=03244_E_Fliesskommavariablen werden fr dieses Ziel nicht untersttzt
% The compiler parsed a floating point expression, but it is not supported.
parser_e_class_doesnt_implement_interface=03245_E_Klasse "$1" implementiert das Interface "$2" nicht
% The delegated interface is not implemented by the class given in the implements clause.
parser_e_class_implements_must_be_interface=03246_E_Der von Implements benutzte Typ muss ein Interface sein
% The \var{implements} keyword must be followed by an interface type.
-parser_e_cant_export_var_different_name=03247_E_Variablen k”nnen fr dieses Target nicht mit einem anderen Namen exportiert werden; fge der Deklaration den Namen mit einer "export" Direktive hinzu (Variablenname: $1, deklarierter Name fr den Export: $2)
+parser_e_cant_export_var_different_name=03247_E_Variablen k”nnen fr dieses Target nicht mit einem anderen Namen exportiert werden; fge der Deklaration den Namen mit einer "export" Direktive hinzu (Variablenname: $1, deklarierter Name fr den Export: $2)
% On most targets it is not possible to change the name under which a variable
% is exported inside the \var{exports} statement of a library.
% In that case, you have to specify the export name at the point where the
% variable is declared, using the \var{export} and \var{alias} directives.
-parser_e_weak_external_not_supported=03248_E_Schwache externe Symbole werden fr dieses Target nicht untersttzt
+parser_e_weak_external_not_supported=03248_E_Schwache externe Symbole werden fr dieses Target nicht untersttzt
% A "weak external" symbol is a symbol which may or may not exist at (either static
% or dynamic) link time. This concept may not be available (or implemented yet)
% on the current cpu/OS target.
@@ -1211,24 +1211,24 @@ parser_e_sealed_class_cannot_have_abstract_methods=03255_E_Eine SEALED Klasse ka
parser_e_only_virtual_methods_final=03256_E_Nur virtuelle Methoden k”nnen final sein.
% You are declaring a method as final, when it is not declared to be
% virtual.
-parser_e_final_can_no_be_overridden=03257_E_Die finale Methode kann nicht berschrieben werden: "$1"
+parser_e_final_can_no_be_overridden=03257_E_Die finale Methode kann nicht berschrieben werden: "$1"
% You are trying to \var{override} a virtual method of a parent class that does
% not exist.
parser_e_multiple_messages=03258_E_Pro Methode kann nur eine Nachricht verwendet werden
% It is not possible to associate multiple messages with a single method.
-parser_e_invalid_enumerator_identifier=03259_E_Ungltiger Aufz„hlungsbezeichner: "$1"
+parser_e_invalid_enumerator_identifier=03259_E_Ungltiger Aufz„hlungsbezeichner: "$1"
% Only "MoveNext" and "Current" enumerator identifiers are supported.
parser_e_enumerator_identifier_required=03260_E_Aufz„hlungsbezeichner notwendig
% "MoveNext" or "Current" identifier must follow the \var{enumerator} modifier.
-parser_e_enumerator_movenext_is_not_valid=03261_E_Die Aufz„hlungs-pattern-Methode "MoveNext" ist ungltig. Die Methode muss eine Funktion mit Rckgabetyp Boolean und ohne notwendige Argumente sein
+parser_e_enumerator_movenext_is_not_valid=03261_E_Die Aufz„hlungs-pattern-Methode "MoveNext" ist ungltig. Die Methode muss eine Funktion mit Rckgabetyp Boolean und ohne notwendige Argumente sein
% "MoveNext" enumerator pattern method must be a function with Boolean return type and no required arguments
-parser_e_enumerator_current_is_not_valid=03262_E_Die Aufz„hlungs-pattern-Eigenschaft "Current" ist ungltig. Die Eigenschaft ben”tigt einen "Getter"
+parser_e_enumerator_current_is_not_valid=03262_E_Die Aufz„hlungs-pattern-Eigenschaft "Current" ist ungltig. Die Eigenschaft ben”tigt einen "Getter"
% "Current" enumerator pattern property must have a getter
parser_e_only_one_enumerator_movenext=03263_E_Pro Klasse/Objekt ist nur eine Aufz„hlungsmethode "MoveNext" erlaubt
% Class or Object can have only one enumerator MoveNext declaration.
parser_e_only_one_enumerator_current=03264_E_Pro Klasse/Objekt ist nur eine Aufz„hlungseigenschaft "Current" erlaubt
% Class or Object can have only one enumerator Current declaration.
-parser_e_for_in_loop_cannot_be_used_for_the_type=03265_E_For in Schleife kann nicht fr den Typ "$1" verwendet werden
+parser_e_for_in_loop_cannot_be_used_for_the_type=03265_E_For in Schleife kann nicht fr den Typ "$1" verwendet werden
% For in loop can be used not for all types. For example it cannot be used for the enumerations with jumps.
parser_e_objc_requires_msgstr=03266_E_Objective-C Nachrichten erfordern, dass ihr Objective-C selector-Name mit der Direktive "message" angegeben wird
% Objective-C messages require their Objective-C name (selector name) to be specified using the \var{message `someName:'} procedure directive.
@@ -1255,11 +1255,11 @@ parser_h_no_objc_parent=03270_H_Definieren einer neuen Objective-C root-Klasse.
parser_e_no_objc_published=03271_E_Objective-C Klassen k”nnen keinen Abschnitt published haben
% In Object Pascal, ``published'' determines whether or not RTTI is generated. Since the Objective-C runtime always needs
% RTTI for everything, this specified does not make sense for Objective-C classes.
-parser_f_need_objc=03272_F_Dieses Modul erfordert, dass der Objective-C Mode-Schalter bersetzt wird
+parser_f_need_objc=03272_F_Dieses Modul erfordert, dass der Objective-C Mode-Schalter bersetzt wird
% This error indicates the use of Objective-C language features without an Objective-C mode switch
% active. Enable one via the -M command line switch, or the {\$modeswitch x} directive.
-parser_e_must_use_override_objc=03273_E_Vererbte Methoden k”nnen nur in Objective-C berschrieben werden, fge "override" hinzu (Vererbte Methode ist in $1 definiert)
-parser_h_should_use_override_objc=03274_H_Vererbte Methoden k”nnen nur in Objective-C berschrieben werden, fge "override" hinzu (Vererbte Methode ist in $1 definiert)
+parser_e_must_use_override_objc=03273_E_Vererbte Methoden k”nnen nur in Objective-C berschrieben werden, fge "override" hinzu (Vererbte Methode ist in $1 definiert)
+parser_h_should_use_override_objc=03274_H_Vererbte Methoden k”nnen nur in Objective-C berschrieben werden, fge "override" hinzu (Vererbte Methode ist in $1 definiert)
% It is not possible to \var{reintroduce} methods in Objective-C like in Object Pascal. Methods with the same
% name always map to the same virtual method entry. In order to make this clear in the source code,
% the compiler always requires the \var{override} directive to be specified when implementing overriding
@@ -1278,9 +1278,9 @@ parser_e_no_objc_unique=03276_E_Noch k”nnen eindeutige Kopien von Objective-C Ty
parser_e_no_category_as_types=03277_E_Objective-C Kategorien k”nnen nicht als Typen benutzt werden
% It is not possible to declare a variable as an instance of an Objective-C category. A
% category adds methods to the scope of an existing class, but does not define a type by itself.
-parser_e_no_category_override=03278_E_Kategorien berschreiben Methoden nicht, sondern ersetzen sie. "reintroduce" benutzen
-parser_e_must_use_reintroduce_objc=03279_E_Ersetzte Methoden k”nnen in Objective-C nur wieder eingefhrt werden, fge "reintroduce" hinzu (Ersetzte Methode ist in $1 definiert)
-parser_h_should_use_reintroduce_objc=03280_H_Ersetzte Methoden k”nnen in Objective-C nur wieder eingefhrt werden, fge "reintroduce" hinzu (Ersetzte Methode ist in $1 definiert)
+parser_e_no_category_override=03278_E_Kategorien berschreiben Methoden nicht, sondern ersetzen sie. "reintroduce" benutzen
+parser_e_must_use_reintroduce_objc=03279_E_Ersetzte Methoden k”nnen in Objective-C nur wieder eingefhrt werden, fge "reintroduce" hinzu (Ersetzte Methode ist in $1 definiert)
+parser_h_should_use_reintroduce_objc=03280_H_Ersetzte Methoden k”nnen in Objective-C nur wieder eingefhrt werden, fge "reintroduce" hinzu (Ersetzte Methode ist in $1 definiert)
% A category replaces an existing method in an Objective-C class, rather than that it overrides it.
% Calling an inherited method from an category method will call that method in
% the extended class' parent, not in the extended class itself. The
@@ -1290,7 +1290,7 @@ parser_h_should_use_reintroduce_objc=03280_H_Ersetzte Methoden k”nnen in Objecti
% in Object Pascal, hidden methods are still reachable via inherited).
% The type in which the inherited method is defined is explicitly mentioned, because this may either
% be an objcclass or an objccategory.
-parser_e_implements_getter_not_default_cc=03281_E_Getter fr das Interface implements mssen die voreingestellte calling convention des Ziels benutzen
+parser_e_implements_getter_not_default_cc=03281_E_Getter fr das Interface implements mssen die voreingestellte calling convention des Ziels benutzen
% Interface getters are called via a helper in the run time library, and hence
% have to use the default calling convention for the target (\var{register} on
% i386 and x86\_64, \var{stdcall} on other architectures).
@@ -1303,7 +1303,7 @@ parser_e_operator_not_overloaded_2=03283_E_šberladenener Operator nicht vorhande
parser_e_operator_not_overloaded_3=03284_E_šberladenener Operator nicht vorhanden: "$1" $2 "$3"
% You are trying to use an overloaded operator when it is not overloaded for
% this type.
-parser_e_more_array_elements_expected=03285_E_Erwarte ein weiteres Element fr Array $1
+parser_e_more_array_elements_expected=03285_E_Erwarte ein weiteres Element fr Array $1
% When declaring a typed constant array, you provided to few elements to initialize the array
parser_e_string_const_too_long=03286_E_Stringkonstante zu lang, so lange ansistrings ausgeschaltet sind
% Only when a piece of code is compiled with ansistrings enabled (\var{\{\$H+\}}), string constants
@@ -1351,7 +1351,7 @@ parser_f_no_generic_inside_generic=03297_F_Die Deklaration einer generischen Kla
% (guarded by internal error 200511173 in tscannerfile.startrecordtokens).
% Since generics are implemented by recording tokens, it is not possible to
% have declaration of generic class inside another generic class.
-parser_e_forward_protocol_declaration_must_be_resolved=03298_E_Vorw„rts-Deklarationen des ObjC-Protokolls "$1" mssen aufgel”st sein, bevor eine ObjC-Klasse ihr folgen kann
+parser_e_forward_protocol_declaration_must_be_resolved=03298_E_Vorw„rts-Deklarationen des ObjC-Protokolls "$1" mssen aufgel”st sein, bevor eine ObjC-Klasse ihr folgen kann
% An objcprotocol must be fully defined before classes can conform to it.
% This error occurs in the following situation:
% \begin{verbatim}
@@ -1365,12 +1365,12 @@ parser_e_no_record_published=03299_E_Record -Typen k”nnen keine ”ffentlichen Abs
% Published sections can be used only inside classes.
parser_e_no_destructor_in_records=03300_E_Destruktoren sind in Records nicht erlaubt
% Destructor declarations aren't allowed in records.
-parser_e_class_methods_only_static_in_records=03301_E_Klassenmethoden mssen in Records statisch sein
+parser_e_class_methods_only_static_in_records=03301_E_Klassenmethoden mssen in Records statisch sein
% Class methods declarations aren't allowed in records without static modifier.
% Records have no inheritance and therefore non static class methods have no sence for them.
parser_e_no_constructor_in_records=03302_E_Konstruktoren sind in Records nicht erlaubt
% Constructor declarations aren't allowed in records.
-parser_e_at_least_one_argument_must_be_of_type=03303_E_Entweder das Ergebnis oder mindestens ein Parameter mssen vom Typ "$1" sein
+parser_e_at_least_one_argument_must_be_of_type=03303_E_Entweder das Ergebnis oder mindestens ein Parameter mssen vom Typ "$1" sein
% It is required that either the result of the routine or at least one of its parameters be of the specified type.
% For example class operators either take an instance of the structured type in which they are defined, or they return one.
parser_e_cant_use_type_parameters_here=03304_E_Typ-Parameter k”nnen initialization/finalization erfordern - Sie k”nnen deshalb nicht in varianten Rekords verwendet werden
@@ -1447,7 +1447,7 @@ type_e_set_element_are_not_comp=04012_E_Set-Elemente sind nicht kompatibel
% You are trying to perform an operation on two sets, when the set element types
% are not the same. The base type of a set must be the same when taking the
% union.
-type_e_set_operation_unknown=04013_E_Operation fr Sets nicht implementiert
+type_e_set_operation_unknown=04013_E_Operation fr Sets nicht implementiert
% several binary operations are not defined for sets.
% These include: \var{div}, \var{mod}, \var{**}, \var{>=} and \var{<=}.
% The last two may be defined for sets in the future.
@@ -1458,7 +1458,7 @@ type_w_convert_real_2_comp=04014_W_Automatische Typumwandlung von Fliesskommatyp
type_h_use_div_for_int=04015_H_Verwenden sie DIV um ein Integer-Ergebnis zu erhalten
% When hints are on, then an integer division with the '/' operator will
% produce this message, because the result will then be of type real.
-type_e_strict_var_string_violation=04016_E_Stringtypen mssen im "$V+"-Modus exakt bereinstimmen
+type_e_strict_var_string_violation=04016_E_Stringtypen mssen im "$V+"-Modus exakt bereinstimmen
% When compiling in \var{\{\$V+\}} mode, the string you pass as a parameter
% should be of the exact same type as the declared parameter of the procedure.
type_e_succ_and_pred_enums_with_assign_not_possible=04017_E_Succ oder Pred kann nicht auf Aufz„hlungen mit Zuweisungen angewendet werden
@@ -1480,7 +1480,7 @@ type_e_no_read_write_for_untyped_file=04020_E_Kann Read und Write nicht bei unty
type_e_typeconflict_in_set=04021_E_Typkonflikt zwischen den Elementen des Sets
% There is at least one set element which is of the wrong type, i.e. not of
% the set type.
-type_w_maybe_wrong_hi_lo=04022_W_lo/hi(dword/qword) gibt oberes/unteres Word/DWord zurck
+type_w_maybe_wrong_hi_lo=04022_W_lo/hi(dword/qword) gibt oberes/unteres Word/DWord zurck
% \fpc supports an overloaded version of \var{lo/hi} for \var{longint/dword/int64/qword}
% which returns the lower/upper word/dword of the argument. \tp always uses
% a 16 bit \var{lo/hi} which always returns bits 0..7 for \var{lo} and the
@@ -1491,12 +1491,12 @@ type_e_integer_or_real_expr_expected=04023_E_Integer- oder Real-Ausdruck erwarte
type_e_wrong_type_in_array_constructor=04024_E_Falscher Typ "$1" im Array-Konstruktor
% You are trying to use a type in an array constructor which is not
% allowed.
-type_e_wrong_parameter_type=04025_E_Inkompatible Typen fr Argument Nr. #$1: habe $2 erhalten, aber $3 erwartet
+type_e_wrong_parameter_type=04025_E_Inkompatible Typen fr Argument Nr. #$1: habe $2 erhalten, aber $3 erwartet
% You are trying to pass an invalid type for the specified parameter.
type_e_no_method_and_procedure_not_compatible=04026_E_Methode (Variable) und Prozedur (Variable) sind nicht kompatibel
% You can't assign a method to a procedure variable or a procedure to a
% method pointer.
-type_e_wrong_math_argument=04027_E_Unzul„ssige Konstante an interne Algebrafunktion bergeben
+type_e_wrong_math_argument=04027_E_Unzul„ssige Konstante an interne Algebrafunktion bergeben
% The constant argument passed to a \var{ln} or \var{sqrt} function is out of
% the definition range of these functions.
type_e_no_addr_of_constant=04028_E_Von Konstanten kann keine Adresse bestimmt werden
@@ -1532,14 +1532,14 @@ type_e_interface_type_expected=04034_E_Interface Typ erwartet, aber "$1" erhalte
% Type
% TMyStream = Class(TStream,Integer)
% \end{verbatim}
-type_h_mixed_signed_unsigned=04035_H_Mischen von signed Ausdrcken und Longwords ergibt ein 64bit Ergebnis
+type_h_mixed_signed_unsigned=04035_H_Mischen von signed Ausdrcken und Longwords ergibt ein 64bit Ergebnis
% If you divide (or calculate the modulus of) a signed expression by a longword (or vice versa),
% or if you have overflow and/or range checking turned on and use an arithmetic
% expression (+, -, *, div, mod) in which both signed numbers and longwords appear,
% then everything has to be evaluated in 64-bit arithmetic which is slower than normal
% 32-bit arithmetic. You can avoid this by typecasting one operand so it
% matches the result type of the other one.
-type_w_mixed_signed_unsigned2=04036_W_Mischen von signed Ausdrcken und kardinalen Typen hier kann einen Bereichsprfungsfehler verursachen
+type_w_mixed_signed_unsigned2=04036_W_Mischen von signed Ausdrcken und kardinalen Typen hier kann einen Bereichsprfungsfehler verursachen
% If you use a binary operator (and, or, xor) and one of
% the operands is a longword while the other one is a signed expression, then,
% if range checking is turned on, you may get a range check error because in
@@ -1588,10 +1588,10 @@ type_h_in_range_check=04047_H_Der linke Operand des IN Operators sollte byte Gr”
% currently only supports a left operand which fits within a byte. In the case of
% enumerations, the size of an element of an enumeration can be controlled with
% the \var{\{\$PACKENUM\}} or \var{\{\$Zn\}} switches.
-type_w_smaller_possible_range_check=04048_W_Unpassende Typgr”ssen, Gefahr des Datenverlusts oder Bereichsprfungsfehlers
+type_w_smaller_possible_range_check=04048_W_Unpassende Typgr”ssen, Gefahr des Datenverlusts oder Bereichsprfungsfehlers
% There is an assignment to a smaller type than the source type. This means that
% this may cause a range-check error, or may lead to possible loss of data.
-type_h_smaller_possible_range_check=04049_H_Unpassende Typgr”ssen, Gefahr des Datenverlusts oder Bereichsprfungsfehlers
+type_h_smaller_possible_range_check=04049_H_Unpassende Typgr”ssen, Gefahr des Datenverlusts oder Bereichsprfungsfehlers
% There is an assignment to a smaller type than the source type. This means that
% this may cause a range-check error, or may lead to possible loss of data.
type_e_cant_take_address_of_abstract_method=04050_E_Die Adresse einer abstrakten Methode kann nicht verwendet werden
@@ -1601,7 +1601,7 @@ type_e_assignment_not_allowed=04051_E_Zuweisungen auf formale Parameter und offe
% parameter, or to an open array.
type_e_constant_expr_expected=04052_E_Konstanter Ausdruck erwartet
% The compiler expects an constant expression, but gets a variable expression.
-type_e_operator_not_supported_for_types=04053_E_Operation "$1" wird fr die Typen "$2" und "$3" nicht untersttzt
+type_e_operator_not_supported_for_types=04053_E_Operation "$1" wird fr die Typen "$2" und "$3" nicht untersttzt
% The operation is not allowed for the supplied types.
type_e_illegal_type_conversion=04054_E_Illegale Typ-Konversion: "$1" nach "$2"
% When doing a type-cast, you must take care that the sizes of the variable and
@@ -1613,7 +1613,7 @@ type_w_pointer_to_longint_conv_not_portable=04056_W_Konversion zwischen ordinale
% If you typecast a pointer to an ordinal type of a different size (or vice-versa), this can
% cause problems. This is a warning to help in finding the 32-bit specific code where cardinal/longint is used
% to typecast pointers to ordinals. A solution is to use the ptrint/ptruint types instead.
-type_e_cant_choose_overload_function=04057_E_Kann nicht bestimmen, welche der berladenen Funktionen aufgerufen werden soll
+type_e_cant_choose_overload_function=04057_E_Kann nicht bestimmen, welche der berladenen Funktionen aufgerufen werden soll
% You're calling overloaded functions with a parameter that doesn't correspond
% to any of the declared function parameter lists. e.g. when you have declared
% a function with parameters \var{word} and \var{longint}, and then you call
@@ -1621,23 +1621,23 @@ type_e_cant_choose_overload_function=04057_E_Kann nicht bestimmen, welche der b
type_e_illegal_count_var=04058_E_Loop-Variable muss einen ordinalen Typ haben
% The type of a \var{for} loop variable must be an ordinal type.
% Loop variables cannot be reals or strings.
-type_w_double_c_varargs=04059_W_Der konstante Wert vom Typ real wird fr ein C Variablen-Argument zu double konvertiert. Erg„nze eine explizite Typ-Konversion (typecast), um das zu verhindern
+type_w_double_c_varargs=04059_W_Der konstante Wert vom Typ real wird fr ein C Variablen-Argument zu double konvertiert. Erg„nze eine explizite Typ-Konversion (typecast), um das zu verhindern
% In C, constant real values are double by default. For this reason, if you
% pass a constant real value to a variable argument part of a C function, FPC
% by default converts this constant to double as well. If you want to prevent
% this from happening, add an explicit typecast around the constant.
type_e_class_or_cominterface_type_expected=04060_E_Class oder COM interface Typ erwartet, statt dessen "$1" erhalten
% Some operators, such as the AS operator, are only applicable to classes or COM interfaces.
-type_e_no_const_packed_array=04061_E_Konstante packed Arrays werden noch nicht untersttzt
+type_e_no_const_packed_array=04061_E_Konstante packed Arrays werden noch nicht untersttzt
% You cannot declare a (bit)packed array as a typed constant.
-type_e_got_expected_packed_array=04062_E_Inkompatibler Typ fr Argument $1: Erhielt "$2" erwartete "(Bit)Packed Array"
+type_e_got_expected_packed_array=04062_E_Inkompatibler Typ fr Argument $1: Erhielt "$2" erwartete "(Bit)Packed Array"
% The compiler expects a (bit)packed array as the specified parameter.
-type_e_got_expected_unpacked_array=04063_E_Inkompatibler Typ fr Argument $1: Erhielt "$2" erwartete "(not packed) Array"
+type_e_got_expected_unpacked_array=04063_E_Inkompatibler Typ fr Argument $1: Erhielt "$2" erwartete "(not packed) Array"
% The compiler expects a regular (i.e., not packed) array as the specified parameter.
type_e_no_packed_inittable=04064_E_Elemente von packed Arrays k”nnen nicht von einem Typ sein, der initialisiert werden muss
% Support for packed arrays of types that need initialization
% (such as ansistrings, or records which contain ansistrings) is not yet implemented.
-type_e_no_const_packed_record=04065_E_Konstante packed Records und Objekte werden noch nicht untersttzt
+type_e_no_const_packed_record=04065_E_Konstante packed Records und Objekte werden noch nicht untersttzt
% You cannot declare a (bit)packed array as a typed constant at this time.
type_w_untyped_arithmetic_unportable=04066_W_Arithmetik "$1" mit typenlosem Pointer ist nicht portierbar nach {$T+}, schlage typecast vor
% Addition/subtraction from an untyped pointer may work differently in \var{\{\$T+\}}.
@@ -1658,16 +1658,16 @@ type_h_convert_sub_operands_to_prevent_overflow=04080_H_Konvertierung des Operan
type_h_convert_mul_operands_to_prevent_overflow=04081_H_Konvertierung des Operanden "$1" vor der Multiplikation k”nnte šberlauf Fehler verhindern
% Multiplying two types can cause overflow errors. Since you are converting the result to a larger type, you
% could prevent such errors by converting the operands to this type before doing the multiplication.
-type_w_pointer_to_signed=04082_W_Die Konvertierung von Pointern in einen Integertyp mit Vorzeichen kann zu falschen Ergebnissen bei Vergleichen und zu Bereichsberschreitungen fhren; verwenden sie statt dessen besser einen Typ ohne Vorzeichen
+type_w_pointer_to_signed=04082_W_Die Konvertierung von Pointern in einen Integertyp mit Vorzeichen kann zu falschen Ergebnissen bei Vergleichen und zu Bereichsberschreitungen fhren; verwenden sie statt dessen besser einen Typ ohne Vorzeichen
% The virtual address space on 32-bit machines runs from \$00000000 to \$ffffffff.
% Many operating systems allow you to allocate memory above \$80000000.
% For example both \windows and \linux allow pointers in the range \$0000000 to \$bfffffff.
% If you convert pointers to signed types, this can cause overflow and range check errors,
% but also \$80000000 < \$7fffffff. This can cause random errors in code like "if p>q".
-type_interface_has_no_guid=04083_E_Interface Typ $1 hat keine gltige GUID
+type_interface_has_no_guid=04083_E_Interface Typ $1 hat keine gltige GUID
% When applying the as-operator to an interface or class, the desired interface (i.e. the right operand of the
% as-operator) must have a valid GUID.
-type_e_invalid_objc_selector_name=04084_E_Ungltiger Objective-C-Selector-Name "$1"
+type_e_invalid_objc_selector_name=04084_E_Ungltiger Objective-C-Selector-Name "$1"
% An Objective-C selector cannot be empty, must be a valid identifier or a single colon,
% and if it contains at least one colon it must also end in one.
type_e_expected_objc_method_but_got=04085_E_Erwartete eine Objective-C-Methode, erhielt aber $1
@@ -1677,7 +1677,7 @@ type_e_expected_objc_method=04086_E_Erwartete eine Objective-C-Methode, oder den
% A selector can only be created for Objective-C methods, either by specifying
% the name using a string constant, or by using an Objective-C method identifier
% that is visible in the current scope.
-type_e_no_type_info=04087_E_Fr diesen Typ steht keine Typ-Information zu Verfgung
+type_e_no_type_info=04087_E_Fr diesen Typ steht keine Typ-Information zu Verfgung
% Type information is not generated for some types, such as enumerations with gaps
% in their value range (this includes enumerations whose lower bound is different
% from zero).
@@ -1689,7 +1689,7 @@ type_w_zero_to_nil=04090_W_Konvertiere 0 zu NIL
% Use NIL rather than 0 when initialising a pointer.
type_e_protocol_type_expected=04091_E_Objective-C Protokolltyp erwartet, erhielt aber "$1"
% The compiler expected a protocol type name, but found something else.
-type_e_objc_type_unsupported=04092_E_Der Typ "$1" wird nicht fr die Verwendung mit der Objective-C Laufzeitumgebung untersttzt.
+type_e_objc_type_unsupported=04092_E_Der Typ "$1" wird nicht fr die Verwendung mit der Objective-C Laufzeitumgebung untersttzt.
% Objective-C makes extensive use of run time type information (RTTI). This format
% is defined by the maintainers of the run time and can therefore not be adapted
% to all possible Object Pascal types. In particular, types that depend on
@@ -1727,7 +1727,7 @@ type_w_procvar_univ_conflicting_para=04095_W_Erzwungener univ Parameter Typ in e
% when \var{test} returns.
type_e_generics_cannot_reference_itself=04096_E_Typ-Parameter bei der Spezialisation von Generics k”nnen den aktuel spezialisierten Typ nicht referenzieren
% Recursive specializations of generics like \var{Type MyType = specialize MyGeneric<MyType>;} are not possible.
-type_e_type_parameters_are_not_allowed_here=04097_E_Typ-Parameter sind fr nicht-generische Klassen/Record/Objekte Prozeduren und Funktionen nicht erlaubt
+type_e_type_parameters_are_not_allowed_here=04097_E_Typ-Parameter sind fr nicht-generische Klassen/Record/Objekte Prozeduren und Funktionen nicht erlaubt
% Type parameters are only allowed for methods of generic classes, records or objects
type_e_generic_declaration_does_not_match=04098_E_Die generische Deklaration von "$1" unterscheidet sich vom der vorherigen Deklaration
% Generic declaration does not match the previous declaration
@@ -1784,10 +1784,10 @@ sym_w_label_not_defined=05014_W_Label "$1" nicht definiert
% A label was declared, but not defined.
sym_e_label_used_and_not_defined=05015_E_Label "$1" benutzt aber nicht definiert
% A label was declared and used, but not defined.
-sym_e_ill_label_decl=05016_E_Ungltige Label-Deklaration
+sym_e_ill_label_decl=05016_E_Ungltige Label-Deklaration
% This error should never happen; it occurs if a label is defined outside a
% procedure or function.
-sym_e_goto_and_label_not_supported=05017_E_GOTO und LABEL werden nicht untersttzt (verwenden Sie den Schalter -Sg)
+sym_e_goto_and_label_not_supported=05017_E_GOTO und LABEL werden nicht untersttzt (verwenden Sie den Schalter -Sg)
% You must use the -Sg switch to compile a program which has \var{label}s
% and \var{goto} statements. By default, \var{label} and \var{goto} aren't
% supported.
@@ -1797,7 +1797,7 @@ sym_e_id_is_no_label_id=05019_E_Bezeichner ist kein Label
% The identifier specified after the \var{goto} isn't of type label.
sym_e_label_already_defined=05020_E_Label ist bereits definiert
% You are defining a label twice. You can define a label only once.
-sym_e_ill_type_decl_set=05021_E_Ungltige Typdeklaration von Set-Elementen
+sym_e_ill_type_decl_set=05021_E_Ungltige Typdeklaration von Set-Elementen
% The declaration of a set contains an invalid type definition.
sym_e_class_forward_not_resolved=05022_E_Forward-Klassendefinition nicht gefunden: $1
% You declared a class, but you didn't implement it.
@@ -1918,7 +1918,7 @@ sym_w_deprecated_symbol_with_msg=05066_W_Symbol "$1" ist veraltet: "$2"
% declared as \var{deprecated} is used. Deprecated symbols may no longer
% be available in newer versions of the unit / library. Use of this symbol
% should be avoided as much as possible.
-sym_e_no_enumerator=05067_E_Kann keinen Z„hler fr den Typ "$1" finden
+sym_e_no_enumerator=05067_E_Kann keinen Z„hler fr den Typ "$1" finden
% This means that compiler cannot find an apropriate enumerator to use in the for-in loop.
% To create an enumerator you need to defind an operator enumerator or add a public or published
% GetEnumerator method to the class or object definition.
@@ -1928,7 +1928,7 @@ sym_e_no_enumerator_move=05068_E_Kann keine Methode "MoveNext" in der Aufz„hlung
sym_e_no_enumerator_current=05069_E_Kann keine Eigenschaft "Current" in der Aufz„hlung "$1" finden
% This means that compiler cannot find a public Current property in the enumerator class or object
% definition.
-sym_e_objc_para_mismatch=05070_E_Die Anzahl der deklarierten Parameter und die Anzahl der Doppelpunkte in der Nachrichtenzeichenkette stimmen nicht berein
+sym_e_objc_para_mismatch=05070_E_Die Anzahl der deklarierten Parameter und die Anzahl der Doppelpunkte in der Nachrichtenzeichenkette stimmen nicht berein
% In Objective-C, a message name automatically contains as many colons as parameters.
% In order to prevent mistakes when specifying the message name in FPC, the compiler
% checks whether this is also the case here. Note that in case of messages taking a
@@ -1977,7 +1977,7 @@ sym_e_objc_formal_class_not_resolved=05080_E_Die vollst„ndige Definition der for
% of the class to be in scope.
sym_e_interprocgoto_into_init_final_code_not_allowed=05081_E_Gotos in die 'initialization'- oder 'finalization'-Bl”cke einer Unit sind nicht erlaubt
% Gotos into initialization or finalization blockse of units are not allowed.
-sym_e_external_class_name_mismatch1=05082=E_Ungltiger externer Name "$1" fr die formale Klasse "$2"
+sym_e_external_class_name_mismatch1=05082=E_Ungltiger externer Name "$1" fr die formale Klasse "$2"
sym_e_external_class_name_mismatch2=05083=E_Hierhin muss die vollst„ndige Klassendefinition mit externem Namen "$1"
% When a class is declared using a formal external definition, the actual external
% definition (if any) must specify the same external name as the formal definition
@@ -1995,10 +1995,10 @@ sym_e_external_class_name_mismatch2=05083=E_Hierhin muss die vollst„ndige Klasse
% This section lists all messages that can be displayed if the code
% generator encounters an error condition.
% \begin{description}
-cg_e_parasize_too_big=06009_E_Gr”sse der Parameterliste bersteigt 65535 Bytes
+cg_e_parasize_too_big=06009_E_Gr”sse der Parameterliste bersteigt 65535 Bytes
% The I386 processor limits the parameter list to 65535 bytes. (The \var{RET}
% instruction causes this).
-cg_e_file_must_call_by_reference=06012_E_Dateitypen mssen VAR Parameter sein
+cg_e_file_must_call_by_reference=06012_E_Dateitypen mssen VAR Parameter sein
% You cannot specify files as value parameters, i.e., they must always be
% declared \var{var} parameters.
cg_e_cant_use_far_pointer_there=06013_E_Die Verwendung eines FAR-Zeigers ist in dieser Art nicht erlaubt
@@ -2019,7 +2019,7 @@ cg_w_member_cd_call_from_method=06016_W_M”glicherweise unzul„ssiger Aufruf eines
% require parameters on entry.
cg_n_inefficient_code=06017_N_Uneffiziente Programmierung
% You construction seems dubious to the compiler.
-cg_w_unreachable_code=06018_W_Code wird niemals ausgefhrt
+cg_w_unreachable_code=06018_W_Code wird niemals ausgefhrt
% You specified a loop which will never be executed. Example:
% \begin{verbatim}
% while false do
@@ -2040,7 +2040,7 @@ cg_e_unable_inline_object_methods=06031_E_Objektmethoden k”nnen nicht Inline sei
% You cannot have inlined object methods.
cg_e_unable_inline_procvar=06032_E_Procvar-Aufrufe k”nnen nicht Inline sein
% A procedure with a procedural variable call cannot be inlined.
-cg_e_no_code_for_inline_stored=06033_E_Kein Code fr Inline-Prozedur gespeichert
+cg_e_no_code_for_inline_stored=06033_E_Kein Code fr Inline-Prozedur gespeichert
% The compiler couldn't store code for the inline procedure.
cg_e_can_access_element_zero=06035_E_Auf Element Null von Ansi/Wide- oder Longstring kann nicht zugegriffen werden, benutzen Sie stattdessen (Set)Length
% You should use \var{setlength} to set the length of an ansi/wide/longstring
@@ -2087,25 +2087,25 @@ cg_e_control_flow_outside_finally=06040_E_Kontrollfluss-Anweisungen sind in eine
% If the procedure \var{p} raises an exception the finally block is
% executed. If the execution reaches the exit, it's unclear what to do:
% exit the procedure or search for another exception handler.
-cg_w_parasize_too_big=06041_W_Gr”sse der Parameter berschreitet die Grenze fr bestimmte CPUs
+cg_w_parasize_too_big=06041_W_Gr”sse der Parameter berschreitet die Grenze fr bestimmte CPUs
% This indicates that you are declaring more than 64K of parameters, which
% might not be supported on other processor targets.
-cg_w_localsize_too_big=06042_W_Gr”sse der lokalen Variablen berschreitet die Grenze fr bestimmte CPUs
+cg_w_localsize_too_big=06042_W_Gr”sse der lokalen Variablen berschreitet die Grenze fr bestimmte CPUs
% This indicates that you are declaring more than 32K of local variables, which
% might not be supported on other processor targets.
-cg_e_localsize_too_big=06043_E_Gr”sse der lokalen Variablen berschreitet die untersttzte Grenze
+cg_e_localsize_too_big=06043_E_Gr”sse der lokalen Variablen berschreitet die untersttzte Grenze
% This indicates that you are declaring more than 32K of local variables, which
% is not supported by this processor.
cg_e_break_not_allowed=06044_E_BREAK nicht zul„ssig
% You're trying to use \var{break} outside a loop construction.
cg_e_continue_not_allowed=06045_E_CONTINUE nicht zul„ssig
% You're trying to use \var{continue} outside a loop construction.
-cg_f_unknown_compilerproc=06046_F_Unbekannte Compiler-Prozedur "$1". šberprfe, ob die korrekte Laufzeit-Bibliothek verwendet wird
+cg_f_unknown_compilerproc=06046_F_Unbekannte Compiler-Prozedur "$1". šberprfe, ob die korrekte Laufzeit-Bibliothek verwendet wird
% The compiler expects that the runtime library contains certain subroutines. If you see this error
% and you didn't change the runtime library code, it's very likely that the runtime library
% you're using doesn't match the compiler in use. If you changed the runtime library this error means
% that you removed a subroutine which the compiler needs for internal use.
-cg_f_unknown_system_type=06047_F_Systemtyp "$1" konnte nicht gefunden werden. šberprfe, ob die korrekte Laufzeit-Bibliothek verwendet wird
+cg_f_unknown_system_type=06047_F_Systemtyp "$1" konnte nicht gefunden werden. šberprfe, ob die korrekte Laufzeit-Bibliothek verwendet wird
% The compiler expects that the runtime library contains certain type definitions. If you see this error
% and you didn't change the runtime library code, it's very likely that the runtime library
% you're using doesn't match the compiler in use. If you changed the runtime library this error means
@@ -2116,7 +2116,7 @@ cg_h_inherited_ignored=06048_H_Geerbter Aufruf einer abstrakten Methode ignorier
cg_e_goto_label_not_found=06049_E_Goto Label "$1": Das Label ist nicht definiert oder wurde bei der Optimierung entfernt
% The label used in the goto definition is not defined or optimized away by the
% unreachable code elemination.
-cg_f_unknown_type_in_unit=06050_F_Kann den Typ "$1" nicht in der Unit "$2" finden. šberprfe, ob die korrekte Laufzeit-Bibliothek verwendet wird
+cg_f_unknown_type_in_unit=06050_F_Kann den Typ "$1" nicht in der Unit "$2" finden. šberprfe, ob die korrekte Laufzeit-Bibliothek verwendet wird
% The compiler expects that the runtime library contains certain type definitions. If you see this error
% and you didn't change the runtime library code, it's very likely that the runtime library
% you're using doesn't match the compiler in use. If you changed the runtime library this error means
@@ -2124,7 +2124,7 @@ cg_f_unknown_type_in_unit=06050_F_Kann den Typ "$1" nicht in der Unit "$2" finde
cg_e_interprocedural_goto_only_to_outer_scope_allowed=06051_E_Interprozedurale gotos sind nur in „uáere Subroutines erlaubt
% Gotos between subroutines are only allowed if the goto jumps from an inner to an outer subroutine or
% from a subroutine to the main program
-cg_e_labels_cannot_defined_outside_declaration_scope=06052_E_ Label mssen im selben Bereich definiert werden, in dem sie deklariert werden
+cg_e_labels_cannot_defined_outside_declaration_scope=06052_E_ Label mssen im selben Bereich definiert werden, in dem sie deklariert werden
% In ISO mode, labels must be defined in the same scope as they are declared.
cg_e_goto_across_procedures_with_exceptions_not_allowed=06053_E_Eine Prozedur, die explizite oder implizite Excpetion Frames enth„lt, darf nicht mit einem goto verlassen werden
% Non-local gotos might not be used to leave procedures using exceptions either implicitly or explicitly. Procedures
@@ -2168,11 +2168,11 @@ asmr_e_cant_have_multiple_relocatable_symbols=07010_E_Verwendung von mehreren ve
asmr_e_only_add_relocatable_symbol=07011_E_Verschiebbares Symbol kann nur addiert werden
% Relocatable symbols (variable/typed constant) can't be used with other
% operators. Only addition is allowed.
-asmr_e_invalid_constant_expression=07012_E_Ungltiger Konstantenausdruck
+asmr_e_invalid_constant_expression=07012_E_Ungltiger Konstantenausdruck
% There is an error in the constant expression.
asmr_e_relocatable_symbol_not_allowed=07013_E_Verschiebbares Symbol ist nicht zul„ssig
% You can't use a relocatable symbol (variable/typed constant) here.
-asmr_e_invalid_reference_syntax=07014_E_Ungltige Verweis-Syntax
+asmr_e_invalid_reference_syntax=07014_E_Ungltige Verweis-Syntax
% There is an error in the reference.
asmr_e_local_para_unreachable=07015_E_Sie k”nnen "$1" von diesem Code aus nicht erreichen
% You cannot read directly the value of a local variable or parameter
@@ -2180,7 +2180,7 @@ asmr_e_local_para_unreachable=07015_E_Sie k”nnen "$1" von diesem Code aus nicht
% local assembler code without parameter nor locals).
asmr_e_local_label_not_allowed_as_ref=07016_E_Lokale Symbole/Labels sind nicht als Referenz zul„ssig
% You can't use local symbols/labels as references
-asmr_e_wrong_base_index=07017_E_Ungltige Verwendung von Basis- und Index-Registern
+asmr_e_wrong_base_index=07017_E_Ungltige Verwendung von Basis- und Index-Registern
% There is an error with the base and index register, they are
% probably incorrect
asmr_w_possible_object_field_bug=07018_W_M”glicher Fehler bei Objektfeld-Behandlung
@@ -2190,30 +2190,30 @@ asmr_e_wrong_scale_factor=07019_E_Falscher Skalierungsfaktor angegeben
% The scale factor given is wrong, only 1,2,4 and 8 are allowed
asmr_e_multiple_index=07020_E_Mehrfache Verwendung fon Index-Registern
% You are trying to use more than one index register
-asmr_e_invalid_operand_type=07021_E_Ungltiger Operandentyp
+asmr_e_invalid_operand_type=07021_E_Ungltiger Operandentyp
% The operand type doesn't match with the opcode used
-asmr_e_invalid_string_as_opcode_operand=07022_E_Unglitge Zeichenkette als Opcode-Operand: $1
+asmr_e_invalid_string_as_opcode_operand=07022_E_Unglitge Zeichenkette als Opcode-Operand: $1
% The string specified as operand is not correct with this opcode
-asmr_w_CODE_and_DATA_not_supported=07023_W_@CODE und @DATA werden nicht untersttzt
+asmr_w_CODE_and_DATA_not_supported=07023_W_@CODE und @DATA werden nicht untersttzt
% @CODE and @DATA are unsupported and are ignored.
asmr_e_null_label_ref_not_allowed=07024_E_Null-Label-Bezug nicht m”glich
asmr_e_expr_zero_divide=07025_E_Division durch Null in Assembler-Ausdruck
% There is a division by zero in a constant expression
-asmr_e_expr_illegal=07026_E_Ungltiger Ausdruck
+asmr_e_expr_illegal=07026_E_Ungltiger Ausdruck
% There is an illegal expression in a constant expression
asmr_e_escape_seq_ignored=07027_E_Escape-Sequenz ignoriert: $1
% There is a C-styled string, but the escape sequence in the string
% is unknown, and is therefore ignored
-asmr_e_invalid_symbol_ref=07028_E_Ungltige Symbolverwendung
+asmr_e_invalid_symbol_ref=07028_E_Ungltige Symbolverwendung
asmr_w_fwait_emu_prob=07029_W_FWAIT kann Emulationsprobleme mit emu387 verursachen
-asmr_w_fadd_to_faddp=07030_W_$1 ohne Operand wurde in $1P bersetzt
-asmr_w_enter_not_supported_by_linux=07031_W_Der ENTER-Befehl wird vom Linux-Kernel nicht untersttzt
+asmr_w_fadd_to_faddp=07030_W_$1 ohne Operand wurde in $1P bersetzt
+asmr_w_enter_not_supported_by_linux=07031_W_Der ENTER-Befehl wird vom Linux-Kernel nicht untersttzt
% ENTER instruction can generate a stack page fault that is not
% caught correctly by the i386 Linux page handler.
-asmr_w_calling_overload_func=07032_W_Aufruf einer berladenen Funktion in Assembler
+asmr_w_calling_overload_func=07032_W_Aufruf einer berladenen Funktion in Assembler
% There is a call to an overloaded method in the assembler block,
% this might be the sign there is a problem
-asmr_e_unsupported_symbol_type=07033_E_Nicht untersttzter Symboltyp fr Operand
+asmr_e_unsupported_symbol_type=07033_E_Nicht untersttzter Symboltyp fr Operand
asmr_e_constant_out_of_bounds=07034_E_Wert der Konstante ausserhalb des zul„ssigen Bereichs
asmr_e_error_converting_decimal=07035_E_Fehler beim Umwandeln in Dezimal $1
% A constant decimal value does not have the correct syntax
@@ -2223,18 +2223,18 @@ asmr_e_error_converting_binary=07037_E_Fehler beim Umwandeln in Bin„r $1
% A constant binary value does not have the correct syntax
asmr_e_error_converting_hexadecimal=07038_E_Fehler beim Umwandeln in Hexadezimal $1
% A constant hexadecimal value does not have the correct syntax
-asmr_h_direct_global_to_mangled=07039_H_$1 bersetzt nach $2
-asmr_w_direct_global_is_overloaded_func=07040_W_$1 ist einer berladenen Funktion zugeordnet
+asmr_h_direct_global_to_mangled=07039_H_$1 bersetzt nach $2
+asmr_w_direct_global_is_overloaded_func=07040_W_$1 ist einer berladenen Funktion zugeordnet
asmr_e_cannot_use_SELF_outside_a_method=07041_E_Kann SELF nicht ausserhalb einer Methode verwenden
% There is a reference to the \var{self} symbol while it is not
% allowed. \var{self} can only be referenced inside methods
asmr_e_cannot_use_OLDEBP_outside_nested_procedure=07042_E_Kann OLDEBP ausserhalb einer verschachtelten Prozedur nicht verwenden
% There is a reference to the \var{oldebp} symbol while it is not
% allowed. \var{oldebp} can only be referenced inside nested routines
-asmr_e_void_function=07043_W_Prozeduren k”nnen keinen Wert im Assembler-Code zurckliefern
+asmr_e_void_function=07043_W_Prozeduren k”nnen keinen Wert im Assembler-Code zurckliefern
% Trying to return a value while in a procedure. A procedure
% does not have any return value
-asmr_e_SEG_not_supported=07044_E_SEG nicht untersttzt
+asmr_e_SEG_not_supported=07044_E_SEG nicht untersttzt
asmr_e_size_suffix_and_dest_dont_match=07045_E_Gr”ssensuffix und Ziel- oder Quellgr”sse passen nicht zusammen
% The register size and the opcode size suffix don't match. This is
% probably an error in the assembler statement
@@ -2243,19 +2243,19 @@ asmr_w_size_suffix_and_dest_dont_match=07046_W_Gr”ssensuffix und Ziel- oder Quel
% probably an error in the assembler statement
asmr_e_syntax_error=07047_E_Assembler Syntaxfehler
% There is an assembler syntax error
-asmr_e_invalid_opcode_and_operand=07048_E_Ungltige Kombination von Opcode und Operanden
+asmr_e_invalid_opcode_and_operand=07048_E_Ungltige Kombination von Opcode und Operanden
% The opcode cannot be used with this type of operand
asmr_e_syn_operand=07049_E_Assembler Syntaxfehler im Operanden
asmr_e_syn_constant=07050_E_Assembler Syntaxfehler in Konstanten
-asmr_e_invalid_string_expression=07051_E_Ungltiger Stringausdruck
-asmr_w_const32bit_for_address=07052_W_Konstante mit Symbol $1 fr Adresse erzeugt, die kein Pointer ist
+asmr_e_invalid_string_expression=07051_E_Ungltiger Stringausdruck
+asmr_w_const32bit_for_address=07052_W_Konstante mit Symbol $1 fr Adresse erzeugt, die kein Pointer ist
% A constant expression represents an address which does not fit
% into a pointer. The address is probably incorrect
asmr_e_unknown_opcode=07053_E_Unbekannter Opcode $1
% This opcode is not known
-asmr_e_invalid_or_missing_opcode=07054_E_Ungltiger oder fehlender Opcode
-asmr_e_invalid_prefix_and_opcode=07055_E_Ungltige Kombination von Prefix und Opcode: $1
-asmr_e_invalid_override_and_opcode=07056_E_Ungltige Kombination von Override und Opcode: $1
+asmr_e_invalid_or_missing_opcode=07054_E_Ungltiger oder fehlender Opcode
+asmr_e_invalid_prefix_and_opcode=07055_E_Ungltige Kombination von Prefix und Opcode: $1
+asmr_e_invalid_override_and_opcode=07056_E_Ungltige Kombination von Override und Opcode: $1
asmr_e_too_many_operands=07057_E_Zu viele Operanden in der Zeile
% There are too many operands for this opcode. Check your
% assembler syntax
@@ -2264,22 +2264,22 @@ asmr_w_far_ignored=07059_W_FAR ignoriert
asmr_e_dup_local_sym=07060_E_Doppelters lokales Symbol $1
asmr_e_unknown_local_sym=07061_E_Undefiniertes lokales Symbol $1
asmr_e_unknown_label_identifier=07062_E_Unbekannter Label-Bezeichner $1
-asmr_e_invalid_register=07063_E_Ungltiger Registername
+asmr_e_invalid_register=07063_E_Ungltiger Registername
% There is an unknown register name used as operand.
-asmr_e_invalid_fpu_register=07064_E_Ungltiger Name fr Fliesskommaregister
+asmr_e_invalid_fpu_register=07064_E_Ungltiger Name fr Fliesskommaregister
% There is an unknown register name used as operand.
-asmr_w_modulo_not_supported=07066_W_Modulo nicht untersttzt
-asmr_e_invalid_float_const=07067_E_Ungltige Fliesskommakonstante $1
+asmr_w_modulo_not_supported=07066_W_Modulo nicht untersttzt
+asmr_e_invalid_float_const=07067_E_Ungltige Fliesskommakonstante $1
% The floating point constant declared in an assembler block is
% invalid.
-asmr_e_invalid_float_expr=07068_E_Ungltiger Fliesskommaausdruck
+asmr_e_invalid_float_expr=07068_E_Ungltiger Fliesskommaausdruck
% The floating point expression declared in an assembler block is
% invalid.
asmr_e_wrong_sym_type=07069_E_Falscher Symboltyp
asmr_e_cannot_index_relative_var=07070_E_Kann lokale Variable oder Parameter nicht mit Register indizieren
% Trying to index using a base register a symbol which is already relative
% to a register. This is not possible, and will probably lead to crashes.
-asmr_e_invalid_seg_override=07071_E_Ungltiger Segmentoverride-Ausdruck
+asmr_e_invalid_seg_override=07071_E_Ungltiger Segmentoverride-Ausdruck
asmr_w_id_supposed_external=07072_W_Bezeichner $1 ist vermutlich External
% There is a reference to an undefined symbol. This will not result
% in an error, since the symbol might be external, but may cause
@@ -2289,7 +2289,7 @@ asmr_e_string_not_allowed_as_const=07073_E_Strings sind als Konstanten unzul„ssi
asmr_e_no_var_type_specified=07074_Typ der Variablen nicht angegeben
% The syntax expects a type idenfitifer after the dot, but
% none was found.
-asmr_w_assembler_code_not_returned_to_text=07075_E_Assemblercode kehrt nicht zum Text zurck
+asmr_w_assembler_code_not_returned_to_text=07075_E_Assemblercode kehrt nicht zum Text zurck
% There was a directive in the assembler block to change sections,
% but there is a missing return to the text section at the end
% of the assembler block. This might cause errors during link time.
@@ -2299,13 +2299,13 @@ asmr_w_using_defined_as_local=07077_E_Verwendung eines definierten Namens als lo
asmr_e_dollar_without_identifier=07078_E_Dollarzeichen wird ohne Bezeichner verwendet
% A constant expression has an identifier which does not start with
% the $ symbol.
-asmr_w_32bit_const_for_address=07079_W_32-Bit-Konstante fr Adresse erzeugt
+asmr_w_32bit_const_for_address=07079_W_32-Bit-Konstante fr Adresse erzeugt
% A constant was used as an address. This is probably an error,
% since using absolute addresses will probably not work.
asmr_n_align_is_target_specific=07080_N_.align ist abh„ngig von Zielplattform, verwende .balign oder .p2align
% Using the .align directive is platform specific, and its meaning will vary
% from one platform to another.
-asmr_e_cannot_access_field_directly_for_parameters=07081_E_Kann fr Parameter nicht direkt auf Felder zugreifen
+asmr_e_cannot_access_field_directly_for_parameters=07081_E_Kann fr Parameter nicht direkt auf Felder zugreifen
% You should load the parameter first into a register and then access the
% fields using that register.
asmr_e_cannot_access_object_field_directly=07082_E_Kann auf Felder von Objekten/Klassen nicht direkt zugreifen
@@ -2319,23 +2319,23 @@ asmr_e_unable_to_determine_reference_size=07083_E_Gr”sse nicht spezifiziert und
asmr_e_cannot_use_RESULT_here=07084_E_RESULT kann in dieser Funktion nicht verwendet werden
% Some functions which return complex types cannot use the \var{result}
% keyword.
-asmr_w_adding_explicit_args_fXX=07086_W_"$1" ohne Operand bersetzt in "$1 %st,%st(1)"
-asmr_w_adding_explicit_first_arg_fXX=07087_W_"$1 %st(n)" bersetzt in "$1 %st,%st(n)"
-asmr_w_adding_explicit_second_arg_fXX=07088_W_"$1 %st(n)" bersetzt in "$1 %st(n),%st"
+asmr_w_adding_explicit_args_fXX=07086_W_"$1" ohne Operand bersetzt in "$1 %st,%st(1)"
+asmr_w_adding_explicit_first_arg_fXX=07087_W_"$1 %st(n)" bersetzt in "$1 %st,%st(n)"
+asmr_w_adding_explicit_second_arg_fXX=07088_W_"$1 %st(n)" bersetzt in "$1 %st(n),%st"
asmr_e_invalid_char_smaller=07089_E_Das Zeichen < ist hier nicht erlaubt
% The shift operator requires the << characters. Only one
% of those characters was found.
asmr_e_invalid_char_greater=07090_E_Das Zeichen > ist hier nicht erlaubt
% The shift operator requires the >> characters. Only one
% of those characters was found.
-asmr_w_align_not_supported=07093_W_ALIGN wird nicht untersttzt
+asmr_w_align_not_supported=07093_W_ALIGN wird nicht untersttzt
asmr_e_no_inc_and_dec_together=07094_E_Inc und Dec k”nnen nicht gemeinsam vorkommen
% Trying to use an increment and a decrement within the same
% opcode on the 680x0. This is impossible.
-asmr_e_invalid_reg_list_in_movem=07095_E_Ungltige Registerliste fr movem
+asmr_e_invalid_reg_list_in_movem=07095_E_Ungltige Registerliste fr movem
% Trying to use the \var{movem} opcode with invalid registers
% to save or restore.
-asmr_e_invalid_reg_list_for_opcode=07096_E_Ungltige Registerliste fr diesen opcode
+asmr_e_invalid_reg_list_for_opcode=07096_E_Ungltige Registerliste fr diesen opcode
asmr_e_higher_cpu_mode_required=07097_E_H”herer cpu Modus notwendig ($1)
% Trying to use an instruction which is not supported in the current
% cpu mode. Use a higher cpu generation to be able to use this
@@ -2365,13 +2365,13 @@ asmr_w_unable_to_determine_reference_size_using_byte=07101_W_Gr”sse nicht angege
% the compiler is unable to determine what size (byte,word,dword,etc.) it
% should use for the reference. This warning is only used in Delphi mode where
% it falls back to use BYTE as default.
-asmr_w_no_direct_ebp_for_parameter=07102_W_Die Verwendung von +offset(%ebp) fr Parameter ist hier ungltig
+asmr_w_no_direct_ebp_for_parameter=07102_W_Die Verwendung von +offset(%ebp) fr Parameter ist hier ungltig
% Using direct 8(%ebp) reference for function/procedure parameters is invalid
% if parameters are in registers.
asmr_w_direct_ebp_for_parameter_regcall=07103_W_Die Verwendung von +offset(%ebp) ist nicht mit der regcall Konvention kompatibel
% Using direct 8(%ebp) reference for function/procedure parameters is invalid
% if parameters are in registers.
-asmr_w_direct_ebp_neg_offset=07104_W_Die Verwendung von -offset(%ebp) wird fr den Zugriff auf lokale Variablen nicht empfohlen
+asmr_w_direct_ebp_neg_offset=07104_W_Die Verwendung von -offset(%ebp) wird fr den Zugriff auf lokale Variablen nicht empfohlen
% Using -8(%ebp) to access a local variable is not recommended
asmr_w_direct_esp_neg_offset=07105_W_Verwendung von -offset(%esp); Zugriff kann einen Crash oder Datenverlust ausl”sen
% Using -8(%esp) to access a local stack is not recommended, as
@@ -2382,7 +2382,7 @@ asmr_e_need_pic_ref=07107_E_Erzeuge eigentlich PIC, aber die Referenz ist nicht
% The compiler has been configured to generate position-independent code
% (PIC), but there are position-dependent references in the current
% handwritten assembler instruction.
-asmr_e_mixing_regtypes=07108_E_Alle Register in einem Registerset mssen in T und Breite bereinstimmen
+asmr_e_mixing_regtypes=07108_E_Alle Register in einem Registerset mssen in T und Breite bereinstimmen
% Instructions on the ARM architecture that take a register set as argument require that all registers
% in this set are of the same kind (e.g., integer, vfp) and width (e.g., single precision, double precision).
asmr_e_empty_regset=07109_E_Ein Registerset kann nicht leer sein
@@ -2400,28 +2400,28 @@ asmr_w_useless_got_for_local=07110_W_@GOTPCREL ist nutzlos und bei lokalen Symbo
asmw_f_too_many_asm_files=08000_F_Zu viele Assembler-Dateien
% With smartlinking enabled, there are too many assembler
% files generated. Disable smartlinking.
-asmw_f_assembler_output_not_supported=08001_F_Gew„hlte Assemblerausgabe wird nicht untersttzt
-asmw_f_comp_not_supported=08002_F_Comp nicht untersttzt
-asmw_f_direct_not_supported=08003_F_Direct nicht untersttzt fr bin„res Schreiben
+asmw_f_assembler_output_not_supported=08001_F_Gew„hlte Assemblerausgabe wird nicht untersttzt
+asmw_f_comp_not_supported=08002_F_Comp nicht untersttzt
+asmw_f_direct_not_supported=08003_F_Direct nicht untersttzt fr bin„res Schreiben
% Direct assembler mode is not supported for binary writers.
asmw_e_alloc_data_only_in_bss=08004_E_Allozieren von Daten ist nur in "bss"-Abschnitten zul„ssig
asmw_f_no_binary_writer_selected=08005_F_Kein Bin„rschreiber ausgew„hlt
asmw_e_opcode_not_in_table=08006_E_Asm: Opcode $1 nicht in Tabelle enthalten
-asmw_e_invalid_opcode_and_operands=08007_E_Asm: $1 ungltige Kombination von Opcode und Operanden
-asmw_e_16bit_not_supported=08008_E_Asm: 16-Bit-Verweise werden nicht untersttzt
-asmw_e_invalid_effective_address=08009_E_Asm: Ungltige effektive Adresse
+asmw_e_invalid_opcode_and_operands=08007_E_Asm: $1 ungltige Kombination von Opcode und Operanden
+asmw_e_16bit_not_supported=08008_E_Asm: 16-Bit-Verweise werden nicht untersttzt
+asmw_e_invalid_effective_address=08009_E_Asm: Ungltige effektive Adresse
asmw_e_immediate_or_reference_expected=08010_E_Asm: Konstanter Ausdruck oder Referenz erwartet
-asmw_e_value_exceeds_bounds=08011_E_Asm: $1 Wert berschreitet Grenzen $2
+asmw_e_value_exceeds_bounds=08011_E_Asm: $1 Wert berschreitet Grenzen $2
asmw_e_short_jmp_out_of_range=08012_E_Asm: "Short jump" ist ausserhalb des Bereichs $1
asmw_e_undefined_label=08013_E_Asm: Undefiniertes Label: $1
-asmw_e_comp_not_supported=08014_E_Asm: Comp wird fr dieses Ziel nicht untersttzt
-asmw_e_extended_not_supported=08015_E_Asm: Extended Typ wird fr dieses Ziel nicht untersttzt
+asmw_e_comp_not_supported=08014_E_Asm: Comp wird fr dieses Ziel nicht untersttzt
+asmw_e_extended_not_supported=08015_E_Asm: Extended Typ wird fr dieses Ziel nicht untersttzt
asmw_e_duplicate_label=08016_E_Asm: Doppeltes Label $1
asmw_e_redefined_label=08017_E_Asm: Neu definiertes Label $1
asmw_e_first_defined_label=08018_E_Asm: First beginnt hier
-asmw_e_invalid_register=08019_E_Asm: Ungltiges Register $1
-asmw_e_16bit_32bit_not_supported=08020_E_Asm: 16 oder 32 Bit Referenzen werden nicht untersttzt
-asmw_e_64bit_not_supported=08021_E_Asm: 64 Bit Operanden werden nicht untersttzt
+asmw_e_invalid_register=08019_E_Asm: Ungltiges Register $1
+asmw_e_16bit_32bit_not_supported=08020_E_Asm: 16 oder 32 Bit Referenzen werden nicht untersttzt
+asmw_e_64bit_not_supported=08021_E_Asm: 64 Bit Operanden werden nicht untersttzt
#
# Executing linker/assembler
@@ -2481,10 +2481,10 @@ exec_e_util_not_found=09016_E_Hilfsprogramm $1 nicht gefunden, schalte um zu ext
% can be used to assemble and link or postprocess the program.
exec_t_using_util=09017_T_Benutze Hilfsprogramm $1
% An informational message, showing which external program (usually a postprocessor) is being used.
-exec_e_exe_not_supported=09018_E_Erzeugen von ausfhrbaren Dateien nicht untersttzt
+exec_e_exe_not_supported=09018_E_Erzeugen von ausfhrbaren Dateien nicht untersttzt
% Creating executable programs is not supported for this platform, because it was
% not yet implemented in the compiler.
-exec_e_dll_not_supported=09019_E_Dynamische Bibliotheken nicht untersttzt
+exec_e_dll_not_supported=09019_E_Dynamische Bibliotheken nicht untersttzt
% Creating dynamically loadable libraries is not supported for this platform, because it was
% not yet implemented in the compiler.
exec_i_closing_script=09020_I_Schliesse Skript $1
@@ -2530,9 +2530,9 @@ exec_e_cant_write_resource_file=09032_E_Kann die Resourcedatei "$1" nicht schrei
% This section lists all messages that the compiler emits when an executable program is produced,
% and only when the internal linker is used.
% \begin{description}
-execinfo_f_cant_process_executable=09128_F_Kann ausfhrbare Datei nicht nachbearbeiten: $1
+execinfo_f_cant_process_executable=09128_F_Kann ausfhrbare Datei nicht nachbearbeiten: $1
% Fatal error when the compiler is unable to post-process an executable.
-execinfo_f_cant_open_executable=09129_F_Kann ausfhrbare Datei nicht ”ffnen: $1
+execinfo_f_cant_open_executable=09129_F_Kann ausfhrbare Datei nicht ”ffnen: $1
% Fatal error when the compiler cannot open the file for the executable.
execinfo_x_codesize=09130_X_Gr”sse des Codes: $1 Bytes
% Informational message showing the size of the produced code section.
@@ -2557,7 +2557,7 @@ execinfo_x_stackcommit=09134_X_Stack Bereich "committed": $1 Bytes
% \section{Linker messages}
% This section lists messages produced by internal linker.
% \begin{description}
-link_f_executable_too_big=09200_F_Das Programm - Image ist fr das Target $1 zu groá
+link_f_executable_too_big=09200_F_Das Programm - Image ist fr das Target $1 zu groá
% Fatal error when resulting executable is too big.
link_w_32bit_absolute_reloc=09201_W_Object Daei "$1" enth„lt eine 32-bit absolute Relocation auf Symbol "$2".
% Warning when 64-bit object file contains 32-bit absolute relocations.
@@ -2594,15 +2594,15 @@ unit_u_ppu_time=10005_U_PPU-Zeit: $1
% When you use the \var{-vu} flag, the unit time is shown.
unit_u_ppu_file_too_short=10006_U_PPU-Datei zu kurz
% When you use the \var{-vu} flag, the unit time is shown.
-unit_u_ppu_invalid_header=10007_U_PPU Ungltiger Header (kein PPU am Anfang)
+unit_u_ppu_invalid_header=10007_U_PPU Ungltiger Header (kein PPU am Anfang)
% A unit file contains as the first three bytes the ASCII codes of the characters \var{PPU}.
-unit_u_ppu_invalid_version=10008_U_PPU Ungltige Version $1
+unit_u_ppu_invalid_version=10008_U_PPU Ungltige Version $1
% This unit file was compiled with a different version of the compiler, and
% cannot be read.
-unit_u_ppu_invalid_processor=10009_U_PPU ist fr einen anderen Prozessor bersetzt
+unit_u_ppu_invalid_processor=10009_U_PPU ist fr einen anderen Prozessor bersetzt
% This unit file was compiled for a different processor type, and
% cannot be read.
-unit_u_ppu_invalid_target=10010_U_PPU ist fr ein anderes Zielsystem bersetzt
+unit_u_ppu_invalid_target=10010_U_PPU ist fr ein anderes Zielsystem bersetzt
% This unit file was compiled for a different processor type, and
% cannot be read.
unit_u_ppu_source=10011_U_PPU Quelle: $1
@@ -2618,12 +2618,12 @@ unit_f_ppu_read_error=10014_F_Kann PPU-Datei nicht lesen
unit_f_ppu_read_unexpected_end=10015_F_Unerwartetes Ende der PPU-Datei
% Unexpected end of file. This may mean that the PPU file is
% corrupted.
-unit_f_ppu_invalid_entry=10016_F_Ungltiger Eintrag in PPU-Datei: $1
+unit_f_ppu_invalid_entry=10016_F_Ungltiger Eintrag in PPU-Datei: $1
% The unit the compiler is trying to read is corrupted, or generated with a
% newer version of the compiler.
unit_f_ppu_dbx_count_problem=10017_F_PPU Dbx Z„hler-Problem
% There is an inconsistency in the debugging information of the unit.
-unit_e_illegal_unit_name=10018_E_Ungltiger Unitname: $1
+unit_e_illegal_unit_name=10018_E_Ungltiger Unitname: $1
% The name of the unit doesn't match the file name.
unit_f_too_much_units=10019_F_Zu viele Units
% \fpc has a limit of 1024 units in a program. You can change this behavior
@@ -2633,7 +2633,7 @@ unit_f_circular_unit_reference=10020_F_Gegenseitige Abh„ngigkeit von Units zwisc
% Two units are using each other in the interface part. This is only allowed
% in the \var{implementation} part. At least one unit must contain the other one
% in the \var{implementation} section.
-unit_f_cant_compile_unit=10021_F_Kann Unit "$1" nicht bersetzen, keine Quellen vorhanden
+unit_f_cant_compile_unit=10021_F_Kann Unit "$1" nicht bersetzen, keine Quellen vorhanden
% A unit was found that needs to be recompiled, but no sources are
% available.
unit_f_cant_find_ppu=10022_F_Kann Unit "$1", die von "$2" benutzt wird, nicht finden
@@ -2653,7 +2653,7 @@ unit_f_errors_in_unit=10026_F_Es traten $1 Fehler beim šbersetzen des Moduls auf
unit_u_load_unit=10027_U_Lade aus $1 ($2) die Unit $3
% When you use the \var{-vu} flag, which unit is loaded from which unit is
% shown.
-unit_u_recompile_crc_change=10028_U_šbersetze $1 erneut, Prfsumme fr $2 hat sich ge„ndert
+unit_u_recompile_crc_change=10028_U_šbersetze $1 erneut, Prfsumme fr $2 hat sich ge„ndert
% The unit is recompiled because the checksum of a unit it depends on has
% changed.
unit_u_recompile_source_found_alone=10029_U_šbersetze "$1", nur Quellcode gefunden
@@ -2677,11 +2677,11 @@ unit_u_parsing_interface=10034_U_Analysiere Interface von $1
unit_u_parsing_implementation=10035_U_Analysiere Implementation von $1
% When you use the \var{-vu} flag, the compiler warns that it starts
% parsing the implementation part of the unit.
-unit_u_second_load_unit=10036_U_Zweites Laden fr Unit "$1"
+unit_u_second_load_unit=10036_U_Zweites Laden fr Unit "$1"
% When you use the \var{-vu} flag, the compiler warns that it starts
% recompiling a unit for the second time. This can happen with
% interdependent units.
-unit_u_check_time=10037_U_PPU prfe Datei $1 Zeit $2
+unit_u_check_time=10037_U_PPU prfe Datei $1 Zeit $2
% When you use the \var{-vu} flag, the compiler shows the filename and
% date and time of the file on which a recompile depends.
### The following two error msgs is currently disabled.
@@ -2695,12 +2695,12 @@ unit_u_check_time=10037_U_PPU prfe Datei $1 Zeit $2
#% the same conditionals are set for the recompiliation. The compiler has
#% found a conditional that was used the last time the unit was compiled, but
#% the conditional is currently not defined.
-unit_w_cant_compile_unit_with_changed_incfile=10040_W_Kann Unit $1 nicht erneut bersetzen, aber ge„nderte Include-Datei gefunden
+unit_w_cant_compile_unit_with_changed_incfile=10040_W_Kann Unit $1 nicht erneut bersetzen, aber ge„nderte Include-Datei gefunden
% A unit was found to have modified include files, but
% some source files were not found, so recompilation is impossible.
unit_u_source_modified=10041_U_Datei $1 ist neuer als die, aus der die PPU Datei $2 erzeugt wird
% A modified source file for a compiler unit was found.
-unit_u_ppu_invalid_fpumode=10042_U_Versuch eine Unit zu verwenden, die in einem anderen FPU Mode bersetzt wurde
+unit_u_ppu_invalid_fpumode=10042_U_Versuch eine Unit zu verwenden, die in einem anderen FPU Mode bersetzt wurde
% Trying to compile code while using units which were not compiled with
% the same floating point format mode. Either all code should be compiled
% with FPU emulation on, or with FPU emulation off.
@@ -2710,18 +2710,18 @@ unit_u_loading_interface_units=10043_U_Interface Units werden von $1 geladen
unit_u_loading_implementation_units=10044_U_Implementation Units werden von $1 geladen
% When you use the \var{-vu} flag, the compiler warns that it is starting
% to load the units defined in the implementation part of the unit.
-unit_u_interface_crc_changed=10045_U_Ge„nderte Interface CRC fr Unit $1
+unit_u_interface_crc_changed=10045_U_Ge„nderte Interface CRC fr Unit $1
% When you use the \var{-vu} flag, the compiler warns that the
% CRC calculated for the interface has been changed after the implementation
% has been parsed.
-unit_u_implementation_crc_changed=10046_U_Ge„nderte Implementation CRC fr Unit $1
+unit_u_implementation_crc_changed=10046_U_Ge„nderte Implementation CRC fr Unit $1
% When you use the \var{-vu} flag, the compiler warns that the
% CRC calculated has been changed after the implementation
% has been parsed.
unit_u_finished_compiling=10047_U_šbersetzen der Unit $1 beendet
% When you use the \var{-vu} flag, the compiler warns that it
% has finished compiling the unit.
-unit_u_add_depend_to=10048_U_Abh„ngigkeit hinzufgen: $1 h„ngt von $2 ab
+unit_u_add_depend_to=10048_U_Abh„ngigkeit hinzufgen: $1 h„ngt von $2 ab
% When you use the \var{-vu} flag, the compiler warns that it
% has added a dependency between the two units.
unit_u_no_reload_is_caller=10049_U_Kein erneutes Laden, Unit $1 ist die Aufrufende
@@ -2731,7 +2731,7 @@ unit_u_no_reload_is_caller=10049_U_Kein erneutes Laden, Unit $1 ist die Aufrufen
unit_u_no_reload_in_second_compile=10050_U_Kein erneutes Laden der Unit, bereits beim zweiten šbersetzen: $1
% When you use the \var{-vu} flag, the compiler warns that it
% will not reload the unit because it is already in a second recompile.
-unit_u_flag_for_reload=10051_U_Flag fr erneutes Laden: $1
+unit_u_flag_for_reload=10051_U_Flag fr erneutes Laden: $1
% When you use the \var{-vu} flag, the compiler warns that it
% has to reload the unit.
unit_u_forced_reload=10052_U_Erzwungenes erneutes Laden
@@ -2740,7 +2740,7 @@ unit_u_forced_reload=10052_U_Erzwungenes erneutes Laden
unit_u_previous_state=10053_U_Vorhergehender Status von $1: $2
% When you use the \var{-vu} flag, the compiler shows the
% previous state of the unit.
-unit_u_second_compile_unit=10054_U_$1 wird bereits bersetzt, zweites šbersetzen gesetzt
+unit_u_second_compile_unit=10054_U_$1 wird bereits bersetzt, zweites šbersetzen gesetzt
% When you use the \var{-vu} flag, the compiler warns that it is starting
% to recompile a unit for the second time. This can happen with interdependent
% units.
@@ -2756,18 +2756,18 @@ unit_u_registering_new_unit=10057_U_Registrierung der neuen Unit $1
unit_u_reresolving_unit=10058_U_Erneutes resolving der Unit $1
% When you use the \var{-vu} flag, the compiler warns that it
% has to recalculate the internal data of the unit.
-unit_u_skipping_reresolving_unit=10059_U_Erneutes Resolving der Unit $1 wird bersprungen, benutzte Units werden noch geladen
+unit_u_skipping_reresolving_unit=10059_U_Erneutes Resolving der Unit $1 wird bersprungen, benutzte Units werden noch geladen
% When you use the \var{-vu} flag, the compiler warns that it is
% skipping the recalculation of the internal data of the unit
% because there is no data to recalculate.
unit_u_unload_resunit=10060_U_Entlade die Resource-Unit $1 (wird nicht ben”tigt)
% When you use the \var{-vu} flag, the compiler warns that it is unloading the
% resource handling unit, since no resources are used.
-unit_e_different_wpo_file=10061_E_Unit $1 wurde mit einer anderen Feedback-Eingabe ($2, $3) fr die Gesamtprogramm-Optimierung (wpo) bersetzt. Bitte erneut ohne wpo oder mit der gleichen wpo-Feedback-Eingabe-Datei bersetzen
+unit_e_different_wpo_file=10061_E_Unit $1 wurde mit einer anderen Feedback-Eingabe ($2, $3) fr die Gesamtprogramm-Optimierung (wpo) bersetzt. Bitte erneut ohne wpo oder mit der gleichen wpo-Feedback-Eingabe-Datei bersetzen
% When a unit has been compiled using a particular whole program optimization (wpo) feedback file (\var{-FW<x>} \var{-OW<x>}),
% this compiled version of the unit is specialised for that particular compilation scenario and cannot be used in
% any other context. It has to be recompiled before you can use it in another program or with another wpo feedback input file.
-unit_u_indirect_crc_changed=10062_U_Die CRC des indirekten Interface (Objekte/Klassen) fr die unit $1 hat sich ge„ndert
+unit_u_indirect_crc_changed=10062_U_Die CRC des indirekten Interface (Objekte/Klassen) fr die unit $1 hat sich ge„ndert
% When you use the \var{-vu} flag, the compiler warns that the
% indirect CRC calculated for the unit (this is the CRC of all classes/objects/interfaces/$\ldots$
% in the interfaces of units directly or indirectly used by this unit in the interface) has been changed after the
@@ -2788,19 +2788,19 @@ option_usage=11000_O_$1 [Optionen] <Eingabedatei> [Optionen]
% This section lists errors that occur when the compiler is processing the
% command line or handling the configuration files.
% \begin{description}
-option_only_one_source_support=11001_W_Es wird nur eine Quelldatei untersttzt. Wechsel fr das Kompilieren von Quelldatei "$1" zu Quelldatei "$2"
+option_only_one_source_support=11001_W_Es wird nur eine Quelldatei untersttzt. Wechsel fr das Kompilieren von Quelldatei "$1" zu Quelldatei "$2"
% You can specify only one source file on the command line. The last
% one will be compiled, others will be ignored. This may indicate that
% you forgot a \var{'-'} sign.
-option_def_only_for_os2=11002_W_DEF-Datei kann nur fr OS/2 erzeugt werden
+option_def_only_for_os2=11002_W_DEF-Datei kann nur fr OS/2 erzeugt werden
% This option can only be specified when you're compiling for OS/2.
-option_no_nested_response_file=11003_E_Verschachtelte Response-Dateien werden nicht untersttzt
+option_no_nested_response_file=11003_E_Verschachtelte Response-Dateien werden nicht untersttzt
% You cannot nest response files with the \var{@file} command line option.
-option_no_source_found=11004_F_Kein Name fr Quelldatei auf der Kommandzeile
+option_no_source_found=11004_F_Kein Name fr Quelldatei auf der Kommandzeile
% The compiler expects a source file name on the command line.
option_no_option_found=11005_N_Keine Angaben in Konfigurationsdatei "$1" gefunden
% The compiler didn't find any option in that config file.
-option_illegal_para=11006_E_Ungltiger Parameter: $1
+option_illegal_para=11006_E_Ungltiger Parameter: $1
% You specified an unknown option.
option_help_pages_para=11007_H_-? zeigt Hilfetext an
% When an unknown option is given, this message is diplayed.
@@ -2813,7 +2813,7 @@ option_reading_further_from=11010_D_Lese weitere Optionen aus $1
% to another options file.
option_target_is_already_set=11011_W_Zielsystem ist bereits gesetzt: $1
% Displayed if more than one \var{-T} option is specified.
-option_no_shared_lib_under_dos=11012_W_Gemeinsame Bibliotheken sind auf der DOS Platform nicht verfgbar, verwende stattdessen statische Bibliotheken
+option_no_shared_lib_under_dos=11012_W_Gemeinsame Bibliotheken sind auf der DOS Platform nicht verfgbar, verwende stattdessen statische Bibliotheken
% If you specify \var{-CD} for the \dos platform, this message is displayed.
% The compiler supports only static libraries under \dos.
option_too_many_ifdef=11013_F_Zu viele \var{\#IF(N)DEFs} in Zeile $2 der Optionen-Datei $1
@@ -2825,19 +2825,19 @@ option_too_many_endif=11014_F_Unerwartetes \var{\#ENDIFs} in Zeile $2 der Option
option_too_less_endif=11015_F_Offene Bedingung am Ende der Optionen-Datei
% The \var{\#IF(N)DEF} statements in the options file are not balanced with
% the \var{\#ENDIF} statements.
-option_no_debug_support=11016_W_Erzeugung von Debug-Informationen wird von dieser ausfhrbaren Datei nicht untersttzt
+option_no_debug_support=11016_W_Erzeugung von Debug-Informationen wird von dieser ausfhrbaren Datei nicht untersttzt
% It is possible to have a compiler executable that doesn't support
% the generation of debugging info. If you use such an executable with the
% \var{-g} switch, this warning will be displayed.
-option_no_debug_support_recompile_fpc=11017_H_Versuchen Sie mit -dGDB erneut zu bersetzen
+option_no_debug_support_recompile_fpc=11017_H_Versuchen Sie mit -dGDB erneut zu bersetzen
% It is possible to have a compiler executable that doesn't support
% the generation of debugging info. If you use such an executable with the
% \var{-g} switch, this warning will be displayed.
-option_obsolete_switch=11018_W_Sie verwenden den nun berholten Schalter $1
+option_obsolete_switch=11018_W_Sie verwenden den nun berholten Schalter $1
% This warns you when you use a switch that is not needed/supported anymore.
% It is recommended that you remove the switch to overcome problems in the
% future, when the meaning of the switch may change.
-option_obsolete_switch_use_new=11019_W_Sie benutzen den nun berholten Schalter $1, bitte benutzen Sie $2
+option_obsolete_switch_use_new=11019_W_Sie benutzen den nun berholten Schalter $1, bitte benutzen Sie $2
% This warns you when you use a switch that is not supported anymore. You
% must now use the second switch instead.
% It is recommended that you change the switch to overcome problems in the
@@ -2856,7 +2856,7 @@ option_using_env=11027_T_Optionen werden aus dem environment $1 gelesen
% Options are also read from this environment string.
option_handling_option=11028_D_Handling der Option "$1"
% Debug info that an option is found and will be handled.
-option_help_press_enter=11029_O_*** Drcken Sie die ENTER-Taste ***
+option_help_press_enter=11029_O_*** Drcken Sie die ENTER-Taste ***
% Message shown when help is shown page per page. When pressing the ENTER
% Key, the next page of help is shown. If you press q and then ENTER, the
% compiler exits.
@@ -2890,19 +2890,19 @@ option_ppc386_deprecated=11042_W_Die Verwendung von ppc386.cfg wird beendet. Bit
% system the naming makes no sense anymore. Please continue to use fpc.cfg instead.
option_else_without_if=11043_F_Zur \var{\#ELSE} Direktive in Zeile $2 der Optionen-Datei $1 gibt es kein entsprechendes \var{\#IF(N)DEF}
% An \var{\#ELSE} statement was found in the options file without a matching \var{\#IF(N)DEF} statement.
-option_unsupported_target=11044_F_Die Option "$1" wird auf der Zielplattform nicht oder noch nicht untersttzt
+option_unsupported_target=11044_F_Die Option "$1" wird auf der Zielplattform nicht oder noch nicht untersttzt
% Not all options are supported or implemented for all target platforms. This message informs you that a chosen
% option is incompatible with the currently selected target platform.
-option_unsupported_target_for_feature=11045_F_Das Feature "$1" wird fr die ausgew„hlte Zielplattform nicht oder noch nicht untersttzt
+option_unsupported_target_for_feature=11045_F_Das Feature "$1" wird fr die ausgew„hlte Zielplattform nicht oder noch nicht untersttzt
% Not all features are supported or implemented for all target platforms. This message informs you that a chosen
% feature is incompatible with the currently selected target platform.
option_dwarf_smart_linking=11046_N_DWARF Debug-Information kann auf dieser Zielplattform nicht zusammen mit Smartlinking benutzt werden, es wird auf statisches Linken umgeschaltet
% Smart linking is currently incompatble with DWARF debug information on most
% platforms, so smart linking is disabled in such cases.
-option_ignored_target=11047_W_Option "$1" wird fr die ausgew„hlte Zielplattform ignoriert
+option_ignored_target=11047_W_Option "$1" wird fr die ausgew„hlte Zielplattform ignoriert
% Not all options are supported or implemented for all target platforms. This message informs you that a chosen
% option is ignored for the currently selected target platform.
-option_debug_external_unsupported=11048_W_Schalte externe Debuginformation aus, weil es fr die gew„hlte Kombination Ziel/Debugformat nicht untersttzt wird
+option_debug_external_unsupported=11048_W_Schalte externe Debuginformation aus, weil es fr die gew„hlte Kombination Ziel/Debugformat nicht untersttzt wird
% Not all debug formats can be stored in an external file on all platforms. In particular, on
% Mac OS X only DWARF debug information can be stored externally.
%
@@ -2920,7 +2920,7 @@ option_debug_external_unsupported=11048_W_Schalte externe Debuginformation aus,
% This section lists errors that occur when the compiler is performing
% whole program optimization.
% \begin{description}
-wpo_cant_find_file=12000_F_Feedback-Datei "$1" fr die Gesamtprogramm-Optimierung kann nicht ge”ffnet werden
+wpo_cant_find_file=12000_F_Feedback-Datei "$1" fr die Gesamtprogramm-Optimierung kann nicht ge”ffnet werden
% The compiler cannot open the specified feedback file with whole program optimization information.
wpo_begin_processing=12001_D_Bearbeite die Informationen zur Gesamtprogramm-Optimierung aus der wpo-Feedback-Datei "$1"
% The compiler starts processing whole program optimization information found in the named file.
@@ -2929,28 +2929,28 @@ wpo_end_processing=12002_D_Bearbeitung der Informationen zur Gesamtprogramm-Opti
wpo_expected_section=12003_E_Erwarte einen Sektions-Header, statt dessen "$2" in Zeile $1 der wpo-Feedback-Datei erhalten
% The compiler expected a section header in the whole program optimization file (starting with \%),
% but did not find it.
-wpo_no_section_handler=12004_W_Kein Handler fr die Sektion "$2" der Gesamtprogramm-Optimierung registriert (Zeile $1 der wpo-Feedback-Datei). Wird ignoriert
+wpo_no_section_handler=12004_W_Kein Handler fr die Sektion "$2" der Gesamtprogramm-Optimierung registriert (Zeile $1 der wpo-Feedback-Datei). Wird ignoriert
% The compiler has no handler to deal with the mentioned whole program optimization information
% section, and will therefore ignore it and skip to the next section.
-wpo_found_section=12005_D_Sektion "$1" der Gesamtprogramm-Optimierung mit Informationen ber "$2" gefunden
+wpo_found_section=12005_D_Sektion "$1" der Gesamtprogramm-Optimierung mit Informationen ber "$2" gefunden
% The compiler encountered a section with whole program optimization information, and according
% to its handler this section contains information usable for the mentioned purpose.
wpo_no_input_specified=12006_F_Die ausgew„hlte Gesamtprogramm-Optimierung erfordert eine bereits erzeugte Feedback-Datei (bitte mit -Fw angeben)
% The compiler needs information gathered during a previous compilation run to perform the selected
% whole program optimizations. You can specify the location of the feedback file containing this
% information using the -Fw switch.
-wpo_not_enough_info=12007_E_Keine Informationen fr "$1" Gesamtprogramm-Optimierung gefunden
+wpo_not_enough_info=12007_E_Keine Informationen fr "$1" Gesamtprogramm-Optimierung gefunden
% While you pointed the compiler to a file containing whole program optimization feedback, it
% did not contain the information necessary to perform the selected optimizations. You most likely
% have to recompile the program using the appropate -OWxxx switch.
-wpo_no_output_specified=12008_F_Gebe eine Feedback-Datei an, um die erzeugte Information fr die Gesamtprogramm-Optimierung zu speichern (mit der Option -FW)
+wpo_no_output_specified=12008_F_Gebe eine Feedback-Datei an, um die erzeugte Information fr die Gesamtprogramm-Optimierung zu speichern (mit der Option -FW)
% You have to specify the feedback file in which the compiler has to store the whole program optimization
% feedback that is generated during the compilation run. This can be done using the -FW switch.
-wpo_output_without_info_gen=12009_E_Erzeuge keine Information fr die Gesamtprogramm-Optimierung, obwohl eine Feedback-Datei dafr angegeben wurde (mit der Option -FW)
+wpo_output_without_info_gen=12009_E_Erzeuge keine Information fr die Gesamtprogramm-Optimierung, obwohl eine Feedback-Datei dafr angegeben wurde (mit der Option -FW)
% The compiler was instructed to store whole program optimization feedback into a file specified using -FW,
% but not to actually generated any whole program optimization feedback. The classes of to be
% generated information can be speciied using -OWxxx.
-wpo_input_without_info_use=12010_E_Gesamtprogramm-Optimierung wird nicht durchgefhrt, obwohl eine Feedback-Datei angegeben wurde (mit der Option -FW)
+wpo_input_without_info_use=12010_E_Gesamtprogramm-Optimierung wird nicht durchgefhrt, obwohl eine Feedback-Datei angegeben wurde (mit der Option -FW)
% The compiler was not instructed to perform any whole program optimizations (no -Owxxx parameters),
% but nevertheless an input file with such feedback was specified (using -Fwyyy). Since this can
% indicate that you forgot to specify an -Owxxx parameter, the compiler generates an error in this case.
@@ -2973,14 +2973,14 @@ wpo_cannot_find_symbol_progs=12015_F_"$1" oder "$2" wurden nicht gefunden, um di
wpo_error_reading_symbol_file=12016_E_Fehler beim Lesen der "symbol liveness" Information durch "$1" erzeugt
% An error occurred during the reading of the symbol liveness file that was generated using the 'nm' or 'objdump' program. The reason
% can be that it was shorter than expected, or that its format was not understood.
-wpo_error_executing_symbol_prog=12017_F_Fehler bei der Ausfhrung von "$1" (exitcode: $2) um Symbolinformationen aus dem "gelinkten" Programm zu erhalten
+wpo_error_executing_symbol_prog=12017_F_Fehler bei der Ausfhrung von "$1" (exitcode: $2) um Symbolinformationen aus dem "gelinkten" Programm zu erhalten
% Certain symbol liveness collectors need a helper program to extract the symbol information from the linked program.
% The helper program produced the reported error code when it was run on the linked program.
wpo_symbol_live_info_needs_smart_linking=12018_E_Die Sammlung der "symbol liveness" Information hilft nur bei smart linking, benutze -CX -XX
% Whether or not a symbol is live is determined by looking whether it exists in the final linked program.
% Without smart linking/dead code stripping, all symbols are always included, regardless of whether they are
% actually used or not. So in that case all symbols will be seen as live, which makes this optimization ineffective.
-wpo_cant_create_feedback_file=12019_E_Die angegebene Feedback-Eingabe-Datei "$1" fr die Gesamtprogramm-Optimierung kann nicht erzeugt werden
+wpo_cant_create_feedback_file=12019_E_Die angegebene Feedback-Eingabe-Datei "$1" fr die Gesamtprogramm-Optimierung kann nicht erzeugt werden
% The compiler is unable to create the file specified using the -FW parameter to store the whole program optimisation information.
%
% \end{description}
@@ -2990,8 +2990,8 @@ wpo_cant_create_feedback_file=12019_E_Die angegebene Feedback-Eingabe-Datei "$1"
# Logo (option -l)
#
option_logo=11023_[
-Free Pascal Compiler Version $FPCFULLVERSION [$FPCDATE] fr $FPCTARGET
-Copyright (c) 1993-2010 Florian Kl„mpfl
+Free Pascal Compiler Version $FPCFULLVERSION [$FPCDATE] fr $FPCTARGET
+Copyright (c) 1993-2011 Florian Kl„mpfl und andere
]
#
@@ -3003,26 +3003,26 @@ Free Pascal Compiler Version $FPCVERSION
Compiler Datum: $FPCDATE
Compiler Zielsystem: $FPCCPU
-Untersttzte Zielbetriebssysteme:
+Untersttzte Zielbetriebssysteme:
$OSTARGETS
-Untersttzte CPU Instruktionen:
+Untersttzte CPU Instruktionen:
$INSTRUCTIONSETS
-Untersttzte FPU Instruktionen:
+Untersttzte FPU Instruktionen:
$FPUINSTRUCTIONSETS
-Untersttzte ABI Ziele:
+Untersttzte ABI Ziele:
$ABITARGETS
-Untersttzte Optimierungen:
+Untersttzte Optimierungen:
$OPTIMIZATIONS
-Untersttzte Gesamtprogramm-Optimierungen:
+Untersttzte Gesamtprogramm-Optimierungen:
All
$WPOPTIMIZATIONS
-Untersttzte Microcontroller:
+Untersttzte Microcontroller:
$CONTROLLERTYPES
Dieses Programm unterliegt der GNU General Public Licence
@@ -3090,35 +3090,35 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
**1b_Erzeuge Browser-Info
**2bl_Erzeuge Info zu lokalen Symbolen
**1B_Erzeuge alle Module (Build)
-**1C<x>_Optionen fr Code-Erzeugung:
-**2C3<x>_Schalte ieee-Prfung von Konstanten ein
+**1C<x>_Optionen fr Code-Erzeugung:
+**2C3<x>_Schalte ieee-Prfung von Konstanten ein
**2Ca<x>_W„hle ABI aus; fpc -i gibt die m”glichen Werte aus
**2Cb_Erzeuge "big-endian" Code
**2Cc<x>_Setze "default calling convention" zu <x>
-**2CD_Erzeuge auch eine dynamische Bibliothek (nicht untersttzt)
+**2CD_Erzeuge auch eine dynamische Bibliothek (nicht untersttzt)
**2Ce_šbersetze mit emulierten Fliesskomma opcodes
**2Cf<x>_W„hle den Fliesskomma instruction set aus; fpc -i gibt die m”glichen Werte aus
**2CF<x>_Minimale Pr„zission von Fliesskommakonstanten (default, 32, 64)
**2Cg_Erzeuge PIC code
**2Ch<n>_<n> Bytes Heap (zwischen 1023 und 67107840)
-**2Ci_I/O-Prfung
+**2Ci_I/O-Prfung
**2Cn_Lasse die Linkstufe aus
-**2Co_Prfe auf šberlauf von Integer-Operationen
-**2CO_Prfe auf m”glichen šberlauf von Integer-Operationen
+**2Co_Prfe auf šberlauf von Integer-Operationen
+**2CO_Prfe auf m”glichen šberlauf von Integer-Operationen
**2Cp<x>_W„hle instruction set aus; fpc -i gibt die m”glichen Werte aus
-**2CP<x>=<y>_ Einstellungen fr packing
+**2CP<x>=<y>_ Einstellungen fr packing
**3CPPACKSET=<y>_ <y> Belegung von Sets: 0, 1 oder DEFAULT oder NORMAL, 2, 4 und 8
-**2Cr_Fhre Bereichsprfung durch
-**2CR_Verifiziere die Gltigkiet des Aufrufs der Objektmethoden
-**2Cs<n>_Setze die Prfgr”sse des Stacks auf <n>
-**2Ct_Fhre Stackprfung durch (nur zum Testen, siehe Handbuch)
+**2Cr_Fhre Bereichsprfung durch
+**2CR_Verifiziere die Gltigkiet des Aufrufs der Objektmethoden
+**2Cs<n>_Setze die Prfgr”sse des Stacks auf <n>
+**2Ct_Fhre Stackprfung durch (nur zum Testen, siehe Handbuch)
**2Cx_Benutze Smartlinking
**1d<x>_Definiere das Symbol <x>
**1D_Erzeuge eine DEF-Datei
**2Dd<x>_Setze Beschreibung zu <x>
**2Dv<x>_Setze DLL Version zu <x>
*O2Dw_Erzeuge PM-Anwendung
-**1e<x>_Setze Pfad zur ausfhrbaren Datei
+**1e<x>_Setze Pfad zur ausfhrbaren Datei
**1E_Genau wie -Cn
**1fPIC_Genau wie -Cg
**1F<x>_Dateinamen und Pfade:
@@ -3126,10 +3126,10 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
**2Fc<x>_Setze die Eingabe-Codepage zu <x>
**2Fd_Schalte den internen Verzeichnis-Cache des Compilers aus
**2FC<x>_Setze den Namen des RC Compiler-Bin„rprograms auf <x>
-**2FD<x>_Setze das Verzeichnis fr die Compiler-Hilfsprogramme
+**2FD<x>_Setze das Verzeichnis fr die Compiler-Hilfsprogramme
**2Fe<x>_Leite die Fehlerausgabe um nach <x>
**2Ff<x>_Erg„nze <x> zum Framework-Pfad (nur Darwin)
-**2FE<x>_Setze den Pfad fr Exe/Unit-Dateien auf <x>
+**2FE<x>_Setze den Pfad fr Exe/Unit-Dateien auf <x>
**2Fi<x>_Erg„nze <x> zum Include-Pfad
**2Fl<x>_Erg„nze <x> zum Bibliotheks-Pfad
**2FL<x>_Benutze <x> als dynamischen Linker
@@ -3139,14 +3139,14 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
**2FR<x>_Setze den Resource (.res) Linker auf <x>
**2Fu<x>_Erg„nze <x> zum Unit-Pfad
**2FU<x>_Units werden nach <x> ausgegeben, hat Vorrang vor -FE
-**2FW<x>_Speichere das erzeugte Feedback fr die Gesamtprogramm-Optimierung in <x>
-**2Fw<x>_Lade das bereits gespeicherte Feedback fr die Gesamtprogramm-Optimierung aus <x>
+**2FW<x>_Speichere das erzeugte Feedback fr die Gesamtprogramm-Optimierung in <x>
+**2Fw<x>_Lade das bereits gespeicherte Feedback fr die Gesamtprogramm-Optimierung aus <x>
*g1g<x>_Erzeuge Informationen zur Fehlersuche:
-*g2gc_Zeigerberprfung
+*g2gc_Zeigerberprfung
*g2gh_Heaptrace-Unit einbinden
*g2gl_Line info Unit einbinden, um mehr backtrace Informationen anzuzeigen
-*g2go<x>_Setze Optionen fr die Debug Informationen
-*g3godwarfsets_Schalte DWARF Debug Informationen fr Mengen (sets) ein (verhindert debugging mit gdb < 6.5)
+*g2go<x>_Setze Optionen fr die Debug Informationen
+*g3godwarfsets_Schalte DWARF Debug Informationen fr Mengen (sets) ein (verhindert debugging mit gdb < 6.5)
*g3gostabsabsincludes_ Absolute/volle Include-Datei-Pfade in Stabs speichern
*g3godwarfmethodclassprefix_ Stelle Methodennamen in DWARF den Namen der Klasse voran
*g2gp_Erhalte Gross/Kleinschreibung in Stabs-Symbolnamen
@@ -3157,7 +3157,7 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
*g2gw2_Erzeuge DWARFv2-Debug-Informationen
*g2gw3_Erzeuge DWARFv3-Debug-Informationen
*g2gw4_Generate DWARFv4-Debug-Informationen (experimentell)
-**1i_Zeige alle Informationen ber den Compiler
+**1i_Zeige alle Informationen ber den Compiler
**2iD_Zeige Compilerdatum
**2iV_Zeige Compilerversion
**2iW_Zeige vollst„ndige Compilerversion
@@ -3177,7 +3177,7 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
**1n_Standard-Konfigurationsdatei ignorieren
**1N<x>_Node tree Optimierung
**2Nu_Unroll loops
-**1o<x>_Die erzeugte, ausfhrbare Datei bekommt den Namen <x>
+**1o<x>_Die erzeugte, ausfhrbare Datei bekommt den Namen <x>
**1O<x>_Optimierungen:
**2O-_Optimierungen ausschalten
**2O1_Level 1 Optimierung (schnell und Debugger freundlich)
@@ -3185,11 +3185,11 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
**2O3_Level 3 Optimierung (-O2 + langsame Optimierungen)
**2Oa<x>=<y>_Ausrichtung (alignment) von Mengen
**2Oo[NO]<x>_Optimierungen ein- oder ausschalten; fpc -i gibt die m”glichen Werte aus
-**2Op<x>_Setze Zielprozessor fr die Optimierung; fpc -i gibt die m”glichen Werte aus
-**2OW<x>_Erzeuge Feedback fr die Gesamtprogramm-Optimierung fr Optimierung <x>, siehe fpc -i fr m”gliche Werte
-**2Ow<x>_Fhre die Gesamtprogramm-Optimierung durch <x>, siehe fpc -i fr m”gliche Werte
-**2Os_Erzeuge krzeren Code
-**1pg_Erzeuge Profiler-Code fr gprof
+**2Op<x>_Setze Zielprozessor fr die Optimierung; fpc -i gibt die m”glichen Werte aus
+**2OW<x>_Erzeuge Feedback fr die Gesamtprogramm-Optimierung fr Optimierung <x>, siehe fpc -i fr m”gliche Werte
+**2Ow<x>_Fhre die Gesamtprogramm-Optimierung durch <x>, siehe fpc -i fr m”gliche Werte
+**2Os_Erzeuge krzeren Code
+**1pg_Erzeuge Profiler-Code fr gprof
**1R<x>_Assembler Code Format:
**2Rdefault_Benutze den default Assembler
3*2Ratt_Lese Assembler Code im AT&T Format
@@ -3197,7 +3197,7 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
6*2RMOT_Lese Assembler im Motorola Format
**1S<x>_Syntax-Optionen:
**2S2_Schalte einige der Delphi 2 Erweiterungen ein (wie -Mobjfpc)
-**2Sc_Untersttze spezielle C Operatoren (*=,+=,/= and -=)
+**2Sc_Untersttze spezielle C Operatoren (*=,+=,/= and -=)
**2Sa_Erlaube assertion code.
**2Sd_Sei Delphi-kompatibel (wie -Mdelphi)
**2Se<x>_Fehler Optionen. <x> ist eine der folgenden Kombinationen:
@@ -3212,10 +3212,10 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
**2SI<x>_Setze den Stil des Interface zu <x>
**3SIcom_COM kompatibles Interface (Voreinstellung)
**3SIcorba_CORBA kompatibles Interface
-**2Sm_Untersttze Makros wie in C (global)
+**2Sm_Untersttze Makros wie in C (global)
**2So_Sei TP/BP 7.0 kompatibel (wie -Mtp)
-**2Ss_Konstruktor- und Destruktorname mssen "Init" und "Done" sein
-**2Sx_Exception Schlsselw”rter einschalten (Voreinstellung in Delphi/ObjFPC Moden)
+**2Ss_Konstruktor- und Destruktorname mssen "Init" und "Done" sein
+**2Sx_Exception Schlsselw”rter einschalten (Voreinstellung in Delphi/ObjFPC Moden)
**1s_Rufe weder Assembler noch Linker auf (nur mit -a)
**2sh_Erzeuge Script um auf dem Host zu linken
**2st_Erzeuge Script um auf dem Zielsystem zu linken
@@ -3255,9 +3255,9 @@ P*2Tmacos_Mac OS (classic)
P*2Tmorphos_MorphOS
S*2Tsolaris_Solaris
S*2Tlinux_Linux
-**1u<x>_Entferne die Definition fr das Symbol <x>
+**1u<x>_Entferne die Definition fr das Symbol <x>
**1U<x>_Unit-Optionen:
-**2Un_Prfe den Unitnamen nicht
+**2Un_Prfe den Unitnamen nicht
**2Ur_Erzeuge "release unit"-Dateien
**2Us_Erzeuge eine Systemunit
**1v<x>_Meldungen, <x> ist eine Kombination der folgenden Zeichen:
@@ -3299,8 +3299,8 @@ P*2WG_Spezifiziere "graphic type application" (Classic Mac OS)
3*2Wi_Benutze interne Resourcen (Darwin)
P*2Wi_Benutze interne Resourcen (Darwin)
p*2Wi_Benutze interne Resourcen (Darwin)
-3*2WN_Erzeuge keinen "relocation code" (notwendig fr debugging) (Windows)
-A*2WN_Erzeuge keinen "relocation code" (notwendig fr debugging) (Windows)
+3*2WN_Erzeuge keinen "relocation code" (notwendig fr debugging) (Windows)
+A*2WN_Erzeuge keinen "relocation code" (notwendig fr debugging) (Windows)
3*2WR_Erzeuge "relocation code" (Windows)
A*2WR_Erzeuge "relocation code" (Windows)
P*2WF_Spezifiziere "MPW tool type application" (Classic Mac OS)
@@ -3310,19 +3310,19 @@ p*2WX_Erm”gliche den executable stack (Linux)
P*2WX_Erm”gliche den executable stack (Linux)
**1X_Programm-Optionen:
**2Xc_šbergebe --shared an den Linker (nur Unix)
-**2Xd_Den Standard Bibliotheks-Suchpfad NICHT nutzen (ben”tigt fr cross compile)
+**2Xd_Den Standard Bibliotheks-Suchpfad NICHT nutzen (ben”tigt fr cross compile)
**2Xe_Verwende den externen Linker
-**2Xg_Erstelle die Debug-Informationen in einer separaten Datei und einen "Debug-Link"-Abschnitt im ausfhrbaren Programm
+**2Xg_Erstelle die Debug-Informationen in einer separaten Datei und einen "Debug-Link"-Abschnitt im ausfhrbaren Programm
**2XD_Versuche Units dynamisch zu linken (definiert FPC_LINK_DYNAMIC)
**2Xi_Verwende den internen Linker
**2Xm_Erzeuge die "link map"
**2XM<x>_Setze den Namen der 'main' program Routine (default ist 'main')
**2XP<x>_Stelle den Namen der Compiler-Hilfsprogrammen den Prefix <x> voran
-**2Xr<x>_Setze den rlink-Pfad des Linker zu <x> (ben”tigt fr cross compile, siehe ld-Manual fr mehr Informationen) (BeOS, Linux)
+**2Xr<x>_Setze den rlink-Pfad des Linker zu <x> (ben”tigt fr cross compile, siehe ld-Manual fr mehr Informationen) (BeOS, Linux)
**2XR<x>_Stelle allen Linker-Suchpfaden den Namen <x> voran (BeOS, Darwin, FreeBSD, Linux, Mac OS, Solaris)
-**2Xs_Entferne alle Symbole aus der ausfhrbaren Datei
+**2Xs_Entferne alle Symbole aus der ausfhrbaren Datei
**2XS_Versuche Units statisch zu linken (default) (definiert FPC_LINK_STATIC)
-**2Xt_Linke mit statischen Bibliotheken (-static wird an den Linker bergeben)
+**2Xt_Linke mit statischen Bibliotheken (-static wird an den Linker bergeben)
**2XX_Versuche Units smart zu linken (definiert FPC_LINK_SMART)
**1*_
**1?_Zeigt diese Hilfe an
diff --git a/compiler/msg/errorda.msg b/compiler/msg/errorda.msg
index eab24501f8..16f07e1ec2 100644
--- a/compiler/msg/errorda.msg
+++ b/compiler/msg/errorda.msg
@@ -2207,7 +2207,7 @@ option_config_is_dir=11040_F_Konfigurationsfilen $1 er et directory
#
option_logo=11023_[
Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] til $FPCTARGET
-Copyright (c) 1993-2010 Florian Klaempfl
+Copyright (c) 1993-2011 Florian Klaempfl
]
#
diff --git a/compiler/msg/errordu.msg b/compiler/msg/errordu.msg
index 41972aaf91..b8bc408100 100644
--- a/compiler/msg/errordu.msg
+++ b/compiler/msg/errordu.msg
@@ -2991,7 +2991,7 @@ wpo_cant_create_feedback_file=12019_E_Die angegebene Feedback-Eingabe-Datei "$1"
#
option_logo=11023_[
Free Pascal Compiler Version $FPCFULLVERSION [$FPCDATE] für $FPCTARGET
-Copyright (c) 1993-2010 Florian Klämpfl
+Copyright (c) 1993-2011 Florian Klämpfl und andere
]
#
diff --git a/compiler/msg/errore.msg b/compiler/msg/errore.msg
index 1770c28836..6da608ee7a 100644
--- a/compiler/msg/errore.msg
+++ b/compiler/msg/errore.msg
@@ -1366,6 +1366,10 @@ parser_e_cant_use_type_parameters_here=03304_E_Type parameters may require initi
% Type parameters may be specialized with types which (e.g. \var{ansistring}) need initialization/finalization
% code which is implicitly generated by the compiler.
% \end{description}
+parser_e_externals_no_section=03305_E_Variables being declared as external cannot be in a custom section
+% A section directive is not valid for variables being declared as external.
+parser_e_section_no_locals=03306_E_Non-static and non-global variables cannot have a section directive
+% A variable placed in a custom section is always statically allocated so it must be either a static or global variable.
# Type Checking
#
# 04095 is the last used one
@@ -2966,7 +2970,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
#
option_logo=11023_[
Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl and others
]
#
diff --git a/compiler/msg/errores.msg b/compiler/msg/errores.msg
index 6f54101b37..de54fd789d 100644
--- a/compiler/msg/errores.msg
+++ b/compiler/msg/errores.msg
@@ -2111,7 +2111,7 @@ option_code_page_not_available=11039_E_Código de página desconocido
#
option_logo=11023_[
Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorf.msg b/compiler/msg/errorf.msg
index 378427a54c..fe00908011 100644
--- a/compiler/msg/errorf.msg
+++ b/compiler/msg/errorf.msg
@@ -1712,7 +1712,7 @@ option_asm_forced=11022_W_"$1" assembler use forced
#
option_logo=11023_[
Compilateur Free Pascal version $FPCFULLVERSION [$FPCDATE] pour $FPCTARGET
-Copyright (c) 1998-2009 by Florian Klaempfl
+Copyright (c) 1998-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorfi.msg b/compiler/msg/errorfi.msg
index 9e3689eae5..16d742c014 100644
--- a/compiler/msg/errorfi.msg
+++ b/compiler/msg/errorfi.msg
@@ -2258,7 +2258,7 @@ option_config_is_dir=11040_F_Le fichier de configuration $1 est un répertoire
# Logo (option -l)
#
option_logo=11023_[ Compilateur Free Pascal version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2010, Florian Klaempfl ]
+Copyright (c) 1993-2011, Florian Klaempfl ]
#
# Info (option -i)
#
diff --git a/compiler/msg/errorhe.msg b/compiler/msg/errorhe.msg
index a30190531f..e2fbbac9c3 100644
--- a/compiler/msg/errorhe.msg
+++ b/compiler/msg/errorhe.msg
@@ -2404,7 +2404,7 @@ option_confict_asm_debug=11041_W_ñåâ äôìè ùì äîàñó ùðáçø "$1" àéðå éëåì ìéöåø îé
#
option_logo=11023_[
Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorheu.msg b/compiler/msg/errorheu.msg
index 894f953047..16afb09bb0 100644
--- a/compiler/msg/errorheu.msg
+++ b/compiler/msg/errorheu.msg
@@ -2404,7 +2404,7 @@ option_confict_asm_debug=11041_W_סוג הפלט של המ×סף שנבחר "$1"
#
option_logo=11023_[
Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorid.msg b/compiler/msg/errorid.msg
index d4a6ec791c..4c03e14317 100644
--- a/compiler/msg/errorid.msg
+++ b/compiler/msg/errorid.msg
@@ -2421,7 +2421,7 @@ option_confict_asm_debug=11041_W_Output assembler yang dipilih "$1" tidak bisa m
#
option_logo=11023_[
Free Pascal Compiler versi $FPCFULLVERSION [$FPCDATE] untuk $FPCCPU
-Hak Cipta (c) 1993-2010 oleh Florian Klaempfl
+Hak Cipta (c) 1993-2011 oleh Florian Klaempfl
]
#
diff --git a/compiler/msg/errorn.msg b/compiler/msg/errorn.msg
index 3e1ee0ab2f..ac7bef7f8a 100644
--- a/compiler/msg/errorn.msg
+++ b/compiler/msg/errorn.msg
@@ -2183,7 +2183,7 @@ option_config_is_dir=11040_F_Config bestand $1 is een directorie
%\end{description}
option_logo=11023_[
Free Pascal Compiler versie $FPCFULLVERSION [$FPCDATE] voor $FPCTARGET
-Copyright (c) 1998-2009 door Florian Klaempfl en anderen
+Copyright (c) 1998-2011 door Florian Klaempfl en anderen
]
#
# Info (option -i)
diff --git a/compiler/msg/errorpl.msg b/compiler/msg/errorpl.msg
index 5f0d07ee59..0cec618f6a 100644
--- a/compiler/msg/errorpl.msg
+++ b/compiler/msg/errorpl.msg
@@ -2116,7 +2116,7 @@ option_code_page_not_available=11039_E_Nieznana strona kodowa
#
option_logo=11023_[
Free Pascal Compiler wersja $FPCFULLVERSION [$FPCDATE] dla $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorpli.msg b/compiler/msg/errorpli.msg
index d975728009..2660eaf4b8 100644
--- a/compiler/msg/errorpli.msg
+++ b/compiler/msg/errorpli.msg
@@ -2116,7 +2116,7 @@ option_code_page_not_available=11039_E_Nieznana strona kodowa
#
option_logo=11023_[
Free Pascal Compiler wersja $FPCFULLVERSION [$FPCDATE] dla $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorpt.msg b/compiler/msg/errorpt.msg
index fe55d6e393..8723597744 100644
--- a/compiler/msg/errorpt.msg
+++ b/compiler/msg/errorpt.msg
@@ -2905,7 +2905,7 @@ wpo_cant_create_feedback_file=12019_E_Imposs¡vel criar arquivo retorno otimiza‡ä
#
option_logo=11023_[
Compilador Free Pascal versÆo $FPCFULLVERSION [$FPCDATE] para $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorptu.msg b/compiler/msg/errorptu.msg
index 15f05f0709..ae31c24135 100644
--- a/compiler/msg/errorptu.msg
+++ b/compiler/msg/errorptu.msg
@@ -2905,7 +2905,7 @@ wpo_cant_create_feedback_file=12019_E_Impossível criar arquivo retorno otimizaÃ
#
option_logo=11023_[
Compilador Free Pascal versão $FPCFULLVERSION [$FPCDATE] para $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorr.msg b/compiler/msg/errorr.msg
index 297e5ca1ce..9982500555 100644
--- a/compiler/msg/errorr.msg
+++ b/compiler/msg/errorr.msg
@@ -2503,7 +2503,7 @@ wpo_cant_create_feedback_file=12019_E_¥¢®§¬®¦­® ᮧ¤ âì ä ©« ®¡à â­®© á¢ï§¨ "$1
#
option_logo=11023_[
Š®¬¯¨«ïâ®à Free Pascal ¢¥àᨨ $FPCFULLVERSION [$FPCDATE] ¤«ï $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorru.msg b/compiler/msg/errorru.msg
index c490dbe621..4efaf6146b 100644
--- a/compiler/msg/errorru.msg
+++ b/compiler/msg/errorru.msg
@@ -2503,7 +2503,7 @@ wpo_cant_create_feedback_file=12019_E_Ðевозможно Ñоздать фай
#
option_logo=11023_[
КомпилÑтор Free Pascal верÑии $FPCFULLVERSION [$FPCDATE] Ð´Ð»Ñ $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msg/errorues.msg b/compiler/msg/errorues.msg
index 28d71d7bd3..64ebb12297 100644
--- a/compiler/msg/errorues.msg
+++ b/compiler/msg/errorues.msg
@@ -2105,7 +2105,7 @@ option_code_page_not_available=11039_E_Código de página desconocido
#
option_logo=11023_[
Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2010 by Florian Klaempfl
+Copyright (c) 1993-2011 by Florian Klaempfl
]
#
diff --git a/compiler/msgidx.inc b/compiler/msgidx.inc
index 2f18b14738..88b106aa58 100644
--- a/compiler/msgidx.inc
+++ b/compiler/msgidx.inc
@@ -393,6 +393,8 @@ const
parser_e_no_constructor_in_records=03302;
parser_e_at_least_one_argument_must_be_of_type=03303;
parser_e_cant_use_type_parameters_here=03304;
+ parser_e_externals_no_section=03305;
+ parser_e_section_no_locals=03306;
type_e_mismatch=04000;
type_e_incompatible_types=04001;
type_e_not_equal_types=04002;
@@ -882,9 +884,9 @@ const
option_info=11024;
option_help_pages=11025;
- MsgTxtSize = 58686;
+ MsgTxtSize = 58848;
MsgIdxMax : array[1..20] of longint=(
- 24,88,305,99,84,54,111,22,202,63,
+ 24,88,307,99,84,54,111,22,202,63,
49,20,1,1,1,1,1,1,1,1
);
diff --git a/compiler/msgtxt.inc b/compiler/msgtxt.inc
index 3ac774ff07..c2003c83bb 100644
--- a/compiler/msgtxt.inc
+++ b/compiler/msgtxt.inc
@@ -1,7 +1,7 @@
{$ifdef Delphi}
-const msgtxt : array[0..000244] of string[240]=(
+const msgtxt : array[0..000245] of string[240]=(
{$else Delphi}
-const msgtxt : array[0..000244,1..240] of char=(
+const msgtxt : array[0..000245,1..240] of char=(
{$endif Delphi}
'01000_T_Compiler: $1'#000+
'01001_D_Compiler OS: $1'#000+
@@ -477,582 +477,587 @@ const msgtxt : array[0..000244,1..240] of char=(
'1"'#000+
'03304_E_Type parameters may require initialization/finalization - can'#039+
't be used in variant r','ecords'#000+
+ '03305_E_Variables being declared as external cannot be in a custom sec'+
+ 'tion'#000+
+ '03306_E_Non-static and non-global variables cannot have a section dire'+
+ 'ctive'#000+
'04000_E_Type mismatch'#000+
'04001_E_Incompatible types: got "$1" expected "$2"'#000+
- '04002_E_Type mismatch between "$1" and "$2"'#000+
+ '04002_E_T','ype mismatch between "$1" and "$2"'#000+
'04003_E_Type identifier expected'#000+
'04004_E_Variable identifier expected'#000+
- '04005_E_Integer expression expected, but got "','$1"'#000+
+ '04005_E_Integer expression expected, but got "$1"'#000+
'04006_E_Boolean expression expected, but got "$1"'#000+
- '04007_E_Ordinal expression expected'#000+
+ '04007_E_Ordinal expression expected',#000+
'04008_E_pointer type expected, but got "$1"'#000+
'04009_E_class type expected, but got "$1"'#000+
'04011_E_Can'#039't evaluate constant expression'#000+
- '04012_E_Set elements ','are not compatible'#000+
+ '04012_E_Set elements are not compatible'#000+
'04013_E_Operation not implemented for sets'#000+
- '04014_W_Automatic type conversion from floating type to COMP which is '+
- 'an integer type'#000+
+ '04014_W_Automatic type conv','ersion from floating type to COMP which i'+
+ 's an integer type'#000+
'04015_H_use DIV instead to get an integer result'#000+
- '04016_E_String types have to match exactly ','in $V+ mode'#000+
+ '04016_E_String types have to match exactly in $V+ mode'#000+
'04017_E_succ or pred on enums with assignments not possible'#000+
- '04018_E_Can'#039't read or write variables of this type'#000+
+ '04018_E_Can'#039't rea','d or write variables of this type'#000+
'04019_E_Can'#039't use readln or writeln on typed file'#000+
'04020_E_Can'#039't use read or write on untyped file.'#000+
- '04021_E_Type confl','ict between set elements'#000+
+ '04021_E_Type conflict between set elements'#000+
'04022_W_lo/hi(dword/qword) returns the upper/lower word/dword'#000+
- '04023_E_Integer or real expression expected'#000+
+ '04','023_E_Integer or real expression expected'#000+
'04024_E_Wrong type "$1" in array constructor'#000+
- '04025_E_Incompatible type for arg no. $1: Got "$2", expected "$3','"'#000+
+ '04025_E_Incompatible type for arg no. $1: Got "$2", expected "$3"'#000+
'04026_E_Method (variable) and Procedure (variable) are not compatible'#000+
- '04027_E_Illegal constant passed to internal math function'#000+
+ '04027_E_Illegal c','onstant passed to internal math function'#000+
'04028_E_Can'#039't take the address of constant expressions'#000+
'04029_E_Argument can'#039't be assigned to'#000+
- '04030_E_Can'#039't ass','ign local procedure/function to procedure varia'+
- 'ble'#000+
- '04031_E_Can'#039't assign values to an address'#000+
+ '04030_E_Can'#039't assign local procedure/function to procedure variabl'+
+ 'e'#000+
+ '04031_E_Can'#039't assign values to an addr','ess'#000+
'04032_E_Can'#039't assign values to const variable'#000+
'04033_E_Array type required'#000+
'04034_E_interface type expected, but got "$1"'#000+
- '04035_H_Mixing signed expre','ssions and longwords gives a 64bit result'+
- #000+
- '04036_W_Mixing signed expressions and cardinals here may cause a range'+
- ' check error'#000+
+ '04035_H_Mixing signed expressions and longwords gives a 64bit result'#000+
+ '04036_W_Mixing signed expressions and cardinals',' here may cause a ran'+
+ 'ge check error'#000+
'04037_E_Typecast has different size ($1 -> $2) in assignment'#000+
- '04038_E_enums with assignments can'#039't be used as array ','index'#000+
+ '04038_E_enums with assignments can'#039't be used as array index'#000+
'04039_E_Class or Object types "$1" and "$2" are not related'#000+
- '04040_W_Class types "$1" and "$2" are not related'#000+
+ '04040_W_Class types "$1','" and "$2" are not related'#000+
'04041_E_Class or interface type expected, but got "$1"'#000+
'04042_E_Type "$1" is not completely defined'#000+
- '04043_W_String literal ha','s more characters than short string length'#000+
- '04044_W_Comparison is always false due to range of values'#000+
+ '04043_W_String literal has more characters than short string length'#000+
+ '04044_W_Comparison is always false due to rang','e of values'#000+
'04045_W_Comparison is always true due to range of values'#000+
'04046_W_Constructing a class "$1" with abstract method "$2"'#000+
- '04047_H_The left opera','nd of the IN operator should be byte sized'#000+
- '04048_W_Type size mismatch, possible loss of data / range check error'#000+
+ '04047_H_The left operand of the IN operator should be byte sized'#000+
+ '04048_W_Type size mismatch, possible loss of d','ata / range check erro'+
+ 'r'#000+
'04049_H_Type size mismatch, possible loss of data / range check error'#000+
- '04050_E_The address of an abstract method can'#039't be taken'#000,
+ '04050_E_The address of an abstract method can'#039't be taken'#000+
'04051_E_Assignments to formal parameters and open arrays are not possi'+
'ble'#000+
- '04052_E_Constant Expression expected'#000+
+ '04052_E_Constan','t Expression expected'#000+
'04053_E_Operation "$1" not supported for types "$2" and "$3"'#000+
'04054_E_Illegal type conversion: "$1" to "$2"'#000+
- '04055_H_Conversion bet','ween ordinals and pointers is not portable'#000+
- '04056_W_Conversion between ordinals and pointers is not portable'#000+
+ '04055_H_Conversion between ordinals and pointers is not portable'#000+
+ '04056_W_Conversion between ordinals and pointe','rs is not portable'#000+
'04057_E_Can'#039't determine which overloaded function to call'#000+
'04058_E_Illegal counter variable'#000+
- '04059_W_Converting constant real value to',' double for C variable argu'+
- 'ment, add explicit typecast to prevent this.'#000+
- '04060_E_Class or COM interface type expected, but got "$1"'#000+
+ '04059_W_Converting constant real value to double for C variable argume'+
+ 'nt, add explicit typecast to prevent this.'#000+
+ '04060_E_Class or ','COM interface type expected, but got "$1"'#000+
'04061_E_Constant packed arrays are not yet supported'#000+
- '04062_E_Incompatible type for arg no. $1: Got "$2" expec','ted "(Bit)Pa'+
- 'cked Array"'#000+
- '04063_E_Incompatible type for arg no. $1: Got "$2" expected "(not pack'+
- 'ed) Array"'#000+
+ '04062_E_Incompatible type for arg no. $1: Got "$2" expected "(Bit)Pack'+
+ 'ed Array"'#000+
+ '04063_E_Incompatible type for arg no. $1: Got "$2" expected "(not',' pa'+
+ 'cked) Array"'#000+
'04064_E_Elements of packed arrays cannot be of a type which need to be'+
' initialised'#000+
- '04065_E_Constant packed records and objects are not ','yet supported'#000+
+ '04065_E_Constant packed records and objects are not yet supported'#000+
'04066_W_Arithmetic "$1" on untyped pointer is unportable to {$T+}, sug'+
- 'gest typecast'#000+
+ 'gest ','typecast'#000+
'04076_E_Can'#039't take address of a subroutine marked as local'#000+
'04077_E_Can'#039't export subroutine marked as local from a unit'#000+
- '04078_E_Type is not aut','omatable: "$1"'#000+
+ '04078_E_Type is not automatable: "$1"'#000+
'04079_H_Converting the operands to "$1" before doing the add could pre'+
- 'vent overflow errors.'#000+
+ 'vent',' overflow errors.'#000+
'04080_H_Converting the operands to "$1" before doing the subtract coul'+
'd prevent overflow errors.'#000+
- '04081_H_Converting the operands to "','$1" before doing the multiply co'+
- 'uld prevent overflow errors.'#000+
- '04082_W_Converting pointers to signed integers may result in wrong com'+
- 'parison results and range errors, use an unsigned type instead.'#000+
+ '04081_H_Converting the operands to "$1" before doing the multiply coul'+
+ 'd prevent overflow errors.'#000+
+ '04082_W_Converting pointers ','to signed integers may result in wrong c'+
+ 'omparison results and range errors, use an unsigned type instead.'#000+
'04083_E_Interface type $1 has no valid GUID'#000+
- '0','4084_E_Invalid selector name "$1"'#000+
+ '04084_E_Invalid selector name "$1"'#000+
'04085_E_Expected Objective-C method, but got $1'#000+
- '04086_E_Expected Objective-C method or constant method name'#000+
+ '04086_E','_Expected Objective-C method or constant method name'#000+
'04087_E_No type info available for this type'#000+
'04088_E_Ordinal or string expression expected'#000+
- '04089_E','_String expression expected'#000+
+ '04089_E_String expression expected'#000+
'04090_W_Converting 0 to NIL'#000+
- '04091_E_Objective-C protocol type expected, but got "$1"'#000+
+ '04091_E_Objective-C protocol type',' expected, but got "$1"'#000+
'04092_E_The type "$1" is not supported for interaction with the Object'+
'ive-C runtime.'#000+
- '04093_E_Class or objcclass type expected, ','but got "$1"'#000+
+ '04093_E_Class or objcclass type expected, but got "$1"'#000+
'04094_E_Objcclass type expected'#000+
- '04095_W_Coerced univ parameter type in procedural variable may cause c'+
- 'rash or memory corruption: $1 to $2'#000+
+ '04095_W_Coerced univ parameter type in proce','dural variable may cause'+
+ ' crash or memory corruption: $1 to $2'#000+
'04096_E_Type parameters of specializations of generics cannot referenc'+
- 'e the currently spe','cialized type'#000+
+ 'e the currently specialized type'#000+
'04097_E_Type parameters are not allowed on non-generic class/record/ob'+
- 'ject procedure or function'#000+
+ 'ject ','procedure or function'#000+
'04098_E_Generic declaration of "$1" differs from previous declaration'#000+
'05000_E_Identifier not found "$1"'#000+
- '05001_F_Internal Error in',' SymTableStack()'#000+
+ '05001_F_Internal Error in SymTableStack()'#000+
'05002_E_Duplicate identifier "$1"'#000+
- '05003_H_Identifier already defined in $1 at line $2'#000+
+ '05003_H_Identifier already defined in ','$1 at line $2'#000+
'05004_E_Unknown identifier "$1"'#000+
'05005_E_Forward declaration not solved "$1"'#000+
'05007_E_Error in type definition'#000+
- '05009_E_Forward type not res','olved "$1"'#000+
+ '05009_E_Forward type not resolved "$1"'#000+
'05010_E_Only static variables can be used in static methods or outside'+
- ' methods'#000+
+ ' methods',#000+
'05012_F_record or class type expected'#000+
'05013_E_Instances of classes or objects with an abstract method are no'+
't allowed'#000+
'05014_W_Label not defined "$1"'#000+
- '0','5015_E_Label used but not defined "$1"'#000+
+ '05015_E_Label used but not defined "$1"'#000+
'05016_E_Illegal label declaration'#000+
- '05017_E_GOTO and LABEL are not supported (use switch -Sg)'#000+
+ '05017_E_GOTO and',' LABEL are not supported (use switch -Sg)'#000+
'05018_E_Label not found'#000+
'05019_E_identifier isn'#039't a label'#000+
'05020_E_label already defined'#000+
- '05021_E_illegal type d','eclaration of set elements'#000+
+ '05021_E_illegal type declaration of set elements'#000+
'05022_E_Forward class definition not resolved "$1"'#000+
- '05023_H_Unit "$1" not used in $2'#000+
+ '05023_H_Uni','t "$1" not used in $2'#000+
'05024_H_Parameter "$1" not used'#000+
'05025_N_Local variable "$1" not used'#000+
'05026_H_Value parameter "$1" is assigned but never used'#000+
- '0502','7_N_Local variable "$1" is assigned but never used'#000+
+ '05027_N_Local variable "$1" is assigned but never used'#000+
'05028_H_Local $1 "$2" is not used'#000+
- '05029_N_Private field "$1.$2" is never used'#000+
+ '0502','9_N_Private field "$1.$2" is never used'#000+
'05030_N_Private field "$1.$2" is assigned but never used'#000+
'05031_N_Private method "$1.$2" never used'#000+
- '05032_E_Set ','type expected'#000+
+ '05032_E_Set type expected'#000+
'05033_W_Function result does not seem to be set'#000+
- '05034_W_Type "$1" is not aligned correctly in current record for C'#000+
+ '05034_W_Type "$1" is not al','igned correctly in current record for C'#000+
'05035_E_Unknown record field identifier "$1"'#000+
'05036_W_Local variable "$1" does not seem to be initialized'#000+
- '05037_','W_Variable "$1" does not seem to be initialized'#000+
- '05038_E_identifier idents no member "$1"'#000+
+ '05037_W_Variable "$1" does not seem to be initialized'#000+
+ '05038_E_identifier idents no member "$1"'#000,
'05039_H_Found declaration: $1'#000+
'05040_E_Data element too large'#000+
'05042_E_No matching implementation for interface method "$1" found'#000+
- '05043_W_Symbol "$1" is ','deprecated'#000+
+ '05043_W_Symbol "$1" is deprecated'#000+
'05044_W_Symbol "$1" is not portable'#000+
'05055_W_Symbol "$1" is not implemented'#000+
- '05056_E_Can'#039't create unique type from this type'#000+
+ '050','56_E_Can'#039't create unique type from this type'#000+
'05057_H_Local variable "$1" does not seem to be initialized'#000+
- '05058_H_Variable "$1" does not seem to be init','ialized'#000+
+ '05058_H_Variable "$1" does not seem to be initialized'#000+
'05059_W_Function result variable does not seem to initialized'#000+
- '05060_H_Function result variable does not seem to be initialized'#000+
+ '05060_H_Function re','sult variable does not seem to be initialized'#000+
'05061_W_Variable "$1" read but nowhere assigned'#000+
'05062_H_Found abstract method: $1'#000+
- '05063_W_Symbol "$1" is ','experimental'#000+
+ '05063_W_Symbol "$1" is experimental'#000+
'05064_W_Forward declaration "$1" not resolved, assumed external'#000+
- '05065_W_Symbol "$1" is belongs to a library'#000+
+ '05065_W_Symb','ol "$1" is belongs to a library'#000+
'05066_W_Symbol "$1" is deprecated: "$2"'#000+
'05067_E_Cannot find an enumerator for the type "$1"'#000+
- '05068_E_Cannot find a "Move','Next" method in enumerator "$1"'#000+
- '05069_E_Cannot find a "Current" property in enumerator "$1"'#000+
+ '05068_E_Cannot find a "MoveNext" method in enumerator "$1"'#000+
+ '05069_E_Cannot find a "Current" property in enumerator "$','1"'#000+
'05070_E_Mismatch between number of declared parameters and number of c'+
'olons in message string.'#000+
'05071_N_Private type "$1.$2" never used'#000+
- '05072_N_Priva','te const "$1.$2" never used'#000+
+ '05072_N_Private const "$1.$2" never used'#000+
'05073_N_Private property "$1.$2" never used'#000+
- '05074_W_Unit "$1" is deprecated'#000+
+ '05074_W_Unit "$1"',' is deprecated'#000+
'05075_W_Unit "$1" is deprecated: "$2"'#000+
'05076_W_Unit "$1" is not portable'#000+
'05077_W_Unit "$1" is belongs to a library'#000+
- '05078_W_Unit "$1" is n','ot implemented'#000+
+ '05078_W_Unit "$1" is not implemented'#000+
'05079_W_Unit "$1" is experimental'#000+
- '05080_E_No complete definition of the formally declared objcclass "$1"'+
- ' is in scope'#000+
+ '05080_E_No complete definition of the fo','rmally declared objcclass "$'+
+ '1" is in scope'#000+
'05081_E_Gotos into initialization or finalization blocks of units are '+
'not allowed'#000+
- '05082=E_Invalid external n','ame "$1" for formal class "$2"'#000+
- '05083=E_Complete class definition with external name "$1" here'#000+
+ '05082=E_Invalid external name "$1" for formal class "$2"'#000+
+ '05083=E_Complete class definition with external name "$1" ','here'#000+
'06009_E_Parameter list size exceeds 65535 bytes'#000+
'06012_E_File types must be var parameters'#000+
'06013_E_The use of a far pointer isn'#039't allowed there'#000+
- '060','15_E_EXPORT declared functions can'#039't be called'#000+
- '06016_W_Possible illegal call of constructor or destructor'#000+
+ '06015_E_EXPORT declared functions can'#039't be called'#000+
+ '06016_W_Possible illegal call of construct','or or destructor'#000+
'06017_N_Inefficient code'#000+
'06018_W_unreachable code'#000+
'06020_E_Abstract methods can'#039't be called directly'#000+
- '06027_DL_Register $1 weight $2 $3'#000,
+ '06027_DL_Register $1 weight $2 $3'#000+
'06029_DL_Stack frame is omitted'#000+
'06031_E_Object or class methods can'#039't be inline.'#000+
- '06032_E_Procvar calls cannot be inline.'#000+
+ '06032_E_','Procvar calls cannot be inline.'#000+
'06033_E_No code for inline procedure stored'#000+
'06035_E_Element zero of an ansi/wide- or longstring can'#039't be acces'+
- 'sed, use ','(set)length instead'#000+
+ 'sed, use (set)length instead'#000+
'06037_E_Constructors or destructors cannot be called inside a '#039'wit'+
- 'h'#039' clause'#000+
+ 'h'#039' ','clause'#000+
'06038_E_Cannot call message handler methods directly'#000+
'06039_E_Jump in or outside of an exception block'#000+
- '06040_E_Control flow statements aren'#039't all','owed in a finally bloc'+
- 'k'#000+
+ '06040_E_Control flow statements aren'#039't allowed in a finally block'#000+
'06041_W_Parameters size exceeds limit for certain cpu'#039's'#000+
- '06042_W_Local variable size exceed limit for certain cpu'#039's'#000+
+ '06042_W_L','ocal variable size exceed limit for certain cpu'#039's'#000+
'06043_E_Local variables size exceeds supported limit'#000+
'06044_E_BREAK not allowed'#000+
- '06045_E_CONTINUE not a','llowed'#000+
+ '06045_E_CONTINUE not allowed'#000+
'06046_F_Unknown compilerproc "$1". Check if you use the correct run ti'+
- 'me library.'#000+
+ 'me library.'#000,
'06047_F_Cannot find system type "$1". Check if you use the correct run'+
' time library.'#000+
'06048_H_Inherited call to abstract method ignored'#000+
- '06049_E_Goto lab','el "$1" not defined or optimized away'#000+
- '06050_F_Cannot find type "$1" in unit "$2". Check if you use the corre'+
- 'ct run time library.'#000+
+ '06049_E_Goto label "$1" not defined or optimized away'#000+
+ '06050_F_Cannot find type "$1" in unit "$2". Check i','f you use the cor'+
+ 'rect run time library.'#000+
'06051_E_Interprocedural gotos are allowed only to outer subroutines'#000+
- '06052_E_Label must be defined in the same s','cope as it is declared'#000+
- '06053_E_Leaving procedures containing explicit or implicit exceptions '+
- 'frames using goto is not allowed'#000+
+ '06052_E_Label must be defined in the same scope as it is declared'#000+
+ '06053_E_Leaving procedures containing explicit or implicit excepti','on'+
+ 's frames using goto is not allowed'#000+
'07000_DL_Starting $1 styled assembler parsing'#000+
'07001_DL_Finished $1 styled assembler parsing'#000+
- '07002_E_Non-label patt','ern contains @'#000+
+ '07002_E_Non-label pattern contains @'#000+
'07004_E_Error building record offset'#000+
- '07005_E_OFFSET used without identifier'#000+
+ '07005_E_OFFSET used without identifie','r'#000+
'07006_E_TYPE used without identifier'#000+
'07007_E_Cannot use local variable or parameters here'#000+
'07008_E_need to use OFFSET here'#000+
- '07009_E_need to use $ here'#000,
+ '07009_E_need to use $ here'#000+
'07010_E_Cannot use multiple relocatable symbols'#000+
- '07011_E_Relocatable symbol can only be added'#000+
+ '07011_E_Relocatable symbol can only be ad','ded'#000+
'07012_E_Invalid constant expression'#000+
'07013_E_Relocatable symbol is not allowed'#000+
'07014_E_Invalid reference syntax'#000+
- '07015_E_You cannot reach $1 from tha','t code'#000+
+ '07015_E_You cannot reach $1 from that code'#000+
'07016_E_Local symbols/labels aren'#039't allowed as references'#000+
- '07017_E_Invalid base and index register usage'#000+
+ '07017_E_Invalid base and',' index register usage'#000+
'07018_W_Possible error in object field handling'#000+
'07019_E_Wrong scale factor specified'#000+
'07020_E_Multiple index register usage'#000+
- '07021_','E_Invalid operand type'#000+
+ '07021_E_Invalid operand type'#000+
'07022_E_Invalid string as opcode operand: $1'#000+
- '07023_W_@CODE and @DATA not supported'#000+
+ '07023_W_@CODE and @DA','TA not supported'#000+
'07024_E_Null label references are not allowed'#000+
'07025_E_Divide by zero in asm evaluator'#000+
'07026_E_Illegal expression'#000+
- '07027_E_escape sequen','ce ignored: $1'#000+
+ '07027_E_escape sequence ignored: $1'#000+
'07028_E_Invalid symbol reference'#000+
- '07029_W_Fwait can cause emulation problems with emu387'#000+
+ '07029_W_Fwait can cause emulation problem','s with emu387'#000+
'07030_W_$1 without operand translated into $1P'#000+
'07031_W_ENTER instruction is not supported by Linux kernel'#000+
- '07032_W_Calling an overload fun','ction in assembler'#000+
+ '07032_W_Calling an overload function in assembler'#000+
'07033_E_Unsupported symbol type for operand'#000+
- '07034_E_Constant value out of bounds'#000+
+ '07034_E_Constant value out',' of bounds'#000+
'07035_E_Error converting decimal $1'#000+
'07036_E_Error converting octal $1'#000+
'07037_E_Error converting binary $1'#000+
- '07038_E_Error converting hexadecima','l $1'#000+
+ '07038_E_Error converting hexadecimal $1'#000+
'07039_H_$1 translated to $2'#000+
'07040_W_$1 is associated to an overloaded function'#000+
- '07041_E_Cannot use SELF outside a method'#000+
+ '07041','_E_Cannot use SELF outside a method'#000+
'07042_E_Cannot use OLDEBP outside a nested procedure'#000+
'07043_W_Procedures can'#039't return any value in asm code'#000+
- '07044_E_','SEG not supported'#000+
+ '07044_E_SEG not supported'#000+
'07045_E_Size suffix and destination or source size do not match'#000+
- '07046_W_Size suffix and destination or source size do not match'#000+
+ '07046_W','_Size suffix and destination or source size do not match'#000+
'07047_E_Assembler syntax error'#000+
'07048_E_Invalid combination of opcode and operands'#000+
- '07049_E_Asse','mbler syntax error in operand'#000+
+ '07049_E_Assembler syntax error in operand'#000+
'07050_E_Assembler syntax error in constant'#000+
- '07051_E_Invalid String expression'#000+
+ '07051_E_Invalid ','String expression'#000+
'07052_W_constant with symbol $1 for address which is not on a pointer'#000+
'07053_E_Unrecognized opcode $1'#000+
- '07054_E_Invalid or missing opcod','e'#000+
+ '07054_E_Invalid or missing opcode'#000+
'07055_E_Invalid combination of prefix and opcode: $1'#000+
- '07056_E_Invalid combination of override and opcode: $1'#000+
+ '07056_E_Invalid combination of ove','rride and opcode: $1'#000+
'07057_E_Too many operands on line'#000+
'07058_W_NEAR ignored'#000+
'07059_W_FAR ignored'#000+
'07060_E_Duplicate local symbol $1'#000+
- '07061_E_Undefined loc','al symbol $1'#000+
+ '07061_E_Undefined local symbol $1'#000+
'07062_E_Unknown label identifier $1'#000+
'07063_E_Invalid register name'#000+
- '07064_E_Invalid floating point register name'#000+
+ '07064_E_In','valid floating point register name'#000+
'07066_W_Modulo not supported'#000+
'07067_E_Invalid floating point constant $1'#000+
'07068_E_Invalid floating point expression'#000+
- '07','069_E_Wrong symbol type'#000+
+ '07069_E_Wrong symbol type'#000+
'07070_E_Cannot index a local var or parameter with a register'#000+
- '07071_E_Invalid segment override expression'#000+
+ '070','71_E_Invalid segment override expression'#000+
'07072_W_Identifier $1 supposed external'#000+
'07073_E_Strings not allowed as constants'#000+
- '07074_No type of variable spe','cified'#000+
+ '07074_No type of variable specified'#000+
'07075_E_assembler code not returned to text section'#000+
- '07076_E_Not a directive or local symbol $1'#000+
+ '07076_E_Not a directive or loc','al symbol $1'#000+
'07077_E_Using a defined name as a local label'#000+
'07078_E_Dollar token is used without an identifier'#000+
- '07079_W_32bit constant created for addres','s'#000+
+ '07079_W_32bit constant created for address'#000+
'07080_N_.align is target specific, use .balign or .p2align'#000+
- '07081_E_Can'#039't access fields directly for parameters'#000+
+ '07081_E_Can'#039't access fields ','directly for parameters'#000+
'07082_E_Can'#039't access fields of objects/classes directly'#000+
'07083_E_No size specified and unable to determine the size of the oper'+
- 'a','nds'#000+
+ 'ands'#000+
'07084_E_Cannot use RESULT in this function'#000+
- '07086_W_"$1" without operand translated into "$1 %st,%st(1)"'#000+
+ '07086_W_"$1" without operand translated in','to "$1 %st,%st(1)"'#000+
'07087_W_"$1 %st(n)" translated into "$1 %st,%st(n)"'#000+
'07088_W_"$1 %st(n)" translated into "$1 %st(n),%st"'#000+
- '07089_E_Char < not allowed h','ere'#000+
+ '07089_E_Char < not allowed here'#000+
'07090_E_Char > not allowed here'#000+
'07093_W_ALIGN not supported'#000+
- '07094_E_Inc and Dec cannot be together'#000+
+ '07094_E_Inc and Dec canno','t be together'#000+
'07095_E_Invalid reglist for movem'#000+
'07096_E_Reglist invalid for opcode'#000+
'07097_E_Higher cpu mode required ($1)'#000+
- '07098_W_No size specified and ','unable to determine the size of the op'+
- 'erands, using DWORD as default'#000+
- '07099_E_Syntax error while trying to parse a shifter operand'#000+
+ '07098_W_No size specified and unable to determine the size of the oper'+
+ 'ands, using DWORD as default'#000+
+ '07099_E_Syntax error',' while trying to parse a shifter operand'#000+
'07100_E_Address of packed component is not at a byte boundary'#000+
- '07101_W_No size specified and unable to determin','e the size of the op'+
- 'erands, using BYTE as default'#000+
- '07102_W_Use of +offset(%ebp) for parameters invalid here'#000+
+ '07101_W_No size specified and unable to determine the size of the oper'+
+ 'ands, using BYTE as default'#000+
+ '07102_W_Use of +offset(%ebp) for parame','ters invalid here'#000+
'07103_W_Use of +offset(%ebp) is not compatible with regcall convention'+
#000+
- '07104_W_Use of -offset(%ebp) is not recommended for local vari','able a'+
- 'ccess'#000+
+ '07104_W_Use of -offset(%ebp) is not recommended for local variable acc'+
+ 'ess'#000+
'07105_W_Use of -offset(%esp), access may cause a crash or value may be'+
' lost'#000+
- '07106_E_VMTOffset must be used in combination with a virtual method, a'+
- 'nd "$1" is not virtual'#000+
+ '0','7106_E_VMTOffset must be used in combination with a virtual method,'+
+ ' and "$1" is not virtual'#000+
'07107_E_Generating PIC, but reference is not PIC-safe'#000+
- '07108','_E_All registers in a register set must be of the same kind and'+
- ' width'#000+
- '07109_E_A register set cannot be empty'#000+
+ '07108_E_All registers in a register set must be of the same kind and w'+
+ 'idth'#000+
+ '07109_E_A register ','set cannot be empty'#000+
'07110_W_@GOTPCREL is useless and potentially dangereous for local symb'+
'ols'#000+
'08000_F_Too many assembler files'#000+
- '08001_F_Selected assembl','er output not supported'#000+
+ '08001_F_Selected assembler output not supported'#000+
'08002_F_Comp not supported'#000+
- '08003_F_Direct not support for binary writers'#000+
+ '08003_F_Direct not support for binary ','writers'#000+
'08004_E_Allocating of data is only allowed in bss section'#000+
'08005_F_No binary writer selected'#000+
'08006_E_Asm: Opcode $1 not in table'#000+
- '08007_E_Asm: $1',' invalid combination of opcode and operands'#000+
- '08008_E_Asm: 16 Bit references not supported'#000+
+ '08007_E_Asm: $1 invalid combination of opcode and operands'#000+
+ '08008_E_Asm: 16 Bit references not supported'#000,
'08009_E_Asm: Invalid effective address'#000+
'08010_E_Asm: Immediate or reference expected'#000+
'08011_E_Asm: $1 value exceeds bounds $2'#000+
- '08012_E_Asm: Short jump is ','out of range $1'#000+
+ '08012_E_Asm: Short jump is out of range $1'#000+
'08013_E_Asm: Undefined label $1'#000+
- '08014_E_Asm: Comp type not supported for this target'#000+
+ '08014_E_Asm: Comp type not supported for ','this target'#000+
'08015_E_Asm: Extended type not supported for this target'#000+
'08016_E_Asm: Duplicate label $1'#000+
'08017_E_Asm: Redefined label $1'#000+
- '08018_E_Asm: First',' defined here'#000+
+ '08018_E_Asm: First defined here'#000+
'08019_E_Asm: Invalid register $1'#000+
- '08020_E_Asm: 16 or 32 Bit references not supported'#000+
+ '08020_E_Asm: 16 or 32 Bit references not s','upported'#000+
'08021_E_Asm: 64 Bit operands not supported'#000+
'09000_W_Source operating system redefined'#000+
'09001_I_Assembling (pipe) $1'#000+
- '09002_E_Can'#039't create assembl','er file: $1'#000+
+ '09002_E_Can'#039't create assembler file: $1'#000+
'09003_E_Can'#039't create object file: $1'#000+
'09004_E_Can'#039't create archive file: $1'#000+
- '09005_E_Assembler $1 not found, switching to external assembling'#000+
+ '09','005_E_Assembler $1 not found, switching to external assembling'#000+
'09006_T_Using assembler: $1'#000+
'09007_E_Error while assembling exitcode $1'#000+
- '09008_E_Can'#039't cal','l the assembler, error $1 switching to external'+
- ' assembling'#000+
+ '09008_E_Can'#039't call the assembler, error $1 switching to external a'+
+ 'ssembling'#000+
'09009_I_Assembling $1'#000+
- '09010_I_Assembling with smartlinking $1'#000+
+ '09010_I_','Assembling with smartlinking $1'#000+
'09011_W_Object $1 not found, Linking may fail !'#000+
'09012_W_Library $1 not found, Linking may fail !'#000+
- '09013_E_Error while li','nking'#000+
+ '09013_E_Error while linking'#000+
'09014_E_Can'#039't call the linker, switching to external linking'#000+
'09015_I_Linking $1'#000+
- '09016_E_Util $1 not found, switching to external linking'#000+
+ '090','16_E_Util $1 not found, switching to external linking'#000+
'09017_T_Using util $1'#000+
'09018_E_Creation of Executables not supported'#000+
- '09019_E_Creation of Dynamic/S','hared Libraries not supported'#000+
+ '09019_E_Creation of Dynamic/Shared Libraries not supported'#000+
'09020_I_Closing script $1'#000+
- '09021_E_resource compiler "$1" not found, switching to external mode'#000+
+ '09021_E_resource compiler "$1" no','t found, switching to external mode'+
+ #000+
'09022_I_Compiling resource $1'#000+
'09023_T_unit $1 can'#039't be statically linked, switching to smart lin'+
'king'#000+
- '09024_T_unit $','1 can'#039't be smart linked, switching to static linki'+
- 'ng'#000+
- '09025_T_unit $1 can'#039't be shared linked, switching to static linkin'+
- 'g'#000+
+ '09024_T_unit $1 can'#039't be smart linked, switching to static linking'+
+ #000+
+ '09025_T_unit $1 can'#039't be shared link','ed, switching to static link'+
+ 'ing'#000+
'09026_E_unit $1 can'#039't be smart or static linked'#000+
'09027_E_unit $1 can'#039't be shared or static linked'#000+
- '09028_D_Calling resour','ce compiler "$1" with "$2" as command line'#000+
+ '09028_D_Calling resource compiler "$1" with "$2" as command line'#000+
'09029_E_Error while compiling resources'#000+
- '09030_E_Can'#039't call the resource compiler "$1", switching to extern'+
- 'al mode'#000+
+ '09030_','E_Can'#039't call the resource compiler "$1", switching to exte'+
+ 'rnal mode'#000+
'09031_E_Can'#039't open resource file "$1"'#000+
'09032_E_Can'#039't write resource file "$1"'#000+
- '09128_','F_Can'#039't post process executable $1'#000+
+ '09128_F_Can'#039't post process executable $1'#000+
'09129_F_Can'#039't open executable $1'#000+
- '09130_X_Size of Code: $1 bytes'#000+
+ '09130_X_Size of Code:',' $1 bytes'#000+
'09131_X_Size of initialized data: $1 bytes'#000+
'09132_X_Size of uninitialized data: $1 bytes'#000+
'09133_X_Stack space reserved: $1 bytes'#000+
- '09134_X_Stack ','space committed: $1 bytes'#000+
+ '09134_X_Stack space committed: $1 bytes'#000+
'09200_F_Executable image size is too big for $1 target.'#000+
- '09201_W_Object file "$1" contains 32-bit absolute relocation to symbol'+
- ' "$2".'#000+
+ '09201_W','_Object file "$1" contains 32-bit absolute relocation to symb'+
+ 'ol "$2".'#000+
'10000_T_Unitsearch: $1'#000+
'10001_T_PPU Loading $1'#000+
'10002_U_PPU Name: $1'#000+
- '10003_U_PPU Fl','ags: $1'#000+
+ '10003_U_PPU Flags: $1'#000+
'10004_U_PPU Crc: $1'#000+
'10005_U_PPU Time: $1'#000+
'10006_U_PPU File too short'#000+
- '10007_U_PPU Invalid Header (no PPU at the begin)'#000+
+ '10007_U_PPU I','nvalid Header (no PPU at the begin)'#000+
'10008_U_PPU Invalid Version $1'#000+
'10009_U_PPU is compiled for another processor'#000+
- '10010_U_PPU is compiled for another ta','rget'#000+
+ '10010_U_PPU is compiled for another target'#000+
'10011_U_PPU Source: $1'#000+
'10012_U_Writing $1'#000+
'10013_F_Can'#039't Write PPU-File'#000+
- '10014_F_Error reading PPU-File'#000+
+ '10014_F_Error',' reading PPU-File'#000+
'10015_F_unexpected end of PPU-File'#000+
'10016_F_Invalid PPU-File entry: $1'#000+
'10017_F_PPU Dbx count problem'#000+
'10018_E_Illegal unit name: $1'#000+
- '100','19_F_Too much units'#000+
+ '10019_F_Too much units'#000+
'10020_F_Circular unit reference between $1 and $2'#000+
- '10021_F_Can'#039't compile unit $1, no sources available'#000+
+ '10021_F_Can'#039't compi','le unit $1, no sources available'#000+
'10022_F_Can'#039't find unit $1 used by $2'#000+
'10023_W_Unit $1 was not found but $2 exists'#000+
- '10024_F_Unit $1 searched but $2 foun','d'#000+
+ '10024_F_Unit $1 searched but $2 found'#000+
'10025_W_Compiling the system unit requires the -Us switch'#000+
- '10026_F_There were $1 errors compiling module, stopping'#000+
+ '10026_F_There were $1 errors ','compiling module, stopping'#000+
'10027_U_Load from $1 ($2) unit $3'#000+
'10028_U_Recompiling $1, checksum changed for $2'#000+
- '10029_U_Recompiling $1, source found only'#000,
+ '10029_U_Recompiling $1, source found only'#000+
'10030_U_Recompiling unit, static lib is older than ppufile'#000+
- '10031_U_Recompiling unit, shared lib is older than ppufile'#000+
+ '10031_U_Recompiling unit, shar','ed lib is older than ppufile'#000+
'10032_U_Recompiling unit, obj and asm are older than ppufile'#000+
'10033_U_Recompiling unit, obj is older than asm'#000+
- '10034_U_Parsi','ng interface of $1'#000+
+ '10034_U_Parsing interface of $1'#000+
'10035_U_Parsing implementation of $1'#000+
'10036_U_Second load for unit $1'#000+
- '10037_U_PPU Check file $1 time $2'#000+
+ '1','0037_U_PPU Check file $1 time $2'#000+
'10040_W_Can'#039't recompile unit $1, but found modifed include files'#000+
- '10041_U_File $1 is newer than the one used for creati','ng PPU file $2'#000+
+ '10041_U_File $1 is newer than the one used for creating PPU file $2'#000+
'10042_U_Trying to use a unit which was compiled with a different FPU m'+
- 'ode'#000+
+ 'ode'#000,
'10043_U_Loading interface units from $1'#000+
'10044_U_Loading implementation units from $1'#000+
'10045_U_Interface CRC changed for unit $1'#000+
- '10046_U_Implementation C','RC changed for unit $1'#000+
+ '10046_U_Implementation CRC changed for unit $1'#000+
'10047_U_Finished compiling unit $1'#000+
- '10048_U_Adding dependency: $1 depends on $2'#000+
+ '10048_U_Adding dependency: $1 d','epends on $2'#000+
'10049_U_No reload, is caller: $1'#000+
'10050_U_No reload, already in second compile: $1'#000+
'10051_U_Flag for reload: $1'#000+
'10052_U_Forced reloading'#000+
- '100','53_U_Previous state of $1: $2'#000+
+ '10053_U_Previous state of $1: $2'#000+
'10054_U_Already compiling $1, setting second compile'#000+
- '10055_U_Loading unit $1'#000+
+ '10055_','U_Loading unit $1'#000+
'10056_U_Finished loading unit $1'#000+
'10057_U_Registering new unit $1'#000+
'10058_U_Re-resolving unit $1'#000+
- '10059_U_Skipping re-resolving unit $1, ','still loading used units'#000+
+ '10059_U_Skipping re-resolving unit $1, still loading used units'#000+
'10060_U_Unloading resource unit $1 (not needed)'#000+
- '10061_E_Unit $1 was compiled using a different whole program optimizat'+
- 'ion feedback input ($2, $3); recompile it without wpo or use the same '+
- 'wpo feedback input file for',' this compilation invocation'#000+
- '10062_U_Indirect interface (objects/classes) CRC changed for unit $1'#000+
+ '10061_E_Unit $1 ','was compiled using a different whole program optimiz'+
+ 'ation feedback input ($2, $3); recompile it without wpo or use the sam'+
+ 'e wpo feedback input file for this compilation invocation'#000+
+ '10062_U_Indirect interface (objects/classes) CRC changed for',' unit $1'+
+ #000+
'11000_O_$1 [options] <inputfile> [options]'#000+
'11001_W_Only one source file supported, changing source file to compil'+
'e from "$1" into "$2"'#000+
- '11002_W','_DEF file can be created only for OS/2'#000+
+ '11002_W_DEF file can be created only for OS/2'#000+
'11003_E_nested response files are not supported'#000+
- '11004_F_No source file name in command line'#000+
+ '11','004_F_No source file name in command line'#000+
'11005_N_No option inside $1 config file'#000+
'11006_E_Illegal parameter: $1'#000+
'11007_H_-? writes help pages'#000+
- '11008_F_To','o many config files nested'#000+
+ '11008_F_Too many config files nested'#000+
'11009_F_Unable to open file $1'#000+
- '11010_D_Reading further options from $1'#000+
+ '11010_D_Reading further options',' from $1'#000+
'11011_W_Target is already set to: $1'#000+
'11012_W_Shared libs not supported on DOS platform, reverting to static'+
#000+
- '11013_F_In options file $1 at line',' $2 too many \var{\#IF(N)DEFs} enc'+
- 'ountered'#000+
- '11014_F_In options file $1 at line $2 unexpected \var{\#ENDIFs} encoun'+
- 'tered'#000+
+ '11013_F_In options file $1 at line $2 too many \var{\#IF(N)DEFs} encou'+
+ 'ntered'#000+
+ '11014_F_In options file $1 at line $2 unexpect','ed \var{\#ENDIFs} enco'+
+ 'untered'#000+
'11015_F_Open conditional at the end of the options file'#000+
- '11016_W_Debug information generation is not supported by this exe','cut'+
- 'able'#000+
+ '11016_W_Debug information generation is not supported by this executab'+
+ 'le'#000+
'11017_H_Try recompiling with -dGDB'#000+
'11018_W_You are using the obsolete switch $1'#000+
- '11019_W_You are using the obsolete switch $1, please use $2'#000+
+ '1','1019_W_You are using the obsolete switch $1, please use $2'#000+
'11020_N_Switching assembler to default source writing assembler'#000+
- '11021_W_Assembler output sel','ected "$1" is not compatible with "$2"'#000+
+ '11021_W_Assembler output selected "$1" is not compatible with "$2"'#000+
'11022_W_"$1" assembler use forced'#000+
- '11026_T_Reading options from file $1'#000+
+ '11026_T_Reading ','options from file $1'#000+
'11027_T_Reading options from environment $1'#000+
'11028_D_Handling option "$1"'#000+
'11029_O_*** press enter ***'#000+
- '11030_H_Start of reading conf','ig file $1'#000+
+ '11030_H_Start of reading config file $1'#000+
'11031_H_End of reading config file $1'#000+
'11032_D_interpreting option "$1"'#000+
- '11036_D_interpreting firstpass option "$1"'#000+
+ '11036_D','_interpreting firstpass option "$1"'#000+
'11033_D_interpreting file option "$1"'#000+
'11034_D_Reading config file "$1"'#000+
'11035_D_found source file name "$1"'#000+
- '11039_E_','Unknown code page'#000+
+ '11039_E_Unknown code page'#000+
'11040_F_Config file $1 is a directory'#000+
- '11041_W_Assembler output selected "$1" cannot generate debug info, deb'+
- 'ugging disabled'#000+
+ '11041_W_Assembler output selected',' "$1" cannot generate debug info, d'+
+ 'ebugging disabled'#000+
'11042_W_Use of ppc386.cfg is deprecated, please use fpc.cfg instead'#000+
- '11043_F_In options file $1 at ','line $2 \var{\#ELSE} directive without'+
- ' \var{\#IF(N)DEF} found'#000+
- '11044_F_Option "$1" is not, or not yet, supported on the current targe'+
- 't platform'#000+
+ '11043_F_In options file $1 at line $2 \var{\#ELSE} directive without \'+
+ 'var{\#IF(N)DEF} found'#000+
+ '11044_F_Option "$1" is not,',' or not yet, supported on the current tar'+
+ 'get platform'#000+
'11045_F_The feature "$1" is not, or not yet, supported on the selected'+
' target platform'#000+
- '11046_N_DW','ARF debug information cannot be used with smart linking on'+
- ' this target, switching to static linking'#000+
+ '11046_N_DWARF debug information cannot be used with smart linking on t'+
+ 'his target, switching to stat','ic linking'#000+
'11047_W_Option "$1" is ignored for the current target platform.'#000+
'11048_W_Disabling external debug information because it is unsupported'+
- ' for t','he selected target/debug format combination.'#000+
- '12000_F_Cannot open whole program optimization feedback file "$1"'#000+
+ ' for the selected target/debug format combination.'#000+
+ '12000_F_Cannot open whole program optimizati','on feedback file "$1"'#000+
'12001_D_Processing whole program optimization information in wpo feedb'+
'ack file "$1"'#000+
- '12002_D_Finished processing the whole program',' optimization informati'+
- 'on in wpo feedback file "$1"'#000+
- '12003_E_Expected section header, but got "$2" at line $1 of wpo feedba'+
- 'ck file'#000+
+ '12002_D_Finished processing the whole program optimization information'+
+ ' in wpo feedback file "$1"'#000+
+ '12003_E_Expected section header, but ','got "$2" at line $1 of wpo feed'+
+ 'back file'#000+
'12004_W_No handler registered for whole program optimization section "'+
- '$2" at line $1 of wpo feedback file, ign','oring'#000+
+ '$2" at line $1 of wpo feedback file, ignoring'#000+
'12005_D_Found whole program optimization section "$1" with information'+
' about "$2"'#000+
- '12006_F_The selected whole program optimizations require a previously '+
- 'generated feedback file (use -Fw to specify)'#000+
- '12007_E_No collected information nece','ssary to perform "$1" whole pro'+
- 'gram optimization found'#000+
- '12008_F_Specify a whole program optimization feedback file to store th'+
- 'e generated info in (using -FW)'#000+
+ '1','2006_F_The selected whole program optimizations require a previousl'+
+ 'y generated feedback file (use -Fw to specify)'#000+
+ '12007_E_No collected information necessary to perform "$1" whole progr'+
+ 'am optimization found'#000+
+ '12008_F_Specify a whole program op','timization feedback file to store '+
+ 'the generated info in (using -FW)'#000+
'12009_E_Not generating any whole program optimization information, yet'+
- ' a feedback f','ile was specified (using -FW)'#000+
- '12010_E_Not performing any whole program optimizations, yet an input f'+
- 'eedback file was specified (using -Fw)'#000+
+ ' a feedback file was specified (using -FW)'#000+
+ '12010_E_Not performing any whole program optimizations, yet',' an input'+
+ ' feedback file was specified (using -Fw)'#000+
'12011_D_Skipping whole program optimization section "$1", because not '+
- 'needed by the requested optimiz','ations'#000+
+ 'needed by the requested optimizations'#000+
'12012_W_Overriding previously read information for "$1" from feedback '+
- 'input file using information in section "$2"'#000+
+ 'input file u','sing information in section "$2"'#000+
'12013_E_Cannot extract symbol liveness information from program when s'+
'tripping symbols, use -Xs-'#000+
- '12014_E_Cannot extrac','t symbol liveness information from program when'+
- ' when not linking'#000+
- '12015_F_Cannot find "$1" or "$2" to extract symbol liveness informatio'+
- 'n from linked program'#000+
+ '12014_E_Cannot extract symbol liveness information from program when w'+
+ 'hen not linking'#000+
+ '12015_F_Cannot find "$1"',' or "$2" to extract symbol liveness informat'+
+ 'ion from linked program'#000+
'12016_E_Error during reading symbol liveness information produced by "'+
'$1"'#000+
- '12017_F_E','rror executing "$1" (exitcode: $2) to extract symbol inform'+
- 'ation from linked program'#000+
- '12018_E_Collection of symbol liveness information can only help when u'+
- 'sing smart linking, use -CX -XX'#000+
- '12019_E_Cannot create specified whole program optimis','ation feedback '+
- 'file "$1"'#000+
- '11023_Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPC'+
- 'CPU'#010+
- 'Copyright (c) 1993-2010 by Florian Klaempfl'#000+
+ '12017_F_Error executing "$1" (exitcode: $2) to extract symbol informat'+
+ 'ion from linked program'#000+
+ '1201','8_E_Collection of symbol liveness information can only help when'+
+ ' using smart linking, use -CX -XX'#000+
+ '12019_E_Cannot create specified whole program optimisation feedback fi'+
+ 'le "$1"'#000+
+ '11023_Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] fo','r $F'+
+ 'PCCPU'#010+
+ 'Copyright (c) 1993-2011 by Florian Klaempfl and others'#000+
'11024_Free Pascal Compiler version $FPCVERSION'#010+
#010+
'Compiler Date : $FPCDATE'#010+
- 'Compiler CPU Target',': $FPCCPU'#010+
+ 'Compiler CPU Target: $FPCCPU'#010+
#010+
'Supported targets:'#010+
' $OSTARGETS'#010+
#010+
'Supported CPU instruction sets:'#010+
- ' $INSTRUCTIONSETS'#010+
+ ' ','$INSTRUCTIONSETS'#010+
#010+
'Supported FPU instruction sets:'#010+
' $FPUINSTRUCTIONSETS'#010+
@@ -1063,311 +1068,311 @@ const msgtxt : array[0..000244,1..240] of char=(
'Supported Optimizations:'#010+
' $OPTIMIZATIONS'#010+
#010+
- 'Supporte','d Whole Program Optimizations:'#010+
+ 'Supported Whole Program Optimizations:'#010+
' All'#010+
' $WPOPTIMIZATIONS'#010+
#010+
- 'Supported Microcontroller types:'#010+
+ 'Supported Microcontro','ller types:'#010+
' $CONTROLLERTYPES'#010+
#010+
'This program comes under the GNU General Public Licence'#010+
'For more information read COPYING.FPC'#010+
#010+
- 'Report bugs, suggestions, etc. to:'#010,
+ 'Report bugs, suggestions, etc. to:'#010+
' http://bugs.freepascal.org'#010+
'or'#010+
- ' bugs@freepascal.org'#000+
+ ' bugs@freepasca','l.org'#000+
'11025_**0*_Put + after a boolean switch option to enable it, - to disa'+
'ble it'#010+
'**1a_The compiler doesn'#039't delete the generated assembler file'#010+
- '**2al_List source','code lines in assembler file'#010+
+ '**2al_List sourcecode lines in assembler file'#010+
'**2an_List node info in assembler file'#010+
- '*L2ap_Use pipes instead of creating temporary assembler files'#010+
+ '*L2ap_Use ','pipes instead of creating temporary assembler files'#010+
'**2ar_List register allocation/release info in assembler file'#010+
- '**2at_List temp allocation/release info in assem','bler file'#010+
+ '**2at_List temp allocation/release info in assembler file'#010+
'**1A<x>_Output format:'#010+
'**2Adefault_Use default assembler'#010+
- '3*2Aas_Assemble using GNU AS'#010+
+ '3*2Aas_Asse','mble using GNU AS'#010+
'3*2Amacho_Mach-O (Darwin, Intel 32 bit) using internal writer'#010+
'3*2Anasmcoff_COFF (Go32v2) file using Nasm'#010+
- '3*2Anasmelf_ELF32 (Linux) file using Na','sm'#010+
+ '3*2Anasmelf_ELF32 (Linux) file using Nasm'#010+
'3*2Anasmwin32_Win32 object file using Nasm'#010+
- '3*2Anasmwdosx_Win32/WDOSX object file using Nasm'#010+
+ '3*2Anasmwdosx_Win32/WDOSX object',' file using Nasm'#010+
'3*2Awasm_Obj file using Wasm (Watcom)'#010+
'3*2Anasmobj_Obj file using Nasm'#010+
'3*2Amasm_Obj file using Masm (Microsoft)'#010+
- '3*2Atasm_Obj file using Tasm (Borl','and)'#010+
+ '3*2Atasm_Obj file using Tasm (Borland)'#010+
'3*2Aelf_ELF (Linux) using internal writer'#010+
- '3*2Acoff_COFF (Go32v2) using internal writer'#010+
+ '3*2Acoff_COFF (Go32v2) using in','ternal writer'#010+
'3*2Apecoff_PE-COFF (Win32) using internal writer'#010+
'4*2Aas_Assemble using GNU AS'#010+
'6*2Aas_Unix o-file using GNU AS'#010+
'6*2Agas_GNU Motorola assembler'#010+
- '6*2Amit','_MIT Syntax (old GAS)'#010+
+ '6*2Amit_MIT Syntax (old GAS)'#010+
'6*2Amot_Standard Motorola assembler'#010+
- 'A*2Aas_Assemble using GNU AS'#010+
+ 'A*2Aas_Assemble usin','g GNU AS'#010+
'P*2Aas_Assemble using GNU AS'#010+
'S*2Aas_Assemble using GNU AS'#010+
'**1b_Generate browser info'#010+
'**2bl_Generate local symbol info'#010+
'**1B_Build all modules'#010+
- '**1C<x>_Code',' generation options:'#010+
+ '**1C<x>_Code generation options:'#010+
'**2C3<x>_Turn on ieee error checking for constants'#010+
- '**2Ca<x>_Select ABI, see fpc -i for possible values'#010+
+ '**2Ca<','x>_Select ABI, see fpc -i for possible values'#010+
'**2Cb_Generate big-endian code'#010+
'**2Cc<x>_Set default calling convention to <x>'#010+
- '**2CD_Create also dynamic library (not',' supported)'#010+
+ '**2CD_Create also dynamic library (not supported)'#010+
'**2Ce_Compilation with emulated floating point opcodes'#010+
- '**2Cf<x>_Select fpu instruction set to use, see fpc -i for possible va'+
- 'lues'#010+
+ '**2Cf<x>_Se','lect fpu instruction set to use, see fpc -i for possible '+
+ 'values'#010+
'**2CF<x>_Minimal floating point constant precision (default, 32, 64)'#010+
'**2Cg_Generate PIC code'#010+
- '**2Ch','<n>_<n> bytes heap (between 1023 and 67107840)'#010+
+ '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#010+
'**2Ci_IO-checking'#010+
- '**2Cn_Omit linking stage'#010+
+ '**2Cn_Omit li','nking stage'#010+
'**2Co_Check overflow of integer operations'#010+
'**2CO_Check for possible overflow of integer operations'#010+
- '**2Cp<x>_Select instruction set, see fpc -i for pos','sible values'#010+
+ '**2Cp<x>_Select instruction set, see fpc -i for possible values'#010+
'**2CP<x>=<y>_ packing settings'#010+
- '**3CPPACKSET=<y>_ <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 '+
- 'and 8'#010+
+ '**3CPPACKSET=<y>_ <y> set allocati','on: 0, 1 or DEFAULT or NORMAL, 2, '+
+ '4 and 8'#010+
'**2Cr_Range checking'#010+
'**2CR_Verify object method call validity'#010+
'**2Cs<n>_Set stack checking size to <n>'#010+
- '**2Ct_Stack checki','ng (for testing only, see manual)'#010+
+ '**2Ct_Stack checking (for testing only, see manual)'#010+
'**2CX_Create also smartlinked library'#010+
- '**1d<x>_Defines the symbol <x>'#010+
+ '**1d<x','>_Defines the symbol <x>'#010+
'**1D_Generate a DEF file'#010+
'**2Dd<x>_Set description to <x>'#010+
'**2Dv<x>_Set DLL version to <x>'#010+
'*O2Dw_PM application'#010+
- '**1e<x>_Set path to executa','ble'#010+
+ '**1e<x>_Set path to executable'#010+
'**1E_Same as -Cn'#010+
'**1fPIC_Same as -Cg'#010+
'**1F<x>_Set file names and paths:'#010+
- '**2Fa<x>[,y]_(for a program) load units <x> and [y] before uses is par'+
- 'sed'#010+
+ '**2','Fa<x>[,y]_(for a program) load units <x> and [y] before uses is p'+
+ 'arsed'#010+
'**2Fc<x>_Set input codepage to <x>'#010+
'**2FC<x>_Set RC compiler binary name to <x>'#010+
- '**2Fd_Disabl','e the compiler'#039's internal directory cache'#010+
- '**2FD<x>_Set the directory where to search for compiler utilities'#010+
+ '**2Fd_Disable the compiler'#039's internal directory cache'#010+
+ '**2FD<x>_Set the directory where to ','search for compiler utilities'#010+
'**2Fe<x>_Redirect error output to <x>'#010+
'**2Ff<x>_Add <x> to framework path (Darwin only)'#010+
'**2FE<x>_Set exe/unit output path to <x>'#010+
- '**2F','i<x>_Add <x> to include path'#010+
+ '**2Fi<x>_Add <x> to include path'#010+
'**2Fl<x>_Add <x> to library path'#010+
- '**2FL<x>_Use <x> as dynamic linker'#010+
+ '**2FL<x>_Use <x>',' as dynamic linker'#010+
'**2Fm<x>_Load unicode conversion table from <x>.txt in the compiler di'+
'r'#010+
'**2Fo<x>_Add <x> to object path'#010+
'**2Fr<x>_Load error message file <x>'#010+
- '**','2FR<x>_Set resource (.res) linker to <x>'#010+
+ '**2FR<x>_Set resource (.res) linker to <x>'#010+
'**2Fu<x>_Add <x> to unit path'#010+
- '**2FU<x>_Set unit output path to <x>, overrides -FE'#010+
+ '**2FU<x','>_Set unit output path to <x>, overrides -FE'#010+
'**2FW<x>_Store generated whole-program optimization feedback in <x>'#010+
- '**2Fw<x>_Load previously stored whole-program opt','imization feedback '+
- 'from <x>'#010+
- '*g1g_Generate debug information (default format for target)'#010+
+ '**2Fw<x>_Load previously stored whole-program optimization feedback fr'+
+ 'om <x>'#010+
+ '*g1g_Generate debug information (default format fo','r target)'#010+
'*g2gc_Generate checks for pointers'#010+
'*g2gh_Use heaptrace unit (for memory leak/corruption debugging)'#010+
- '*g2gl_Use line info unit (show more info with backtra','ces)'#010+
+ '*g2gl_Use line info unit (show more info with backtraces)'#010+
'*g2go<x>_Set debug information options'#010+
- '*g3godwarfsets_ Enable DWARF '#039'set'#039' type debug information (bre'+
- 'aks gdb < 6.5)'#010+
+ '*g3godwarfsets_ Enable DWARF '#039'set'#039,' type debug information (br'+
+ 'eaks gdb < 6.5)'#010+
'*g3gostabsabsincludes_ Store absolute/full include file paths in Stabs'+
#010+
- '*g3godwarfmethodclassprefix_ Prefix method names',' in DWARF with class'+
- ' name'#010+
+ '*g3godwarfmethodclassprefix_ Prefix method names in DWARF with class n'+
+ 'ame'#010+
'*g2gp_Preserve case in stabs symbol names'#010+
- '*g2gs_Generate Stabs debug information'#010+
+ '*g2gs_Gene','rate Stabs debug information'#010+
'*g2gt_Trash local variables (to detect uninitialized uses)'#010+
'*g2gv_Generates programs traceable with Valgrind'#010+
- '*g2gw_Generate DWARFv2 de','bug information (same as -gw2)'#010+
+ '*g2gw_Generate DWARFv2 debug information (same as -gw2)'#010+
'*g2gw2_Generate DWARFv2 debug information'#010+
- '*g2gw3_Generate DWARFv3 debug information'#010+
+ '*g2gw','3_Generate DWARFv3 debug information'#010+
'*g2gw4_Generate DWARFv4 debug information (experimental)'#010+
'**1i_Information'#010+
'**2iD_Return compiler date'#010+
- '**2iV_Return short compi','ler version'#010+
+ '**2iV_Return short compiler version'#010+
'**2iW_Return full compiler version'#010+
'**2iSO_Return compiler OS'#010+
- '**2iSP_Return compiler host processor'#010+
+ '**2iS','P_Return compiler host processor'#010+
'**2iTO_Return target OS'#010+
'**2iTP_Return target processor'#010+
'**1I<x>_Add <x> to include path'#010+
'**1k<x>_Pass <x> to the linker'#010+
- '**1l_Write ','logo'#010+
+ '**1l_Write logo'#010+
'**1M<x>_Set language mode to <x>'#010+
'**2Mfpc_Free Pascal dialect (default)'#010+
- '**2Mobjfpc_FPC mode with Object Pascal support'#010+
+ '**','2Mobjfpc_FPC mode with Object Pascal support'#010+
'**2Mdelphi_Delphi 7 compatibility mode'#010+
'**2Mtp_TP/BP 7.0 compatibility mode'#010+
- '**2Mmacpas_Macintosh Pascal dialects compa','tibility mode'#010+
+ '**2Mmacpas_Macintosh Pascal dialects compatibility mode'#010+
'**1n_Do not read the default config files'#010+
- '**1N<x>_Node tree optimizations'#010+
+ '**1N<x>_Node tree opti','mizations'#010+
'**2Nu_Unroll loops'#010+
'**1o<x>_Change the name of the executable produced to <x>'#010+
'**1O<x>_Optimizations:'#010+
'**2O-_Disable optimizations'#010+
- '**2O1_Level 1 optimizati','ons (quick and debugger friendly)'#010+
- '**2O2_Level 2 optimizations (-O1 + quick optimizations)'#010+
+ '**2O1_Level 1 optimizations (quick and debugger friendly)'#010+
+ '**2O2_Level 2 optimizations (-O1 + quick opt','imizations)'#010+
'**2O3_Level 3 optimizations (-O2 + slow optimizations)'#010+
'**2Oa<x>=<y>_Set alignment'#010+
- '**2Oo[NO]<x>_Enable or disable optimizations, see fpc -i for possibl','e'+
- ' values'#010+
- '**2Op<x>_Set target cpu for optimizing, see fpc -i for possible values'+
- #010+
+ '**2Oo[NO]<x>_Enable or disable optimizations, see fpc -i for possible '+
+ 'values'#010+
+ '**2Op<x>_Set target cpu for optimizing, see fpc -i for possible value',
+ 's'#010+
'**2OW<x>_Generate whole-program optimization feedback for optimization'+
' <x>, see fpc -i for possible values'#010+
- '**2Ow<x>_Perform whole-program optimization <x>, see ','fpc -i for poss'+
- 'ible values'#010+
+ '**2Ow<x>_Perform whole-program optimization <x>, see fpc -i for possib'+
+ 'le values'#010+
'**2Os_Optimize for size rather than speed'#010+
- '**1pg_Generate profile code for gprof (defines FPC_PROFILE)'#010+
+ '**1pg_Gen','erate profile code for gprof (defines FPC_PROFILE)'#010+
'**1R<x>_Assembler reading style:'#010+
'**2Rdefault_Use default assembler for target'#010+
- '3*2Ratt_Read AT&T style assembler',#010+
+ '3*2Ratt_Read AT&T style assembler'#010+
'3*2Rintel_Read Intel style assembler'#010+
'6*2RMOT_Read motorola style assembler'#010+
- '**1S<x>_Syntax options:'#010+
+ '**','1S<x>_Syntax options:'#010+
'**2S2_Same as -Mobjfpc'#010+
'**2Sc_Support operators like C (*=,+=,/= and -=)'#010+
'**2Sa_Turn on assertions'#010+
'**2Sd_Same as -Mdelphi'#010+
- '**2Se<x>_Error optio','ns. <x> is a combination of the following:'#010+
- '**3*_<n> : Compiler halts after the <n> errors (default is 1)'#010+
+ '**2Se<x>_Error options. <x> is a combination of the following:'#010+
+ '**3*_<n> : Compiler halts after the',' <n> errors (default is 1)'#010+
'**3*_w : Compiler also halts after warnings'#010+
'**3*_n : Compiler also halts after notes'#010+
'**3*_h : Compiler also halts after hints'#010+
- '**2Sg_Ena','ble LABEL and GOTO (default in -Mtp and -Mdelphi)'#010+
- '**2Sh_Use ansistrings by default instead of shortstrings'#010+
+ '**2Sg_Enable LABEL and GOTO (default in -Mtp and -Mdelphi)'#010+
+ '**2Sh_Use ansistrings by def','ault instead of shortstrings'#010+
'**2Si_Turn on inlining of procedures/functions declared as "inline"'#010+
'**2Sk_Load fpcylix unit'#010+
'**2SI<x>_Set interface style to <x>'#010+
- '**3SI','com_COM compatible interface (default)'#010+
+ '**3SIcom_COM compatible interface (default)'#010+
'**3SIcorba_CORBA compatible interface'#010+
- '**2Sm_Support macros like C (global)'#010+
+ '*','*2Sm_Support macros like C (global)'#010+
'**2So_Same as -Mtp'#010+
'**2Ss_Constructor name must be init (destructor must be done)'#010+
- '**2Sx_Enable exception keywords (default in D','elphi/ObjFPC modes)'#010+
+ '**2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)'#010+
'**1s_Do not call assembler and linker'#010+
- '**2sh_Generate script to link on host'#010+
+ '**2sh_Generate scrip','t to link on host'#010+
'**2st_Generate script to link on target'#010+
'**2sr_Skip register allocation phase (use with -alr)'#010+
'**1T<x>_Target operating system:'#010+
- '3*2Tdarwin_Darwin/','Mac OS X'#010+
+ '3*2Tdarwin_Darwin/Mac OS X'#010+
'3*2Temx_OS/2 via EMX (including EMX/RSX extender)'#010+
- '3*2Tfreebsd_FreeBSD'#010+
+ '3*2Tfreebsd_FreeBSD',#010+
'3*2Tgo32v2_Version 2 of DJ Delorie DOS extender'#010+
'3*2Tiphonesim_ iPhoneSimulator from iOS SDK 3.2+ (older versions: -Tda'+
'rwin)'#010+
'3*2Tlinux_Linux'#010+
'3*2Tnetbsd_NetBSD'#010+
- '3*2','Tnetware_Novell Netware Module (clib)'#010+
- '3*2Tnetwlibc_Novell Netware Module (libc)'#010+
+ '3*2Tnetware_Novell Netware Module (clib)'#010+
+ '3*2Tnetwlibc_Novell Netware Module (libc',')'#010+
'3*2Topenbsd_OpenBSD'#010+
'3*2Tos2_OS/2 / eComStation'#010+
'3*2Tsunos_SunOS/Solaris'#010+
'3*2Tsymbian_Symbian OS'#010+
'3*2Tsolaris_Solaris'#010+
'3*2Twatcom_Watcom compatible DOS extender'#010+
- '3*2T','wdosx_WDOSX DOS extender'#010+
+ '3*2Twdosx_WDOSX DOS extender'#010+
'3*2Twin32_Windows 32 Bit'#010+
'3*2Twince_Windows CE'#010+
- '4*2Tdarwin_Darwin/Mac OS X'#010+
+ '4*2Tdar','win_Darwin/Mac OS X'#010+
'4*2Tlinux_Linux'#010+
'4*2Twin64_Win64 (64 bit Windows systems)'#010+
'6*2Tamiga_Commodore Amiga'#010+
'6*2Tatari_Atari ST/STe/TT'#010+
'6*2Tlinux_Linux'#010+
- '6*2Tpalmos_PalmOS',#010+
+ '6*2Tpalmos_PalmOS'#010+
'A*2Tdarwin_Darwin/iPhoneOS/iOS'#010+
'A*2Tlinux_Linux'#010+
'A*2Twince_Windows CE'#010+
- 'P*2Tamiga_AmigaOS'#010+
+ 'P*2Tamiga','_AmigaOS'#010+
'P*2Tdarwin_Darwin/Mac OS X'#010+
'P*2Tlinux_Linux'#010+
'P*2Tmacos_Mac OS (classic)'#010+
'P*2Tmorphos_MorphOS'#010+
'S*2Tsolaris_Solaris'#010+
'S*2Tlinux_Linux'#010+
- '**1u<x>_Undefines the symbo','l <x>'#010+
+ '**1u<x>_Undefines the symbol <x>'#010+
'**1U_Unit options:'#010+
- '**2Un_Do not check where the unit name matches the file name'#010+
+ '**2Un_Do not check where the unit name matches the fi','le name'#010+
'**2Ur_Generate release unit files (never automatically recompiled)'#010+
'**2Us_Compile a system unit'#010+
- '**1v<x>_Be verbose. <x> is a combination of the following l','etters:'#010+
- '**2*_e : Show errors (default) 0 : Show nothing (except errors)'#010+
+ '**1v<x>_Be verbose. <x> is a combination of the following letters:'#010+
+ '**2*_e : Show errors (default) 0 : Show nothing (except errors)'#010,
'**2*_w : Show warnings u : Show unit info'#010+
'**2*_n : Show notes t : Show tried/used files'#010+
- '**2*_h : Show hints c : Sh','ow conditionals'#010+
+ '**2*_h : Show hints c : Show conditionals'#010+
'**2*_i : Show general info d : Show debug info'#010+
- '**2*_l : Show linenumbers r : Rhide/GCC compatibility mode'#010+
- '**2*_s : Show time stamps q : Show message numbers'#010+
- '**2*_a : Show everything ',' x : Executable info (Win32 only'+
- ')'#010+
- '**2*_b : Write file names messages p : Write tree.log with parse tre'+
+ '**2*_','l : Show linenumbers r : Rhide/GCC compatibility mod'+
'e'#010+
+ '**2*_s : Show time stamps q : Show message numbers'#010+
+ '**2*_a : Show everything x : Executable info (Win32 only)'#010+
+ '**2*_b : Write file names messages p : Wr','ite tree.log with parse t'+
+ 'ree'#010+
'**2*_ with full path v : Write fpcdebug.txt with'#010+
'**2*_ lots of debugging info'#010+
- '**2*','_m<x>,<y> : Don'#039't show messages numbered <x> and <y>'#010+
- '3*1W<x>_Target-specific options (targets)'#010+
+ '**2*_m<x>,<y> : Don'#039't show messages numbered <x> and <y>'#010+
+ '3*1W<x>_Target-specific o','ptions (targets)'#010+
'A*1W<x>_Target-specific options (targets)'#010+
'P*1W<x>_Target-specific options (targets)'#010+
'p*1W<x>_Target-specific options (targets)'#010+
- '3*2Wb_Create a bund','le instead of a library (Darwin)'#010+
- 'P*2Wb_Create a bundle instead of a library (Darwin)'#010+
+ '3*2Wb_Create a bundle instead of a library (Darwin)'#010+
+ 'P*2Wb_Create a bundle instead of a library (D','arwin)'#010+
'p*2Wb_Create a bundle instead of a library (Darwin)'#010+
'3*2WB_Create a relocatable image (Windows)'#010+
'A*2WB_Create a relocatable image (Windows, Symbian)'#010+
- '3*2WC_Sp','ecify console type application (EMX, OS/2, Windows)'#010+
- 'A*2WC_Specify console type application (Windows)'#010+
+ '3*2WC_Specify console type application (EMX, OS/2, Windows)'#010+
+ 'A*2WC_Specify console type',' application (Windows)'#010+
'P*2WC_Specify console type application (Classic Mac OS)'#010+
'3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+
- 'A*2WD_Use DEFFILE to ','export functions of DLL or EXE (Windows)'#010+
- '3*2We_Use external resources (Darwin)'#010+
+ 'A*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+
+ '3*2We_Use external resources (Darwin)',#010+
'4*2We_Use external resources (Darwin)'#010+
'A*2We_Use external resources (Darwin)'#010+
'P*2We_Use external resources (Darwin)'#010+
'p*2We_Use external resources (Darwin)'#010+
- '3*2WF_Spe','cify full-screen type application (EMX, OS/2)'#010+
- '3*2WG_Specify graphic type application (EMX, OS/2, Windows)'#010+
+ '3*2WF_Specify full-screen type application (EMX, OS/2)'#010+
+ '3*2WG_Specify graphic type appli','cation (EMX, OS/2, Windows)'#010+
'A*2WG_Specify graphic type application (Windows)'#010+
'P*2WG_Specify graphic type application (Classic Mac OS)'#010+
- '3*2Wi_Use internal resources ','(Darwin)'#010+
+ '3*2Wi_Use internal resources (Darwin)'#010+
'P*2Wi_Use internal resources (Darwin)'#010+
- 'p*2Wi_Use internal resources (Darwin)'#010+
+ 'p*2Wi_Use internal resources (D','arwin)'#010+
'3*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+
'A*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+
- '3*2WR_Generate ','relocation code (Windows)'#010+
+ '3*2WR_Generate relocation code (Windows)'#010+
'A*2WR_Generate relocation code (Windows)'#010+
- 'P*2WT_Specify MPW tool type application (Classic Mac OS)'#010+
+ 'P*2WT_Speci','fy MPW tool type application (Classic Mac OS)'#010+
'3*2WX_Enable executable stack (Linux)'#010+
'A*2WX_Enable executable stack (Linux)'#010+
'p*2WX_Enable executable stack (Linux)'#010+
- 'P*','2WX_Enable executable stack (Linux)'#010+
+ 'P*2WX_Enable executable stack (Linux)'#010+
'**1X_Executable options:'#010+
- '**2Xc_Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Lin'+
- 'ux)'#010+
+ '**2Xc_Pass --shar','ed/-dynamic to the linker (BeOS, Darwin, FreeBSD, L'+
+ 'inux)'#010+
'**2Xd_Do not use standard library search path (needed for cross compil'+
'e)'#010+
'**2Xe_Use external linker'#010+
- '**2Xg_','Create debuginfo in a separate file and add a debuglink sectio'+
- 'n to executable'#010+
+ '**2Xg_Create debuginfo in a separate file and add a debuglink section '+
+ 'to executable'#010,
'**2XD_Try to link units dynamically (defines FPC_LINK_DYNAMIC)'#010+
'**2Xi_Use internal linker'#010+
'**2Xm_Generate link map'#010+
- '**2XM<x>_Set the name of the '#039'main'#039' program ','routine (default'+
- ' is '#039'main'#039')'#010+
- '**2XP<x>_Prepend the binutils names with the prefix <x>'#010+
+ '**2XM<x>_Set the name of the '#039'main'#039' program routine (default i'+
+ 's '#039'main'#039')'#010+
+ '**2XP<x>_Prepend the binutils names with the prefi','x <x>'#010+
'**2Xr<x>_Set the linker'#039's rlink-path to <x> (needed for cross comp'+
'ile, see the ld manual for more information) (BeOS, Linux)'#010+
- '**2XR<x>_Prepend <x> to all lin','ker search paths (BeOS, Darwin, FreeB'+
- 'SD, Linux, Mac OS, Solaris)'#010+
- '**2Xs_Strip all symbols from executable'#010+
+ '**2XR<x>_Prepend <x> to all linker search paths (BeOS, Darwin, FreeBSD'+
+ ', Linux, Mac OS, Solaris)'#010+
+ '**2Xs_Strip a','ll symbols from executable'#010+
'**2XS_Try to link units statically (default, defines FPC_LINK_STATIC)'#010+
'**2Xt_Link with static libraries (-static is passed to linker)'#010+
- '**','2XX_Try to smartlink units (defines FPC_LINK_SMART)'#010+
+ '**2XX_Try to smartlink units (defines FPC_LINK_SMART)'#010+
'**1*_'#010+
- '**1?_Show this help'#010+
+ '**1?_Sho','w this help'#010+
'**1h_Shows this help without waiting'
);
diff --git a/compiler/ncal.pas b/compiler/ncal.pas
index 097aa18b40..9d1bc440cb 100644
--- a/compiler/ncal.pas
+++ b/compiler/ncal.pas
@@ -201,6 +201,9 @@ interface
function can_be_inlined: boolean;
property nextpara : tnode read right write right;
+ { third is reused to store the parameter name (only while parsing
+ vardispatch calls, never in real node tree) and copy of 'high'
+ parameter tree when the parameter is an open array of managed type }
property parametername : tnode read third write third;
{ returns whether the evaluation of this parameter involves a
@@ -620,6 +623,8 @@ implementation
old_array_constructor:=allow_array_constructor;
allow_array_constructor:=true;
typecheckpass(left);
+ if assigned(third) then
+ typecheckpass(third);
allow_array_constructor:=old_array_constructor;
if codegenerror then
resultdef:=generrordef
@@ -635,6 +640,8 @@ implementation
if not assigned(left.resultdef) then
get_paratype;
firstpass(left);
+ if assigned(third) then
+ firstpass(third);
expectloc:=left.expectloc;
end;
@@ -2492,6 +2499,7 @@ implementation
varargspara,
currpara : tparavarsym;
hiddentree : tnode;
+ paradef : tdef;
begin
pt:=tcallparanode(left);
oldppt:=pcallparanode(@left);
@@ -2527,7 +2535,19 @@ implementation
if not assigned(pt) or (i=0) then
internalerror(200304081);
{ we need the information of the previous parameter }
- hiddentree:=gen_high_tree(pt.left,tparavarsym(procdefinition.paras[i-1]).vardef);
+ paradef:=tparavarsym(procdefinition.paras[i-1]).vardef;
+ hiddentree:=gen_high_tree(pt.left,paradef);
+ { for open array of managed type, a copy of high parameter is
+ necessary to properly initialize before the call }
+ if is_open_array(paradef) and
+ (tparavarsym(procdefinition.paras[i-1]).varspez=vs_out) and
+ is_managed_type(tarraydef(paradef).elementdef) then
+ begin
+ typecheckpass(hiddentree);
+ {this eliminates double call to fpc_dynarray_high, if any}
+ maybe_load_in_temp(hiddentree);
+ oldppt^.third:=hiddentree.getcopy;
+ end;
end
else
if vo_is_typinfo_para in currpara.varoptions then
diff --git a/compiler/ncgcal.pas b/compiler/ncgcal.pas
index 5251c6690a..6bb0db3868 100644
--- a/compiler/ncgcal.pas
+++ b/compiler/ncgcal.pas
@@ -167,7 +167,16 @@ implementation
is_managed_type(left.resultdef) then
begin
location_get_data_ref(current_asmdata.CurrAsmList,left.location,href,false,sizeof(pint));
- cg.g_decrrefcount(current_asmdata.CurrAsmList,left.resultdef,href);
+ if is_open_array(resultdef) then
+ begin
+ if third=nil then
+ InternalError(201103063);
+ secondpass(third);
+ cg.g_array_rtti_helper(current_asmdata.CurrAsmList,tarraydef(resultdef).elementdef,
+ href,third.location,'FPC_DECREF_ARRAY');
+ end
+ else
+ cg.g_decrrefcount(current_asmdata.CurrAsmList,left.resultdef,href);
end;
paramanager.createtempparaloc(current_asmdata.CurrAsmList,aktcallnode.procdefinition.proccalloption,parasym,not followed_by_stack_tainting_call_cached,tempcgpara);
diff --git a/compiler/ncgmem.pas b/compiler/ncgmem.pas
index 1150c737bc..cad56ab507 100644
--- a/compiler/ncgmem.pas
+++ b/compiler/ncgmem.pas
@@ -59,6 +59,7 @@ interface
function get_mul_size : aint;
private
procedure rangecheck_array;
+ procedure rangecheck_string;
protected
{# This routine is used to calculate the address of the reference.
On entry reg contains the index in the array,
@@ -635,6 +636,10 @@ implementation
hreg : tregister;
paraloc1,paraloc2 : tcgpara;
begin
+ { omit range checking when this is an array access to a pointer which has been
+ typecasted from an array }
+ if (ado_isconvertedpointer in tarraydef(left.resultdef).arrayoptions) then
+ exit;
paraloc1.init;
paraloc2.init;
if is_open_array(left.resultdef) or
@@ -690,6 +695,45 @@ implementation
paraloc2.done;
end;
+ procedure tcgvecnode.rangecheck_string;
+ var
+ paraloc1,
+ paraloc2: tcgpara;
+ begin
+ paraloc1.init;
+ paraloc2.init;
+ case tstringdef(left.resultdef).stringtype of
+ { it's the same for ansi- and wide strings }
+ st_unicodestring,
+ st_widestring,
+ st_ansistring:
+ begin
+ paramanager.getintparaloc(pocall_default,1,paraloc1);
+ paramanager.getintparaloc(pocall_default,2,paraloc2);
+ cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
+ cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
+
+ paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
+ paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);
+ cg.allocallcpuregisters(current_asmdata.CurrAsmList);
+ cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_RANGECHECK',false);
+ cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
+ end;
+
+ st_shortstring:
+ begin
+ {!!!!!!!!!!!!!!!!!}
+ { if this one is implemented making use of the high parameter for openshortstrings, update ncgutils.do_get_used_regvars() too (JM) }
+ end;
+
+ st_longstring:
+ begin
+ {!!!!!!!!!!!!!!!!!}
+ end;
+ end;
+ paraloc1.done;
+ paraloc2.done;
+ end;
procedure tcgvecnode.pass_generate_code;
@@ -697,7 +741,6 @@ implementation
offsetdec,
extraoffset : aint;
t : tnode;
- href : treference;
otl,ofl : tasmlabel;
newsize : tcgsize;
mulsize,
@@ -726,8 +769,7 @@ implementation
{ an ansistring needs to be dereferenced }
if is_ansistring(left.resultdef) or
- is_widestring(left.resultdef) or
- is_unicodestring(left.resultdef) then
+ is_wide_or_unicode_string(left.resultdef) then
begin
if nf_callunique in flags then
internalerror(200304236);
@@ -754,18 +796,6 @@ implementation
internalerror(2002032218);
end;
- { check for a zero length string,
- we can use the ansistring routine here }
- if (cs_check_range in current_settings.localswitches) then
- begin
- paramanager.getintparaloc(pocall_default,1,paraloc1);
- cg.a_load_reg_cgpara(current_asmdata.CurrAsmList,OS_ADDR,location.reference.base,paraloc1);
- paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
- cg.allocallcpuregisters(current_asmdata.CurrAsmList);
- cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_CHECKZERO',false);
- cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
- end;
-
{ in ansistrings/widestrings S[1] is p<w>char(S)[0] !! }
if is_ansistring(left.resultdef) then
offsetdec:=1
@@ -828,84 +858,16 @@ implementation
if right.nodetype=ordconstn then
begin
{ offset can only differ from 0 if arraydef }
- case left.resultdef.typ of
- arraydef :
- begin
- { do not do any range checking when this is an array access to a pointer which has been
- typecasted from an array }
- if (not (ado_isconvertedpointer in tarraydef(left.resultdef).arrayoptions)) then
- begin
- if not(is_open_array(left.resultdef)) and
- not(is_array_of_const(left.resultdef)) and
- not(is_dynamic_array(left.resultdef)) then
- begin
- if (tordconstnode(right).value.svalue>tarraydef(left.resultdef).highrange) or
- (tordconstnode(right).value.svalue<tarraydef(left.resultdef).lowrange) then
- begin
- { this should be caught in the typecheckpass! (JM) }
- if (cs_check_range in current_settings.localswitches) then
- CGMessage(parser_e_range_check_error)
- else
- CGMessage(parser_w_range_check_error);
- end;
- end
- else
- begin
- { range checking for open and dynamic arrays needs
- runtime code }
- secondpass(right);
- if (cs_check_range in current_settings.localswitches) then
- rangecheck_array;
- end;
- end;
+ if cs_check_range in current_settings.localswitches then
+ begin
+ secondpass(right);
+ case left.resultdef.typ of
+ arraydef :
+ rangecheck_array;
+ stringdef :
+ rangecheck_string;
end;
- stringdef :
- begin
- if (cs_check_range in current_settings.localswitches) then
- begin
- case tstringdef(left.resultdef).stringtype of
- { it's the same for ansi- and wide strings }
- st_unicodestring,
- st_widestring,
- st_ansistring:
- begin
- paramanager.getintparaloc(pocall_default,1,paraloc1);
- paramanager.getintparaloc(pocall_default,2,paraloc2);
- cg.a_load_const_cgpara(current_asmdata.CurrAsmList,OS_INT,tordconstnode(right).value.svalue,paraloc2);
- href:=location.reference;
- if not(tf_winlikewidestring in target_info.flags) or
- (tstringdef(left.resultdef).stringtype<>st_widestring) then
- begin
- dec(href.offset,sizeof(pint)-offsetdec);
- cg.a_load_ref_cgpara(current_asmdata.CurrAsmList,OS_ADDR,href,paraloc1);
- end
- else
- begin
- { winlike widestrings have a 4 byte length }
- dec(href.offset,4-offsetdec);
- cg.a_load_ref_cgpara(current_asmdata.CurrAsmList,OS_32,href,paraloc1);
- end;
- paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
- paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);
- cg.allocallcpuregisters(current_asmdata.CurrAsmList);
- cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_RANGECHECK',false);
- cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
- end;
-
- st_shortstring:
- begin
- {!!!!!!!!!!!!!!!!!}
- { if this one is implemented making use of the high parameter for openshortstrings, update ncgutils.do_get_used_regvars() too (JM) }
- end;
-
- st_longstring:
- begin
- {!!!!!!!!!!!!!!!!!}
- end;
- end;
- end;
- end;
- end;
+ end;
if not(is_packed_array(left.resultdef)) or
((mulsize mod 8 = 0) and
(ispowerof2(mulsize div 8,temp) or
@@ -1015,56 +977,9 @@ implementation
if cs_check_range in current_settings.localswitches then
begin
if left.resultdef.typ=arraydef then
- begin
- { do not do any range checking when this is an array access to a pointer which has been
- typecasted from an array }
- if (not (ado_isconvertedpointer in tarraydef(left.resultdef).arrayoptions)) then
- rangecheck_array
- end
+ rangecheck_array
else if (left.resultdef.typ=stringdef) then
- begin
- case tstringdef(left.resultdef).stringtype of
- { it's the same for ansi- and wide strings }
- st_unicodestring,
- st_widestring,
- st_ansistring:
- begin
- paramanager.getintparaloc(pocall_default,1,paraloc1);
- paramanager.getintparaloc(pocall_default,2,paraloc2);
- cg.a_load_reg_cgpara(current_asmdata.CurrAsmList,OS_INT,right.location.register,paraloc2);
- href:=location.reference;
- dec(href.offset,sizeof(pint)-offsetdec);
-
- href:=location.reference;
- if not(tf_winlikewidestring in target_info.flags) or
- (tstringdef(left.resultdef).stringtype<>st_widestring) then
- begin
- dec(href.offset,sizeof(pint)-offsetdec);
- cg.a_load_ref_cgpara(current_asmdata.CurrAsmList,OS_ADDR,href,paraloc1);
- end
- else
- begin
- { winlike widestrings have a 4 byte length }
- dec(href.offset,4-offsetdec);
- cg.a_load_ref_cgpara(current_asmdata.CurrAsmList,OS_32,href,paraloc1);
- end;
-
- paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
- paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);
- cg.allocallcpuregisters(current_asmdata.CurrAsmList);
- cg.a_call_name(current_asmdata.CurrAsmList,'FPC_'+upper(tstringdef(left.resultdef).stringtypname)+'_RANGECHECK',false);
- cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
- end;
- st_shortstring:
- begin
- {!!!!!!!!!!!!!!!!!}
- end;
- st_longstring:
- begin
- {!!!!!!!!!!!!!!!!!}
- end;
- end;
- end;
+ rangecheck_string;
end;
{ insert the register and the multiplication factor in the
diff --git a/compiler/ncgrtti.pas b/compiler/ncgrtti.pas
index 1324c2b769..580f11d2e7 100644
--- a/compiler/ncgrtti.pas
+++ b/compiler/ncgrtti.pas
@@ -636,7 +636,8 @@ implementation
{ pocall_safecall } 4,
{ pocall_stdcall } 3,
{ pocall_softfloat } 10,
- { pocall_mwpascal } 11
+ { pocall_mwpascal } 11,
+ { pocall_interrupt } 12
);
procedure write_para(parasym:tparavarsym);
diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas
index 7d0ab56073..4751ee691b 100644
--- a/compiler/ncgutil.pas
+++ b/compiler/ncgutil.pas
@@ -161,6 +161,10 @@ interface
procedure gen_pic_helpers(list : TAsmList);
+ procedure gen_fpc_dummy(list : TAsmList);
+
+ procedure InsertInterruptTable;
+
implementation
uses
@@ -1568,6 +1572,8 @@ implementation
procedure init_paras(p:TObject;arg:pointer);
var
href : treference;
+ hsym : tparavarsym;
+ eldef : tdef;
tmpreg : tregister;
list : TAsmList;
needs_inittable,
@@ -1591,7 +1597,18 @@ implementation
paramanager.push_addr_param(tparavarsym(p).varspez,tparavarsym(p).vardef,current_procinfo.procdef.proccalloption)) then
begin
location_get_data_ref(list,tparavarsym(p).initialloc,href,is_open_array(tparavarsym(p).vardef),sizeof(pint));
- cg.g_incrrefcount(list,tparavarsym(p).vardef,href);
+ if is_open_array(tparavarsym(p).vardef) then
+ begin
+ { open arrays do not contain correct element count in their rtti,
+ the actual count must be passed separately. }
+ hsym:=tparavarsym(tsym(p).owner.Find('high'+tsym(p).name));
+ eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
+ if not assigned(hsym) then
+ internalerror(201003031);
+ cg.g_array_rtti_helper(list,eldef,href,hsym.initialloc,'FPC_ADDREF_ARRAY');
+ end
+ else
+ cg.g_incrrefcount(list,tparavarsym(p).vardef,href);
end;
end;
vs_out :
@@ -1616,7 +1633,18 @@ implementation
else
trash_reference(list,href,2);
if needs_inittable then
- cg.g_initialize(list,tparavarsym(p).vardef,href);
+ begin
+ if is_open_array(tparavarsym(p).vardef) then
+ begin
+ hsym:=tparavarsym(tsym(p).owner.Find('high'+tsym(p).name));
+ eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
+ if not assigned(hsym) then
+ internalerror(201103033);
+ cg.g_array_rtti_helper(list,eldef,href,hsym.initialloc,'FPC_INITIALIZE_ARRAY');
+ end
+ else
+ cg.g_initialize(list,tparavarsym(p).vardef,href);
+ end;
end;
end;
else if do_trashing and
@@ -1649,6 +1677,8 @@ implementation
var
list : TAsmList;
href : treference;
+ hsym : tparavarsym;
+ eldef : tdef;
begin
if not(tsym(p).typ=paravarsym) then
exit;
@@ -1659,7 +1689,16 @@ implementation
begin
include(current_procinfo.flags,pi_needs_implicit_finally);
location_get_data_ref(list,tparavarsym(p).localloc,href,is_open_array(tparavarsym(p).vardef),sizeof(pint));
- cg.g_decrrefcount(list,tparavarsym(p).vardef,href);
+ if is_open_array(tparavarsym(p).vardef) then
+ begin
+ hsym:=tparavarsym(tsym(p).owner.Find('high'+tsym(p).name));
+ eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
+ if not assigned(hsym) then
+ internalerror(201003032);
+ cg.g_array_rtti_helper(list,eldef,href,hsym.initialloc,'FPC_DECREF_ARRAY');
+ end
+ else
+ cg.g_decrrefcount(list,tparavarsym(p).vardef,href);
end;
end;
{ open arrays can contain elements requiring init/final code, so the else has been removed here }
@@ -2496,7 +2535,10 @@ implementation
sectype:=sec_bss;
end;
maybe_new_object_file(list);
- new_section(list,sectype,lower(sym.mangledname),varalign);
+ if sym.section<>'' then
+ new_section(list,sec_user,sym.section,varalign)
+ else
+ new_section(list,sectype,lower(sym.mangledname),varalign);
if (sym.owner.symtabletype=globalsymtable) or
create_smartlink or
DLLSource or
@@ -3092,4 +3134,98 @@ implementation
{$endif i386}
end;
+
+ procedure gen_fpc_dummy(list : TAsmList);
+ begin
+{$ifdef i386}
+ { fix me! }
+ list.concat(Taicpu.Op_const_reg(A_MOV,S_L,1,NR_EAX));
+ list.concat(Taicpu.Op_const(A_RET,S_W,12));
+{$endif i386}
+ end;
+
+
+ procedure InsertInterruptTable;
+
+ procedure WriteVector(const name: string);
+ var
+ ai: taicpu;
+ begin
+{$IFDEF arm}
+ if current_settings.cputype in [cpu_armv7m, cpu_cortexm3] then
+ current_asmdata.asmlists[al_globals].concat(tai_const.Createname(name,0))
+ else
+ begin
+ ai:=taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(name));
+ ai.is_jmp:=true;
+ current_asmdata.asmlists[al_globals].concat(ai);
+ end;
+{$ENDIF arm}
+ end;
+
+ function GetInterruptTableLength: longint;
+ begin
+{$if defined(ARM)}
+ result:=interruptvectors[current_settings.controllertype];
+{$else}
+ result:=0;
+{$endif}
+ end;
+
+ var
+ hp: tused_unit;
+ sym: tsym;
+ i, i2: longint;
+ interruptTable: array of tprocdef;
+ pd: tprocdef;
+ begin
+ SetLength(interruptTable, GetInterruptTableLength);
+ FillChar(interruptTable[0], length(interruptTable)*sizeof(pointer), 0);
+
+ hp:=tused_unit(usedunits.first);
+ while assigned(hp) do
+ begin
+ for i := 0 to hp.u.symlist.Count-1 do
+ begin
+ sym:=tsym(hp.u.symlist[i]);
+ if not assigned(sym) then
+ continue;
+ if sym.typ = procsym then
+ begin
+ for i2 := 0 to tprocsym(sym).ProcdefList.Count-1 do
+ begin
+ pd:=tprocdef(tprocsym(sym).ProcdefList[i2]);
+ if pd.interruptvector >= 0 then
+ begin
+ if pd.interruptvector > high(interruptTable) then
+ Internalerror(2011030602);
+ if interruptTable[pd.interruptvector] <> nil then
+ internalerror(2011030601);
+
+ interruptTable[pd.interruptvector]:=pd;
+ break;
+ end;
+ end;
+ end;
+ end;
+ hp:=tused_unit(hp.next);
+ end;
+
+ new_section(current_asmdata.asmlists[al_globals],sec_init,'VECTORS',sizeof(pint));
+ current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('VECTORS',AT_DATA,0));
+{$IFDEF arm}
+ if current_settings.cputype in [cpu_armv7m, cpu_cortexm3] then
+ current_asmdata.asmlists[al_globals].concat(tai_const.Createname('_stack_top',0)); { ARMv7-M processors have the initial stack value at address 0 }
+{$ENDIF arm}
+
+ for i:=0 to high(interruptTable) do
+ begin
+ if interruptTable[i]<>nil then
+ writeVector(interruptTable[i].mangledname)
+ else
+ writeVector('DefaultHandler'); { Default handler name }
+ end;
+ end;
+
+
end.
diff --git a/compiler/nset.pas b/compiler/nset.pas
index 9e72455551..015d4bf6f6 100644
--- a/compiler/nset.pas
+++ b/compiler/nset.pas
@@ -229,17 +229,6 @@ implementation
exit;
end;
- if (right.nodetype=typen) then
- begin
- { we need to create a setconstn }
- pst:=createsetconst(tsetdef(ttypenode(right).resultdef));
- t:=csetconstnode.create(pst,ttypenode(right).resultdef);
- dispose(pst);
- right.free;
- right:=t;
- typecheckpass(right);
- end;
-
typecheckpass(left);
set_varstate(left,vs_read,[vsf_must_be_valid]);
if codegenerror then
diff --git a/compiler/ogbase.pas b/compiler/ogbase.pas
index ec3ed99dbf..c6cc207826 100644
--- a/compiler/ogbase.pas
+++ b/compiler/ogbase.pas
@@ -482,6 +482,7 @@ interface
procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);virtual;
procedure GenerateDebugLink(const dbgname:string;dbgcrc:cardinal);
function WriteExeFile(const fn:string):boolean;
+ procedure ParseScript (linkscript:TCmdStrList); virtual;
property Writer:TObjectWriter read FWriter;
property ExeSectionList:TFPHashObjectList read FExeSectionList;
property ObjDataList:TFPObjectList read FObjDataList;
@@ -544,7 +545,7 @@ implementation
procedure TObjSymbol.SetAddress(apass:byte;aobjsec:TObjSection;abind:TAsmsymbind;atyp:Tasmsymtype);
begin
- if not(abind in [AB_GLOBAL,AB_LOCAL,AB_COMMON]) then
+ if not(abind in [AB_GLOBAL,AB_LOCAL,AB_COMMON,AB_IMPORT]) then
internalerror(200603016);
if not assigned(aobjsec) then
internalerror(200603017);
@@ -823,7 +824,7 @@ implementation
function TObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
const
- secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
+ secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
'code',
'Data',
'Data',
@@ -902,6 +903,7 @@ implementation
function TObjData.sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;
const
secoptions : array[TAsmSectiontype] of TObjSectionOptions = ([],
+ {user} [oso_Data,oso_load,oso_write,oso_executable,oso_keep],
{code} [oso_Data,oso_load,oso_readonly,oso_executable,oso_keep],
{Data} [oso_Data,oso_load,oso_write,oso_keep],
{ TODO: Fix sec_rodata be read-only-with-relocs}
@@ -1549,6 +1551,11 @@ implementation
end;
+ procedure TExeOutput.ParseScript (linkscript:TCmdStrList);
+ begin
+ end;
+
+
function TExeOutput.FindExeSection(const aname:string):TExeSection;
begin
result:=TExeSection(ExeSectionList.Find(aname));
diff --git a/compiler/ogcoff.pas b/compiler/ogcoff.pas
index 5ce3f5d369..73b90a2aab 100644
--- a/compiler/ogcoff.pas
+++ b/compiler/ogcoff.pas
@@ -488,7 +488,7 @@ implementation
SymbolMaxGrow = 200*sizeof(coffsymbol);
StrsMaxGrow = 8192;
- coffsecnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
+ coffsecnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
'.text','.data','.data','.data','.bss','.tls',
'.pdata',{pdata}
'.text', {stub}
@@ -1031,22 +1031,28 @@ const pemagic : array[0..3] of byte = (
sep : string[3];
secname : string;
begin
- secname:=coffsecnames[atype];
- if create_smartlink_sections and
- (aname<>'') then
- begin
- case aorder of
- secorder_begin :
- sep:='.b_';
- secorder_end :
- sep:='.z_';
- else
- sep:='.n_';
- end;
- result:=secname+sep+aname
- end
+ { section type user gives the user full controll on the section name }
+ if atype=sec_user then
+ result:=aname
else
- result:=secname;
+ begin
+ secname:=coffsecnames[atype];
+ if create_smartlink_sections and
+ (aname<>'') then
+ begin
+ case aorder of
+ secorder_begin :
+ sep:='.b_';
+ secorder_end :
+ sep:='.z_';
+ else
+ sep:='.n_';
+ end;
+ result:=secname+sep+aname
+ end
+ else
+ result:=secname;
+ end;
end;
diff --git a/compiler/ogelf.pas b/compiler/ogelf.pas
index 416cd4a95a..a3c164fb14 100644
--- a/compiler/ogelf.pas
+++ b/compiler/ogelf.pas
@@ -584,7 +584,7 @@ implementation
function TElfObjData.sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;
const
- secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
+ secnames : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
{$ifdef userodata}
'.text','.data','.data','.rodata','.bss','.threadvar',
{$else userodata}
@@ -639,7 +639,7 @@ implementation
'.obcj_nlcatlist',
'.objc_protolist'
);
- secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('',
+ secnames_pic : array[TAsmSectiontype] of string[length('__DATA, __datacoal_nt,coalesced')] = ('','',
'.text',
'.data.rel',
'.data.rel',
@@ -700,30 +700,36 @@ implementation
sep : string[3];
secname : string;
begin
- if (cs_create_pic in current_settings.moduleswitches) and
- not(target_info.system in systems_darwin) then
- secname:=secnames_pic[atype]
+ { section type user gives the user full controll on the section name }
+ if atype=sec_user then
+ result:=aname
else
- secname:=secnames[atype];
- if (atype=sec_fpc) and (Copy(aname,1,3)='res') then
begin
- result:=secname+'.'+aname;
- exit;
+ if (cs_create_pic in current_settings.moduleswitches) and
+ not(target_info.system in systems_darwin) then
+ secname:=secnames_pic[atype]
+ else
+ secname:=secnames[atype];
+ if (atype=sec_fpc) and (Copy(aname,1,3)='res') then
+ begin
+ result:=secname+'.'+aname;
+ exit;
+ end;
+ if create_smartlink_sections and (aname<>'') then
+ begin
+ case aorder of
+ secorder_begin :
+ sep:='.b_';
+ secorder_end :
+ sep:='.z_';
+ else
+ sep:='.n_';
+ end;
+ result:=secname+sep+aname
+ end
+ else
+ result:=secname;
end;
- if create_smartlink_sections and (aname<>'') then
- begin
- case aorder of
- secorder_begin :
- sep:='.b_';
- secorder_end :
- sep:='.z_';
- else
- sep:='.n_';
- end;
- result:=secname+sep+aname
- end
- else
- result:=secname;
end;
diff --git a/compiler/ogmacho.pas b/compiler/ogmacho.pas
index 6b6bde45bb..963a70c37c 100644
--- a/compiler/ogmacho.pas
+++ b/compiler/ogmacho.pas
@@ -180,6 +180,7 @@ implementation
= ('sec_debug_frame','__debug_info','__debug_line','__debug_abbrev');
begin
case atype of
+ sec_user: Result:=aname;
sec_bss: Result:=MakeSectionName(seg_DATA, '__common');
sec_stab: Result:='.stabs';
sec_stabstr: Result:='.stabsstr';
diff --git a/compiler/ognlm.pas b/compiler/ognlm.pas
new file mode 100644
index 0000000000..81d47454be
--- /dev/null
+++ b/compiler/ognlm.pas
@@ -0,0 +1,1516 @@
+{
+ Copyright (c) 1998-2006 by Peter Vreman
+ Copyright (c) 2011 by Armin Diehl
+
+ Contains the binary netware nlm executable writer
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit ognlm;
+
+{$i fpcdefs.inc}
+
+interface
+
+ uses
+ { common }
+ cclasses,globtype,
+ { target }
+ systems,
+ aasmbase,assemble,link,
+ { output }
+ ogbase,
+ owbase,
+ ogcoff;
+
+{*****************************************************************************
+ NLM File structures and constants
+*****************************************************************************}
+
+{
+
+LString0 -> 1 byte Length, Text, #0
+LString -> 1 byte length, Text
+
+Basic NLM File Structure:
+
+FixedHeader
+ nlm32_i386_external_fixed_header 130 bytes
+
+VarHdr1
+ NLM Description: LString0 2+n bytes
+ Stacksize 4 bytes
+ reserved = 0 4 bytes
+ ' LONG' 5 bytes
+ NLM screen name: LString0 2+n bytes
+ NLM thread name: LString0 2+n bytes
+
+Optional Headers beginning with stamp (without '')
+'VeRsIoN#': nlm32_i386_external_version_header 32 bytes
+'CoPyRiGhT=': LString0 2+n bytes
+'MeSsAgEs': nlm32_i386_external_extended_header 124 bytes
+'CuStHeAd': nlm32_i386_external_custom_header
+'CyGnUsEx': nlm32_i386_external_cygnus_ext_header 16 bytes
+
+.text
+.data
+.relocs=
+ addr(32),addr(32),...
+ addr and $80000000 > 0 -> FixupToSeg=.text else .data
+ addr and $40000000 > 0 -> FixupInSeg=.text else .data
+.importedSymbols
+ name LString 1+n bytes
+ number of references r 4 bytes
+ addresses r*4 bytes
+.exportedSymbols
+ name LString 1+n bytes
+ addr 4 bytes
+ addr and $80000000 > 0 -> .text else .data
+ ...
+.modules
+
+.nlmdebugrecs
+ type (0=.data,1=.code,2,..=????) 1 byte
+ addr 4 bytes
+ name LString 1+n bytes
+ ...
+
+}
+
+
+const NLM_MAX_DESCRIPTION_LENGTH = 127;
+ NLM_MAX_SCREEN_NAME_LENGTH = 71;
+ NLM_MAX_THREAD_NAME_LENGTH = 71; // some netware docs limit this to 12 ?
+ NLM_OLD_THREAD_NAME_LENGTH = 5;
+ NLM_HEADER_VERSION = 4;
+ NLM_DEFAULT_STACKSIZE = (32 * 1024);
+ NLM_VERSION_STAMP = 'VeRsIoN#';
+ NLM_COPYRIGHT_STAMP = 'CoPyRiGhT=';
+ NLM_CYGNUS_STAMP = 'CyGnUsEx';
+ NLM_MESSAGES_STAMP = 'MeSsAgEs';
+ NLM_CUSTOM_STAMP = 'CuStHeAd';
+ NLM_SIGNATURE = 'NetWare Loadable Module'#$1A;
+ NLM_FLAGS_REENTRANT = 1;
+ NLM_FLAGS_MULTILOAD = 2;
+ NLM_FLAGS_SYNCHRONIZE = 4;
+ NLM_FLAGS_PSEUDOPREEMPTION = 8;
+ NLM_FLAGS_OSDOMAIN = $10;
+ NLM_FLAGS_AUTOUNLOAD = $40;
+
+
+ type
+ uint32 = longword;
+
+ nlm32_i386_external_fixed_header = packed record
+ signature : array[0..23] of char;
+ version : uint32;
+ (* The name of the module, which must be a DOS name (1-8 characters followed
+ by a period and a 1-3 character extension). The first byte is the byte
+ length of the name and the last byte is a null terminator byte. This
+ field is fixed length, and any unused bytes should be null bytes. The
+ value is set by the OUTPUT keyword to NLMLINK. *)
+ moduleName : string[13]; //array[0..13] of byte;
+ codeImageOffset : uint32; // The byte offset of the code image from the start of the file.
+ codeImageSize : uint32; // The size of the code image, in bytes.
+ dataImageOffset : uint32; // The byte offset of the data image from the start of the file.
+ dataImageSize : uint32; // The size of the data image, in bytes.
+ uninitializedDataSize : uint32; // The size of the uninitialized data region that the loader has to be
+ // allocated at load time. Uninitialized data follows the initialized
+ // data in the NLM address space.
+ customDataOffset : uint32; // The byte offset of the custom data from the start of the file. The
+ // custom data is set by the CUSTOM keyword to NLMLINK. It is possible
+ // for this to be EOF if there is no custom data.
+ customDataSize : uint32; // The size of the custom data, in bytes.
+ moduleDependencyOffset : uint32; // The byte offset of the module dependencies from the start of the file.
+ // The module dependencies are determined by the MODULE keyword in NLMLINK.
+ numberOfModuleDependencies : uint32; // he number of module dependencies at the moduleDependencyOffset.
+ relocationFixupOffset : uint32; // The byte offset of the relocation fixup data from the start of the file
+ numberOfRelocationFixups : uint32;
+ externalReferencesOffset : uint32;
+ numberOfExternalReferences : uint32;
+ publicsOffset : uint32;
+ numberOfPublics : uint32;
+ debugInfoOffset : uint32; // The byte offset of the internal debug info from the start of the file.
+ // It is possible for this to be EOF if there is no debug info.
+ numberOfDebugRecords : uint32;
+ codeStartOffset : uint32;
+ exitProcedureOffset : uint32;
+ checkUnloadProcedureOffset : uint32;
+ moduleType : uint32;
+ flags : uint32;
+ end;
+
+
+ { The version header is one of the optional auxiliary headers and
+ follows the fixed length and variable length NLM headers. }
+ { The header is recognized by "VeRsIoN#" in the stamp field. }
+
+ nlm32_i386_external_version_header = packed record
+ stamp : array[0..7] of char; // VeRsIoN#
+ majorVersion,
+ minorVersion,
+ revision,
+ year,
+ month,
+ day : uint32;
+ end;
+ { The header is recognized by "MeSsAgEs" in the stamp field. }
+
+ nlm32_i386_external_extended_header = packed record
+ stamp : array[0..7] of char; // MeSsAgEs
+ languageID : uint32;
+ messageFileOffset : uint32;
+ messageFileLength : uint32;
+ messageCount : uint32;
+ helpFileOffset : uint32;
+ helpFileLength : uint32;
+ RPCDataOffset : uint32;
+ RPCDataLength : uint32;
+ sharedCodeOffset : uint32;
+ sharedCodeLength : uint32;
+ sharedDataOffset : uint32;
+ sharedDataLength : uint32;
+ sharedRelocationFixupOffset : uint32;
+ sharedRelocationFixupCount : uint32;
+ sharedExternalReferenceOffset: uint32;
+ sharedExternalReferenceCount : uint32;
+ sharedPublicsOffset : uint32;
+ sharedPublicsCount : uint32;
+ sharedDebugRecordOffset : uint32;
+ sharedDebugRecordCount : uint32;
+ SharedInitializationOffset : uint32;
+ SharedExitProcedureOffset : uint32;
+ productID : longint;
+ reserved0 : longint;
+ reserved1 : longint;
+ reserved2 : longint;
+ reserved3 : longint;
+ reserved4 : longint;
+ reserved5 : longint;
+ end;
+
+ nlm32_i386_external_custom_header = packed record
+ stamp : array[0..7] of char; // CuStHeAd
+ hdrLength : uint32;
+ dataOffset : uint32;
+ dataLength : uint32;
+ //dataStamp : array[0..7] of char;
+ //hdr : uint32;
+ end;
+ { The internal Cygnus header is written out externally as a custom
+ header. We don't try to replicate that structure here. }
+ { The header is recognized by "CyGnUsEx" in the stamp field. }
+ { File location of debugging information. }
+ { Length of debugging information. }
+
+ nlm32_i386_external_cygnus_ext_header = packed record
+ stamp : array[0..7] of char; // CyGnUsEx
+ offset : uint32;
+ length : uint32;
+ end;
+
+
+//------------------
+
+
+ TNLMExeSection = class(TExeSection)
+ public
+ constructor createnw(AList:TFPHashObjectList;const n:string);
+ end;
+
+ TsecType = (Section_text,Section_data,Section_other);
+
+ TNLMexeoutput = class(texeoutput)
+ private
+ FRelocsGenerated,FImportsGenerated : boolean;
+ FNumRelocs : longword;
+ FNumExternals : longword;
+ FNumModules : longword;
+ FNumDebugSymbols : longword;
+ fSizeWoDebugSyms : longword;
+ FnumExports : longword;
+ NlmSymbols : TDynamicArray;
+ ExeSecsListSize : longint;
+ nlmImpNames, // name of import. module name as import
+ nlmImports : TFPHashObjectList; // name of import, list of relocs as object
+ headerAlignBytes : longint;
+ FexportFunctionOffsets:TFPList; // offsets in .exports for function addresses, an offset of $80000000 is needed
+
+ nlmHeader : nlm32_i386_external_fixed_header;
+ nlmVersionHeader : nlm32_i386_external_version_header;
+ nlmExtHeader : nlm32_i386_external_extended_header;
+ nlmCustHeader : nlm32_i386_external_custom_header;
+ nlmHelpFileName : TCmdStr;
+ nlmMessagesFileName: TCmdStr;
+ nlmXdcFileName : TCmdStr;
+ nlmCopyright : string;
+ nlmThreadname : string;
+ nlmScreenname : string;
+ nlmDescription : string;
+
+ function totalheadersize:longword;
+ procedure createNlm_symbol(const name:shortstring;value:longword;secType:TSecType);
+ procedure globalsyms_create_symbol(p:TObject;arg:pointer);
+ procedure ExeSectionList_write_header(p:TObject;arg:pointer);
+ procedure ExeSectionList_calc_size(p:TObject;arg:pointer);
+ procedure ExeSectionList_write_data(p:TObject;arg:pointer);
+ procedure GenerateImports;
+ procedure GenerateExports;
+ procedure GenerateRelocs;
+ procedure ExeSectionList_pass2_header(p:TObject;arg:pointer);
+ protected
+ function writedata:boolean;override;
+ public
+ constructor create; override;
+ destructor destroy; override;
+ procedure MemPos_Header;override;
+ procedure DataPos_Header;override;
+ procedure fillNlmVersionHeader;
+ procedure GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);override;
+ procedure Order_End;override;
+ procedure MemPos_ExeSection(const aname:string);override;
+ procedure DataPos_ExeSection(const aname:string);override;
+ procedure NLMwriteString (const s : string; terminateWithZero : boolean);
+ procedure objNLMwriteString (const s : string; terminateWithZero : boolean);
+ procedure ParseScript (linkscript:TCmdStrList); override;
+ end;
+
+ var
+ {for symbols defined in linker script. To generate a fixup we
+ need to know the segment (.text,.bss or .code) of the symbol
+ Pointer in list is used as TsecType
+ Filled by TInternalLinkerNetware.DefaultLinkScript }
+ nlmSpecialSymbols_Segments : TFPHashList;
+
+ type
+
+ TNLMCoffObjInput = class(TCoffObjInput)
+ constructor create;override;
+ end;
+
+ TNLMCoffassembler = class(tinternalassembler)
+ constructor create(smart:boolean);override;
+ end;
+
+ TNLMCoffObjData = class(TCoffObjData)
+ constructor create(const n:string);override;
+ end;
+
+ TNLMCoffObjOutput = class(TCoffObjOutput)
+ constructor create(AWriter:TObjectWriter);override;
+ end;
+
+ TNLMCoffObjSection = class(TCoffObjSection)
+ constructor create(AList:TFPHashObjectList;const Aname:string;Aalign:shortint;Aoptions:TObjSectionOptions);override;
+ end;
+
+implementation
+
+ uses
+{$ifdef win32}
+ Windows,
+{$endif win32}
+ SysUtils,
+ cutils,verbose,globals,
+ fmodule,aasmdata,
+ ogmap,export
+ ;
+
+
+{****************************************************************************
+ Helpers
+****************************************************************************}
+type
+ TStringObj = class (TObject)
+ fValue : string;
+ constructor create (value:string);
+ property value : string read fValue write fValue;
+ end;
+
+ constructor TStringObj.create(value:string);
+ begin
+ inherited create;
+ fValue := value;
+ end;
+
+
+
+function SectionType (aName : string) : TSecType;
+var s : string;
+ seg: ptruint;
+begin
+ s := copy(aName,1,5);
+ if s = '.text' then result := Section_text else
+ if (s = '.data') or (copy(s,1,4)='.bss') then result := Section_data else
+ if s[1] <> '.' then
+ begin
+ seg := ptruint(nlmSpecialSymbols_Segments.Find(aName));
+ if seg <> 0 then
+ result := TSecType(seg)
+ else
+ result := Section_other;
+ end else
+ result := Section_other;
+end;
+
+{****************************************************************************
+ TNLMexesection
+****************************************************************************}
+
+
+ constructor TNLMExeSection.createnw(AList:TFPHashObjectList;const n:string);
+ begin
+ inherited create(AList,n);
+ end;
+
+
+{****************************************************************************
+ TNLMexeoutput
+****************************************************************************}
+
+ constructor TNLMexeoutput.create;
+ begin
+ inherited create;
+ CExeSection:=TNLMExeSection;
+ CObjData:=TNLMCoffObjData;
+ MaxMemPos:=$7FFFFFFF;
+ SectionMemAlign:=$0;
+ SectionDataAlign:=0;
+ RelocSection := true; // always needed for NLM's
+ nlmImports := TFPHashObjectList.create(true);
+ nlmImpNames := TFPHashObjectList.create(false);
+ NlmSymbols := TDynamicArray.create(4096);
+ FexportFunctionOffsets := TFPList.Create;
+ end;
+
+ destructor TNLMexeoutput.destroy;
+ begin
+ if assigned(nlmImports) then
+ nlmImports.Free;
+ if assigned(nlmImpNames) then
+ nlmImpNames.Free;
+ if assigned(nlmSymbols) then
+ nlmSymbols.Free;
+ if assigned(FexportFunctionOffsets) then
+ FexportFunctionOffsets.Free;
+ inherited destroy;
+ end;
+
+ procedure TNLMexeoutput.createNlm_symbol(const name:shortstring;value:longword;secType:TSecType);
+ var
+ b:byte;
+ begin
+ //Comment (V_Debug,'TNLMexeoutput.write_symbol '+name);
+ { type (0=.data,1=.code,2,..=????) 1 byte
+ addr 4 bytes
+ name LString 1+n bytes }
+ case secType of
+ Section_Text : b := 1;
+ Section_Data : b := 0
+ else
+ exit;
+ end;
+ nlmSymbols.write(b,sizeof(b));
+ assert (sizeof(value)<>4);
+ nlmSymbols.write(value,sizeof(value));
+ nlmSymbols.write(name[0],length(name)+1);
+ inc(FNumDebugSymbols);
+ end;
+
+
+ procedure TNLMexeoutput.globalsyms_create_symbol(p:TObject;arg:pointer);
+ var
+ value : longword;
+ exesec : TExeSection;
+ i : integer;
+ secType : TsecType;
+ begin
+ if not assigned(texesymbol(p).objsymbol) then
+ internalerror(200603053);
+ with texesymbol(p).objsymbol do
+ begin
+ exesec:=TExeSection(objsection.exesection);
+ { There is no exesection defined for special internal symbols
+ like __image_base__ }
+ if assigned(exesec) then
+ begin
+ //secval:=exesec.secsymidx;
+ value:=address-exesec.mempos;
+ end
+ else
+ begin
+ value:=address;
+ end;
+ { reloctype address to the section in the executable }
+ secType := SectionType(objsection.Name);
+ if (secType = Section_Text) or (secType = Section_Data) then
+ begin
+ i := nlmImports.FindIndexOf(texesymbol(p).name);
+ if i < 0 then
+ createNlm_symbol(name,value,secType);
+ end;
+ end;
+ end;
+
+
+
+(*
+function SecOpts(SecOptions:TObjSectionOptions):string;
+ begin
+ result := '[';
+ if oso_Data in SecOptions then result := result + 'oso_Data ';
+ { Is loaded into memory }
+ if oso_load in SecOptions then result := result + 'oso_load ';
+ { Not loaded into memory }
+ if oso_noload in SecOptions then result := result + 'oso_noload ';
+ { Read only }
+ if oso_readonly in SecOptions then result := result + 'oso_readonly ';
+ { Read/Write }
+ if oso_write in SecOptions then result := result + 'oso_write ';
+ { Contains executable instructions }
+ if oso_executable in SecOptions then result := result + 'oso_executable ';
+ { Never discard section }
+ if oso_keep in SecOptions then result := result + 'oso_keep ';
+ { Special common symbols }
+ if oso_common in SecOptions then result := result + 'oso_common ';
+ { Contains debug info and can be stripped }
+ if oso_debug in SecOptions then result := result + 'oso_debug ';
+ { Contains only strings }
+ if oso_strings in SecOptions then result := result + 'oso_strings ';
+ result := result + ']';
+ end;
+*)
+
+ procedure TNLMexeoutput.ExeSectionList_calc_size(p:TObject;arg:pointer);
+ var
+ objsec : TObjSection;
+ i : longint;
+ begin
+ with texesection(p) do
+ begin
+ { don't write normal section if writing only debug info }
+ if (ExeWriteMode=ewm_dbgonly) and
+ not(oso_debug in SecOptions) then
+ exit;
+
+ if oso_data in secoptions then
+ begin
+ inc (fSizeWoDebugSyms,(Align(fSizeWoDebugSyms,SectionDataAlign)-fSizeWoDebugSyms));
+ for i:=0 to ObjSectionList.Count-1 do
+ begin
+ objsec:=TObjSection(ObjSectionList[i]);
+ if oso_data in objsec.secoptions then
+ begin
+ inc(fSizeWoDebugSyms,objsec.size);
+ inc(fSizeWoDebugSyms,objsec.dataalignbytes);
+ end;
+ end;
+ end;
+ end;
+ end;
+
+
+
+ procedure TNLMexeoutput.ExeSectionList_write_Data(p:TObject;arg:pointer);
+ var
+ objsec : TObjSection;
+ i,j : longint;
+ b : byte;
+ begin
+
+ with texesection(p) do
+ begin
+ { don't write normal section if writing only debug info }
+ if (ExeWriteMode=ewm_dbgonly) and
+ not(oso_debug in SecOptions) then
+ exit;
+
+ if oso_data in secoptions then
+ begin
+ //if Align(FWriter.Size,SectionDataAlign)-FWriter.Size>0 then
+ // writeln (name,' align ',Align(FWriter.Size,SectionDataAlign)-FWriter.Size,' SectionDataAlign:',SectionDataAlign);
+ FWriter.Writezeros(Align(FWriter.Size,SectionDataAlign)-FWriter.Size);
+ for i:=0 to ObjSectionList.Count-1 do
+ begin
+ objsec:=TObjSection(ObjSectionList[i]);
+ if oso_data in objsec.secoptions then
+ begin
+ if assigned(exemap) then
+ if objsec.data.size > 0 then
+ exemap.Add(' 0x'+hexstr(objsec.DataPos,8)+': '+objsec.name);
+ //writeln (' ',objsec.name,' size:',objsec.size,' relocs:',objsec.ObjRelocations.count,' DataPos:',objsec.DataPos,' MemPos:',objsec.MemPos);
+ {for j := 0 to objsec.ObjRelocations.count-1 do
+ begin
+ objreloc := TObjRelocation(objsec.ObjRelocations[j]);
+ with objreloc do
+ begin
+ write(' reloc DataOffset: ',DataOffset,' OrgSize:',OrgSize,' typ:',typ);
+ if assigned(symbol) then
+ write(' Name: '#39,symbol.Name,#39' bind:',symbol.bind,' address:',symbol.address,' Size:',symbol.size);
+ writeln;
+ end;
+ end;}
+ if not assigned(objsec.data) then
+ internalerror(200603042);
+ if copy (objsec.Name,1,5) = '.text' then
+ begin // write NOP's instead of zero's for .text, makes disassemble possible
+ b := $90; // NOP
+ if objsec.DataAlignBytes > 0 then
+ for j := 1 to objsec.DataAlignBytes do
+ FWriter.write(b,1);
+ end else
+ FWriter.writezeros(objsec.dataalignbytes);
+ //if objsec.dataalignbytes>0 then
+ // writeln (' ',name,' alignbytes: ',objsec.dataalignbytes);
+ if objsec.DataPos<>FWriter.Size then
+ internalerror(200602251);
+ FWriter.writearray(objsec.data);
+ end else
+ begin
+ if assigned(exemap) then //TExeMap
+ exemap.Add(' skipping: '+objsec.name);
+ end;
+ end;
+ end;
+ end;
+ end;
+
+
+ function TNLMexeoutput.totalheadersize:longword;
+ var
+ varHdrSize,
+ optHdrSize,
+ hdrSize: longword;
+ begin
+ optHdrSize := 0;
+ inc(optHdrSize,2+length(nlmDescription));
+ inc(optHdrSize,8); // Stacksize+reserved
+ inc(optHdrSize,NLM_OLD_THREAD_NAME_LENGTH);
+ inc(optHdrSize,2+length(nlmScreenname));
+ inc(optHdrSize,2+length(nlmThreadname));
+
+ varHdrSize := 0;
+ if nwcopyright <> '' then
+ inc(varHdrSize,sizeof(NLM_COPYRIGHT_STAMP)+2+length(nlmCopyright));
+ hdrSize := sizeof(nlm32_i386_external_fixed_header)+
+ sizeof(nlm32_i386_external_extended_header)+
+ sizeof(nlm32_i386_external_custom_header)+
+ sizeof(nlm32_i386_external_version_header)+ // always
+ sizeof(nlm32_i386_external_cygnus_ext_header)+ // CyGnUsEx
+ varHdrSize+optHdrSize+
+ 8; // empty stamp
+ result := hdrSize;
+ end;
+
+
+ procedure TNLMexeoutput.MemPos_Header;
+ begin
+ { calculate start positions after the headers }
+ currmempos:=0;
+ end;
+
+
+ procedure TNLMexeoutput.ExeSectionList_write_header(p:TObject;arg:pointer);
+ var
+ nam : string;
+ u32,al : longword;
+ alignAmount:longint;
+ begin
+ with tExeSection(p) do
+ begin
+ //comment (v_debug,'ExeSectionList_write_header: '+name);
+ nam := name;
+ alignAmount := 4 - ((length (nam) + 1) MOD 4);
+ FWriter.write(nam[1],length(nam));
+ FWriter.WriteZeros(1+alignAmount);
+ al := 0;
+ // for .stab we have to ignore leading zeros due to alignment in file
+ if nam='.stab' then
+ if assigned(ObjSectionList[0]) then
+ al := TObjSection(ObjSectionList[0]).dataalignbytes;
+ u32 := dataPos+al; FWriter.write(u32,sizeof(u32));
+ u32 := size-al; FWriter.write(u32,sizeof(u32));
+ end;
+ end;
+
+
+
+ procedure TNLMexeoutput.ExeSectionList_pass2_header(p:TObject;arg:pointer);
+ var len,alignAmount:longint;
+ begin
+ {list of sections, extension of binutils,CuStHeAd points to this list
+ The format of the section information is:
+ null terminated section name
+ zeroes to adjust to 4 byte boundary
+ 4 byte section data file pointer
+ 4 byte section size }
+
+ with TExeSection(p) do
+ begin
+ alignAmount := 4 - ((length (Name) + 1) MOD 4);
+ len := length(name) + 1 + alignAmount + 8;
+ if ObjSectionList.Count>0 then
+ inc(len,TObjSection(ObjSectionList[0]).dataalignbytes);
+ inc(plongint(arg)^,len);
+ end;
+ end;
+
+ procedure TNLMexeoutput.DataPos_Header;
+ begin
+ ExeSecsListSize:=0;
+ ExeSectionList.ForEachCall(@ExeSectionList_pass2_header,@ExeSecsListSize);
+
+ headerAlignBytes := align(totalheadersize+ExeSecsListSize,16)-(totalheadersize+ExeSecsListSize); // align as in TObjData.sectiontype2align
+ currdatapos:=totalheadersize+ExeSecsListSize+headerAlignBytes;
+ end;
+
+
+ procedure TNLMexeoutput.fillNlmVersionHeader;
+ var
+ hour,min,sec,hsec,Year,Month,Day : word;
+ begin
+ DecodeTime(Time,hour,min,sec,hsec);
+ DecodeDate(Date,year,month,day);
+ nlmVersionHeader.stamp := NLM_VERSION_STAMP;
+ if nlmVersionHeader.year = 0 then
+ begin
+ nlmVersionHeader.year := Year;
+ nlmVersionHeader.month := Month;
+ nlmVersionHeader.day := Day;
+ end;
+ end;
+
+
+
+ function TNLMexeoutput.writedata:boolean;
+ var
+ dummyLong : array[0..4] of char;
+ textExeSec,
+ dataExeSec,
+ bssExeSec,
+ relocsExeSec,
+ exportsExeSec,
+ importsExeSec,
+ xdcExeSec,
+ messagesExeSec,
+ helpExeSec,
+ customExeSec : TExeSection;
+ hassymbols : boolean;
+ nlmCygnusHeader : nlm32_i386_external_cygnus_ext_header;
+ ModuleName : string;
+ exesym : TExeSymbol;
+ expOffset : PtrUInt;
+ expAddr : longword;
+ i : integer;
+
+ begin
+ result:=false;
+ textExeSec:=FindExeSection('.text');
+ dataExeSec:=FindExeSection('.data');
+ bssExeSec:=FindExeSection('.bss');
+ relocsExeSec:=FindExeSection('.reloc');
+ importsExeSec:=FindExeSection('.imports');
+ exportsExeSec:=FindExeSection('.exports');
+ xdcExeSec:=FindExeSection('.xdc');
+ messagesExeSec:=FindExeSection('.messages');
+ helpExeSec:=FindExeSection('.help');
+ customExeSec:=FindExeSection('.custom');
+
+ // exported function need the upper bit in the address
+ // to be set (=CODE), do this here to avoid another
+ // reloc type. The ExportFunctionOffsets list was
+ // filled in GenerateExports
+ if FexportFunctionOffsets.Count>0 then
+ begin
+ if not assigned(exportsExeSec) then
+ internalerror(201103201); // we have to have a .export section
+ if not assigned(exportsExeSec.ObjSectionList[0]) then
+ internalerror(201103202); // nothing in the .exports section but we have data in FexportFunctionOffsets
+ for i := 0 to FexportFunctionOffsets.Count-1 do
+ begin
+ expOffset := PtrUint(FexportFunctionOffsets[i]);
+ if TObjSection(exportsExeSec.ObjSectionList[0]).Data.size < expOffset+3 then
+ internalerror(201103203); // offset in FexportFunctionOffsets out of range
+ with TObjSection(exportsExeSec.ObjSectionList[0]) do
+ begin // set the upper bit of address to indicate .text
+ Data.seek(expOffset);
+ Data.read(expAddr,4);
+ Data.seek(expOffset);
+ expAddr := expAddr or $80000000;
+ Data.write(expAddr,4);
+ end;
+ end;
+ end;
+
+ if not assigned(TextExeSec) or
+ not assigned(RelocsExeSec) or
+ not assigned(DataExeSec) then
+ internalerror(200602231); // we have to have .data, .text and .reloc
+ { do we need to write symbols? }
+ hassymbols:=(ExeWriteMode=ewm_dbgonly) or
+ (
+ (ExeWriteMode=ewm_exefull) and
+ not(cs_link_strip in current_settings.globalswitches)
+ );
+
+ { Initial header, will be updated later }
+ nlmHeader.signature := NLM_SIGNATURE;
+ nlmHeader.version := NLM_HEADER_VERSION;
+ moduleName := upperCase(current_module.exefilename^);
+ nlmHeader.moduleName := moduleName;
+ nlmHeader.codeImageOffset := TextExeSec.DataPos+TObjSection(TextExeSec.ObjSectionList[0]).dataalignbytes; // ??? may be that align has to be moved to fixups/imports
+ nlmHeader.codeImageSize := TextExeSec.Size;
+ nlmHeader.dataImageOffset := DataExeSec.DataPos;
+ nlmHeader.dataImageSize := DataExeSec.Size;
+ if assigned(BSSExeSec) then
+ nlmHeader.uninitializedDataSize:=BSSExeSec.Size;
+ if assigned(customExeSec) then
+ begin
+ nlmHeader.customDataOffset := customExeSec.DataPos;
+ nlmHeader.customDataSize := customExeSec.Size;
+ end;
+ if FNumModules > 0 then
+ begin
+ nlmHeader.moduleDependencyOffset := FindExeSection('.modules').DataPos+4; // 4 bytes dummy
+ nlmHeader.numberOfModuleDependencies := FNumModules;
+ end;
+ nlmHeader.relocationFixupOffset := relocsExeSec.DataPos;
+ nlmHeader.numberOfRelocationFixups := FNumRelocs;
+ nlmHeader.externalReferencesOffset := importsExeSec.DataPos+4; // 4 bytes dummy
+ nlmHeader.numberOfExternalReferences := FNumExternals;
+ if assigned(exportsExeSec) then
+ if exportsExeSec.Size>0 then
+ begin
+ nlmHeader.publicsOffset := exportsExeSec.dataPos;
+ nlmHeader.numberOfPublics := FnumExports;
+ end;
+ nlmHeader.codeStartOffset := EntrySym.Address;
+
+ {exit function}
+ exesym:=texesymbol(ExeSymbolList.Find('_Stop'));
+ if assigned(exesym) then
+ nlmHeader.exitProcedureOffset := exesym.ObjSymbol.address;
+
+ {check exit function}
+ exesym:=texesymbol(ExeSymbolList.Find('FPC_NW_CHECKFUNCTION'));
+ if assigned(exesym) then
+ nlmHeader.checkUnloadProcedureOffset := exesym.ObjSymbol.address;
+
+ // calc file pos after all exesections
+ fSizeWoDebugSyms := totalheadersize + ExeSecsListSize + headerAlignBytes;
+ ExeSectionList.ForEachCall(@ExeSectionList_calc_size,nil);
+
+ nlmExtHeader.stamp := NLM_MESSAGES_STAMP;
+ //extHeader.languageID // TODO: where to get this from ?
+ if assigned(messagesExeSec) then
+ begin
+ nlmExtHeader.messageFileOffset := messagesExeSec.DataPos;
+ nlmExtHeader.messageFileLength := messagesExeSec.Size;
+ end;
+ //nlmExtHeader.messageCount // TODO: how is messageCount set ?
+ if assigned(helpExeSec) then
+ begin
+ nlmExtHeader.helpFileOffset := helpExeSec.DataPos;
+ nlmExtHeader.helpFileLength := helpExeSec.Size;
+ end;
+ //nlmExtHeader.productID // TODO: were does this came from ?
+ if assigned(xdcExeSec) then
+ begin
+ nlmExtHeader.RPCDataOffset := xdcExeSec.DataPos;
+ nlmExtHeader.RPCDataLength := xdcExeSec.Size;
+ end;
+
+ if hassymbols then
+ begin
+ nlmHeader.debugInfoOffset := fSizeWoDebugSyms;
+ ExeSymbolList.ForEachCall(@globalsyms_create_symbol,nil);
+ nlmHeader.numberOfDebugRecords := FNumDebugSymbols;
+ end;
+
+ fillNlmVersionHeader;
+ FWriter.write(nlmHeader,sizeof(nlmHeader));
+
+ { variable header }
+ NLMWriteString(nlmDescription,true);
+ if stacksize < NLM_DEFAULT_STACKSIZE then stacksize := NLM_DEFAULT_STACKSIZE;
+ FWriter.Write(stacksize,4);
+ FWriter.writezeros(4);
+ dummyLong := ' LONG';
+ FWriter.Write(dummyLong,sizeof(dummyLong)); // old thread name
+ NLMWriteString(nlmScreenname,true);
+ NLMWriteString(nlmThreadname,true);
+
+ {version}
+ FWriter.Write(nlmVersionHeader,sizeof(nlmVersionHeader));
+ {copyright}
+ if nlmCopyright <> '' then
+ begin
+ FWriter.write(NLM_COPYRIGHT_STAMP,sizeof(NLM_COPYRIGHT_STAMP));
+ NLMWriteString(nlmCopyright,true);
+ end;
+ {messages}
+ FWriter.write(nlmExtHeader,sizeof(nlmExtHeader));
+
+ {custhead}
+ nlmCustHeader.stamp := NLM_CUSTOM_STAMP;
+ nlmCustHeader.dataLength := ExeSecsListSize;
+ nlmCustHeader.dataOffset := totalheadersize;
+ nlmCustHeader.hdrLength := $10; // why 16 ?, this is what binutils write
+ FWriter.write(nlmCustHeader,sizeof(nlmCustHeader));
+
+ {CyGnUsEx}
+ // bfd has a strange way to read the sections:
+ // the section directory is written under CuStHeAd
+ // when bfd finds the neader "CyGnUsEx", it uses the
+ // offset and size from CuStHeAd to read the section table
+
+ nlmCygnusHeader.stamp := NLM_CYGNUS_STAMP; // CyGnUsEx
+ // ld writes some unknown values here, bfd irgnores the values at all
+ // lets write the offset and length of the segment table
+ nlmCygnusHeader.offset := nlmCustHeader.dataLength;
+ nlmCygnusHeader.length := nlmCustHeader.dataOffset;
+ FWriter.write(nlmCygnusHeader,sizeof(nlmCygnusHeader));
+ FWriter.WriteZeros(8); // empty stamp + align next to 16 bytes
+
+ if FWriter.Size<>totalheadersize then
+ internalerror(201103061); // headersize <> header written
+
+ { Section headers, CuStHeAd points to this section, not needed by
+ netware. Can be used to find the section in the nlm file, binutils
+ will use this section }
+ ExeSectionList.ForEachCall(@ExeSectionList_write_header,nil);
+ FWriter.WriteZeros(headerAlignBytes);
+ if FWriter.Size<>totalheadersize+ExeSecsListSize+headerAlignBytes then
+ internalerror(201103062);
+ { Section data }
+ if assigned(exemap) then
+ begin
+ exemap.Add('');
+ exemap.Add('NLM file offsets:');
+ end;
+ ExeSectionList.ForEachCall(@ExeSectionList_write_data,nil);
+
+ if hassymbols then
+ FWriter.writearray(NlmSymbols); // specific symbols for the internal netware debugger
+
+ result:=true;
+ end;
+
+
+
+ procedure TNLMexeoutput.GenerateLibraryImports(ImportLibraryList:TFPHashObjectList);
+ var
+ idata5objsection : TObjSection;
+ basedllname : string;
+
+ function AddImport(const afuncname,amangledname:string; isvar:boolean):TObjSymbol;
+ var
+ secname:string;
+ begin
+ //Comment (V_Debug,'TNLMexeoutput.GenerateLibraryImports.AddImport '+afuncName);
+ result:=nil;
+ if assigned(exemap) then
+ exemap.Add(' Importing Function '+afuncname);
+
+ if not isvar then
+ with internalobjdata do
+ begin
+ secname:=basedllname+'_i_'+amangledname;
+ idata5objsection:=createsection(sec_idata5, secname);
+ internalobjdata.SetSection(idata5objsection);
+ result:=internalobjdata.SymbolDefine('_'+amangledname,AB_IMPORT,AT_FUNCTION);
+ end;
+ end;
+
+ var
+ i,j : longint;
+ ImportLibrary : TImportLibrary;
+ ImportSymbol : TImportSymbol;
+ exesym : TExeSymbol;
+ importAddressList : TFPObjectList;
+ begin
+ if ImportLibraryList.Count > 0 then
+ begin
+ {objsec:=}internalObjData.createsection('.imports',0,[oso_data,oso_keep]);
+ i := 0;
+ internalobjdata.writebytes(i,4); // dummy to avoid deletion
+ {objsec:=}internalObjData.createsection('.modules',0,[oso_data,oso_keep]);
+ internalobjdata.writebytes(i,4); // dummy to avoid deletion
+ end;
+ for i:=0 to ImportLibraryList.Count-1 do
+ begin
+ ImportLibrary:=TImportLibrary(ImportLibraryList[i]);
+ idata5objsection:=nil;
+ for j:=0 to ImportLibrary.ImportSymbolList.Count-1 do
+ begin
+ ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);
+ exesym:=TExeSymbol(ExeSymbolList.Find(ImportSymbol.MangledName));
+ if assigned(exesym) and
+ (exesym.State<>symstate_defined) then
+ begin
+ basedllname:=ExtractFileName(ImportLibrary.Name);
+ exesym.objsymbol:=AddImport(ImportSymbol.Name,ImportSymbol.MangledName,ImportSymbol.IsVar);
+ exesym.State:=symstate_defined;
+ importAddressList := TFPObjectList.create(false);
+ nlmImports.Add(ImportSymbol.Name,importAddressList);
+ if pos('.',basedllname) = 0 then
+ basedllname := basedllname + '.nlm';
+ nlmImpNames.Add(ImportSymbol.Name,TStringObj.create(lower(basedllname)));
+ end;
+ end;
+ end;
+
+ PackUnresolvedExeSymbols('after DLL imports');
+ GenerateExports;
+ end;
+
+
+
+ procedure TNLMexeoutput.GenerateImports;
+ var
+ exesec,
+ impexesec : TExeSection;
+ objsec : TObjSection;
+ objreloc : TObjRelocation;
+ i,j,k : integer;
+ importAddressList : TFPObjectList;
+ name,mName : string;
+ b : byte;
+ modules : string;
+ modName : TStringObj;
+ begin
+ if FImportsGenerated then exit;
+ FImportsGenerated := true;
+ impexesec:=FindExeSection('.imports');
+ if impexesec=nil then exit;
+
+ for i:=0 to ExeSectionList.Count-1 do
+ begin
+ exesec:=TExeSection(ExeSectionList[i]);
+ for j:=0 to exesec.ObjSectionList.count-1 do
+ begin
+ objsec:=TObjSection(exesec.ObjSectionList[j]);
+ if j=0 then
+ begin
+ exesec.DataPos:=objSec.DataPos;
+ exesec.MemPos:=objSec.MemPos;
+ end;
+ if (copy(objsec.name,1,5) <> '.text') and (copy(objsec.name,1,4) <> '.bss') and (copy(objsec.name,1,5) <> '.data') then
+ continue;
+ for k:=0 to objsec.ObjRelocations.Count-1 do
+ begin
+ objreloc := TObjRelocation(objsec.ObjRelocations[k]);
+ if assigned(objreloc.symbol) then
+ begin
+ //writeln (objreloc.symbol.name,' ',objreloc.symbol.bind);
+ if objreloc.symbol.bind = AB_IMPORT then
+ begin
+ importAddressList := TFPObjectList(nlmImports.Find(objreloc.symbol.name));
+ if assigned(importAddressList) then
+ begin
+ objreloc.objsection := objsec; // points to idata5
+ importAddressList.Add(objreloc);
+ end else
+ begin
+ comment(v_error,objreloc.symbol.name+' is external but not defined in nlm imports');
+ end;
+ end;
+ end
+ end;
+ end;
+ end;
+
+ modules := '';
+ for i := 0 to nlmImports.count-1 do
+ begin
+ importAddressList := TFPObjectList(nlmImports.Items[i]);
+ if importAddressList.Count > 0 then
+ begin
+ name := nlmImports.NameOfIndex(i);
+
+ // find the module to be imported and add it to the list
+ // of modules to be auto loaded
+ modName := TStringObj(nlmImpNames.Find(name));
+ if assigned(modName) then
+ begin
+ mName := modName.Value;
+ if mName <> '' then
+ if copy(mName,1,1) <> '!' then // special, with ! only the imp will be included but no module is autoloaded, needed i.e. for netware.imp
+ begin
+ if pos(mName+';',modules) < 1 then
+ begin
+ modules := modules + mName + ';';
+ inc(FNumModules);
+ end;
+ end;
+ end;
+ internalobjdata.SetSection(TObjSection(impexesec.ObjSectionList[0]));
+ objNLMwriteString (name,false); // name of symbol
+ k := importAddressList.Count;
+ internalobjdata.writebytes(k,sizeof(k)); // number of references
+ inc(FNumExternals);
+ for j := 0 to importAddressList.Count-1 do
+ begin
+ objreloc := TObjRelocation(importAddressList[j]);
+ objsec := objreloc.objsection;
+ if oso_executable in objreloc.objsection.SecOptions then
+ begin
+ if objreloc.typ <> RELOC_RELATIVE then comment(v_error,'reference to external symbols must be RELOC_RELATIVE');
+ // TODO: how to check if size is 4 ????
+
+ k := objsec.MemPos + objreloc.DataOffset;
+ k := k or $40000000;
+ // TODO: data|code if we support importing data symbols
+ // i do not know if this is possible with netware
+ internalobjdata.writebytes(k,sizeof(k)); // address
+
+ // the netware loader requires an offset at the import address
+ // for call = E8 this is -4
+ // TODO: how can we check the needed offset ??
+ if objreloc.DataOffset > 0 then
+ begin
+ objsec.Data.seek(objreloc.DataOffset-1);
+ objsec.data.read(b,1);
+ if b <> $E8 then
+ comment(v_error,'no rcall (E8) before imported symbol target address');
+ k := -4;
+ objsec.Data.write(k,sizeof(k));
+ end else
+ begin
+ objsec.Data.seek(objreloc.DataOffset);
+ k := 0;
+ objsec.Data.write(k,sizeof(k));
+ end;
+ objreloc.typ := RELOC_NONE; // to avoid that TCoffObjSection.fixuprelocs changes the address again
+ end else
+ comment(v_error,'Importing of symbols only supported for .text');
+ end;
+ end;
+ end;
+
+ exesec := FindExeSection('.modules');
+ if not assigned(exesec) then internalerror(201103272); // exe section .modules does not exist ???
+ internalobjdata.SetSection(TObjSection(exesec.ObjSectionList[0]));
+ for i := 1 to FNumModules do
+ begin
+ name := GetToken(modules,';');
+ objNLMwriteString (name,false);
+ end;
+ end;
+
+
+ procedure TNLMexeoutput.GenerateExports;
+ var
+ hp : texported_item; { for exports }
+ len : byte;
+ addr: longword;
+ exesym : texesymbol;
+ begin
+ internalObjData.createsection('.exports',0,[oso_data,oso_keep]);
+ {name LString 1+n bytes
+ addr 4 bytes
+ addr and $80000000 > 0 -> .text else .data}
+ hp:=texported_item(current_module._exports.first);
+ if assigned(hp) then
+ if assigned(exemap) then
+ exemap.Add('');
+ while assigned(hp) do
+ begin
+ { Export the Symbol }
+ if assigned(exemap) then
+ exemap.Add(' Exporting Function '+hp.sym.prettyname+' as '+hp.name^);
+ len := length(hp.name^);
+ internalobjdata.writebytes(len,1);
+ internalobjdata.writebytes(hp.name^[1],len);
+ exesym:=texesymbol(ExeSymbolList.Find(hp.sym.prettyname));
+ if not assigned(exesym) then
+ begin
+ comment(v_error,'exported symbol '+hp.sym.prettyname+' not found');
+ exit;
+ end;
+ // for exported functions we have to set the upper bit
+ // this will be done in .writedata
+ if not hp.is_var then
+ FexportFunctionOffsets.Add(pointer(PtrUInt(internalobjdata.CurrObjSec.Size)));
+ internalobjdata.writereloc(0,4,exesym.ObjSymbol,RELOC_ABSOLUTE32);
+
+ addr := 0;
+ internalobjdata.writebytes(addr,4);
+ inc(FnumExports);
+ hp:=texported_item(hp.next);
+ end;
+ end;
+
+ procedure TNLMexeoutput.GenerateRelocs;
+
+ var
+ exesec : TExeSection;
+ objsec : TObjSection;
+ objreloc : TObjRelocation;
+ i,j,k : longint;
+ offset : longword;
+ inSec,toSec : TsecType;
+ targetSectionName : string;
+
+ begin
+ if not RelocSection or FRelocsGenerated then
+ exit;
+ exesec:=FindExeSection('.reloc');
+ if exesec=nil then
+ exit;
+ objsec:=internalObjData.createsection('.reloc',0,exesec.SecOptions+[oso_data]);
+ exesec.AddObjSection(objsec);
+ for i:=0 to ExeSectionList.Count-1 do
+ begin
+ exesec:=TExeSection(ExeSectionList[i]);
+ for j:=0 to exesec.ObjSectionList.count-1 do
+ begin
+ objsec:=TObjSection(exesec.ObjSectionList[j]);
+ //writeln ('Relocs for ',exesec.name,' - ',objsec.name);
+ { create relocs only for sections which are loaded in memory }
+ if not (oso_load in objsec.SecOptions) then
+ continue;
+ { create relocs only for .text and .data }
+ inSec := SectionType (objsec.name);
+ if (inSec <> Section_Text) and (inSec <> Section_Data) then
+ continue;
+
+ for k:=0 to objsec.ObjRelocations.Count-1 do
+ begin
+ objreloc:=TObjRelocation(objsec.ObjRelocations[k]);
+ if objreloc.typ <> RELOC_ABSOLUTE then
+ continue;
+ offset:=objsec.MemPos+objreloc.dataoffset;
+ targetSectionName := '';
+ if objreloc.symbol <> nil then
+ begin
+ // writeln (' MemPos',objsec.MemPos,' dataOfs:',objreloc.dataoffset,' ',objsec.name,' objreloc.symbol: ',objreloc.symbol.name,' objreloc.symbol.objsection.name: ',objreloc.symbol.objsection.name,' ',objreloc.symbol.Typ,' ',objreloc.symbol.bind,' ',objreloc.Typ);
+ if objreloc.symbol.objsection.name[1] <> '.' then
+ targetSectionName := objreloc.symbol.name // specials like __bss_start__
+ else // dont use objsection.name because it begins with *
+ targetSectionName := copy(objreloc.symbol.objsection.name,1,5); // all others begin with .segment, we only have to check for .text, .data or .bss
+ end else
+ internalerror(2011030603);
+
+ toSec := SectionType(targetSectionName);
+
+ if (toSec = Section_Text) or (toSec = Section_Data) then
+ begin
+ if (inSec = Section_text) then offset := offset or $40000000;
+ if (toSec = Section_text) then offset := offset or $80000000;
+ internalObjData.writebytes(offset,4);
+ inc(FNumRelocs);
+ end;
+ end;
+ end;
+ end;
+ FRelocsGenerated:=true;
+ end;
+
+
+ procedure TNLMexeoutput.Order_End;
+ var
+ exesec : TExeSection;
+ begin
+ inherited;
+ exesec:=FindExeSection('.reloc');
+ if exesec=nil then
+ exit;
+ exesec.SecOptions:=exesec.SecOptions + [oso_Data,oso_keep,oso_load];
+ end;
+
+
+ procedure TNLMexeoutput.MemPos_ExeSection(const aname:string);
+ begin
+ if aname='.reloc' then
+ GenerateRelocs;
+ if aname='.imports' then
+ GenerateImports;
+ if aname='.data' then
+ currMemPos := 0; // both, data and code in the nlm have a start offset of 0
+ inherited;
+ end;
+
+
+ procedure TNLMexeoutput.DataPos_ExeSection(const aname:string);
+ begin
+ inherited;
+ end;
+
+
+ procedure TNLMexeoutput.NLMwriteString (const s : string; terminateWithZero : boolean);
+ var len : byte;
+ begin
+ if length(s) > 254 then len := 254 else len := length(s);
+ FWriter.Write(len,1);
+ if len > 0 then
+ FWriter.write(s[1],len);
+ if terminateWithZero then
+ FWriter.writeZeros(1);
+ end;
+
+
+ procedure TNLMexeoutput.objNLMwriteString (const s : string; terminateWithZero : boolean);
+ var len : byte;
+ begin
+ if length(s) > 254 then len := 254 else len := length(s);
+ Internalobjdata.writebytes(len,1);
+ if len > 0 then
+ Internalobjdata.writebytes(s[1],len);
+ if terminateWithZero then
+ begin
+ len := 0;
+ Internalobjdata.writebytes(s[1],len);
+ end;
+ end;
+
+ { parse netware specific linker options }
+ procedure TNLMexeoutput.ParseScript (linkscript:TCmdStrList);
+ var
+ hp : TCmdStrListItem;
+ opt,keyword,s : string;
+ i : integer;
+
+ function toInteger(s:string; min,max:integer; var res:integer):boolean;
+ var
+ code:word;
+ begin
+ result := false;
+ val (s,res,code);
+ if code<>0 then exit;
+ if (res < min) or (res > max) then exit;
+ result := true;
+ end;
+
+
+ procedure loadFile (const secName, fileName, Desc : string);
+ var
+ fileBuf : array [0..4095] of char;
+ bytesRead : longint;
+ fileH : THandle;
+ fn : TCmdStr;
+
+ begin
+ fn := fileName;
+ if not fileExists(fn) then
+ if not unitsearchpath.FindFile(fileName,true,fn) then
+ begin
+ comment(v_error,'can not find '+desc+' file '+fileName);
+ exit;
+ end;
+ fileH := fileOpen (fn,fmOpenRead);
+ if fileH = -1 then
+ begin
+ comment(v_error,'can not open '+desc+' file '+fn);
+ exit;
+ end;
+ { load file into section }
+ internalObjData.createsection(secName,0,[oso_data,oso_keep]);
+ repeat
+ bytesRead := fileRead(fileH,fileBuf,sizeof(fileBuf));
+ if bytesRead > 0 then
+ internalobjdata.writebytes(fileBuf,bytesRead);
+ until bytesRead < sizeof(fileBuf);
+ fileClose(fileH);
+ end;
+
+ begin
+ hp:=TCmdStrListItem(linkscript.first);
+ while assigned(hp) do
+ begin
+ opt:=hp.str;
+ if (opt='') or (opt[1]='#') then
+ continue;
+ keyword:=Upper(GetToken(opt,' '));
+ if keyword = 'AUTOUNLOAD' then
+ begin
+ nlmHeader.flags:=nlmHeader.flags or NLM_FLAGS_AUTOUNLOAD;
+ end else
+ if keyword = 'COPYRIGHT' then
+ begin
+ nlmCopyright := GetToken(opt,' ');
+ end else
+ if keyword = 'CUSTOM' then
+ begin
+ loadFile ('.custom',GetToken(opt,' '),'custom data');
+ end;
+ if keyword = 'DATE' then // month day 4-digit-year
+ begin
+ if not toInteger(GetToken(opt,' '),1,12,i) then comment(v_error,'DATE: invalid month')
+ else nlmVersionHeader.month := i;
+ if not toInteger(GetToken(opt,' '),1,31,i) then comment(v_error,'DATE: invalid day')
+ else nlmVersionHeader.day := i;
+ if not toInteger(GetToken(opt,' '),1900,3000,i) then comment(v_error,'DATE: invalid year')
+ else nlmVersionHeader.year := i;
+ end else
+ if keyword = 'DEBUG' then
+ begin
+ // ignore
+ end else
+ if keyword = 'DESCRIPTION' then
+ begin
+ nlmDescription := GetToken(opt,' ');
+ if length (nlmDescription) > NLM_MAX_DESCRIPTION_LENGTH then
+ nlmDescription := copy (nlmDescription,1,NLM_MAX_DESCRIPTION_LENGTH);
+ end else
+ if keyword = 'FLAG' then
+ begin
+ s := upper(GetToken(opt,' '));
+ if (not toInteger(GetToken(opt,' '),1,$FFFFFFF,i)) or ((s <> 'ON') and (S <> 'OFF')) then comment(v_error,'FLAG: invalid') else
+ if (s='ON') then
+ nlmHeader.flags:=nlmHeader.flags or i else
+ nlmHeader.flags:=nlmHeader.flags and ($FFFFFFF-i);
+ end else
+ if keyword = 'HELP' then
+ begin
+ loadFile ('.help',GetToken(opt,' '),'help');
+ end else
+ if keyword = 'MESSAGES' then
+ begin
+ loadFile ('.messages',GetToken(opt,' '),'message');
+ end else
+ if keyword = 'MULTIPLE' then
+ begin
+ nlmHeader.flags:=nlmHeader.flags or NLM_FLAGS_MULTILOAD;
+ end else
+ if keyword = 'OS_DOMAIN' then
+ begin
+ nlmHeader.flags:=nlmHeader.flags or NLM_FLAGS_OSDOMAIN;
+ end else
+ if keyword = 'PSEUDOPREEMPTION' then
+ begin
+ nlmHeader.flags:=nlmHeader.flags or NLM_FLAGS_PSEUDOPREEMPTION;
+ end else
+ if keyword = 'REENTRANT' then
+ begin
+ nlmHeader.flags:=nlmHeader.flags or NLM_FLAGS_REENTRANT;
+ end else
+ if keyword = 'SCREENNAME' then
+ begin
+ nlmScreenname := GetToken(opt,' ');
+ if length(nlmScreenname) > NLM_MAX_SCREEN_NAME_LENGTH then
+ nlmScreenName := copy (nlmScreenName,1,NLM_MAX_SCREEN_NAME_LENGTH);
+ end else
+ if (keyword = 'STACK') or (keyword = 'STACKSIZE') then
+ begin
+ if (not toInteger(GetToken(opt,' '),1,$FFFFFFF,i)) then comment(v_error,'invalid stacksize') else
+ stacksize := i;
+ end else
+ if keyword = 'SYNCHRONIZE' then
+ begin
+ nlmHeader.flags:=nlmHeader.flags or NLM_FLAGS_SYNCHRONIZE;
+ end else
+ if keyword = 'THREADNAME' then
+ begin
+ nlmThreadname := GetToken(opt,' ');
+ if length(nlmThreadname) > NLM_MAX_THREAD_NAME_LENGTH then
+ nlmThreadname := copy (nlmThreadname,1,NLM_MAX_THREAD_NAME_LENGTH);
+ end else
+ if keyword = 'TYPE' then
+ begin
+ if (not toInteger(GetToken(opt,' '),1,16,i)) then comment(v_error,'invalid TYPE') else
+ nlmHeader.moduleType := i; // TODO: set executable extension (.DSK, .LAN, ...)
+ end else
+ if keyword = 'VERSION' then
+ begin
+ if (not toInteger(GetToken(opt,' '),0,$FFFFFFF,i)) then comment(v_error,'invalid major version') else
+ nlmVersionHeader.majorVersion := i;
+ if (not toInteger(GetToken(opt,' '),0,99,i)) then comment(v_error,'invalid minor version') else
+ nlmVersionHeader.minorVersion := i;
+ if (not toInteger(GetToken(opt,' '),0,$FFFFFFF,i)) then comment(v_error,'invalid minor version') else
+ if i > 26 then
+ nlmVersionHeader.revision := 0 else
+ nlmVersionHeader.revision := i;
+ end else
+ if keyword = 'XDCDATA' then
+ begin
+ loadFile ('.xdc',GetToken(opt,' '),'xdc');
+ end;
+ { TODO: check for unknown options. This means all handled option
+ (also in link.pas) have to be flagged if processed }
+ hp:=TCmdStrListItem(hp.next);
+ end;
+ end;
+
+{****************************************************************************
+ TNLMCoffObjData
+****************************************************************************}
+
+ constructor TNLMCoffObjData.create(const n:string);
+ begin
+ inherited createcoff(n,true,TNLMCoffObjSection);
+ end;
+
+
+{****************************************************************************
+ TNLMoffObjSection
+****************************************************************************}
+
+ constructor TNLMCoffObjSection.create(AList:TFPHashObjectList;const aname:string;aalign:shortint;aoptions:TObjSectionOptions);
+ begin
+ inherited create(alist,aname,aalign,aoptions);
+ end;
+
+
+ constructor TNLMCoffObjOutput.create(AWriter:TObjectWriter);
+ begin
+ // ??????
+ // if win32=false, .stabs and .stabstr will be written without oso_debug
+ // Without oso_debug the sections will be removed by the linker
+ inherited createcoff(AWriter,{win32}true);
+ cobjdata:=TNLMCoffObjData;
+ end;
+
+{****************************************************************************
+ TDJCoffAssembler
+****************************************************************************}
+
+ constructor TNLMCoffAssembler.Create(smart:boolean);
+ begin
+ inherited Create(smart);
+ CObjOutput:=TNLMCoffObjOutput;
+ end;
+
+ constructor TNLMCoffObjInput.create;
+ begin
+ inherited createcoff(true);
+ cobjdata:=TNLMCoffObjData;
+ end;
+
+{*****************************************************************************
+ Initialize
+*****************************************************************************}
+const
+ as_i386_nlmcoff_info : tasminfo =
+ (
+ id : as_i386_nlmcoff;
+ idtxt : 'NLMCOFF';
+ asmbin : '';
+ asmcmd : '';
+ supported_targets : [system_i386_Netware,system_i386_netwlibc];
+ flags : [af_outputbinary,af_smartlink_sections];
+ labelprefix : '.L';
+ comment : '';
+ );
+
+
+
+initialization
+{$ifdef i386}
+ RegisterAssembler(as_i386_nlmcoff_info,TNLMCoffAssembler);
+{$endif i386}
+end.
diff --git a/compiler/owar.pas b/compiler/owar.pas
index 8a5a39ca8d..b714700385 100644
--- a/compiler/owar.pas
+++ b/compiler/owar.pas
@@ -262,11 +262,11 @@ implementation
procedure tarobjectwriter.writear;
var
- arf : TCFileStream;
+ arf : TCCustomFileStream;
fixup,l,
relocs,i : longint;
begin
- arf:=TCFileStream.Create(arfn,fmCreate);
+ arf:=CFileStreamClass.Create(arfn,fmCreate);
if CStreamError<>0 then
begin
Message1(exec_e_cant_create_archivefile,arfn);
diff --git a/compiler/owbase.pas b/compiler/owbase.pas
index 592d463aac..56558b2fa4 100644
--- a/compiler/owbase.pas
+++ b/compiler/owbase.pas
@@ -31,7 +31,7 @@ uses
type
tobjectwriter=class
private
- f : TCFileStream;
+ f : TCCustomFileStream;
opened : boolean;
buf : pchar;
bufidx : longword;
@@ -54,7 +54,7 @@ type
tobjectreader=class
private
- f : TCFileStream;
+ f : TCCustomFileStream;
opened : boolean;
buf : pchar;
ffilename : string;
@@ -108,7 +108,7 @@ end;
function tobjectwriter.createfile(const fn:string):boolean;
begin
createfile:=false;
- f:=TCFileStream.Create(fn,fmCreate);
+ f:=CFileStreamClass.Create(fn,fmCreate);
if CStreamError<>0 then
begin
Message1(exec_e_cant_create_objectfile,fn);
@@ -233,7 +233,7 @@ end;
function tobjectreader.openfile(const fn:string):boolean;
begin
openfile:=false;
- f:=TCFileStream.Create(fn,fmOpenRead);
+ f:=CFileStreamClass.Create(fn,fmOpenRead);
if CStreamError<>0 then
begin
Comment(V_Error,'Can''t open object file: '+fn);
diff --git a/compiler/paramgr.pas b/compiler/paramgr.pas
index 0e844da786..8fde613a00 100644
--- a/compiler/paramgr.pas
+++ b/compiler/paramgr.pas
@@ -366,7 +366,8 @@ implementation
i386 isn't affected anyways because it uses the stack to push parameters
on arm it reduces executable size of the compiler by 2.1 per cent (FK) }
{ Does it fit a register? }
- if (not can_use_final_stack_loc or
+ if ((not can_use_final_stack_loc and
+ use_fixed_stack) or
not is_stack_paraloc(paraloc)) and
(len<=sizeof(pint)) and
(paraloc^.size in [OS_8,OS_16,OS_32,OS_64,OS_128,OS_S8,OS_S16,OS_S32,OS_S64,OS_S128]) then
@@ -382,7 +383,8 @@ implementation
newparaloc^.register:=cg.getmmregister(list,paraloc^.size);
LOC_REFERENCE :
begin
- if can_use_final_stack_loc and
+ if (can_use_final_stack_loc or
+ not use_fixed_stack) and
is_stack_paraloc(paraloc) then
duplicatecgparaloc(paraloc,newparaloc)
else
diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas
index 277d0630f9..63c1bb219a 100644
--- a/compiler/pdecl.pas
+++ b/compiler/pdecl.pas
@@ -397,7 +397,6 @@ implementation
typename,orgtypename : TIDString;
newtype : ttypesym;
sym : tsym;
- srsymtable : TSymtable;
hdef : tdef;
defpos,storetokenpos : tfileposinfo;
old_block_type : tblock_type;
@@ -462,8 +461,10 @@ implementation
current_scanner.startrecordtokens(generictokenbuf);
end;
- { is the type already defined? }
- searchsym(typename,sym,srsymtable);
+ { is the type already defined? -- must be in the current symtable,
+ not in a nested symtable or one higher up the stack -> don't
+ use searchsym & frinds! }
+ sym:=tsym(symtablestack.top.find(typename));
newtype:=nil;
{ found a symbol with this name? }
if assigned(sym) then
diff --git a/compiler/pdecobj.pas b/compiler/pdecobj.pas
index 54e7f7c688..8fafe9f7c5 100644
--- a/compiler/pdecobj.pas
+++ b/compiler/pdecobj.pas
@@ -280,12 +280,13 @@ implementation
procedure handleImplementedProtocol(intfdef : tobjectdef);
begin
+ intfdef:=find_real_objcclass_definition(intfdef,false);
if not is_objcprotocol(intfdef) then
begin
Message1(type_e_protocol_type_expected,intfdef.typename);
exit;
end;
- if (oo_is_forward in intfdef.objectoptions) then
+ if ([oo_is_forward,oo_is_formal] * intfdef.objectoptions <> []) then
begin
Message1(parser_e_forward_protocol_declaration_must_be_resolved,intfdef.objrealname^);
exit;
diff --git a/compiler/pdecsub.pas b/compiler/pdecsub.pas
index 9efb4e0265..e982dd3ed0 100644
--- a/compiler/pdecsub.pas
+++ b/compiler/pdecsub.pas
@@ -1611,9 +1611,22 @@ begin
end;
procedure pd_interrupt(pd:tabstractprocdef);
+
+var v: Tconstexprint;
+
begin
if pd.parast.symtablelevel>normal_function_level then
Message(parser_e_dont_nest_interrupt);
+
+ if target_info.system in systems_interrupt_table then
+ begin
+ if token<>_SEMICOLON then
+ begin
+ pd.proccalloption:=pocall_interrupt;
+ v:=get_intconst;
+ Tprocdef(pd).interruptvector:=v.uvalue;
+ end;
+ end;
end;
procedure pd_abstract(pd:tabstractprocdef);
@@ -3084,7 +3097,7 @@ const
can be in a different location because of the calling convention, eg. L-R vs. R-L order (PFV) }
(
(compare_paras(currpd.paras,fwpd.paras,cp_none,[cpo_comparedefaultvalue,cpo_ignorehidden,cpo_openequalisexact,cpo_ignoreuniv])=te_exact) and
- (fwpd.returndef=currpd.returndef)
+ (compare_defs(fwpd.returndef,currpd.returndef,nothingn)=te_exact)
) then
begin
{ Check if we've found the forwarddef, if found then
@@ -3155,7 +3168,7 @@ const
if ((m_repeat_forward in current_settings.modeswitches) or
not is_bareprocdef(currpd)) and
((compare_paras(currpd.paras,fwpd.paras,cp_all,paracompopt)<>te_exact) or
- (fwpd.returndef<>currpd.returndef)) then
+ (compare_defs(fwpd.returndef,currpd.returndef,nothingn)<>te_exact)) then
begin
MessagePos1(currpd.fileinfo,parser_e_header_dont_match_forward,
fwpd.fullprocname(false));
diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas
index b085d60fa4..259ca0c45d 100644
--- a/compiler/pdecvar.pas
+++ b/compiler/pdecvar.pas
@@ -1041,6 +1041,17 @@ implementation
end;
+ procedure try_consume_sectiondirective(var asection: ansistring);
+ begin
+ if idtoken=_SECTION then
+ begin
+ consume(_ID);
+ asection:=get_stringconst;
+ consume(_SEMICOLON);
+ end;
+ end;
+
+
procedure read_var_decls(options:Tvar_dec_options);
procedure read_default_value(sc : TFPObjectList);
@@ -1253,6 +1264,7 @@ implementation
hintsymoptions : tsymoptions;
deprecatedmsg : pshortstring;
old_block_type : tblock_type;
+ section : ansistring;
begin
old_block_type:=block_type;
block_type:=bt_var;
@@ -1394,6 +1406,24 @@ implementation
) then
read_public_and_external_sc(sc);
+ { try to parse a section directive }
+ if (target_info.system in systems_embedded) and (idtoken=_SECTION) then
+ begin
+ try_consume_sectiondirective(section);
+ if section<>'' then
+ begin
+ for i:=0 to sc.count-1 do
+ begin
+ vs:=tabstractvarsym(sc[i]);
+ if (vs.varoptions *[vo_is_external,vo_is_weak_external])<>[] then
+ Message(parser_e_externals_no_section);
+ if vs.typ<>staticvarsym then
+ Message(parser_e_section_no_locals);
+ tstaticvarsym(vs).section:=section;
+ end;
+ end;
+ end;
+
{ allocate normal variable (non-external and non-typed-const) staticvarsyms }
for i:=0 to sc.count-1 do
begin
diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas
index b4438306e2..c3c8e36339 100644
--- a/compiler/pexpr.pas
+++ b/compiler/pexpr.pas
@@ -1451,7 +1451,7 @@ implementation
{ e.g., "with classinstance do field := 5"), then }
{ let do_member_read handle it }
if (srsym.owner.symtabletype in [ObjectSymtable,recordsymtable]) then
- do_member_read(tobjectdef(hdef),getaddr,srsym,p1,again,[])
+ do_member_read(tabstractrecorddef(hdef),getaddr,srsym,p1,again,[])
else
{ otherwise it's a regular record subscript }
p1:=csubscriptnode.create(srsym,p1);
@@ -1507,7 +1507,7 @@ implementation
if assigned(srsym) then
check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg);
consume(_ID);
- do_member_read(tobjectdef(hdef),false,srsym,p1,again,[]);
+ do_member_read(tabstractrecorddef(hdef),false,srsym,p1,again,[]);
end
else
begin
@@ -1522,7 +1522,7 @@ implementation
begin
check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg);
consume(_ID);
- do_member_read(tobjectdef(hdef),getaddr,srsym,p1,again,[]);
+ do_member_read(tabstractrecorddef(hdef),getaddr,srsym,p1,again,[]);
end
else
Message1(sym_e_id_no_member,orgpattern);
@@ -1547,7 +1547,7 @@ implementation
begin
check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg);
consume(_ID);
- do_member_read(tobjectdef(hdef),getaddr,srsym,p1,again,[]);
+ do_member_read(tabstractrecorddef(hdef),getaddr,srsym,p1,again,[]);
end
else
begin
@@ -1597,7 +1597,7 @@ implementation
{ not srsymtable.symtabletype since that can be }
{ withsymtable as well }
if (srsym.owner.symtabletype in [ObjectSymtable,recordsymtable]) then
- do_member_read(tobjectdef(hdef),getaddr,srsym,p1,again,[])
+ do_member_read(tabstractrecorddef(hdef),getaddr,srsym,p1,again,[])
else
{ no procsyms in records (yet) }
internalerror(2007012006);
@@ -1630,7 +1630,7 @@ implementation
{ not srsymtable.symtabletype since that can be }
{ withsymtable as well }
if (srsym.owner.symtabletype in [ObjectSymtable,recordsymtable]) then
- do_member_read(tobjectdef(hdef),getaddr,srsym,p1,again,[])
+ do_member_read(tabstractrecorddef(hdef),getaddr,srsym,p1,again,[])
else
{ no propertysyms in records (yet) }
internalerror(2009111510);
diff --git a/compiler/pinline.pas b/compiler/pinline.pas
index 2c3904abae..58fe2b9184 100644
--- a/compiler/pinline.pas
+++ b/compiler/pinline.pas
@@ -620,14 +620,12 @@ implementation
begin
destppn:=tcallparanode(ppn.right);
{ create call to fpc_initialize/finalize_array }
- npara:=ccallparanode.create(cordconstnode.create
- (destppn.left.resultdef.size,s32inttype,true),
- ccallparanode.create(ctypeconvnode.create
+ npara:=ccallparanode.create(ctypeconvnode.create
(ppn.left,s32inttype),
ccallparanode.create(caddrnode.create_internal
(crttinode.create(tstoreddef(destppn.left.resultdef),initrtti,rdt_normal)),
ccallparanode.create(caddrnode.create_internal
- (destppn.left),nil))));
+ (destppn.left),nil)));
if isinit then
newblock:=ccallnode.createintern('fpc_initialize_array',npara)
else
diff --git a/compiler/pmodules.pas b/compiler/pmodules.pas
index 10f799ce81..3f9cb27730 100644
--- a/compiler/pmodules.pas
+++ b/compiler/pmodules.pas
@@ -29,7 +29,6 @@ interface
procedure proc_package;
procedure proc_program(islibrary : boolean);
-
implementation
uses
@@ -47,13 +46,8 @@ implementation
pexports,
objcgutl,
wpobase,
- scanner,pbase,pexpr,psystem,psub,pdecsub,ptype
- ,cpuinfo
-{$ifdef i386}
- { fix me! }
- ,cpubase
-{$endif i386}
- ;
+ scanner,pbase,pexpr,psystem,psub,pdecsub,ptype,
+ cpuinfo;
procedure create_objectfile;
@@ -715,7 +709,7 @@ implementation
end;
{ CPU targets with microcontroller support can add a controller specific unit }
-{$if defined(ARM)}
+{$if defined(ARM) or defined(AVR)}
if (target_info.system in systems_embedded) and (current_settings.controllertype<>ct_none) then
AddUnit(controllerunitstr[current_settings.controllertype]);
{$endif ARM}
@@ -1908,11 +1902,7 @@ implementation
new_section(current_asmdata.asmlists[al_procedures],sec_code,'',0);
current_asmdata.asmlists[al_procedures].concat(tai_symbol.createname_global('_DLLMainCRTStartup',AT_FUNCTION,0));
-{$ifdef i386}
- { fix me! }
- current_asmdata.asmlists[al_procedures].concat(Taicpu.Op_const_reg(A_MOV,S_L,1,NR_EAX));
- current_asmdata.asmlists[al_procedures].concat(Taicpu.Op_const(A_RET,S_W,12));
-{$endif i386}
+ gen_fpc_dummy(current_asmdata.asmlists[al_procedures]);
current_asmdata.asmlists[al_procedures].concat(tai_const.createname('_FPCDummy',0));
{ leave when we got an error }
@@ -2174,7 +2164,7 @@ implementation
{ Insert _GLOBAL_OFFSET_TABLE_ symbol if system uses it }
maybe_load_got;
-
+
{ create whole program optimisation information }
current_module.wpoinfo:=tunitwpoinfo.create;
@@ -2363,6 +2353,9 @@ implementation
InsertWideInitsTablesTable;
InsertMemorySizes;
+ if target_info.system in systems_interrupt_table then
+ InsertInterruptTable;
+
{ Insert symbol to resource info }
InsertResourceInfo(resources_used);
diff --git a/compiler/powerpc/agppcmpw.pas b/compiler/powerpc/agppcmpw.pas
index bd6a8ae10b..9b28633338 100644
--- a/compiler/powerpc/agppcmpw.pas
+++ b/compiler/powerpc/agppcmpw.pas
@@ -70,6 +70,7 @@ interface
secnames : array[TAsmSectiontype] of string[10] = (
'', {none}
+ '', {user}
'csect', {code}
'csect', {data}
'csect', {read only data}
diff --git a/compiler/ppu.pas b/compiler/ppu.pas
index 1e7f04252f..3e873f1c6f 100644
--- a/compiler/ppu.pas
+++ b/compiler/ppu.pas
@@ -26,7 +26,7 @@ unit ppu;
interface
uses
- globtype,constexp;
+ globtype,constexp,cstreams;
{ Also write the ppu if only crc if done, this can be used with ppudump to
see the differences between the intf and implementation }
@@ -186,9 +186,11 @@ type
nr : byte;
end;
+ { tppufile }
+
tppufile=class
private
- f : file;
+ f : TCCustomFileStream;
mode : byte; {0 - Closed, 1 - Reading, 2 - Writing}
fname : string;
fsize : integer;
@@ -260,6 +262,7 @@ type
function getaword:aword;
function getreal:ppureal;
function getstring:string;
+ function getansistring:ansistring;
procedure getnormalset(var b);
procedure getsmallset(var b);
function skipuntilentry(untilb:byte):boolean;
@@ -280,10 +283,11 @@ type
procedure putaword(i:aword);
procedure putreal(d:ppureal);
procedure putstring(const s:string);
+ procedure putansistring(const s:ansistring);
procedure putnormalset(const b);
procedure putsmallset(const b);
- procedure tempclose;
- function tempopen:boolean;
+ procedure tempclose; // MG: not used, obsolete?
+ function tempopen:boolean; // MG: not used, obsolete?
end;
implementation
@@ -356,10 +360,7 @@ begin
if Mode<>0 then
begin
Flush;
- {$I-}
- system.close(f);
- {$I+}
- if ioresult<>0 then;
+ f.Free;
Mode:=0;
closed:=true;
end;
@@ -415,21 +416,17 @@ var
i : integer;
begin
openfile:=false;
- assign(f,fname);
- ofmode:=filemode;
- filemode:=$0;
- {$I-}
- reset(f,1);
- {$I+}
- filemode:=ofmode;
- if ioresult<>0 then
- exit;
+ try
+ f:=CFileStreamClass.Create(fname,fmOpenRead)
+ except
+ exit;
+ end;
closed:=false;
{read ppuheader}
- fsize:=filesize(f);
+ fsize:=f.Size;
if fsize<sizeof(tppuheader) then
exit;
- blockread(f,header,sizeof(tppuheader),i);
+ i:=f.Read(header,sizeof(tppuheader));
{ The header is always stored in little endian order }
{ therefore swap if on a big endian machine }
{$IFDEF ENDIAN_BIG}
@@ -478,7 +475,7 @@ end;
procedure tppufile.reloadbuf;
begin
inc(bufstart,bufsize);
- blockread(f,buf^,ppubufsize,bufsize);
+ bufsize:=f.Read(buf^,ppubufsize);
bufidx:=0;
end;
@@ -789,6 +786,22 @@ begin
end;
+function tppufile.getansistring: ansistring;
+var
+ l : longint;
+begin
+ l:=getlongint;
+ if entryidx+l>entry.size then
+ begin
+ error:=true;
+ exit;
+ end;
+ SetLength(Result,l);
+ ReadData(result[1],l);
+ inc(entryidx,l);
+end;
+
+
procedure tppufile.getsmallset(var b);
var
i : longint;
@@ -827,6 +840,8 @@ end;
*****************************************************************************}
function tppufile.createfile:boolean;
+var
+ ok: boolean;
begin
createfile:=false;
{$ifdef INTFPPU}
@@ -838,24 +853,26 @@ begin
{$endif}
if not crc_only then
begin
- assign(f,fname);
{$ifdef MACOS}
{FPas is FreePascal's creator code on MacOS. See systems/mac_crea.txt}
SetDefaultMacOSCreator('FPas');
SetDefaultMacOSFiletype('FPPU');
{$endif}
- {$I-}
- rewrite(f,1);
- {$I+}
+ ok:=false;
+ try
+ f:=CFileStreamClass.Create(fname,fmCreate);
+ ok:=true;
+ except
+ end;
{$ifdef MACOS}
SetDefaultMacOSCreator('MPS ');
SetDefaultMacOSFiletype('TEXT');
{$endif}
- if ioresult<>0 then
+ if not ok then
exit;
Mode:=2;
{write header for sure}
- blockwrite(f,header,sizeof(tppuheader));
+ f.Write(header,sizeof(tppuheader));
end;
bufsize:=ppubufsize;
bufstart:=sizeof(tppuheader);
@@ -904,10 +921,10 @@ begin
header.symlistsize:=swapendian(header.symlistsize);
{$endif not FPC_BIG_ENDIAN}
{ write header and restore filepos after it }
- opos:=filepos(f);
- seek(f,0);
- blockwrite(f,header,sizeof(tppuheader));
- seek(f,opos);
+ opos:=f.Position;
+ f.Position:=0;
+ f.Write(header,sizeof(tppuheader));
+ f.Position:=opos;
end;
@@ -915,7 +932,7 @@ procedure tppufile.writebuf;
begin
if not crc_only and
(bufidx <> 0) then
- blockwrite(f,buf^,bufidx);
+ f.Write(buf^,bufidx);
inc(bufstart,bufidx);
bufidx:=0;
end;
@@ -985,10 +1002,10 @@ begin
{flush to be sure}
WriteBuf;
{write entry}
- opos:=filepos(f);
- seek(f,entrystart);
- blockwrite(f,entry,sizeof(tppuentry));
- seek(f,opos);
+ opos:=f.Position;
+ f.Position:=entrystart;
+ f.write(entry,sizeof(tppuentry));
+ f.Position:=opos;
end;
entrybufstart:=bufstart;
end
@@ -1131,6 +1148,16 @@ procedure tppufile.putstring(const s:string);
end;
+procedure tppufile.putansistring(const s: ansistring);
+ var
+ l : longint;
+ begin
+ l:=length(s);
+ putdata(l,4);
+ putdata(s[1],l);
+ end;
+
+
procedure tppufile.putsmallset(const b);
var
l : longint;
@@ -1152,11 +1179,8 @@ procedure tppufile.tempclose;
begin
if not closed then
begin
- closepos:=filepos(f);
- {$I-}
- system.close(f);
- {$I+}
- if ioresult<>0 then;
+ closepos:=f.Position;
+ f.Free;
closed:=true;
tempclosed:=true;
end;
@@ -1170,6 +1194,10 @@ function tppufile.tempopen:boolean;
tempopen:=false;
if not closed or not tempclosed then
exit;
+ // MG: not sure, if this is correct
+
+ f.Position:=0;
+ (*
ofm:=filemode;
filemode:=0;
{$I-}
@@ -1178,11 +1206,12 @@ function tppufile.tempopen:boolean;
filemode:=ofm;
if ioresult<>0 then
exit;
+ *)
closed:=false;
tempclosed:=false;
{ restore state }
- seek(f,closepos);
+ f.Position:=closepos;
tempopen:=true;
end;
diff --git a/compiler/procinfo.pas b/compiler/procinfo.pas
index d2cbeb8c2c..b23b34341b 100644
--- a/compiler/procinfo.pas
+++ b/compiler/procinfo.pas
@@ -47,10 +47,17 @@ unit procinfo;
type
+ tsavedlabels = array[Boolean] of TAsmLabel;
+
{# This object gives information on the current routine being
compiled.
}
tprocinfo = class(tlinkedlistitem)
+ private
+ { list to store the procinfo's of the nested procedures }
+ nestedprocs : tlinkedlist;
+ procedure addnestedproc(child: tprocinfo);
+ public
{ pointer to parent in nested procedures }
parent : tprocinfo;
{# the definition of the routine itself }
@@ -123,6 +130,18 @@ unit procinfo;
{ Allocate got register }
procedure allocate_got_register(list: TAsmList);virtual;
+
+ { Destroy the entire procinfo tree, starting from the outermost parent }
+ procedure destroy_tree;
+
+ { Store CurrTrueLabel and CurrFalseLabel to saved and generate new ones }
+ procedure save_jump_labels(out saved: tsavedlabels);
+
+ { Restore CurrTrueLabel and CurrFalseLabel from saved }
+ procedure restore_jump_labels(const saved: tsavedlabels);
+
+ function get_first_nestedproc: tprocinfo;
+ function has_nestedprocs: boolean;
end;
tcprocinfo = class of tprocinfo;
@@ -165,15 +184,61 @@ implementation
CurrTrueLabel:=nil;
CurrFalseLabel:=nil;
maxpushedparasize:=0;
+ if Assigned(parent) and (parent.procdef.parast.symtablelevel>=normal_function_level) then
+ parent.addnestedproc(Self);
end;
destructor tprocinfo.destroy;
begin
+ nestedprocs.free;
aktproccode.free;
aktlocaldata.free;
end;
+ procedure tprocinfo.destroy_tree;
+ var
+ hp: tprocinfo;
+ begin
+ hp:=Self;
+ while Assigned(hp.parent) do
+ hp:=hp.parent;
+ hp.Free;
+ end;
+
+ procedure tprocinfo.addnestedproc(child: tprocinfo);
+ begin
+ if nestedprocs=nil then
+ nestedprocs:=TLinkedList.Create;
+ nestedprocs.insert(child);
+ end;
+
+ function tprocinfo.get_first_nestedproc: tprocinfo;
+ begin
+ if assigned(nestedprocs) then
+ result:=tprocinfo(nestedprocs.first)
+ else
+ result:=nil;
+ end;
+
+ function tprocinfo.has_nestedprocs: boolean;
+ begin
+ result:=assigned(nestedprocs) and (nestedprocs.count>0);
+ end;
+
+ procedure tprocinfo.save_jump_labels(out saved: tsavedlabels);
+ begin
+ saved[false]:=CurrFalseLabel;
+ saved[true]:=CurrTrueLabel;
+ current_asmdata.getjumplabel(CurrTrueLabel);
+ current_asmdata.getjumplabel(CurrFalseLabel);
+ end;
+
+ procedure tprocinfo.restore_jump_labels(const saved: tsavedlabels);
+ begin
+ CurrFalseLabel:=saved[false];
+ CurrTrueLabel:=saved[true];
+ end;
procedure tprocinfo.allocate_push_parasize(size:longint);
begin
diff --git a/compiler/psub.pas b/compiler/psub.pas
index 195bb6d7c7..2e0dd6be94 100644
--- a/compiler/psub.pas
+++ b/compiler/psub.pas
@@ -45,10 +45,7 @@ interface
stackcheck_asmnode,
init_asmnode,
final_asmnode : tasmnode;
- { list to store the procinfo's of the nested procedures }
- nestedprocs : tlinkedlist;
dfabuilder : TDFABuilder;
- constructor create(aparent:tprocinfo);override;
destructor destroy;override;
procedure printproc(pass:string);
procedure generate_code;
@@ -555,16 +552,8 @@ implementation
TCGProcInfo
****************************************************************************}
- constructor tcgprocinfo.create(aparent:tprocinfo);
- begin
- inherited Create(aparent);
- nestedprocs:=tlinkedlist.create;
- end;
-
-
destructor tcgprocinfo.destroy;
begin
- nestedprocs.free;
if assigned(code) then
code.free;
inherited destroy;
@@ -794,10 +783,10 @@ implementation
function tcgprocinfo.has_assembler_child : boolean;
var
- hp : tcgprocinfo;
+ hp : tprocinfo;
begin
result:=false;
- hp:=tcgprocinfo(nestedprocs.first);
+ hp:=get_first_nestedproc;
while assigned(hp) do
begin
if (hp.flags*[pi_has_assembler_block,pi_is_assembler])<>[] then
@@ -805,7 +794,7 @@ implementation
result:=true;
exit;
end;
- hp:=tcgprocinfo(hp.next);
+ hp:=tprocinfo(hp.next);
end;
end;
@@ -1549,7 +1538,7 @@ implementation
{ generate code for this procedure }
pi.generate_code;
{ process nested procs }
- hpi:=tcgprocinfo(pi.nestedprocs.first);
+ hpi:=tcgprocinfo(pi.get_first_nestedproc);
while assigned(hpi) do
begin
do_generate_code(hpi);
@@ -1602,7 +1591,7 @@ implementation
{ We can't support inlining for procedures that have nested
procedures because the nested procedures use a fixed offset
for accessing locals in the parent procedure (PFV) }
- if (tcgprocinfo(current_procinfo).nestedprocs.count>0) then
+ if current_procinfo.has_nestedprocs then
begin
if (df_generic in current_procinfo.procdef.defoptions) then
Comment(V_Error,'Generic methods cannot have nested procedures')
@@ -1618,9 +1607,7 @@ implementation
{ When it's a nested procedure then defer the code generation,
when back at normal function level then generate the code
for all defered nested procedures and the current procedure }
- if isnestedproc then
- tcgprocinfo(current_procinfo.parent).nestedprocs.insert(current_procinfo)
- else
+ if not isnestedproc then
begin
if not(df_generic in current_procinfo.procdef.defoptions) then
do_generate_code(tcgprocinfo(current_procinfo));
diff --git a/compiler/ptype.pas b/compiler/ptype.pas
index a95b7132c5..e15137527e 100644
--- a/compiler/ptype.pas
+++ b/compiler/ptype.pas
@@ -40,9 +40,6 @@ interface
procedure resolve_forward_types;
- { reads a type identifier }
- procedure id_type(var def : tdef;isforwarddef:boolean);
-
{ reads a string, file type or a type identifier }
procedure single_type(var def:tdef;options:TSingleTypeOptions);
@@ -389,7 +386,96 @@ implementation
end;
- procedure id_type(var def : tdef;isforwarddef:boolean);
+ procedure id_type(var def : tdef;isforwarddef,checkcurrentrecdef:boolean); forward;
+
+ { def is the outermost type in which other types have to be searched
+
+ isforward indicates whether the current definition can be a forward definition
+
+ if assigned, currentstructstack is a list of tabstractrecorddefs that, from
+ last to first, are child types of def that are not yet visible via the
+ normal symtable searching routines because they are types that are currently
+ being parsed (so using id_type on them after pushing def on the
+ symtablestack would result in errors because they'd come back as errordef)
+ }
+ procedure parse_nested_types(var def: tdef; isforwarddef: boolean; currentstructstack: tfpobjectlist);
+ var
+ t2: tdef;
+ structstackindex: longint;
+ begin
+ if assigned(currentstructstack) then
+ structstackindex:=currentstructstack.count-1
+ else
+ structstackindex:=-1;
+ { handle types inside classes, e.g. TNode.TLongint }
+ while (token=_POINT) do
+ begin
+ if parse_generic then
+ begin
+ consume(_POINT);
+ consume(_ID);
+ end
+ else if is_class_or_object(def) or is_record(def) then
+ begin
+ consume(_POINT);
+ if (structstackindex>=0) and
+ (tabstractrecorddef(currentstructstack[structstackindex]).objname^=pattern) then
+ begin
+ def:=tdef(currentstructstack[structstackindex]);
+ dec(structstackindex);
+ consume(_ID);
+ end
+ else
+ begin
+ structstackindex:=-1;
+ symtablestack.push(tabstractrecorddef(def).symtable);
+ t2:=generrordef;
+ id_type(t2,isforwarddef,false);
+ symtablestack.pop(tabstractrecorddef(def).symtable);
+ def:=t2;
+ end;
+ end
+ else
+ break;
+ end;
+ end;
+
+
+ function try_parse_structdef_nested_type(out def: tdef; basedef: tabstractrecorddef; isfowarddef: boolean): boolean;
+ var
+ structdef : tdef;
+ structdefstack : tfpobjectlist;
+ begin
+ { use of current parsed object:
+ classes, objects, records can be used also in themself }
+ structdef:=basedef;
+ structdefstack:=nil;
+ while assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
+ begin
+ if (tabstractrecorddef(structdef).objname^=pattern) then
+ begin
+ consume(_ID);
+ def:=structdef;
+ { we found the top-most match, now check how far down we can
+ follow }
+ structdefstack:=tfpobjectlist.create(false);
+ structdef:=basedef;
+ while (structdef<>def) do
+ begin
+ structdefstack.add(structdef);
+ structdef:=tabstractrecorddef(structdef.owner.defowner);
+ end;
+ parse_nested_types(def,isfowarddef,structdefstack);
+ structdefstack.free;
+ result:=true;
+ exit;
+ end;
+ structdef:=tdef(tabstractrecorddef(structdef).owner.defowner);
+ end;
+ result:=false;
+ end;
+
+ procedure id_type(var def : tdef;isforwarddef,checkcurrentrecdef:boolean);
{ reads a type definition }
{ to a appropriating tdef, s gets the name of }
{ the type to allow name mangling }
@@ -407,17 +493,9 @@ implementation
pos:=current_tokenpos;
{ use of current parsed object:
classes, objects, records can be used also in themself }
- structdef:=current_structdef;
- while assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
- begin
- if (structdef.objname^=pattern) then
- begin
- consume(_ID);
- def:=structdef;
- exit;
- end;
- structdef:=tabstractrecorddef(structdef.owner.defowner);
- end;
+ if checkcurrentrecdef and
+ try_parse_structdef_nested_type(def,current_structdef,isforwarddef) then
+ exit;
{ Use the special searchsym_type that search only types }
searchsym_type(s,srsym,srsymtable);
{ handle unit specification like System.Writeln }
@@ -518,26 +596,8 @@ implementation
end
else
begin
- id_type(def,stoIsForwardDef in options);
- { handle types inside classes, e.g. TNode.TLongint }
- while (token=_POINT) do
- begin
- if parse_generic then
- begin
- consume(_POINT);
- consume(_ID);
- end
- else if is_class_or_object(def) or is_record(def) then
- begin
- symtablestack.push(tabstractrecorddef(def).symtable);
- consume(_POINT);
- id_type(t2,stoIsForwardDef in options);
- symtablestack.pop(tabstractrecorddef(def).symtable);
- def:=t2;
- end
- else
- break;
- end;
+ id_type(def,stoIsForwardDef in options,true);
+ parse_nested_types(def,stoIsForwardDef in options,nil);
end;
end;
@@ -945,19 +1005,8 @@ implementation
{ use of current parsed object:
classes, objects, records can be used also in themself }
if (token=_ID) then
- begin
- structdef:=current_structdef;
- while assigned(structdef) and (structdef.typ in [objectdef,recorddef]) do
- begin
- if (tabstractrecorddef(structdef).objname^=pattern) then
- begin
- consume(_ID);
- def:=structdef;
- exit;
- end;
- structdef:=tdef(structdef.owner.defowner);
- end;
- end;
+ if try_parse_structdef_nested_type(def,current_structdef,false) then
+ exit;
{ Generate a specialization in FPC mode? }
dospecialize:=not(m_delphi in current_settings.modeswitches) and try_to_consume(_SPECIALIZE);
{ we can't accept a equal in type }
diff --git a/compiler/regvars.pas b/compiler/regvars.pas
index 4f75c0bd7d..1576d25536 100644
--- a/compiler/regvars.pas
+++ b/compiler/regvars.pas
@@ -148,7 +148,7 @@ implementation
if (cs_opt_regvar in current_settings.optimizerswitches) and
{ we have to store regvars back to memory in this case (the nested }
{ procedures can access the variables of the parent) }
- (tcgprocinfo(current_procinfo).nestedprocs.count = 0) and
+ (not current_procinfo.has_nestedprocs) and
not(pi_has_assembler_block in current_procinfo.flags) and
not(pi_uses_exceptions in current_procinfo.flags) then
begin
diff --git a/compiler/symconst.pas b/compiler/symconst.pas
index 011fbe37a7..98ecf5e372 100644
--- a/compiler/symconst.pas
+++ b/compiler/symconst.pas
@@ -423,7 +423,8 @@ type
vo_is_msgsel,
{ first field of variant part of a record }
vo_is_first_field,
- vo_volatile
+ vo_volatile,
+ vo_has_section
);
tvaroptions=set of tvaroption;
diff --git a/compiler/symdef.pas b/compiler/symdef.pas
index 8be9fc6e5c..f1de801fd8 100644
--- a/compiler/symdef.pas
+++ b/compiler/symdef.pas
@@ -76,6 +76,7 @@ interface
function is_publishable : boolean;override;
function needs_inittable : boolean;override;
function rtti_mangledname(rt:trttitype):string;override;
+ function OwnerHierarchyName: string; override;
function in_currentunit: boolean;
{ regvars }
function is_intregable : boolean;
@@ -550,6 +551,8 @@ interface
interfacedef : boolean;
{ true if the procedure has a forward declaration }
hasforward : boolean;
+ { interrupt vector }
+ interruptvector : longint;
constructor create(level:byte);
constructor ppuload(ppufile:tcompilerppufile);
destructor destroy;override;
@@ -1029,6 +1032,22 @@ implementation
end;
+ function tstoreddef.OwnerHierarchyName: string;
+ var
+ tmp: tdef;
+ begin
+ tmp:=self;
+ result:='';
+ repeat
+ if tmp.owner.symtabletype in [ObjectSymtable,recordsymtable] then
+ tmp:=tdef(tmp.owner.defowner)
+ else
+ break;
+ result:=tabstractrecorddef(tmp).objrealname^+'.'+result;
+ until tmp=nil;
+ end;
+
+
function tstoreddef.in_currentunit: boolean;
var
st: tsymtable;
@@ -2684,15 +2703,7 @@ implementation
var
tmp: tabstractrecorddef;
begin
- Result:=objrealname^;
- tmp:=self;
- repeat
- if tmp.owner.symtabletype in [ObjectSymtable,recordsymtable] then
- tmp:=tabstractrecorddef(tmp.owner.defowner)
- else
- break;
- Result:=tmp.objrealname^+'.'+Result;
- until tmp=nil;
+ Result:=OwnerHierarchyName+objrealname^;
end;
function tabstractrecorddef.search_enumerator_get: tprocdef;
@@ -3322,6 +3333,7 @@ implementation
{$ifdef i386}
fpu_used:=maxfpuregs;
{$endif i386}
+ interruptvector:=-1;
end;
@@ -3360,6 +3372,8 @@ implementation
else
import_name:=nil;
import_nr:=ppufile.getword;
+ if target_info.system in systems_interrupt_table then
+ interruptvector:=ppufile.getlongint;
if (po_msgint in procoptions) then
messageinf.i:=ppufile.getlongint;
if (po_msgstr in procoptions) then
@@ -3496,6 +3510,8 @@ implementation
if po_has_importname in procoptions then
ppufile.putstring(import_name^);
ppufile.putword(import_nr);
+ if target_info.system in systems_interrupt_table then
+ ppufile.putlongint(interruptvector);
if (po_msgint in procoptions) then
ppufile.putlongint(messageinf.i);
if (po_msgstr in procoptions) then
diff --git a/compiler/symsym.pas b/compiler/symsym.pas
index 43638e036c..7a3c95f05e 100644
--- a/compiler/symsym.pas
+++ b/compiler/symsym.pas
@@ -200,6 +200,7 @@ interface
private
_mangledname : pshortstring;
public
+ section : ansistring;
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
constructor create_dll(const n : string;vsp:tvarspez;def:tdef);
constructor create_C(const n,mangled : string;vsp:tvarspez;def:tdef);
@@ -1312,6 +1313,8 @@ implementation
_mangledname:=stringdup(ppufile.getstring)
else
_mangledname:=nil;
+ if vo_has_section in varoptions then
+ section:=ppufile.getansistring;
end;
@@ -1336,6 +1339,8 @@ implementation
inherited ppuwrite(ppufile);
if vo_has_mangledname in varoptions then
ppufile.putstring(_mangledname^);
+ if vo_has_section in varoptions then
+ ppufile.putansistring(section);
ppufile.writeentry(ibstaticvarsym);
end;
diff --git a/compiler/symtable.pas b/compiler/symtable.pas
index 35879a931c..f067caadc6 100644
--- a/compiler/symtable.pas
+++ b/compiler/symtable.pas
@@ -2199,6 +2199,7 @@ implementation
var
hashedid : THashedIDString;
begin
+ result:=false;
hashedid.id:=s;
srsymtable:=recordh.symtable;
srsym:=tsym(srsymtable.FindWithHash(hashedid));
diff --git a/compiler/symtype.pas b/compiler/symtype.pas
index c7ce1f8495..a30260ffa6 100644
--- a/compiler/symtype.pas
+++ b/compiler/symtype.pas
@@ -73,6 +73,7 @@ interface
function mangledparaname:string;
function getmangledparaname:string;virtual;
function rtti_mangledname(rt:trttitype):string;virtual;abstract;
+ function OwnerHierarchyName: string; virtual; abstract;
function size:asizeint;virtual;abstract;
function packedbitsize:asizeint;virtual;
function alignment:shortint;virtual;abstract;
@@ -258,12 +259,13 @@ implementation
function tdef.typename:string;
begin
+ result:=OwnerHierarchyName;
if assigned(typesym) and
not(typ in [procvardef,procdef]) and
(typesym.realname[1]<>'$') then
- result:=typesym.realname
+ result:=result+typesym.realname
else
- result:=GetTypeName;
+ result:=result+GetTypeName;
end;
@@ -275,10 +277,11 @@ implementation
function tdef.typesymbolprettyname:string;
begin
+ result:=OwnerHierarchyName;
if assigned(typesym) then
- result:=typesym.prettyname
+ result:=result+typesym.prettyname
else
- result:='<no type symbol>'
+ result:=result+'<no type symbol>'
end;
function tdef.mangledparaname:string;
diff --git a/compiler/systems.pas b/compiler/systems.pas
index e8e462245f..5824c83586 100644
--- a/compiler/systems.pas
+++ b/compiler/systems.pas
@@ -185,6 +185,7 @@ interface
,as_ggas { gnu assembler called "gas" instead of "as" }
,as_i386_nasmhaiku
,as_powerpc_vasm
+ ,as_i386_nlmcoff
);
tar = (ar_none
@@ -448,6 +449,8 @@ interface
systems_internal_sysinit = [system_i386_linux,system_i386_win32];
+ systems_interrupt_table = [{system_arm_embedded}];
+
{ all symbian systems }
systems_symbian = [system_i386_symbian,system_arm_symbian];
diff --git a/compiler/systems/i_nwm.pas b/compiler/systems/i_nwm.pas
index 8d729bf88c..307f2fee8f 100644
--- a/compiler/systems/i_nwm.pas
+++ b/compiler/systems/i_nwm.pas
@@ -34,7 +34,7 @@ unit i_nwm;
system : system_i386_netware;
name : 'Netware for i386(clib)';
shortname : 'Netware';
- flags : [tf_smartlink_library];
+ flags : [tf_smartlink_library,tf_smartlink_sections,tf_dwarf_only_local_labels];
cpu : cpu_i386;
unit_env : 'NETWAREUNITS';
extradefines : 'NETWARE_CLIB';
@@ -50,18 +50,18 @@ unit i_nwm;
resobjext : '.or';
sharedlibext : '.nlm';
staticlibext : '.a';
- staticlibprefix : '';
+ staticlibprefix : 'libp';
sharedlibprefix : '';
sharedClibext : '.nlm';
staticClibext : '.a';
- staticClibprefix : '';
+ staticClibprefix : 'lib';
sharedClibprefix : '';
- importlibprefix : 'imp';
+ importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #13#10;
dirsep : '/';
- assem : as_i386_elf32;
+ assem : as_i386_nlmcoff; // as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
diff --git a/compiler/systems/i_wii.pas b/compiler/systems/i_wii.pas
index 848480bf64..c9c7a8c1cd 100644
--- a/compiler/systems/i_wii.pas
+++ b/compiler/systems/i_wii.pas
@@ -86,7 +86,7 @@ unit i_wii;
maxCrecordalign : 8
);
first_parm_offset : 8;
- stacksize : 32*1024*1024;
+ stacksize : 131072; // 128 kb
abi : abi_powerpc_sysv;
);
diff --git a/compiler/systems/t_embed.pas b/compiler/systems/t_embed.pas
index 7a7fd67a53..a1a2c52fb5 100644
--- a/compiler/systems/t_embed.pas
+++ b/compiler/systems/t_embed.pas
@@ -267,7 +267,7 @@ begin
Add('{');
Add(' .text :');
Add(' {');
- Add(' *(.init, .init.*)');
+ Add(' KEEP(*(.init, .init.*))');
Add(' *(.text, .text.*)');
Add(' *(.strings)');
Add(' *(.rodata, .rodata.*)');
diff --git a/compiler/systems/t_nwm.pas b/compiler/systems/t_nwm.pas
index a371343f02..f85619df5b 100644
--- a/compiler/systems/t_nwm.pas
+++ b/compiler/systems/t_nwm.pas
@@ -97,7 +97,7 @@ implementation
verbose,systems,globtype,globals,
symconst,script,
fmodule,aasmbase,aasmtai,aasmdata,aasmcpu,cpubase,symsym,symdef,
- import,export,link,i_nwm,ogbase
+ import,export,link,i_nwm,ogbase, ogcoff, ognlm, cclasses
{$ifdef netware} ,dos {$endif}
;
@@ -123,6 +123,16 @@ implementation
function MakeExecutable:boolean;override;
end;
+ TInternalLinkerNetware = class(TInternalLinker)
+ prelude : string;
+ constructor create;override;
+ destructor destroy;override;
+ procedure DefaultLinkScript;override;
+ procedure InitSysInitUnitName;override;
+ procedure ConcatEntryName; virtual;
+ Function MakeSharedLibrary:boolean;override;
+ end;
+
Const tmpLinkFileName = 'link~tmp._o_';
minStackSize = 32768;
@@ -330,10 +340,26 @@ begin
{ add objectfiles, start with nwpre always }
LinkRes.Add ('INPUT(');
- s2 := FindObjectFile('nwpre','',false);
+ if target_info.system = system_i386_netwlibc then
+ begin
+ s2 := FindObjectFile('nwplibc','',false);
+ if s2 = '' then
+ s2 := FindObjectFile('libcpre.gcc','',false);
+ end else
+ s2 := FindObjectFile('nwpre','',false);
Comment (V_Debug,'adding Object File '+s2);
{$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
+ if target_info.system = system_i386_netwlibc then
+ begin
+ if isDll then {needed to provide main}
+ s2 := FindObjectFile('nwl_dlle','',false)
+ else
+ s2 := FindObjectFile('nwl_main','',false);
+ Comment (V_Debug,'adding Object File '+s2);
+ {$ifndef netware} LinkRes.Add (s2); {$else} LinkRes.Add (FExpand(s2)); {$endif}
+ end;
+
{ main objectfiles, add to linker input }
while not ObjectFiles.Empty do
begin
@@ -355,9 +381,20 @@ begin
{$endif}
{ start and stop-procedures }
- NLMConvLinkFile.Add ('START _Prelude'); { defined in rtl/netware/nwpre.as }
- NLMConvLinkFile.Add ('EXIT _Stop'); { nwpre.as }
- NLMConvLinkFile.Add ('CHECK FPC_NW_CHECKFUNCTION'); { system.pp }
+
+ if target_info.system = system_i386_netwlibc then
+ begin
+ NLMConvLinkFile.Add ('START _LibCPrelude');
+ NLMConvLinkFile.Add ('EXIT _LibCPostlude');
+ NLMConvLinkFile.Add ('CHECK _LibCCheckUnload');
+ NLMConvLinkFile.Add ('REENTRANT'); { needed by older libc versions }
+ end else
+ begin
+ NLMConvLinkFile.Add ('START _Prelude'); { defined in rtl/netware/nwpre.as }
+ NLMConvLinkFile.Add ('EXIT _Stop'); { nwpre.as }
+ NLMConvLinkFile.Add ('CHECK FPC_NW_CHECKFUNCTION'); { system.pp }
+ end;
+
if not (cs_link_strip in current_settings.globalswitches) then
begin
@@ -549,6 +586,395 @@ begin
end;
+{****************************************************************************
+ TInternalLinkerNetware
+****************************************************************************}
+
+ constructor TInternalLinkerNetware.Create;
+ begin
+ inherited Create;
+ CExeoutput:=TNLMexeoutput;
+ CObjInput:=TNLMCoffObjInput;
+ nlmSpecialSymbols_Segments := TFPHashList.create;
+ end;
+
+ destructor TInternalLinkerNetware.destroy;
+ begin
+ if assigned(nlmSpecialSymbols_Segments) then
+ begin
+ nlmSpecialSymbols_Segments.Free;
+ nlmSpecialSymbols_Segments := nil;
+ end;
+ inherited destroy;
+ end;
+
+ procedure TInternalLinkerNetware.DefaultLinkScript;
+ var
+ s,s2 : TCmdStr;
+ secname,
+ secnames : string;
+ hasCopyright,
+ hasScreenname,
+ hasThreadname,
+ hasVersion,
+ hasDescription,
+ hasStacksize: boolean;
+ t : text;
+
+
+
+ procedure addLinkerOption(s : string);
+ var op : string;
+ begin
+ if s = '' then exit;
+ if s[1] = '#' then exit;
+ LinkScript.Concat(s);
+ op := upper(GetToken(s,' '));
+ {check for options via -k that can also be specified vie
+ compiler directives in source, -k options will override
+ options in source}
+ if op = 'COPYRIGHT' then hasCopyright := true else
+ if op = 'SCREENNAME' then hasScreenname := true else
+ if op = 'THREADNAME' then hasThreadname := true else
+ if op = 'VERSION' then hasVersion := true else
+ if op = 'DESCRIPTION' then hasDescription := true else
+ if (op = 'STACK') or (op = 'STACKSIZE') then hasStacksize := true;
+ end;
+
+ { add linker scropt specified by -k@FileName }
+ procedure addLinkerOptionsFile (fileName : string);
+ var
+ t : text;
+ option : string;
+ fn : TCmdStr;
+ begin
+ fn := fileName;
+ if not sysutils.fileExists(fn) then
+ if not includesearchpath.FindFile(fileName,true,fn) then
+ begin
+ comment(v_error,'linker options file "'+fileName+'" not found');
+ exit;
+ end;
+ assign(t,fn); reset(t);
+ while not eof(t) do
+ begin
+ readln(t,option);
+ addLinkerOption(option);
+ end;
+ close(t);
+ end;
+
+ { add linker options specified by command line parameter -k }
+ procedure addLinkerOptions;
+ var
+ s,option : string;
+ p : integer;
+ begin
+ s := ParaLinkOptions;
+ option := GetToken(s,';');
+ while option <> '' do
+ begin
+ if copy(option,1,1)='@' then
+ begin
+ delete(option,1,1);
+ addLinkerOptionsFile(option);
+ end else
+ addLinkerOption(option);
+ option := GetToken(s,';');
+ end;
+ end;
+
+ { default: nwpre but can be specified via linker options
+ bacuse this has to be the first object, we have to scan
+ linker options before adding other options }
+
+ function findPreludeInFile (fileName : string):string;
+ var
+ t : text;
+ option,s : string;
+ fn : TCmdStr;
+ begin
+ result := '';
+ fn := fileName;
+ if not sysutils.fileExists(fn) then
+ if not includesearchpath.FindFile(fileName,true,fn) then
+ begin
+ comment(v_error,'linker options file "'+fileName+'" not found');
+ exit;
+ end;
+ assign(t,fn); reset(t);
+ while not eof(t) do
+ begin
+ readln(t,option);
+ option := upper(GetToken(s,' '));
+ if option='PRELUDE' then
+ begin
+ result := getToken(s,' ');
+ close(t);
+ exit;
+ end;
+ end;
+ close(t);
+ end;
+
+ function findPrelude : string;
+ var
+ s,option,keyword : string;
+ p : integer;
+ begin
+ s := ParaLinkOptions;
+ option := GetToken(s,';');
+ while option <> '' do
+ begin
+ if copy(option,1,1)='@' then
+ begin
+ delete(option,1,1);
+ result := findPreludeInFile(option);
+ if result <> '' then exit;
+ end else
+ begin
+ keyword := GetToken(option,' ');
+ if keyword = 'PRELUDE' then
+ begin
+ result := GetToken(option,' ');
+ exit;
+ end;
+ end;
+ option := GetToken(s,';');
+ end;
+ if target_info.system = system_i386_netwlibc then
+ result := 'libcpre'
+ else
+ result := 'nwpre';
+ end;
+
+ begin
+ with LinkScript do
+ begin
+ prelude := findPrelude; // needs to be first object, can be specified by -k"PRELUDE ObjFileName"
+ if prelude = '' then internalerror(201103271);
+ if pos ('.',prelude) = 0 then prelude := prelude + '.o';
+ s2 := FindObjectFile(prelude,'',false);
+ Comment (V_Debug,'adding init Object File '+s2);
+ Concat('READOBJECT '+MaybeQuoted(s2));
+ while not ObjectFiles.Empty do
+ begin
+ s:=ObjectFiles.GetFirst;
+ if s<>'' then
+ begin
+ Concat('READOBJECT '+MaybeQuoted(s));
+ Comment (V_Debug,'adding Object File '+s);
+ end;
+ end;
+ while not StaticLibFiles.Empty do
+ begin
+ s:=StaticLibFiles.GetFirst;
+ if s<>'' then
+ begin
+ Comment (V_Debug,'adding StaticLibFile '+s);
+ Concat('READSTATICLIBRARY '+MaybeQuoted(s));
+ end;
+ end;
+ { While not SharedLibFiles.Empty do
+ begin
+ S:=SharedLibFiles.GetFirst;
+ if FindLibraryFile(s,target_info.staticClibprefix,target_info.importlibext,s2) then
+ begin
+ Comment (V_Debug,'adding LibraryFile '+s);
+ Concat('READSTATICLIBRARY '+MaybeQuoted(s2));
+ end else
+ Comment(V_Error,'Import library not found for '+S);
+ end;}
+ if IsSharedLibrary then
+ Concat('ISSHAREDLIBRARY');
+ ConcatEntryName;
+ Concat('IMAGEBASE $' + hexStr(0, SizeOf(imagebase)*2));
+ Concat('HEADER');
+ Concat('EXESECTION .text');
+ Concat(' SYMBOL __text_start__'); nlmSpecialSymbols_Segments.Add('__text_start__',pointer(ptruint(Section_text)));
+ Concat(' OBJSECTION .text*');
+ Concat(' SYMBOL ___CTOR_LIST__'); nlmSpecialSymbols_Segments.Add('___CTOR_LIST__',pointer(ptruint(Section_text)));
+ Concat(' SYMBOL __CTOR_LIST__'); nlmSpecialSymbols_Segments.Add('__CTOR_LIST__',pointer(ptruint(Section_text)));
+ Concat(' LONG -1');
+ Concat(' OBJSECTION .ctor*');
+ Concat(' LONG 0');
+ Concat(' SYMBOL ___DTOR_LIST__'); nlmSpecialSymbols_Segments.Add('___DTOR_LIST__',pointer(ptruint(Section_text)));
+ Concat(' SYMBOL __DTOR_LIST__'); nlmSpecialSymbols_Segments.Add('__DTOR_LIST__',pointer(ptruint(Section_text)));
+ Concat(' LONG -1');
+ Concat(' OBJSECTION .dtor*');
+ Concat(' LONG 0');
+ Concat(' SYMBOL etext'); nlmSpecialSymbols_Segments.Add('etext',pointer(ptruint(Section_text)));
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .data');
+ Concat(' SYMBOL __data_start__'); nlmSpecialSymbols_Segments.Add('__data_start__',pointer(ptruint(Section_data)));
+ Concat(' OBJSECTION .data*');
+ Concat(' OBJSECTION .fpc*');
+ Concat(' SYMBOL edata'); nlmSpecialSymbols_Segments.Add('edata',pointer(ptruint(Section_data)));
+ Concat(' SYMBOL __data_end__'); nlmSpecialSymbols_Segments.Add('__data_end__',pointer(ptruint(Section_data)));
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .bss');
+ Concat(' SYMBOL __bss_start__'); nlmSpecialSymbols_Segments.Add('__bss_start__',pointer(ptruint(Section_data)));
+ Concat(' OBJSECTION .bss*');
+ Concat(' SYMBOL __bss_end__'); nlmSpecialSymbols_Segments.Add('__bss_end__',pointer(ptruint(Section_data)));
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .imports');
+ Concat(' SYMBOL __imports_start__');
+ Concat(' OBJSECTION .imports*');
+ Concat(' SYMBOL __imports_end__');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .modules');
+ Concat(' SYMBOL __modules_start__');
+ Concat(' OBJSECTION .modules*');
+ Concat(' SYMBOL __modules_end__');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .exports');
+ Concat(' SYMBOL __exports_start__');
+ Concat(' OBJSECTION .exports*');
+ Concat(' SYMBOL __exports_end__');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .reloc');
+ Concat(' SYMBOL __reloc_start__');
+ Concat(' OBJSECTION .reloc*');
+ Concat(' SYMBOL __reloc_end__');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .xdc');
+ Concat(' OBJSECTION .xdc*');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .custom');
+ Concat(' OBJSECTION .custom*');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .messages');
+ Concat(' OBJSECTION .messages*');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .help');
+ Concat(' OBJSECTION .help*');
+ Concat('ENDEXESECTION');
+
+ Concat('EXESECTION .rdata');
+ Concat(' SYMBOL ___RUNTIME_PSEUDO_RELOC_LIST__');
+ Concat(' SYMBOL __RUNTIME_PSEUDO_RELOC_LIST__');
+ Concat(' OBJSECTION .rdata_runtime_pseudo_reloc');
+ Concat(' SYMBOL ___RUNTIME_PSEUDO_RELOC_LIST_END__');
+ Concat(' SYMBOL __RUNTIME_PSEUDO_RELOC_LIST_END__');
+ Concat(' OBJSECTION .rdata*');
+ Concat(' OBJSECTION .rodata*');
+ Concat('ENDEXESECTION');
+ Concat('EXESECTION .pdata');
+ Concat(' OBJSECTION .pdata');
+ Concat('ENDEXESECTION');
+ secnames:='.edata,.rsrc,.gnu_debuglink,'+
+ '.debug_aranges,.debug_pubnames,.debug_info,.debug_abbrev,.debug_line,.debug_frame,.debug_str,.debug_loc,'+
+ '.debug_macinfo,.debug_weaknames,.debug_funcnames,.debug_typenames,.debug_varnames,.debug_ranges';
+ repeat
+ secname:=gettoken(secnames,',');
+ if secname='' then
+ break;
+ Concat('EXESECTION '+secname);
+ Concat(' OBJSECTION '+secname+'*');
+ Concat('ENDEXESECTION');
+ until false;
+ { Can't use the generic rules, because that will add also .stabstr to .stab }
+ Concat('EXESECTION .stab');
+ Concat(' OBJSECTION .stab');
+ Concat('ENDEXESECTION');
+ Concat('EXESECTION .stabstr');
+ Concat(' OBJSECTION .stabstr');
+ Concat('ENDEXESECTION');
+ Concat('STABS');
+ Concat('SYMBOLS');
+ Concat('');
+
+ hasCopyright := false;
+ hasScreenname := false;
+ hasThreadname := false;
+ hasVersion := false;
+ hasDescription := false;
+ hasStacksize := false;
+ addLinkerOptions;
+ if not hasCopyright then
+ if nwcopyright <> '' then
+ Concat('COPYRIGHT "'+nwCopyright+'"');
+ if not hasScreenname then
+ if nwscreenname <> '' then
+ Concat('SCREENNAME "'+nwscreenname+'"');
+ if not hasThreadname then
+ if nwthreadname <> '' then
+ Concat('THREADNAME "'+nwthreadname+'"');
+ if not hasVersion then
+ Concat('VERSION '+tostr(dllmajor)+' '+tostr(dllminor)+' '+tostr(dllrevision));
+ if not hasDescription then
+ if description <> '' then
+ Concat ('DESCRIPTION "'+description+'"');
+ if not hasStacksize then
+ if MaxStackSizeSetExplicity then
+ begin
+ if stacksize < minStackSize then stacksize := minStackSize;
+ Concat ('STACKSIZE '+tostr(stacksize));
+ end else
+ Concat ('STACKSIZE '+tostr(minStackSize));
+ if target_info.system = system_i386_netwlibc then
+ Concat ('REENTRANT'); { needed by older libc versions }
+ end;
+
+ // add symbols needed by nwpre. We have not loaded the ppu,
+ // therefore we do not know the externals so read it from nwpre.imp
+ s := ChangeFileExt(prelude,'.imp'); // nwpre.imp
+ if not librarysearchpath.FindFile(s,true,s2) then
+ begin
+ comment(v_error,s+' not found');
+ exit;
+ end;
+ assign(t,s2); reset(t);
+ while not eof(t) do
+ begin
+ readln(t,s);
+ s := trimspace(s);
+ if (length(s) > 0) then
+ if copy(s,1,1) <> '#' then
+ AddImportSymbol('!clib',s,0,false);
+ end;
+ close(t);
+ end;
+
+
+ procedure TInternalLinkerNetware.InitSysInitUnitName;
+ begin
+ //if target_info.system=system_i386_netware then
+ // GlobalInitSysInitUnitName(self);
+ end;
+
+ procedure TInternalLinkerNetware.ConcatEntryName;
+ begin
+ with LinkScript do
+ begin
+ if IsSharedLibrary then
+ begin
+ Concat('ISSHAREDLIBRARY');
+ Concat('ENTRYNAME _Prelude')
+ end
+ else
+ begin
+ Concat('ENTRYNAME _Prelude')
+ end;
+ end;
+ end;
+
+
+ Function TInternalLinkerNetware.MakeSharedLibrary:boolean;
+ begin
+ Comment(V_Error,'Make shared library not supported for netware');
+ end;
+
{*****************************************************************************
Initialize
*****************************************************************************}
@@ -556,6 +982,7 @@ end;
initialization
RegisterExternalLinker(system_i386_netware_info,TLinkerNetware);
+ RegisterInternalLinker(system_i386_netware_info,TInternalLinkerNetware);
RegisterImport(system_i386_netware,TImportLibNetware);
RegisterExport(system_i386_netware,TExportLibNetware);
RegisterTarget(system_i386_netware_info);
diff --git a/compiler/systems/t_wii.pas b/compiler/systems/t_wii.pas
index ee0764bacc..485eb5bc89 100644
--- a/compiler/systems/t_wii.pas
+++ b/compiler/systems/t_wii.pas
@@ -562,9 +562,8 @@ begin
{ Call linker }
SplitBinCmd(Info.ExeCmd[1],binstr,cmdstr);
- Replace(cmdstr,'$OPT',Info.ExtraOptions);
-
Replace(cmdstr,'$EXE',(maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename^,'.elf')))));
+ Replace(cmdstr,'$OPT',Info.ExtraOptions);
Replace(cmdstr,'$RES',(maybequoted(ScriptFixFileName(outputexedir+Info.ResName))));
Replace(cmdstr,'$STATIC',StaticStr);
Replace(cmdstr,'$STRIP',StripStr);
diff --git a/compiler/tokens.pas b/compiler/tokens.pas
index d41ee371a0..82b7325123 100644
--- a/compiler/tokens.pas
+++ b/compiler/tokens.pas
@@ -203,6 +203,7 @@ type
_PRIVATE,
_PROGRAM,
_R12BASE,
+ _SECTION,
_STDCALL,
_SYSCALL,
_VARARGS,
@@ -497,6 +498,7 @@ const
(str:'PRIVATE' ;special:false;keyword:m_none;op:NOTOKEN),
(str:'PROGRAM' ;special:false;keyword:m_all;op:NOTOKEN),
(str:'R12BASE' ;special:false;keyword:m_none;op:NOTOKEN), { Syscall variation on MorphOS }
+ (str:'SECTION' ;special:false;keyword:m_none;op:NOTOKEN),
(str:'STDCALL' ;special:false;keyword:m_none;op:NOTOKEN),
(str:'SYSCALL' ;special:false;keyword:m_none;op:NOTOKEN),
(str:'VARARGS' ;special:false;keyword:m_none;op:NOTOKEN),
diff --git a/compiler/utils/samplecfg b/compiler/utils/samplecfg
index 68abd32674..c939e9e5d3 100644
--- a/compiler/utils/samplecfg
+++ b/compiler/utils/samplecfg
@@ -5,30 +5,6 @@
# Generate Sample Free Pascal configuration file
#
-setgccdir() {
-# Find path to libgcc.a
-GCCSPEC=`(gcc -v $@ 2>&1)| head -n 1| awk '{ print $4 } '`
-if [ -z "$GCCSPEC" ] ; then
- GCCSPEC=`gcc -print-libgcc-file-name $@ 2>/dev/null`
-fi
-GCCDIR=`dirname "$GCCSPEC"`
-}
-
-
-setgccdirarch() {
-# First argument is fpc define for CPU type; remaining args are passed to gcc to set corresponding architecture
-FPCDEFINE=$1
-shift
-setgccdir $@
-
-if [ -z "$GCCDIR" ] ; then
- return
-fi
-GCCDIR="#ifdef $FPCDEFINE
--Fl$GCCDIR
-#endif"
-}
-
HOSTOS=`uname -s | tr A-Z a-z`
echo Running on $HOSTOS
@@ -47,18 +23,23 @@ else
fi
FPCBIN=`dirname "$1"`/../../bin/fpc
FPBIN=`dirname "$1"`/../../bin/fp
+FPPKGBIN=`dirname "$1"`/../../bin/fppkg
sysfpdirbase=`dirname "$1"`/`"$FPCBIN" -iV`
sysfpdirbase2=$sysfpdirbase/ide
sysfpdir=$sysfpdirbase2/text
-fpctargetos=`"$FPCBIN" -iTO`
# Detect if we have write permission in sysdir.
if [ -w "$sysdir" ] ; then
echo Write permission in $sysdir.
fpccfgfile="$sysdir"/fpc.cfg
+ fppkgfile="$sysdir"/fppkg.cfg
+ defaultfile="$sysdir"/fppkg/default
+ compilerconfigdir="-d CompilerConfigDir=$sysdir/fppkg"
else
echo No write premission in $sysdir.
fpccfgfile="$HOME"/.fpc.cfg
+ fppkgfile="$HOME"/.config/fppkg.cfg
+ defaultfile="$HOME"/.fppkg/config/default
fi
#
@@ -69,388 +50,24 @@ if [ -f "$FPBIN" ] ; then
fpinifile="$HOME"/.fp/fp.ini
fpcfgfile="$HOME"/.fp/fp.cfg
-# Detect if we have write permission in sysfpdirbase.
- if [ -w "$sysfpdirbase" ] ; then
- echo Write permission in $sysfpdirbase.
- if ! [ -d "$sysfpdirbase2" ] ; then
- echo Directory $sysfpdirbase2 did not exist, attempting to create it now
- mkdir $sysfpdirbase2 >/dev/null 2>&1
- echo Attempting to create directory $sysfpdir
- mkdir $sysfpdir >/dev/null 2>&1
- elif ! [ -d "$sysfpdir" ] ; then
- echo Directory $sysfpdir did not exist, attempting to create it now
- mkdir $sysfpdir >/dev/null 2>&1
- fi
- if [ -w "$sysfpdir" ] ; then
- fpinifile="$sysfpdir"/fp.ini
- fpcfgfile="$sysfpdir"/fp.cfg
- fi
+# Detect if we have write permission in sysfpdir, or that the directory can be made
+ if ( [ -d "$sysfpdirbase" ] && [ -w "$sysfpdirbase" ] && ! [ -d "$sysfpdirbase2" ] ) ||
+ ( [ -d "$sysfpdirbase2" ] && [ -w "$sysfpdirbase2" ] && ! [ -d "$sysfpdir" ] ) ||
+ ( [ -d "$sysfpdir" ] && [ -w "$sysfpdir" ] ) ; then
+ fpinifile="$sysfpdir"/fp.ini
+ fpcfgfile="$sysfpdir"/fp.cfg
fi
#
-
-# When the local FP IDE configuration is used, check if the directory exists
- if [ $fpcfgfile = "$HOME"/.fp/fp.cfg -a ! -d "$HOME"/.fp ] ; then
- echo Directory $HOME/.fp did not exist, attempting to create it now
- mkdir "$HOME"/.fp >/dev/null 2>&1
- fi
-fi
-#
-
-if [ -f "$fpccfgfile" ] ; then
- mv "$fpccfgfile" "$fpccfgfile.orig" >/dev/null 2>&1
- if [ $? = 0 ]; then
- echo Saved old compiler config to $fpccfgfile.orig
- else
- echo Could not save old compiler config. Bailing out...
- exit
- fi
fi
-if [ -f "$FPBIN" ] ; then
- if [ -f "$fpinifile" ] ; then
- mv "$fpinifile" "$fpinifile.orig" >/dev/null 2>&1
- if [ $? = 0 ]; then
- echo Saved old fp.ini to $fpinifile.orig
- else
- echo Could not save old fp.ini. Bailing out...
- exit
- fi
- fi
-
- if [ -f "$fpcfgfile" ] ; then
- mv "$fpcfgfile" "$fpcfgfile.orig" >/dev/null 2>&1
- if [ $? = 0 ]; then
- echo Saved old fp.cfg to $fpcfgfile.orig
- else
- echo Could not save old fp.cfg. Bailing out...
- exit
- fi
- fi
-fi
-
-setgccdir
-GCCDIR2=""
-GCCDIR3=""
-GCCDIR4=""
-
-singlearch() {
- if [ -d "$GCCDIR" ]; then
- echo Found libgcc.a in "$GCCDIR"
- GCCDIR=-Fl$GCCDIR
- fi
-}
-
-# include ports tree dir for FreeBSDers.
-case "$HOSTOS" in
- freebsd)
- GCCDIR=-Fl/usr/local/lib
- ;;
- openbsd)
- GCCDIR=-Fl/usr/local/lib
- ;;
- netbsd)
- GCCDIR=-Fl/usr/pkg/lib
- ;;
- darwin)
- setgccdirarch cpupowerpc -arch ppc
- GCCDIR2="$GCCDIR"
- setgccdirarch cpupowerpc64 -arch ppc64
- GCCDIR3="$GCCDIR"
- setgccdirarch cpui386 -arch i386
- GCCDIR4="$GCCDIR"
- setgccdirarch cpux86_64 -arch x86_64
- ;;
- linux)
- case `"$FPCBIN" -PP` in
- i?86|x86_64|amd64)
- # Allow for the possibility of both 32 and 64 bit compilation on same system
- setgccdirarch cpui386 -m32
- GCCDIR4="$GCCDIR"
- setgccdirarch cpux86_64 -m64
- ;;
- powerpc|powerpc64)
- # Allow for the possibility of both 32 and 64 bit compilation on same system
- setgccdirarch cpupowerpc -m32
- GCCDIR4="$GCCDIR"
- setgccdirarch cpupowerpc64 -m64
- ;;
- # Add cases for other linux dual architectures here
- *) singlearch # Default
- ;;
- esac
- ;;
-
- *) singlearch
- ;;
-
-esac
-
-CPUCROSSIFDEF1="#DEFINE NEEDCROSSBINUTILS"
-CPUCROSSIFDEF2=""
-
-case `"$FPCBIN" -PP` in
- i?86|x86_64|amd64)
- # Cross-binutils are not needed to compile for i386 on an x86_64 system
- CPUCROSSIFDEF1="
-#IFNDEF CPUI386
-#IFNDEF CPUAMD64
-#DEFINE NEEDCROSSBINUTILS
-#ENDIF
-#ENDIF
-"
- CPUCROSSIFDEF2="
-#IFNDEF $HOSTOS
-#DEFINE NEEDCROSSBINUTILS
-#ENDIF
-"
- ;;
- *)
- CPUCROSSIFDEF1="#DEFINE NEEDCROSSBINUTILS"
- CPUCROSSIFDEF2=""
- ;;
-esac
-
-# darwin->darwin does not need cross binutils
-case "$HOSTOS" in
- darwin)
- CPUCROSSIFDEF2="
-#ifdef darwin
-#undef NEEDCROSSBINUTILS
-#endif
-"
- ;;
-esac
-
-
# set right path to FPC with $fpcversion
FPCPATH=`dirname "$1"`/\$fpcversion
+# set right prefix to FPC
+FPCGLOBALPREFIX=`dirname "$1"`/../../
# Write (.)fpc.cfg
echo Writing sample configuration file to $fpccfgfile
-cat <<EOFCFG > $fpccfgfile
-#
-# Example fpc.cfg for Free Pascal Compiler
-#
-
-# ----------------------
-# Defines (preprocessor)
-# ----------------------
-
-#
-# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
-#
-# -d is the same as #DEFINE
-# -u is the same as #UNDEF
-#
-
-#
-# Some examples (for switches see below, and the -? helppages)
-#
-# Try compiling with the -dRELEASE or -dDEBUG on the commandline
-#
-
-# For a release compile with optimizes and strip debuginfo
-#IFDEF RELEASE
- -O2
- -Xs
- #WRITE Compiling Release Version
-#ENDIF
-
-# For a debug version compile with debuginfo and all codegeneration checks on
-#IFDEF DEBUG
- -g
- -Crtoi
- #WRITE Compiling Debug Version
-#ENDIF
-
-# set binutils prefix
-$CPUCROSSIFDEF1
-$CPUCROSSIFDEF2
-
-#IFDEF FPC_CROSSCOMPILING
-#IFDEF NEEDCROSSBINUTILS
- -XP\$fpctarget-
-#ENDIF NEEDCROSSBINUTILS
-#ENDIF
-
-# assembling
-#ifdef darwin
-# use pipes instead of temporary files for assembling
--ap
-#endif
-
-# ----------------
-# Parsing switches
-# ----------------
-
-# Pascal language mode
-# -Mfpc free pascal dialect (default)
-# -Mobjfpc switch some Delphi 2 extensions on
-# -Mdelphi tries to be Delphi compatible
-# -Mtp tries to be TP/BP 7.0 compatible
-# -Mgpc tries to be gpc compatible
-# -Mmacpas tries to be compatible to the macintosh pascal dialects
-#
-# Turn on Object Pascal extensions by default
-#-Mobjfpc
-
-# Assembler reader mode
-# -Rdefault use default assembler
-# -Ratt read AT&T style assembler
-# -Rintel read Intel style assembler
-#
-# All assembler blocks are AT&T styled by default
-#-Ratt
-
-# Semantic checking
-# -S2 same as -Mobjfpc
-# -Sc supports operators like C (*=,+=,/= and -=)
-# -Sa include assertion code.
-# -Sd same as -Mdelphi
-# -Se<x> error options. <x> is a combination of the following:
-# <n> : compiler stops after the <n> errors (default is 1)
-# w : compiler stops also after warnings
-# n : compiler stops also after notes
-# h : compiler stops also after hints
-# -Sg allow LABEL and GOTO
-# -Sh Use ansistrings
-# -Si support C++ styled INLINE
-# -Sk load fpcylix unit
-# -SI<x> set interface style to <x>
-# -SIcom COM compatible interface (default)
-# -SIcorba CORBA compatible interface
-# -Sm support macros like C (global)
-# -So same as -Mtp
-# -Sp same as -Mgpc
-# -Ss constructor name must be init (destructor must be done)
-# -Sx enable exception keywords (default in Delphi/ObjFPC modes)
-#
-# Allow goto, inline, C-operators, C-vars
--Sgic
-
-# ---------------
-# Code generation
-# ---------------
-
-# Uncomment the next line if you always want static/dynamic units by default
-# (can be overruled with -CD, -CS at the commandline)
-#-CS
-#-CD
-
-# Set the default heapsize to 8Mb
-#-Ch8000000
-
-# Set default codegeneration checks (iocheck, overflow, range, stack)
-#-Ci
-#-Co
-#-Cr
-#-Ct
-
-# Optimizer switches
-# -Os generate smaller code
-# -O1 level 1 optimizations (quick optimizations, debuggable)
-# -O2 level 2 optimizations (-O1 + optimizations which make debugging more difficult)
-# -O3 level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster)
-# -Op<x> set target cpu for optimizing, see fpc -i for possible values
-#
-# See "fpc -i" also for more fine-grained control over which optimizations
-# to perform
-
-#ifdef darwin
-#ifdef cpui386
--Cppentiumm
--Oppentiumm
-#endif
-#endif
-
-# -----------------------
-# Set Filenames and Paths
-# -----------------------
-
-# Slashes are also allowed under dos
-
-# path to the messagefile, not necessary anymore but can be used to override
-# the default language
-#-Fr$FPCPATH/msg/errore.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
--Fu$FPCPATH/units/\$fpctarget/httpd13/
-#ELSE
-#IFDEF FPCAPACHE_2_0
--Fu$FPCPATH/units/\$fpctarget/httpd20
-#ELSE
--Fu$FPCPATH/units/\$fpctarget/httpd22
-#ENDIF
-#ENDIF
-
-# searchpath for libraries
-$GCCDIR
-$GCCDIR2
-$GCCDIR3
-$GCCDIR4
-#-Fl/pp/lib
-#-Fl/lib;/usr/lib
-
-
-# -------------
-# Linking
-# -------------
-
-# generate always debugging information for GDB (slows down the compiling
-# process)
-# -gc generate checks for pointers
-# -gd use dbx
-# -gg use gsym
-# -gh use heap trace unit (for memory leak debugging)
-# -gl use line info unit to show more info for backtraces
-# -gv generates programs tracable with valgrind
-# -gw generate dwarf debugging info
-#
-# Enable debuginfo and use the line info unit by default
-#-gl
-
-# always pass an option to the linker
-#-k-s
-
-# Always strip debuginfo from the executable
--Xs
-
-
-# -------------
-# Miscellaneous
-# -------------
-
-# Write always a nice FPC logo ;)
--l
-
-# Verbosity
-# e : Show errors (default) d : Show debug info
-# w : Show warnings u : Show unit info
-# n : Show notes t : Show tried/used files
-# h : Show hints c : Show conditionals
-# i : Show general info d : Show debug info
-# l : Show linenumbers r : Rhide/GCC compatibility mode
-# a : Show everything x : Executable info (Win32 only)
-# b : Write file names messages with full path
-# v : write fpcdebug.txt with p : Write tree.log with parse tree
-# lots of debugging info
-#
-# Display Info, Warnings and Notes
--viwn
-# If you don't want so much verbosity use
-#-vw
-
-#
-# That's all folks
-#
-EOFCFG
+fpcmkcfg -d "basepath=$FPCPATH" -o $fpccfgfile
if ! [ -f "$FPBIN" ] ; then
exit
@@ -458,132 +75,21 @@ fi
# Write fp.cfg
echo Writing sample configuration file to $fpcfgfile
-cat <<EOFFPCFG > $fpcfgfile
-#IFDEF NORMAL
- -Ci
- -XS
- -T$fpctargetos
- -Sg
- -O1
- -Fu$FPCPATH/units/\$fpctarget
- -Fu$FPCPATH/units/\$fpctarget\*
- -Fu$FPCPATH/units/\$fpctarget\rtl
- $GCCDIR
- $GCCDIR2
- $GCCDIR3
- $GCCDIR4
- -g-
- -p-
- -b-
-#ENDIF
-
-#IFDEF DEBUG
- -Ci
- -XS
- -T$fpctargetos
- -Sg
- -Cr
- -Co
- -Fu$FPCPATH/units/\$fpctarget
- -Fu$FPCPATH/units/\$fpctarget\*
- -Fu$FPCPATH/units/\$fpctarget\rtl
- $GCCDIR
- $GCCDIR2
- $GCCDIR3
- $GCCDIR4
- -g
- -p-
- -b-
-#ENDIF
-
-#IFDEF RELEASE
- -XS
- -T$fpctargetos
- -Sg
- -O2
- -Fu$FPCPATH/units/\$fpctarget
- -Fu$FPCPATH/units/\$fpctarget\*
- -Fu$FPCPATH/units/\$fpctarget\rtl
- $GCCDIR
- $GCCDIR2
- $GCCDIR3
- $GCCDIR4
- -g-
- -p-
- -b-
-#ENDIF
-EOFFPCFG
+fpcmkcfg -p -1 -d "basepath=$FPCPATH" -o $fpcfgfile
# Write fp.ini
echo Writing sample configuration file to $fpinifile
-cat <<EOFFPINI > $fpinifile
-[Compile]
-CompileMode=DEBUG
-
-[Editor]
-DefaultTabSize=8
-DefaultFlags=20599
-DefaultSaveExt=.pas
-DefaultIndentSize=1
-
-[Highlight]
-Exts="*.pas;*.pp;*.inc"
-NeedsTabs="make*;make*.*"
-
-[SourcePath]
-SourceList=""
-
-[Mouse]
-DoubleDelay=8
-ReverseButtons=0
-AltClickAction=6
-CtrlClickAction=1
-
-[Search]
-FindFlags=4
+fpcmkcfg -p -2 -o $fpinifile
-[Breakpoints]
-Count=0
-
-[Watches]
-Count=0
-
-[Preferences]
-DesktopFileFlags=209
-CenterCurrentLineWhileDebugging=1
-AutoSaveFlags=7
-MiscOptions=6
-DesktopLocation=1
-
-[Misc]
-ShowReadme=1
+# Do not write fppkg configuration when fppkg is not available
+if ! [ -f "$FPPKGBIN" ] ; then
+ exit
+fi
-[Files]
-OpenExts="*.pas;*.pp;*.inc"
+# Write fppkg.cfg
+echo Writing sample configuration file to $fppkgfile
+fpcmkcfg -p -3 $compilerconfigdir -o $fppkgfile
-[Tools]
-Title1="svn ~u~p (curr. dir)"
-Program1="svn"
-Params1="up \$CAP_MSG()"
-HotKey1=23296
-Title2="svn c~i~ (curr. dir)"
-Program2="svn"
-Params2="ci \$CAP_MSG()"
-HotKey2=23552
-Title3="svn ~d~iff"
-Program3="svn"
-Params3="diff \$CAP_MSG() \$EDNAME"
-HotKey3=23808
-Title4="svn ~l~og"
-Program4="svn"
-Params4="log \$CAP_MSG() \$EDNAME"
-HotKey4=34560
-Title5="svn ~b~lame"
-Program5="svn"
-Params5="blame \$CAP_MSG() \$EDNAME"
-HotKey5=34816
-Title6="svn ~a~dd"
-Program6="svn"
-Params6="add \$CAP_MSG() \$EDNAME"
-HotKey6=0'
-EOFFPINI
+# Write default
+echo Writing sample configuration file to $defaultfile
+fpcmkcfg -p -4 -d "GlobalPrefix=$FPCGLOBALPREFIX" -o $defaultfile
diff --git a/compiler/x86/agx86int.pas b/compiler/x86/agx86int.pas
index 739c3b4e39..545a71e361 100644
--- a/compiler/x86/agx86int.pas
+++ b/compiler/x86/agx86int.pas
@@ -59,7 +59,7 @@ implementation
const
line_length = 70;
- secnames : array[TAsmSectiontype] of string[4] = ('',
+ secnames : array[TAsmSectiontype] of string[4] = ('','',
'CODE','DATA','DATA','DATA','BSS','',
'','','','','','',
'','','','',
@@ -109,7 +109,7 @@ implementation
''
);
- secnamesml64 : array[TAsmSectiontype] of string[7] = ('',
+ secnamesml64 : array[TAsmSectiontype] of string[7] = ('','',
'_TEXT','_DATE','_DATA','_DATA','_BSS','',
'','','','',
'idata$2','idata$4','idata$5','idata$6','idata$7','edata',
@@ -978,7 +978,7 @@ implementation
{ better do this at end of WriteTree, but then there comes a trouble with
al_const which does not have leading ait_section and thus goes out of segment }
-
+
{ TODO: probably ml64 needs 'closing' last section, too }
if LastSecType <> sec_none then
AsmWriteLn('_'+secnames[LasTSecType]+#9#9'ENDS');
diff --git a/compiler/x86/x86ins.dat b/compiler/x86/x86ins.dat
index 098771c7b0..32cdd1bd54 100644
--- a/compiler/x86/x86ins.dat
+++ b/compiler/x86/x86ins.dat
@@ -2557,7 +2557,9 @@ xmmreg,mem \1\x66\301\323\2\x0F\xE3\110 WILLAMETTE,SSE2,SM
[PEXTRW]
(Ch_All, Ch_None, Ch_None)
reg32,mmxreg,imm \2\x0F\xC5\110\22 KATMAI,MMX,SB,AR2
-reg32,xmmreg,imm \1\x66\323\2\x0F\xC5\110\26 WILLAMETTE,SSE2,SB,AR2
+reg32,xmmreg,imm \1\x66\323\2\x0F\xC5\110\26 SSE4
+mem32,xmmreg,imm \1\x66\300\323\3\x0F\x3A\x15\101\26 SSE4
+
[PINSRW]
(Ch_All, Ch_None, Ch_None)
@@ -3269,7 +3271,7 @@ mem,xmmreg \333\300\323\2\x0F\x2B\101 SSE4,SD
[MOVNTSD]
(Ch_All, Ch_None, Ch_None)
-mem,xmmreg \300\334\325\323\2\x0F\x2B\\101 SSE4 ;,SQ
+mem,xmmreg \300\334\325\323\2\x0F\x2B\101 SSE4 ;,SQ
[INSERTQ]
(Ch_All, Ch_None, Ch_None)
@@ -3287,7 +3289,432 @@ xmmreg,xmmreg \336\323\2\x0F\x79\110 SSE4
reg16,regmem \320\333\301\323\2\x0F\xBD\110 386,SM,SSE4
reg32|64,regmem \321\333\301\323\2\x0F\xBD\110 386,SM,SSE4
+;*******************************************************************************
+;**********SSSE3****************************************************************
+;*******************************************************************************
+;Use SSE4, but need special flag for SSSE3 insructions set
+[PABSB]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x1C\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x1C\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x1C\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x1C\110 SSE4
+
+[PABSW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x1D\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x1D\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x1D\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x1D\110 SSE4
+
+[PABSD]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x1E\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x1E\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x1E\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x1E\110 SSE4
+
+[PALIGNR]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg,imm \331\3\x0F\x3A\x0F\110\26 SSE4
+mmxreg,mem,imm \301\331\3\x0F\x3A\x0F\110\26 SSE4
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x0F\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x0F\110\26 SSE4
+
+[PHADDW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x01\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x01\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x01\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x01\110 SSE4
+
+[PHADDD]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x02\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x02\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x02\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x02\110 SSE4
+
+[PHADDSW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x03\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x03\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x03\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x03\110 SSE4
+
+[PHSUBW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x05\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x05\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x05\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x05\110 SSE4
+
+[PHSUBD]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x06\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x06\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x06\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x06\110 SSE4
+
+[PHSUBSW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x07\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x07\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x07\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x07\110 SSE4
+
+[PMADDUBSW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x04\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x04\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x04\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x04\110 SSE4
+
+[PMULHRSW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x0B\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x0B\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x0B\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x0B\110 SSE4
+
+[PSHUFB]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x00\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x00\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x00\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x00\110 SSE4
+
+[PSIGNB]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x08\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x08\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x08\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x08\110 SSE4
+
+[PSIGNW]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x09\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x09\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x09\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x09\110 SSE4
+
+[PSIGND]
+(Ch_All, Ch_None, Ch_None)
+mmxreg,mmxreg \331\3\x0F\x38\x0A\110 SSE4
+mmxreg,mem \301\331\3\x0F\x38\x0A\110 SSE4
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x0A\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x0A\110 SSE4
+;*******************************************************************************
+;**********SSE4.1***************************************************************
+;*******************************************************************************
+[BLENDPS] ;By hands delete 'or ot_signed' from i386tab.inc or x8664tab.inc
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x0C\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x0C\110\26 SSE4
+
+[BLENDPD] ;By hands delete 'or ot_signed' from i386tab.inc or x8664tab.inc
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\2\x0F\x3A\375\1\x0D\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\2\x0F\x3A\375\1\x0D\110\26 SSE4
+
+[BLENDVPS]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x14\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x14\110 SSE4
+
+[BLENDVPD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x15\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x15\110 SSE4
+
+[DPPS]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x40\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x40\110\26 SSE4
+
+[DPPD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x41\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x41\110\26 SSE4
+
+[EXTRACTPS]
+(Ch_All, Ch_None, Ch_None)
+mem,xmmreg,imm \1\x66\325\3\x0F\x3A\x17\101\26 SSE4
+reg32|64,xmmreg,imm \1\x66\300\3\x0F\x3A\x17\101\26 SSE4
+
+[INSERTPS]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x21\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x21\110\26 SSE4
+
+[MOVNTDQA]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x2A\110 SSE4
+
+[MPSADBW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x42\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x42\110\26 SSE4
+
+[PACKUSDW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x2B\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x2B\110 SSE4
+
+[PBLENDVB]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x10\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x10\110 SSE4
+
+[PBLENDW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x0E\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x0E\110\26 SSE4
+
+[PCMPEQQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x29\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x29\110 SSE4
+
+[PEXTRB]
+(Ch_All, Ch_None, Ch_None)
+reg32,xmmreg,imm \1\x66\323\3\x0F\x3A\x14\101\26 SSE4
+mem8,xmmreg,imm \1\x66\300\323\3\x0F\x3A\x14\101\26 SSE4
+
+;PEXTRW - Look is prev. implementation
+
+[PEXTRD]
+(Ch_All, Ch_None, Ch_None)
+reg32,xmmreg,imm \1\x66\323\3\x0F\x3A\x16\101\26 SSE4
+mem32,xmmreg,imm \1\x66\300\323\3\x0F\x3A\x16\101\26 SSE4
+
+[PEXTRQ]
+(Ch_All, Ch_None, Ch_None)
+reg64,xmmreg,imm \1\x66\326\3\x0F\x3A\x16\101\26 SSE4
+mem64,xmmreg,imm \1\x66\300\326\3\x0F\x3A\x16\101\26 SSE4
+
+[PHMINPOSUW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x41\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x41\110 SSE4
+
+[PINSRB]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,reg32,imm \1\x66\331\3\x0F\x3A\x20\110\26 SSE4
+xmmreg,mem8,imm \1\x66\301\331\3\x0F\x3A\x20\110\26 SSE4
+
+[PINSRD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,reg32,imm \1\x66\331\3\x0F\x3A\x22\110\26 SSE4
+xmmreg,mem32,imm \1\x66\301\331\3\x0F\x3A\x22\110\26 SSE4
+
+[PINSRQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,reg64,imm \1\x66\326\3\x0F\x3A\x22\110\26 SSE4
+xmmreg,mem64,imm \1\x66\301\326\3\x0F\x3A\x22\110\26 SSE4
+
+[PMAXSB]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x3C\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x3C\110 SSE4
+
+[PMAXSD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x3D\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x3D\110 SSE4
+
+[PMAXUD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x3F\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x3F\110 SSE4
+
+[PMAXUW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x3E\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x3E\110 SSE4
+
+[PMINSB]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x38\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x38\110 SSE4
+
+[PMINSD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x39\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x39\110 SSE4
+
+[PMINUW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x3A\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x3A\110 SSE4
+
+[PMINUD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x3B\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x3B\110 SSE4
+
+[PMOVSXBW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x20\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x20\110 SSE4
+
+[PMOVSXBD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x21\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x21\110 SSE4
+
+[PMOVSXBQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x22\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x22\110 SSE4
+
+[PMOVSXWD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x23\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x23\110 SSE4
+
+[PMOVSXWQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x24\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x24\110 SSE4
+
+[PMOVSXDQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x25\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x25\110 SSE4
+
+[PMOVZXBW]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x30\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x30\110 SSE4
+
+[PMOVZXBD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x31\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x31\110 SSE4
+
+[PMOVZXBQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x32\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x32\110 SSE4
+
+[PMOVZXWD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x33\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x33\110 SSE4
+
+[PMOVZXWQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x34\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x34\110 SSE4
+
+[PMOVZXDQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x35\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x35\110 SSE4
+
+[PMULDQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x28\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x28\110 SSE4
+
+[PTEST]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x17\110 SSE4
+
+[ROUNDPS]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x08\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x08\110\26 SSE4
+
+[ROUNDPD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x09\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x09\110\26 SSE4
+
+[ROUNDSS]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x0A\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x0A\110\26 SSE4
+
+[ROUNDSD]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x0B\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x0B\110\26 SSE4
+;*******************************************************************************
+;**********SSE4.2***************************************************************
+;*******************************************************************************
+[PCMPESTRI]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x61\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x61\110\26 SSE4
+[PCMPESTRM]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x60\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x60\110\26 SSE4
+[PCMPISTRI]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x63\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x63\110\26 SSE4
+[PCMPISTRM]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\x62\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\x62\110\26 SSE4
+[PCMPGTQ]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\x37\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\x37\110 SSE4
+; CRC32
[POPCNT,popcntX]
(Ch_All, Ch_None, Ch_None)
-reg16,regmem \320\333\301\323\2\x0F\xB8\110 386,SM,SSE4
-reg32|64,regmem \321\333\301\323\2\x0F\xB8\110 386,SM,SSE4
+reg16,rm16 \1\xF3\301\320\2\x0F\xB8\110 386,SM,SSE4
+reg32,rm32 \1\xF3\301\320\2\x0F\xB8\110 386,SM,SSE4
+reg64,rm64 \1\xF3\301\320\2\x0F\xB8\110 386,SM,SSE4
+;*******************************************************************************
+;**********AES******************************************************************
+;*******************************************************************************
+;Use SSE4, but need special flag for AES insructions set
+
+[AESENC]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\xDC\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\xDC\110 SSE4
+
+[AESENCLAST]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\xDD\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\xDD\110 SSE4
+
+[AESDEC]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\xDE\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\xDE\110 SSE4
+
+[AESDECLAST]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\xDF\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\xDF\110 SSE4
+
+[AESIMC]
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg \1\x66\331\3\x0F\x38\xDB\110 SSE4
+xmmreg,mem \1\x66\301\331\3\x0F\x38\xDB\110 SSE4
+
+[AESKEYGEN] ;AESKEYGENASIST
+(Ch_All, Ch_None, Ch_None)
+xmmreg,xmmreg,imm \1\x66\331\3\x0F\x3A\xDF\110\26 SSE4
+xmmreg,mem,imm \1\x66\301\331\3\x0F\x3A\xDF\110\26 SSE4
+;*******************************************************************************
+;*******************************************************************************
+;*******************************************************************************
+[STOSQ]
+(Ch_RRAX, Ch_WMemEDI, Ch_RWRDI)
+void \2\x48\xAB X86_64
+
+[LODSQ]
+(Ch_WRAX, Ch_RWRSI, Ch_None)
+void \2\x48\xAD X86_64
+
+[CMPSQ]
+(Ch_All, Ch_None, Ch_None)
+void \2\x48\xA7 X86_64 \ No newline at end of file
diff --git a/compiler/x86_64/cgcpu.pas b/compiler/x86_64/cgcpu.pas
index 812acd713f..e204268fd0 100644
--- a/compiler/x86_64/cgcpu.pas
+++ b/compiler/x86_64/cgcpu.pas
@@ -90,8 +90,13 @@ unit cgcpu;
else
{ in intf. wrapper code generation }
framepointer:=RS_FRAME_POINTER_REG;
- rg[R_INTREGISTER]:=trgcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_RAX,RS_RDX,RS_RCX,RS_RBX,RS_RSI,RS_RDI,
- RS_R8,RS_R9,RS_R10,RS_R11,RS_R12,RS_R13,RS_R14,RS_R15],first_int_imreg,[framepointer]);
+ if target_info.system=system_x86_64_win64 then
+ rg[R_INTREGISTER]:=trgcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_RAX,RS_RDX,RS_RCX,RS_R8,RS_R9,RS_R10,
+ RS_R11,RS_RBX,RS_RSI,RS_RDI,RS_R12,RS_R13,RS_R14,RS_R15],first_int_imreg,[framepointer])
+ else
+ rg[R_INTREGISTER]:=trgcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_RAX,RS_RDX,RS_RCX,RS_RSI,RS_RDI,RS_R8,
+ RS_R9,RS_R10,RS_R11,RS_RBX,RS_R12,RS_R13,RS_R14,RS_R15],first_int_imreg,[framepointer]);
+
rg[R_MMREGISTER]:=trgcpu.create(R_MMREGISTER,R_SUBWHOLE,[RS_XMM0,RS_XMM1,RS_XMM2,RS_XMM3,RS_XMM4,RS_XMM5,RS_XMM6,RS_XMM7,
RS_XMM8,RS_XMM9,RS_XMM10,RS_XMM11,RS_XMM12,RS_XMM13,RS_XMM14,RS_XMM15],first_mm_imreg,[]);
rgfpu:=Trgx86fpu.create;
diff --git a/compiler/x86_64/x8664ats.inc b/compiler/x86_64/x8664ats.inc
index f8a8d8d702..f012e395d6 100644
--- a/compiler/x86_64/x8664ats.inc
+++ b/compiler/x86_64/x8664ats.inc
@@ -602,5 +602,82 @@ attsufNONE,
attsufNONE,
attsufNONE,
attsufINT,
-attsufINT
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE
);
diff --git a/compiler/x86_64/x8664att.inc b/compiler/x86_64/x8664att.inc
index 04e9e8387e..b34c6193fe 100644
--- a/compiler/x86_64/x8664att.inc
+++ b/compiler/x86_64/x8664att.inc
@@ -602,5 +602,82 @@
'insertq',
'extrq',
'lzcnt',
-'popcnt'
+'pabsb',
+'pabsw',
+'pabsd',
+'palignr',
+'phaddw',
+'phaddd',
+'phaddsw',
+'phsubw',
+'phsubd',
+'phsubsw',
+'pmaddubsw',
+'pmulhrsw',
+'pshufb',
+'psignb',
+'psignw',
+'psignd',
+'blendps',
+'blendpd',
+'blendvps',
+'blendvpd',
+'dpps',
+'dppd',
+'extractps',
+'insertps',
+'movntdqa',
+'mpsadbw',
+'packusdw',
+'pblendvb',
+'pblendw',
+'pcmpeqq',
+'pextrb',
+'pextrd',
+'pextrq',
+'phminposuw',
+'pinsrb',
+'pinsrd',
+'pinsrq',
+'pmaxsb',
+'pmaxsd',
+'pmaxud',
+'pmaxuw',
+'pminsb',
+'pminsd',
+'pminuw',
+'pminud',
+'pmovsxbw',
+'pmovsxbd',
+'pmovsxbq',
+'pmovsxwd',
+'pmovsxwq',
+'pmovsxdq',
+'pmovzxbw',
+'pmovzxbd',
+'pmovzxbq',
+'pmovzxwd',
+'pmovzxwq',
+'pmovzxdq',
+'pmuldq',
+'ptest',
+'roundps',
+'roundpd',
+'roundss',
+'roundsd',
+'pcmpestri',
+'pcmpestrm',
+'pcmpistri',
+'pcmpistrm',
+'pcmpgtq',
+'popcnt',
+'aesenc',
+'aesenclast',
+'aesdec',
+'aesdeclast',
+'aesimc',
+'aeskeygen',
+'stosq',
+'lodsq',
+'cmpsq'
);
diff --git a/compiler/x86_64/x8664int.inc b/compiler/x86_64/x8664int.inc
index 3e030b7150..a661e19278 100644
--- a/compiler/x86_64/x8664int.inc
+++ b/compiler/x86_64/x8664int.inc
@@ -602,5 +602,82 @@
'insertq',
'extrq',
'lzcnt',
-'popcnt'
+'pabsb',
+'pabsw',
+'pabsd',
+'palignr',
+'phaddw',
+'phaddd',
+'phaddsw',
+'phsubw',
+'phsubd',
+'phsubsw',
+'pmaddubsw',
+'pmulhrsw',
+'pshufb',
+'psignb',
+'psignw',
+'psignd',
+'blendps',
+'blendpd',
+'blendvps',
+'blendvpd',
+'dpps',
+'dppd',
+'extractps',
+'insertps',
+'movntdqa',
+'mpsadbw',
+'packusdw',
+'pblendvb',
+'pblendw',
+'pcmpeqq',
+'pextrb',
+'pextrd',
+'pextrq',
+'phminposuw',
+'pinsrb',
+'pinsrd',
+'pinsrq',
+'pmaxsb',
+'pmaxsd',
+'pmaxud',
+'pmaxuw',
+'pminsb',
+'pminsd',
+'pminuw',
+'pminud',
+'pmovsxbw',
+'pmovsxbd',
+'pmovsxbq',
+'pmovsxwd',
+'pmovsxwq',
+'pmovsxdq',
+'pmovzxbw',
+'pmovzxbd',
+'pmovzxbq',
+'pmovzxwd',
+'pmovzxwq',
+'pmovzxdq',
+'pmuldq',
+'ptest',
+'roundps',
+'roundpd',
+'roundss',
+'roundsd',
+'pcmpestri',
+'pcmpestrm',
+'pcmpistri',
+'pcmpistrm',
+'pcmpgtq',
+'popcnt',
+'aesenc',
+'aesenclast',
+'aesdec',
+'aesdeclast',
+'aesimc',
+'aeskeygen',
+'stosq',
+'lodsq',
+'cmpsq'
);
diff --git a/compiler/x86_64/x8664nop.inc b/compiler/x86_64/x8664nop.inc
index c04c39f905..b1481b46ce 100644
--- a/compiler/x86_64/x8664nop.inc
+++ b/compiler/x86_64/x8664nop.inc
@@ -1,2 +1,2 @@
{ don't edit, this file is generated from x86ins.dat }
-1372;
+1555;
diff --git a/compiler/x86_64/x8664op.inc b/compiler/x86_64/x8664op.inc
index 2077fbebdf..7386f7fcd5 100644
--- a/compiler/x86_64/x8664op.inc
+++ b/compiler/x86_64/x8664op.inc
@@ -602,5 +602,82 @@ A_MOVNTSD,
A_INSERTQ,
A_EXTRQ,
A_LZCNT,
-A_POPCNT
+A_PABSB,
+A_PABSW,
+A_PABSD,
+A_PALIGNR,
+A_PHADDW,
+A_PHADDD,
+A_PHADDSW,
+A_PHSUBW,
+A_PHSUBD,
+A_PHSUBSW,
+A_PMADDUBSW,
+A_PMULHRSW,
+A_PSHUFB,
+A_PSIGNB,
+A_PSIGNW,
+A_PSIGND,
+A_BLENDPS,
+A_BLENDPD,
+A_BLENDVPS,
+A_BLENDVPD,
+A_DPPS,
+A_DPPD,
+A_EXTRACTPS,
+A_INSERTPS,
+A_MOVNTDQA,
+A_MPSADBW,
+A_PACKUSDW,
+A_PBLENDVB,
+A_PBLENDW,
+A_PCMPEQQ,
+A_PEXTRB,
+A_PEXTRD,
+A_PEXTRQ,
+A_PHMINPOSUW,
+A_PINSRB,
+A_PINSRD,
+A_PINSRQ,
+A_PMAXSB,
+A_PMAXSD,
+A_PMAXUD,
+A_PMAXUW,
+A_PMINSB,
+A_PMINSD,
+A_PMINUW,
+A_PMINUD,
+A_PMOVSXBW,
+A_PMOVSXBD,
+A_PMOVSXBQ,
+A_PMOVSXWD,
+A_PMOVSXWQ,
+A_PMOVSXDQ,
+A_PMOVZXBW,
+A_PMOVZXBD,
+A_PMOVZXBQ,
+A_PMOVZXWD,
+A_PMOVZXWQ,
+A_PMOVZXDQ,
+A_PMULDQ,
+A_PTEST,
+A_ROUNDPS,
+A_ROUNDPD,
+A_ROUNDSS,
+A_ROUNDSD,
+A_PCMPESTRI,
+A_PCMPESTRM,
+A_PCMPISTRI,
+A_PCMPISTRM,
+A_PCMPGTQ,
+A_POPCNT,
+A_AESENC,
+A_AESENCLAST,
+A_AESDEC,
+A_AESDECLAST,
+A_AESIMC,
+A_AESKEYGEN,
+A_STOSQ,
+A_LODSQ,
+A_CMPSQ
);
diff --git a/compiler/x86_64/x8664pro.inc b/compiler/x86_64/x8664pro.inc
index 75aab26425..87dd25a2ac 100644
--- a/compiler/x86_64/x8664pro.inc
+++ b/compiler/x86_64/x8664pro.inc
@@ -602,5 +602,82 @@
(Ch: (Ch_All, Ch_None, Ch_None)),
(Ch: (Ch_All, Ch_None, Ch_None)),
(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RRAX, Ch_WMemEDI, Ch_RWRDI)),
+(Ch: (Ch_WRAX, Ch_RWRSI, Ch_None)),
(Ch: (Ch_All, Ch_None, Ch_None))
);
diff --git a/compiler/x86_64/x8664tab.inc b/compiler/x86_64/x8664tab.inc
index 4c1025a7a7..02f8efb5a6 100644
--- a/compiler/x86_64/x8664tab.inc
+++ b/compiler/x86_64/x8664tab.inc
@@ -7705,7 +7705,14 @@
ops : 3;
optypes : (ot_reg32,ot_xmmreg,ot_immediate);
code : #1#102#211#2#15#197#72#22;
- flags : if_willamette or if_sse2 or if_sb or if_ar2
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRW;
+ ops : 3;
+ optypes : (ot_memory or ot_bits32,ot_xmmreg,ot_immediate);
+ code : #1#102#192#211#3#15#58#21#65#22;
+ flags : if_sse4
),
(
opcode : A_PINSRW;
@@ -9552,7 +9559,7 @@
opcode : A_MOVNTSD;
ops : 2;
optypes : (ot_memory,ot_xmmreg,ot_none);
- code : #192#220#213#211#2#15#43#0#65;
+ code : #192#220#213#211#2#15#43#65;
flags : if_sse4
),
(
@@ -9591,17 +9598,1291 @@
flags : if_386 or if_sm or if_sse4
),
(
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#28#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#29#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PABSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#30#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_immediate);
+ code : #217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_mmxreg,ot_memory,ot_immediate);
+ code : #193#217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PALIGNR;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#15#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#1#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#2#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHADDSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#3#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#5#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#6#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHSUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#7#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMADDUBSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#4#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULHRSW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#11#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSHUFB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#0#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#8#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGNW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#9#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_mmxreg,ot_none);
+ code : #217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_mmxreg,ot_memory,ot_none);
+ code : #193#217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PSIGND;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#10#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPS;
+ ops : 3;
+ optypes : (ot_xmmreg or ot_signed,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#12#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPS;
+ ops : 3;
+ optypes : (ot_xmmreg or ot_signed,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#12#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#2#15#58#253#1#13#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#2#15#58#253#1#13#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPS;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#20#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPS;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#20#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#21#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_BLENDVPD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#21#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#64#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#64#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#65#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_DPPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#65#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_EXTRACTPS;
+ ops : 3;
+ optypes : (ot_memory,ot_xmmreg,ot_immediate);
+ code : #1#102#213#3#15#58#23#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_EXTRACTPS;
+ ops : 3;
+ optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_immediate);
+ code : #1#102#192#3#15#58#23#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_INSERTPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#33#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_INSERTPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#33#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_MOVNTDQA;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#42#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_MPSADBW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#66#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_MPSADBW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#66#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PACKUSDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#43#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PACKUSDW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#43#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDVB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#16#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDVB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#16#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_signed);
+ code : #1#102#217#3#15#58#14#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PBLENDW;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate or ot_signed);
+ code : #1#102#193#217#3#15#58#14#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPEQQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#41#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPEQQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#41#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRB;
+ ops : 3;
+ optypes : (ot_reg32,ot_xmmreg,ot_immediate);
+ code : #1#102#211#3#15#58#20#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRB;
+ ops : 3;
+ optypes : (ot_memory or ot_bits8,ot_xmmreg,ot_immediate);
+ code : #1#102#192#211#3#15#58#20#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRD;
+ ops : 3;
+ optypes : (ot_reg32,ot_xmmreg,ot_immediate);
+ code : #1#102#211#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRD;
+ ops : 3;
+ optypes : (ot_memory or ot_bits32,ot_xmmreg,ot_immediate);
+ code : #1#102#192#211#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRQ;
+ ops : 3;
+ optypes : (ot_reg64,ot_xmmreg,ot_immediate);
+ code : #1#102#214#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PEXTRQ;
+ ops : 3;
+ optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_immediate);
+ code : #1#102#192#214#3#15#58#22#65#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHMINPOSUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#65#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PHMINPOSUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#65#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRB;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_reg32,ot_immediate);
+ code : #1#102#217#3#15#58#32#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRB;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory or ot_bits8,ot_immediate);
+ code : #1#102#193#217#3#15#58#32#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_reg32,ot_immediate);
+ code : #1#102#217#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_immediate);
+ code : #1#102#193#217#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRQ;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_reg64,ot_immediate);
+ code : #1#102#214#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PINSRQ;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_immediate);
+ code : #1#102#193#214#3#15#58#34#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#60#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#60#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#61#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#61#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#63#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#63#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#62#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMAXUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#62#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#56#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSB;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#56#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#57#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINSD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#57#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#58#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#58#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#59#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMINUD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#59#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#32#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#32#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#33#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#33#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#34#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#34#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#35#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#35#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#36#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#36#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#37#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVSXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#37#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#48#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBW;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#48#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#49#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#49#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#50#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXBQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#50#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#51#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWD;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#51#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#52#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXWQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#52#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#53#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMOVZXDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#53#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#40#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PMULDQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#40#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PTEST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#23#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#8#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#8#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#9#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDPD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#9#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#10#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSS;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#10#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#11#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_ROUNDSD;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#11#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#97#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#97#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#96#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPESTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#96#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#99#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRI;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#99#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#98#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPISTRM;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#98#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPGTQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#55#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_PCMPGTQ;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#55#72;
+ flags : if_sse4
+ ),
+ (
opcode : A_POPCNT;
ops : 2;
- optypes : (ot_reg16,ot_regmem,ot_none);
- code : #208#219#193#211#2#15#184#72;
+ optypes : (ot_reg16,ot_regmem or ot_bits16,ot_none);
+ code : #1#243#193#208#2#15#184#72;
flags : if_386 or if_sm or if_sse4
),
(
opcode : A_POPCNT;
ops : 2;
- optypes : (ot_reg32 or ot_bits64,ot_regmem,ot_none);
- code : #209#219#193#211#2#15#184#72;
+ optypes : (ot_reg32,ot_regmem or ot_bits32,ot_none);
+ code : #1#243#193#208#2#15#184#72;
+ flags : if_386 or if_sm or if_sse4
+ ),
+ (
+ opcode : A_POPCNT;
+ ops : 2;
+ optypes : (ot_reg64,ot_regmem or ot_bits64,ot_none);
+ code : #1#243#193#208#2#15#184#72;
flags : if_386 or if_sm or if_sse4
+ ),
+ (
+ opcode : A_AESENC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#220#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESENC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#220#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESENCLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#221#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESENCLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#221#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDEC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#222#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDEC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#222#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDECLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#223#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESDECLAST;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#223#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESIMC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_none);
+ code : #1#102#217#3#15#56#219#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESIMC;
+ ops : 2;
+ optypes : (ot_xmmreg,ot_memory,ot_none);
+ code : #1#102#193#217#3#15#56#219#72;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESKEYGEN;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_xmmreg,ot_immediate);
+ code : #1#102#217#3#15#58#223#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_AESKEYGEN;
+ ops : 3;
+ optypes : (ot_xmmreg,ot_memory,ot_immediate);
+ code : #1#102#193#217#3#15#58#223#72#22;
+ flags : if_sse4
+ ),
+ (
+ opcode : A_STOSQ;
+ ops : 0;
+ optypes : (ot_none,ot_none,ot_none);
+ code : #2#72#171;
+ flags : if_x86_64
+ ),
+ (
+ opcode : A_LODSQ;
+ ops : 0;
+ optypes : (ot_none,ot_none,ot_none);
+ code : #2#72#173;
+ flags : if_x86_64
+ ),
+ (
+ opcode : A_CMPSQ;
+ ops : 0;
+ optypes : (ot_none,ot_none,ot_none);
+ code : #2#72#167;
+ flags : if_x86_64
)
);
diff --git a/packages/Makefile b/packages/Makefile
index 80ea808c74..aeaba5ed07 100644
--- a/packages/Makefile
+++ b/packages/Makefile
@@ -1,5 +1,5 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/02/21]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/02/07]
#
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
@@ -9703,11 +9703,11 @@ winunits-base_shared: fcl-registry_shared fcl-base_shared
winunits-base_smart: fcl-registry_smart fcl-base_smart
winunits-base_debug: fcl-registry_debug fcl-base_debug
winunits-base_release: fcl-registry_release fcl-base_release
-winunits-jedi_all: winunits-base_all fcl-registry fcl-base_all
-winunits-jedi_shared: winunits-base_shared fcl-registry fcl-base_shared
-winunits-jedi_smart: winunits-base_smart fcl-registry fcl-base_smart
-winunits-jedi_debug: winunits-base_debug fcl-registry fcl-base_debug
-winunits-jedi_release: winunits-base_release fcl-registry fcl-base_release
+winunits-jedi_all: winunits-base_all fcl-registry_all fcl-base_all
+winunits-jedi_shared: winunits-base_shared fcl-registry_shared fcl-base_shared
+winunits-jedi_smart: winunits-base_smart fcl-registry_smart fcl-base_smart
+winunits-jedi_debug: winunits-base_debug fcl-registry_debug fcl-base_debug
+winunits-jedi_release: winunits-base_release fcl-registry_release fcl-base_release
xforms_all: x11_all
xforms_shared: x11_shared
xforms_smart: x11_smart
diff --git a/packages/Makefile.fpc b/packages/Makefile.fpc
index 4e84bde5e5..e7e93d599a 100644
--- a/packages/Makefile.fpc
+++ b/packages/Makefile.fpc
@@ -346,11 +346,11 @@ winunits-base_smart: fcl-registry_smart fcl-base_smart
winunits-base_debug: fcl-registry_debug fcl-base_debug
winunits-base_release: fcl-registry_release fcl-base_release
-winunits-jedi_all: winunits-base_all fcl-registry fcl-base_all
-winunits-jedi_shared: winunits-base_shared fcl-registry fcl-base_shared
-winunits-jedi_smart: winunits-base_smart fcl-registry fcl-base_smart
-winunits-jedi_debug: winunits-base_debug fcl-registry fcl-base_debug
-winunits-jedi_release: winunits-base_release fcl-registry fcl-base_release
+winunits-jedi_all: winunits-base_all fcl-registry_all fcl-base_all
+winunits-jedi_shared: winunits-base_shared fcl-registry_shared fcl-base_shared
+winunits-jedi_smart: winunits-base_smart fcl-registry_smart fcl-base_smart
+winunits-jedi_debug: winunits-base_debug fcl-registry_debug fcl-base_debug
+winunits-jedi_release: winunits-base_release fcl-registry_release fcl-base_release
xforms_all: x11_all
diff --git a/packages/cdrom/src/cdromlin.inc b/packages/cdrom/src/cdromlin.inc
index 43e1b1178e..f5b22faf12 100644
--- a/packages/cdrom/src/cdromlin.inc
+++ b/packages/cdrom/src/cdromlin.inc
@@ -117,20 +117,55 @@ end;
Function GetCDRomDevices(Var Devices : Array of string) : Integer;
-Var
- S : String;
-begin
- Result:=TestFSTab(Devices);
- If (Result<1) then
+ Function AlreadyAdded(AName: String; AMax: Integer): Boolean;
+ var
+ I: Integer;
+ begin
+ Result := False;
+ for I := 0 to AMax do
+ if Devices[I] = AName then
+ Exit(True);
+ end;
+
+ // Resolves name if it's a symlink and adds it ensuring no dups
+ Function AddCdrom(ACDRom: String; I: Integer): Integer;
+ var
+ SInfo : stat;
+ RealName: String;
+ begin
+ Result := I;
+ if fpStat(PChar(ACDRom), SInfo) <> -1 then
begin
- S:=DetectCD;
- If (S<>'') then
+ RealName := ACDRom;
+ if SInfo.st_mode and S_IFMT = S_IFLNK then
+ RealName := fpReadLink(ACDRom);
+
+ if not AlreadyAdded(RealName, I-1) then
begin
- Devices[0]:=S;
- Result:=1;
+ Devices[I] := RealName;
+ Result := I+1;
end;
- end
+ end;
+ end;
+
+var
+ I,J: Integer;
+ CDRec: TCDSearchRec;
+ FSTab: array[0..10] of String;
+
+begin
+ I := 0;
+ // First Add Entries From FSTab
+ for J := 0 to TestFSTab(FSTab)-1 do
+ I := AddCdrom(FSTab[J], I);
+
+ //Now Do A Search
+ if FindFirstCD(CDRec) then
+ repeat
+ I := AddCdrom(CDRec.Name, I);
+ until FindNextCD(CDRec) = False;
+ Result := I;
end;
diff --git a/packages/cdrom/src/lincd.pp b/packages/cdrom/src/lincd.pp
index 9eef43bb3e..f038e79e25 100644
--- a/packages/cdrom/src/lincd.pp
+++ b/packages/cdrom/src/lincd.pp
@@ -708,8 +708,15 @@ procedure set_sense_key(var a : Trequest_sense; __sense_key : Tu8);
{ ---------------------------------------------------------------------
Utility functions
---------------------------------------------------------------------}
+type
+ TCDSearchRec = record
+ Name: String;
+ i,j: Integer;
+ end;
Function IsCDDevice(Device : String) : Boolean;
+Function FindFirstCD(var ACDSearchRec: TCDSearchRec): Boolean;
+Function FindNextCD(var ACDSearchRec: TCDSearchRec): Boolean;
Function DetectCd : String;
implementation
@@ -1098,6 +1105,61 @@ Const
'/dev/sr?',
'/dev/optcd');
+function FindFirstCD(var ACDSearchRec: TCDSearchRec): Boolean;
+begin
+ Result := False;
+ With ACDSearchRec do
+ begin
+ I := 1;
+ J := 0;
+ Name := '';
+ end;
+ Result := FindNextCD(ACDSearchRec);
+end;
+
+function FindNextCD(var ACDSearchRec: TCDSearchRec): Boolean;
+var
+ L: integer;
+ S: String;
+ FoundDev: String;
+begin
+
+ Result := False;
+ FoundDev := '';
+ with ACDSearchRec do
+ begin
+ While (FoundDev='') and (I<NrDevices) do
+ begin
+ S:=Devices[i];
+ L:=Length(S);
+ If S[l]='?' then
+ begin
+ S:=Copy(S,1,L-1);
+ if j >= 3 then
+ j := 0;
+ while (j <= 3) and (Length(FoundDev)=0) do
+ begin
+ If IsCdDevice(S+Chr(Ord('0')+J)) then
+ FoundDev:=S+Chr(Ord('0')+J)
+ else If IsCdDevice(S+Chr(Ord('a')+J)) then
+ FoundDev:=S+Chr(Ord('a')+J);
+ Inc(j);
+ end;
+ if J >= 3 then
+ Inc(i);
+ end
+ else
+ begin
+ If IsCdDevice(S) then
+ FoundDev:=S;
+ Inc(i);
+ end;
+ end;
+ end;
+ Result := Length(FoundDev) > 0;
+ ACDSearchRec.Name:=FoundDev;
+end;
+
Function DetectCD : String;
Var
@@ -1163,7 +1225,9 @@ begin
If fpStat(Device,info)<>0 then
exit;
DeviceMajor:=info.st_rdev shr 8;
+ {$ifdef debug}
Writeln('Device major : ',DeviceMajor);
+ {$endif}
If DeviceMajor in [IDE0_MAJOR,IDE1_MAJOR,IDE2_MAJOR,IDE3_MAJOR] then
Result:=TestCDRomIOCTL(Device)
else
diff --git a/packages/cocoaint/utils/uikit-skel/src/uikit/UIKit.inc b/packages/cocoaint/utils/uikit-skel/src/uikit/UIKit.inc
index f4d048e343..e8e7dc497e 100644
--- a/packages/cocoaint/utils/uikit-skel/src/uikit/UIKit.inc
+++ b/packages/cocoaint/utils/uikit-skel/src/uikit/UIKit.inc
@@ -78,4 +78,5 @@
{$ifdef IOS_SDK_4_2_OR_HIGHER}
{$include UIActionSheet.inc}
{$include UILocalNotification.inc}
-{$endif} \ No newline at end of file
+{$include UIAlertView.inc}
+{$endif}
diff --git a/packages/fcl-base/src/eventlog.pp b/packages/fcl-base/src/eventlog.pp
index 00c679abb4..d17d5881f5 100644
--- a/packages/fcl-base/src/eventlog.pp
+++ b/packages/fcl-base/src/eventlog.pp
@@ -29,6 +29,7 @@ Type
TEventLog = Class(TComponent)
Private
+ fAppendContent : Boolean;
FEventIDOffset : DWord;
FLogHandle : Pointer;
FStream : TFileStream;
@@ -84,6 +85,7 @@ Type
Procedure Info (const Msg : String); {$ifndef fpc }Overload;{$endif}
Procedure Info (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif}
Published
+ Property AppendContent : Boolean Read fAppendContent Write fAppendContent;
Property Identification : String Read FIdentification Write SetIdentification;
Property LogType : TLogType Read Flogtype Write SetlogType;
Property Active : Boolean Read FActive write SetActive;
@@ -240,12 +242,19 @@ begin
end;
Procedure TEventLog.ActivateFileLog;
-
+var
+ fFileFlags : Word;
begin
If (FFileName='') then
FFileName:=DefaultFileName;
// This will raise an exception if the file cannot be opened for writing !
- FStream:=TFileStream.Create(FFileName,fmCreate or fmShareDenyWrite);
+ if fAppendContent and FileExists(FFileName) then
+ fFileFlags := fmOpenWrite
+ else
+ fFileFlags := fmCreate;
+
+ fFileFlags := fFileFlags or fmShareDenyWrite;
+ FStream:=TFileStream.Create(FFileName,fFileFlags);
end;
Procedure TEventLog.DeActivateFileLog;
diff --git a/packages/fcl-base/src/inifiles.pp b/packages/fcl-base/src/inifiles.pp
index eb4164bc1b..f75416d5e9 100644
--- a/packages/fcl-base/src/inifiles.pp
+++ b/packages/fcl-base/src/inifiles.pp
@@ -657,7 +657,11 @@ end;
destructor TIniFile.destroy;
begin
If FDirty and FCacheUpdates then
- UpdateFile;
+ try
+ UpdateFile;
+ except
+ // Eat exception. Compatible to D7 behaviour, see comments to bug 19046
+ end;
inherited destroy;
end;
diff --git a/packages/fcl-db/src/base/fields.inc b/packages/fcl-db/src/base/fields.inc
index 5b0e8b1b8b..66f5bc7d15 100644
--- a/packages/fcl-db/src/base/fields.inc
+++ b/packages/fcl-db/src/base/fields.inc
@@ -819,7 +819,13 @@ procedure TField.SetData(Buffer: Pointer; NativeFormat : Boolean);
begin
If Not Assigned(FDataset) then
- EDatabaseError.CreateFmt(SNoDataset,[FieldName]);
+ DatabaseErrorFmt(SNoDataset,[FieldName]);
+ if (FieldNo>0) and not (FDataSet.State in [dsSetKey, dsFilter]) then
+ begin
+ if ReadOnly then
+ DatabaseErrorFmt(SReadOnlyField, [DisplayName], Self);
+ Validate(Buffer);
+ end;
FDataSet.SetFieldData(Self,Buffer, NativeFormat);
end;
@@ -1070,7 +1076,7 @@ function TStringField.GetDataSize: Integer;
begin
if DataType=ftFixedChar then
- Result:=Size
+ Result:=Size+1
else
Result:=Size+1;
end;
@@ -2475,28 +2481,23 @@ end;
procedure TFMTBCDField.GetText(var TheText: string; ADisplayText: Boolean);
var
bcd: TBCD;
- E: double; //remove when formatBCD,BCDToStrF in fmtbcd.pp will be implemented
fmt: String;
begin
if GetData(@bcd) then begin
- E:=BCDToDouble(bcd);
if aDisplayText or (FEditFormat='') then
fmt := FDisplayFormat
else
fmt := FEditFormat;
if fmt<>'' then
- TheText := FormatFloat(fmt,E)
- //TheText := FormatBCD(fmt,bcd)
+ TheText := BCDToStr(bcd)
+ //TheText := FormatBCD(fmt,bcd) //uncomment when formatBCD in fmtbcd.pp will be implemented
else if fCurrency then begin
if aDisplayText then
- TheText := FloatToStrF(E, ffCurrency, FPrecision, 2{digits?})
- //TheText := BcdToStrF(bcd, ffCurrency, FPrecision, 2{digits?})
+ TheText := BcdToStrF(bcd, ffCurrency, FPrecision, 2)
else
- TheText := FloatToStrF(E, ffFixed, FPrecision, 2{digits?});
- //TheText := BcdToStrF(bcd, ffFixed, FPrecision, 2{digits?});
+ TheText := BcdToStrF(bcd, ffFixed, FPrecision, 2);
end else
- TheText := BcdToStr(bcd);
- //TheText := BcdToStrF(bcd, ffGeneral, FPrecision, FSize);
+ TheText := BcdToStrF(bcd, ffGeneral, FPrecision, FSize);
end else
TheText := '';
end;
diff --git a/packages/fcl-db/src/memds/memds.pp b/packages/fcl-db/src/memds/memds.pp
index d109fd4547..f7807f68d0 100644
--- a/packages/fcl-db/src/memds/memds.pp
+++ b/packages/fcl-db/src/memds/memds.pp
@@ -11,8 +11,10 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
+{$IFDEF FPC}
{$mode objfpc}
{$H+}
+{$ENDIF}
{
TMemDataset : In-memory dataset.
- Has possibility to copy Structure/Data from other dataset.
@@ -37,6 +39,10 @@ const
smData = 2;
type
+ {$IFNDEF FPC}
+ ptrint = Integer;
+ {$ENDIF}
+
MDSError=class(Exception);
PRecInfo=^TMTRecInfo;
@@ -63,6 +69,9 @@ type
FFilterBuffer: PChar;
ffieldoffsets: PInteger;
ffieldsizes: PInteger;
+ function GetCharPointer(p:PChar; Pos:Integer):PChar;
+ function GetIntegerPointer(p:PInteger; Pos:Integer):PInteger;
+
procedure calcrecordlayout;
function MDSGetRecordOffset(ARecNo: integer): longint;
function MDSGetFieldOffset(FieldNo: integer): integer;
@@ -123,16 +132,16 @@ type
Function DataSize : Integer;
- procedure Clear(ClearDefs : Boolean);
- procedure Clear;
- Procedure SaveToFile(AFileName : String);
- Procedure SaveToFile(AFileName : String; SaveData : Boolean);
- Procedure SaveToStream(F : TStream);
- Procedure SaveToStream(F : TStream; SaveData : Boolean);
+ procedure Clear(ClearDefs : Boolean);{$IFNDEF FPC} overload; {$ENDIF}
+ procedure Clear;{$IFNDEF FPC} overload; {$ENDIF}
+ Procedure SaveToFile(AFileName : String);{$IFNDEF FPC} overload; {$ENDIF}
+ Procedure SaveToFile(AFileName : String; SaveData : Boolean);{$IFNDEF FPC} overload; {$ENDIF}
+ Procedure SaveToStream(F : TStream); {$IFNDEF FPC} overload; {$ENDIF}
+ Procedure SaveToStream(F : TStream; SaveData : Boolean);{$IFNDEF FPC} overload; {$ENDIF}
Procedure LoadFromStream(F : TStream);
Procedure LoadFromFile(AFileName : String);
- Procedure CopyFromDataset(DataSet : TDataSet);
- Procedure CopyFromDataset(DataSet : TDataSet; CopyData : Boolean);
+ Procedure CopyFromDataset(DataSet : TDataSet); {$IFNDEF FPC} overload; {$ENDIF}
+ Procedure CopyFromDataset(DataSet : TDataSet; CopyData : Boolean); {$IFNDEF FPC} overload; {$ENDIF}
Property FileModified : Boolean Read FFileModified;
@@ -284,7 +293,7 @@ end;
function TMemDataset.MDSGetFieldOffset(FieldNo: integer): integer;
begin
- result:= ffieldoffsets[fieldno-1];
+ result:= getIntegerpointer(ffieldoffsets, fieldno-1)^;
end;
Procedure TMemDataset.RaiseError(Fmt : String; Args : Array of const);
@@ -300,6 +309,7 @@ begin
dt1:= FieldDefs.Items[FieldNo-1].Datatype;
case dt1 of
ftString: result:=FieldDefs.Items[FieldNo-1].Size+1;
+ ftFixedChar:result:=FieldDefs.Items[FieldNo-1].Size+1;
ftBoolean: result:=SizeOf(Wordbool);
ftFloat: result:=SizeOf(Double);
ftLargeInt: result:=SizeOf(int64);
@@ -705,7 +715,7 @@ begin
not getfieldisnull(pointer(srcbuffer),I);
if result and (buffer <> nil) then
begin
- Move((SrcBuffer+ffieldoffsets[I])^, Buffer^,FFieldSizes[I]);
+ Move(getcharpointer(SrcBuffer,getintegerpointer(ffieldoffsets,I)^)^, Buffer^,GetIntegerPointer(FFieldSizes, I)^);
end;
end;
@@ -723,10 +733,10 @@ begin
else
begin
unsetfieldisnull(pointer(destbuffer),I);
- J:=FFieldSizes[I];
+ J:=GetIntegerPointer(FFieldSizes, I)^;
if Field.DataType=ftString then
Dec(J); // Do not move terminating 0, which is in the size.
- Move(Buffer^,(DestBuffer+FFieldOffsets[I])^,J);
+ Move(Buffer^,GetCharPointer(DestBuffer, getIntegerPointer(FFieldOffsets, I)^)^,J);
dataevent(defieldchange,ptrint(field));
end;
end;
@@ -842,18 +852,22 @@ begin
// Avoid mem-leak if CreateTable is called twice
FreeMem(ffieldoffsets);
Freemem(ffieldsizes);
-
+ {$IFDEF FPC}
FFieldOffsets:=getmem(Count*sizeof(integer));
FFieldSizes:=getmem(Count*sizeof(integer));
+ {$ELSE}
+ getmem(FFieldOffsets, Count*sizeof(integer));
+ getmem(FFieldSizes, Count*sizeof(integer));
+ {$ENDIF}
FRecSize:= (Count+7) div 8; //null mask
{$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
FRecSize:=Align(FRecSize,4);
{$ENDIF}
for i:= 0 to Count-1 do
begin
- ffieldoffsets[i] := frecsize;
- ffieldsizes[i] := MDSGetbufferSize(i+1);
- FRecSize:= FRecSize+FFieldSizes[i];
+ GetIntegerPointer(ffieldoffsets, i)^ := frecsize;
+ GetIntegerPointer(ffieldsizes, i)^ := MDSGetbufferSize(i+1);
+ FRecSize:= FRecSize+GetIntegerPointeR(FFieldSizes, i)^;
end;
end;
@@ -964,6 +978,7 @@ begin
ftInteger : F1.AsInteger:=F2.AsInteger;
ftDate : F1.AsDateTime:=F2.AsDateTime;
ftTime : F1.AsDateTime:=F2.AsDateTime;
+ ftDateTime : F1.AsDateTime:=F2.AsDateTime;
end;
end;
Try
@@ -986,4 +1001,16 @@ begin
end;
end;
+function TMemDataset.GetCharPointer(p:PChar; Pos:Integer):PChar;
+begin
+ Result:=p;
+ inc(Result, Pos);
+end;
+
+function TMemDataset.GetIntegerPointer(p:PInteger; Pos:Integer):PInteger;
+begin
+ Result:=p;
+ inc(Result, Pos);
+end;
+
end.
diff --git a/packages/fcl-db/src/sqldb/mysql/mysql50conn.pas b/packages/fcl-db/src/sqldb/mysql/mysql50conn.pas
index a3695ad929..80e3994d91 100644
--- a/packages/fcl-db/src/sqldb/mysql/mysql50conn.pas
+++ b/packages/fcl-db/src/sqldb/mysql/mysql50conn.pas
@@ -4,6 +4,7 @@
unit mysql50conn;
+{$DEFINE MYSQL50_up}
{$DEFINE MYSQL50}
{$i mysqlconn.inc}
diff --git a/packages/fcl-db/src/sqldb/mysql/mysql51conn.pas b/packages/fcl-db/src/sqldb/mysql/mysql51conn.pas
index 9088bc80f4..41bbc113b0 100644
--- a/packages/fcl-db/src/sqldb/mysql/mysql51conn.pas
+++ b/packages/fcl-db/src/sqldb/mysql/mysql51conn.pas
@@ -4,6 +4,8 @@
unit mysql51conn;
+{$DEFINE MYSQL50_UP}
+{$DEFINE MYSQL51_UP}
{$DEFINE MYSQL51}
{$i mysqlconn.inc}
diff --git a/packages/fcl-db/src/sqldb/mysql/mysqlconn.inc b/packages/fcl-db/src/sqldb/mysql/mysqlconn.inc
index 0ed85ff45c..8f6f7a61e2 100644
--- a/packages/fcl-db/src/sqldb/mysql/mysqlconn.inc
+++ b/packages/fcl-db/src/sqldb/mysql/mysqlconn.inc
@@ -188,12 +188,8 @@ const
'MYSQL_OPT_USE_REMOTE_CONNECTION','MYSQL_OPT_USE_EMBEDDED_CONNECTION',
'MYSQL_OPT_GUESS_CONNECTION','MYSQL_SET_CLIENT_IP',
'MYSQL_SECURE_AUTH'
-{$IFDEF MYSQL50}
+{$IFDEF MYSQL50_UP}
,'MYSQL_REPORT_DATA_TRUNCATION', 'MYSQL_OPT_RECONNECT'
-{$ELSE}
- {$IFDEF MYSQL51}
- ,'MYSQL_REPORT_DATA_TRUNCATION', 'MYSQL_OPT_RECONNECT'
- {$ENDIF}
{$ENDIF}
);
@@ -559,7 +555,7 @@ begin
NewType := ftInteger;
NewSize := 0;
end;
-{$ifdef mysql50}
+{$ifdef mysql50_up}
FIELD_TYPE_NEWDECIMAL,
{$endif}
FIELD_TYPE_DECIMAL: if ADecimals < 5 then
@@ -867,7 +863,7 @@ begin
VL := 0;
Move(VL, Dest^, SizeOf(LargeInt));
end;
-{$ifdef mysql50}
+{$ifdef mysql50_up}
FIELD_TYPE_NEWDECIMAL,
{$endif}
FIELD_TYPE_DECIMAL, FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE:
diff --git a/packages/fcl-db/src/sqldb/postgres/pqconnection.pp b/packages/fcl-db/src/sqldb/postgres/pqconnection.pp
index 664b8a2bd9..d40e9a9398 100644
--- a/packages/fcl-db/src/sqldb/postgres/pqconnection.pp
+++ b/packages/fcl-db/src/sqldb/postgres/pqconnection.pp
@@ -546,7 +546,7 @@ begin
FPrepared := True;
end
else
- statement := buf;
+ statement := AParams.ParseSQL(buf,false,sqEscapeSlash in ConnOptions, sqEscapeRepeat in ConnOptions,psPostgreSQL);
end;
end;
@@ -561,10 +561,11 @@ begin
res := pqexec(tr.PGConn,pchar('deallocate prepst'+nr));
if (PQresultStatus(res) <> PGRES_COMMAND_OK) then
begin
+ pqclear(res);
+ DatabaseError(SErrPrepareFailed + ' (PostgreSQL: ' + PQerrorMessage(tr.PGConn) + ')',self)
+ end
+ else
pqclear(res);
- DatabaseError(SErrPrepareFailed + ' (PostgreSQL: ' + PQerrorMessage(tr.PGConn) + ')',self)
- end;
- pqclear(res);
end;
FPrepared := False;
end;
@@ -641,9 +642,12 @@ begin
s := Statement;
res := pqexec(tr.PGConn,pchar(s));
if (PQresultStatus(res) in [PGRES_COMMAND_OK,PGRES_TUPLES_OK]) then
- pqclear(res);
+ begin
+ pqclear(res);
+ res:=nil;
+ end;
end;
- if not (PQresultStatus(res) in [PGRES_COMMAND_OK,PGRES_TUPLES_OK]) then
+ if assigned(res) and not (PQresultStatus(res) in [PGRES_COMMAND_OK,PGRES_TUPLES_OK]) then
begin
s := PQerrorMessage(tr.PGConn);
pqclear(res);
diff --git a/packages/fcl-db/tests/sqldbtoolsunit.pas b/packages/fcl-db/tests/sqldbtoolsunit.pas
index 0c4482fbd2..60d9893ca2 100644
--- a/packages/fcl-db/tests/sqldbtoolsunit.pas
+++ b/packages/fcl-db/tests/sqldbtoolsunit.pas
@@ -7,13 +7,13 @@ interface
uses
Classes, SysUtils, toolsunit,
db,
- sqldb, ibconnection, mysql40conn, mysql41conn, mysql50conn, pqconnection,odbcconn,oracleconnection,sqlite3conn;
+ sqldb, ibconnection, mysql40conn, mysql41conn, mysql50conn, mysql51conn, pqconnection,odbcconn,oracleconnection,sqlite3conn;
-type TSQLDBTypes = (mysql40,mysql41,mysql50,postgresql,interbase,odbc,oracle,sqlite3);
+type TSQLDBTypes = (mysql40,mysql41,mysql50,mysql51,postgresql,interbase,odbc,oracle,sqlite3);
const MySQLdbTypes = [mysql40,mysql41,mysql50];
DBTypesNames : Array [TSQLDBTypes] of String[19] =
- ('MYSQL40','MYSQL41','MYSQL50','POSTGRESQL','INTERBASE','ODBC','ORACLE','SQLITE3');
+ ('MYSQL40','MYSQL41','MYSQL50','MYSQL51','POSTGRESQL','INTERBASE','ODBC','ORACLE','SQLITE3');
FieldtypeDefinitionsConst : Array [TFieldType] of String[15] =
(
@@ -115,8 +115,7 @@ begin
testStringValues[t] := TrimRight(testStringValues[t]);
end;
if SQLDbType = MYSQL50 then Fconnection := tMySQL50Connection.Create(nil);
- if SQLDbType in MySQLdbTypes then
- FieldtypeDefinitions[ftLargeint] := 'BIGINT';
+ if SQLDbType = MYSQL51 then Fconnection := tMySQL51Connection.Create(nil);
if SQLDbType = sqlite3 then
begin
Fconnection := TSQLite3Connection.Create(nil);
@@ -134,7 +133,6 @@ begin
if SQLDbType = INTERBASE then
begin
Fconnection := tIBConnection.Create(nil);
- FieldtypeDefinitions[ftLargeint] := 'BIGINT';
end;
if SQLDbType = ODBC then Fconnection := tODBCConnection.Create(nil);
if SQLDbType = ORACLE then Fconnection := TOracleConnection.Create(nil);
diff --git a/packages/fcl-db/tests/testfieldtypes.pas b/packages/fcl-db/tests/testfieldtypes.pas
index 0925465ce8..67b634a76a 100644
--- a/packages/fcl-db/tests/testfieldtypes.pas
+++ b/packages/fcl-db/tests/testfieldtypes.pas
@@ -1391,7 +1391,10 @@ begin
begin
with query do
begin
- SQL.Text:='select NAME from FPDEV where NAME=''TestName21'' limit 1';
+ if (sqlDBtype=interbase) then
+ SQL.Text:='select first 1 NAME from FPDEV where NAME=''TestName21'''
+ else
+ SQL.Text:='select NAME from FPDEV where NAME=''TestName21'' limit 1';
Open;
close;
ServerFilter:='ID=21';
@@ -1626,6 +1629,8 @@ procedure TTestFieldTypes.TestSQLClob;
AssertEquals(testStringValues[a],AField.AsString);
end;
begin
+ if SQLDbType=interbase then
+ Ignore('This test does not apply to Interbase/Firebird, since it does not support CLOB fields');
TestSQLFieldType(ftMemo, 'CLOB', 0, @TestSQLClob_GetSQLText, @CheckFieldValue);
end;
@@ -1641,7 +1646,10 @@ procedure TTestFieldTypes.TestSQLLargeint;
AssertEquals(testLargeIntValues[a],AField.AsLargeInt);
end;
begin
- TestSQLFieldType(ftLargeint, 'LARGEINT', 8, @TestSQLLargeint_GetSQLText, @CheckFieldValue);
+ if sqlDBType=interbase then
+ TestSQLFieldType(ftLargeint, 'BIGINT', 8, @TestSQLLargeint_GetSQLText, @CheckFieldValue)
+ else
+ TestSQLFieldType(ftLargeint, 'LARGEINT', 8, @TestSQLLargeint_GetSQLText, @CheckFieldValue);
end;
diff --git a/packages/fcl-image/Makefile b/packages/fcl-image/Makefile
index 46987dec8b..66a18b59ab 100644
--- a/packages/fcl-image/Makefile
+++ b/packages/fcl-image/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/03/21]
#
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
+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 powerpc-wii 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
@@ -377,6 +377,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd freetypeh freetype ftfont
endif
@@ -402,7 +405,7 @@ ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd freetypeh freetype ftfont
endif
ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
+override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd freetypeh freetype ftfont
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
@@ -563,6 +566,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_RSTS+=pscanvas
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_RSTS+=pscanvas
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_RSTS+=pscanvas
endif
@@ -749,6 +755,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_EXAMPLEDIRS+=examples
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_EXAMPLEDIRS+=examples
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_EXAMPLEDIRS+=examples
endif
@@ -936,6 +945,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override COMPILER_OPTIONS+=-S2h
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_OPTIONS+=-S2h
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override COMPILER_OPTIONS+=-S2h
endif
@@ -1122,6 +1134,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override COMPILER_SOURCEDIR+=src
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_SOURCEDIR+=src
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override COMPILER_SOURCEDIR+=src
endif
@@ -1543,6 +1558,11 @@ ifeq ($(OS_TARGET),NativeNT)
SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
else
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
@@ -2230,6 +2250,13 @@ REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-BASE=1
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-BASE=1
+endif
ifeq ($(FULL_TARGET),sparc-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASJPEG=1
@@ -3268,6 +3295,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
ifeq ($(FULL_TARGET),sparc-linux)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
diff --git a/packages/fcl-image/Makefile.fpc b/packages/fcl-image/Makefile.fpc
index ba1fa87890..391e22119c 100644
--- a/packages/fcl-image/Makefile.fpc
+++ b/packages/fcl-image/Makefile.fpc
@@ -14,6 +14,7 @@ units=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm \
targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer \
extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
units_win32=freetypeh freetype ftfont
+units_win64=freetypeh freetype ftfont
units_beos=freetypeh freetype ftfont
units_haiku=freetypeh freetype ftfont
units_linux=freetypeh freetype ftfont
diff --git a/packages/fcl-image/src/fpcanvas.inc b/packages/fcl-image/src/fpcanvas.inc
index 99784a8e8d..b3729fb5c3 100644
--- a/packages/fcl-image/src/fpcanvas.inc
+++ b/packages/fcl-image/src/fpcanvas.inc
@@ -402,6 +402,56 @@ begin
FPenPos := points[high(points)];
end;
+procedure TFPCustomCanvas.RadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer);
+
+begin
+ DoRadialPie(X1, y1, x2, y2, StartAngle16Deg, Angle16DegLength);
+end;
+
+procedure TFPCustomCanvas.DoRadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer);
+
+begin
+ // To be implemented
+end;
+
+procedure TFPCustomCanvas.DoPolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+
+begin
+ // To be implemented
+end;
+
+procedure TFPCustomCanvas.PolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+begin
+ DoPolyBezier(Points,NumPts,Filled,Continuous);
+end;
+
+procedure TFPCustomCanvas.PolyBezier(const Points: array of TPoint;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+var
+ NPoints{, i}: integer;
+// PointArray: ^TPoint;
+begin
+ NPoints:=High(Points)-Low(Points)+1;
+ if NPoints>0 then
+ DoPolyBezier(@Points[Low(Points)],NPoints,Filled,Continuous);
+{
+ NPoints:=High(Points)-Low(Points)+1;
+ if NPoints<=0 then exit;
+ GetMem(PointArray,SizeOf(TPoint)*NPoints);
+ try
+ for i:=0 to NPoints-1 do
+ PointArray[i]:=Points[i+Low(Points)];
+ DoPolyBezier(PointArray, NPoints, Filled, Continuous);
+ finally
+ FreeMem(PointArray);
+ end;}
+end;
+
procedure TFPCustomCanvas.Clear;
var r : TRect;
begin
@@ -500,6 +550,25 @@ begin
Rectangle (Rect(left,top,right,bottom));
end;
+procedure TFPCustomCanvas.FillRect(const ARect: TRect);
+
+begin
+ if (Brush.style <> bsClear) then
+ begin
+ if not (brush is TFPCustomDrawBrush) then
+ DoRectangleFill (ARect)
+ else
+ with ARect do
+ TFPCustomDrawBrush(Brush).Rectangle (left,top,right,bottom);
+ end;
+end;
+
+procedure TFPCustomCanvas.FillRect(X1,Y1,X2,Y2: Integer);
+
+begin
+ FillRect (Rect(X1,Y1,X2,Y2));
+end;
+
procedure TFPCustomCanvas.Rectangle (const Bounds:TRect);
var np,nb,dp,db,pb : boolean;
begin
diff --git a/packages/fcl-image/src/fpcanvas.pp b/packages/fcl-image/src/fpcanvas.pp
index 6c82cae7f7..c9ca814463 100644
--- a/packages/fcl-image/src/fpcanvas.pp
+++ b/packages/fcl-image/src/fpcanvas.pp
@@ -24,6 +24,7 @@ const
type
+ PPoint = ^TPoint;
TFPCanvasException = class (Exception);
TFPPenException = class (TFPCanvasException);
TFPBrushException = class (TFPCanvasException);
@@ -82,11 +83,14 @@ type
TFPCustomFont = class (TFPCanvasHelper)
private
FName : string;
+ FOrientation,
FSize : integer;
protected
procedure DoCopyProps (From:TFPCanvasHelper); override;
procedure SetName (AValue:string); virtual;
procedure SetSize (AValue:integer); virtual;
+ procedure SetOrientation (AValue:integer); virtual;
+ function GetOrientation : Integer;
public
function CopyFont : TFPCustomFont;
// Creates a copy of the font with all properties the same, but not allocated
@@ -99,6 +103,8 @@ type
property Italic : boolean index 6 read GetFlags write SetFlags;
property Underline : boolean index 7 read GetFlags write SetFlags;
property StrikeTrough : boolean index 8 read GetFlags write SetFlags;
+ property Orientation: Integer read GetOrientation write SetOrientation default 0;
+
end;
TFPCustomFontClass = class of TFPCustomFont;
@@ -255,6 +261,10 @@ type
procedure DoLine (x1,y1,x2,y2:integer); virtual; abstract;
procedure DoCopyRect (x,y:integer; canvas:TFPCustomCanvas; Const SourceRect:TRect); virtual; abstract;
procedure DoDraw (x,y:integer; Const image:TFPCustomImage); virtual; abstract;
+ procedure DoRadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer); virtual;
+ procedure DoPolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False); virtual;
procedure CheckHelper (AHelper:TFPCanvasHelper); virtual;
procedure AddHelper (AHelper:TFPCanvasHelper);
public
@@ -277,8 +287,17 @@ type
procedure EllipseC (x,y:integer; rx,ry:longword);
procedure Polygon (Const points:array of TPoint);
procedure Polyline (Const points:array of TPoint);
- procedure Rectangle (Const Bounds:TRect);
+ procedure RadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer);
+ procedure PolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+ procedure PolyBezier(const Points: array of TPoint;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+ procedure Rectangle (Const Bounds : TRect);
procedure Rectangle (left,top,right,bottom:integer);
+ procedure FillRect(const ARect: TRect);
+ procedure FillRect(X1,Y1,X2,Y2: Integer);
// using brush
procedure FloodFill (x,y:integer);
procedure Clear;
diff --git a/packages/fcl-image/src/fpfont.inc b/packages/fcl-image/src/fpfont.inc
index a63f435fb6..b61c78a448 100644
--- a/packages/fcl-image/src/fpfont.inc
+++ b/packages/fcl-image/src/fpfont.inc
@@ -24,6 +24,17 @@ begin
FSize := AValue;
end;
+procedure TFPCustomFont.SetOrientation (AValue:integer);
+begin
+ FOrientation := AValue;
+end;
+
+function TFPCustomFont.GetOrientation : Integer;
+begin
+ Result := FOrientation;
+end;
+
+
procedure TFPCustomFont.DoCopyProps (From:TFPCanvasHelper);
begin
with from as TFPCustomFont do
diff --git a/packages/fcl-json/Makefile b/packages/fcl-json/Makefile
index dcf4e98380..4ad9d8c0fc 100644
--- a/packages/fcl-json/Makefile
+++ b/packages/fcl-json/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/20]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/10/20]
#
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 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 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
@@ -245,7 +245,7 @@ endif
ifndef CROSSBINDIR
CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
endif
-ifeq ($(OS_TARGET),darwin)
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
ifeq ($(OS_SOURCE),darwin)
DARWIN2DARWIN=1
endif
@@ -329,6 +329,9 @@ endif
ifeq ($(FULL_TARGET),i386-nativent)
override TARGET_UNITS+=fpjson jsonscanner jsonparser jsonconf fpjsonrtti
endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_UNITS+=fpjson jsonscanner jsonparser jsonconf fpjsonrtti
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_UNITS+=fpjson jsonscanner jsonparser jsonconf fpjsonrtti
endif
@@ -512,6 +515,9 @@ endif
ifeq ($(FULL_TARGET),i386-nativent)
override TARGET_RSTS+=fpjson jsonscanner jsonparser jsonconf fpjsonrtti
endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_RSTS+=fpjson jsonscanner jsonparser jsonconf fpjsonrtti
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_RSTS+=fpjson jsonscanner jsonparser jsonconf fpjsonrtti
endif
@@ -696,6 +702,9 @@ endif
ifeq ($(FULL_TARGET),i386-nativent)
override COMPILER_OPTIONS+=-S2h
endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_OPTIONS+=-S2h
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_OPTIONS+=-S2h
endif
@@ -879,6 +888,9 @@ endif
ifeq ($(FULL_TARGET),i386-nativent)
override COMPILER_SOURCEDIR+=src
endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_SOURCEDIR+=src
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_SOURCEDIR+=src
endif
@@ -1326,7 +1338,7 @@ DEBUGSYMEXT=.xcoff
SHORTSUFFIX=mac
IMPORTLIBPREFIX=imp
endif
-ifeq ($(OS_TARGET),darwin)
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
BATCHEXT=.sh
EXEEXT=
HASSHAREDLIB=1
@@ -1855,6 +1867,11 @@ ifeq ($(FULL_TARGET),i386-nativent)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_FCL-BASE=1
endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_UNIVINT=1
+REQUIRE_PACKAGES_FCL-BASE=1
+endif
ifeq ($(FULL_TARGET),m68k-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_FCL-BASE=1
diff --git a/packages/fcl-passrc/examples/test_parser.pp b/packages/fcl-passrc/examples/test_parser.pp
index ae178e7334..c857b78f05 100644
--- a/packages/fcl-passrc/examples/test_parser.pp
+++ b/packages/fcl-passrc/examples/test_parser.pp
@@ -1,7 +1,151 @@
+{ This is a test-program for the fcl-passrc package (except writer-class).
+
+ Please notice that i have done this to find out how good the parser workes,
+ it is not thought to be a good example to use the fcl-passrc package but
+ may give you hints on using it.
+
+ It is done to test the source of these units for usability, completeness and
+ bugs. It is base on the fcl-passrc exampe.
+ It workes like a pretty-printer to compare the output of this program with
+ the original code, but is not thought to be a real pretty-printer as
+ e.g. the semicolons can sometimes not be set at the place they sould be
+ (this imformation is not available from the parsing-engine, as a parser
+ should only give you a positiv result if the source is valid, otherwise
+ you get a negative result).
+ Also the output is not always in the same order as in input as this
+ information is not available easily.
+
+ !!!Do not expect this program to produce executeable output!!!
+
+ Status: -workes with one Unit or Program
+ -Some type declarations missing
+ -string[n] the [n] part missing -> missing in parser
+ -array of const -> missing in parser
+ -Hints deprecated, etc. missing sometimes
+ -the parser splits x,y:atype
+ x:atype
+ y:atype
+ i tryed to put them together again
+ - () missing in statements: () expression and typecast
+ -missing forward class declaration like x=class
+ -incomplete !
+
+ parser: -ugly ''' quotation from scanner, why not #39 ?
+ -see comments in the program for hints
+ -incomplete !
+
+ Usage: call with one complete filename of a Unit or Program
+ defaults for the parser are 'linux' and 'i386'
+
+ Output: is 'pretty-printed' to stdout or unformated
+ The unformated output is thought to be diffed with the original
+ source to see differences caused by the parser (a tool to unformat
+ a souce file is in progress but not finished jet).
+
+ Bugs: 1. In case of unimplemented statements (like up to now asm) the parser
+ cause a excemtion to abort the program hard.
+ 2. Missing implementaion in this program should not print out anything
+ or result in not pascal conform output.
+
+ Hit: The parser uses directives given in the source file.
+
+ Hints to read the code:
+ There are comments in the code with hints and marks of possible bugs.
+ During development some code was modified for true order output but the
+ old code is still available as a comment as it is easier to understand.
+ This is programmed using 'recursive' calls. Most options in functions are
+ for printing the output.
+ There is no writer-class used to keep it simple and see what is done.
+ All output is produced by direct writing to stdout, this cause problems in
+ furter development; a function result as string may be more usable.
+
+ The parser was written to be used for unit interface and was expanded to
+ work with program and implementation too. It does nearly no seperate
+ things for programs, they are adapted to the unit scheme (see main).
+
+ The order will change in following case:
+ -function with forward declaration (also overloading etc.)
+
+
+ Inheritance (only the important ones):
+
+ TInterfaceSection, TImplementationSection, TProgramSection
+ |
+ TPasSection
+ |
+ TPasDeclarations
+ |
+ TPasElement
+ |
+ TPasElementBase
+ |
+ TObject
+
+ TInitializationSection, TFinalizationSection
+ |
+ TPasImplBlock
+ |
+ TPasImplElement
+ |
+ TPasElement
+ |
+ TPasElementBase
+ |
+ TObject
+
+ TPasProgram
+ |
+ TPasModule
+ |
+ TPasElement
+ |
+ TPasElementBase
+ |
+ TObject
+
+ Dependance Structure :
+
+ TPasPackage = class(TPasElement)
+ |
+ Modules: TList;
+
+ TPasModule = class(TPasElement)
+ |-InterfaceSection: TInterfaceSection;
+ | |-Declarations -> forward part, unit only
+ |
+ |-ImplementationSection: TImplementationSection;
+ | |-Declarations -> full declaration, unit and program
+ | |-Functions: TList;
+ | |-TPasFunction = class(TPasProcedureBase)
+ | |-Body: TProcedureBody;
+ | |-Declarations -> declaration and sub function
+ | |-Body: TPasImplBlock; -> procedure block
+ |
+ |-InitializationSection: TInitializationSection;
+ | |-TPasImplBlock.Elements: TList; -> main block
+ |
+ |-FinalizationSection: TFinalizationSection;
+ |-TPasImplBlock.Elements: TList; -> unit only
+
+ Declarations = class(TPasElement)
+ |-Declarations: TList; -> the following are all in here
+ |-ResStrings: TList;
+ |-Types: TList;
+ |-Consts: TList;
+ |-Classes: TList;
+ |-Functions: TList;
+ |-Variables: TList;
+ |-Properties: TList;
+ }
+
+
+program test_parser1;
{$mode objfpc}{$H+}
uses SysUtils, Classes, PParser, PasTree;
+//# types the parser needs
+
type
{ We have to override abstract TPasTreeContainer methods.
See utils/fpdoc/dglobals.pp for an implementation of TFPDocEngine,
@@ -31,43 +175,1779 @@ begin
Result := nil;
end;
+
+//# main var
var
M: TPasModule;
E: TPasTreeContainer;
I: Integer;
- Decls: TList;
- cmdl : string;
+ cmdl, TargetOS, TargetCPU : string;
+ isim, //is Impleamentation, only for GetTPasProcedureBody
+ Unformated:boolean; // no Formating in output
+
+
+//# tools
+
+ function GetIndent(indent:integer):String;
+ var i:integer;
+ begin
+ Result:='';
+ if not Unformated then
+ for i:=1 to indent do Result:=Result+' ';
+ end;
+
+ //delete ugly quoting '''STRING'''
+ function DelQuot(s:String):String;
+ var i:integer;
+ const s1=#39#39#39;
+ begin
+ Result:='';
+ i:=pos(s1,s);
+ while i > 0 do
+ begin
+ if i > 0 then delete(s,i,2);
+ i:=pos(s1,s);
+ end;
+ //if i > 0 then delete(s,i,2);
+ Result:=s;
+ end;
+
+ //LeadingSpace only valid if Formated output (as this will be one line in output)
+ //UnFormated: all is printed in a new line
+ procedure WriteFmt(LeadingSpace:boolean; s:String; Semicolon:boolean);
+ begin
+ if Semicolon then s:=s+';';
+ if Unformated then writeln(s)
+ else if LeadingSpace then write(' ',s)
+ else write(s);
+ end;
+
+//# parsing output
+
+function GetTPasImplBlock(lb:TPasImplBlock; indent,declistby:integer;
+ LastNoSem,NoFirstIndent:boolean):boolean; forward;
+
+function GetTPasImplElement(le:TPasImplElement; lindent:integer;
+ lLastNoSem,NoFirstIndent:boolean):boolean; forward;
+
+procedure GetDecls(Decl:TPasDeclarations; indent:integer); forward;
+//procedure PrintDecls(Decl:TPasDeclarations; indent:integer); forward;
+
+//# most is for implementation or implblocks except the expr things
+
+function ReturnTPasMemberHints(h:TPasMemberHints):String;
+ begin
+ Result:='';
+ if hDeprecated in h then Result:=' deprecated';
+ if hLibrary in h then Result:=Result+' library';
+ if hPlatform in h then Result:=Result+' platform';
+ if hExperimental in h then Result:=Result+' experimental';
+ if hUnimplemented in h then Result:=Result+' unimplemented';
+ end;
+
+function GetTPasMemberHints(h:TPasMemberHints):Boolean;
+ begin
+ Result:=false;
+ if hDeprecated in h then begin write(' deprecated'); Result:=true; end;
+ if hLibrary in h then begin write(' library'); Result:=true; end;
+ if hPlatform in h then begin write(' platform'); Result:=true; end;
+ if hExperimental in h then begin write(' experimental'); Result:=true; end;
+ if hUnimplemented in h then begin write(' unimplemented'); Result:=true; end;
+ end;
+
+
+
+
+function GetTPasExprKind(lpek:TPasExprKind):String;
+ begin
+ Result:='';
+ case lpek of
+ pekIdent:Result:='ID';
+ pekNumber:Result:='NUMBER';
+ pekString:Result:='STRING';
+ pekSet:Result:='SET';
+ pekNil:Result:='NIL';
+ pekBoolConst:Result:='BOOL';
+ pekRange:Result:='RANGE';
+ pekUnary:Result:='UNARY';
+ pekBinary:Result:='BINARY';
+ pekFuncParams:Result:='FUNCPAR';
+ pekArrayParams:Result:='ARRAYPAR';
+ pekListOfExp:Result:='EXPLIST';
+ end;
+ end;
+
+procedure GetTPasExpr(lex:TPasExpr);
+ var lex1:TpasExpr;
+ lpe:TParamsExpr;
+ l:integer;
+ lbk,rbk,sep:string;
+ lav:TArrayValues;
+ lrv:TRecordValues;
+ rvi:TRecordValuesItem;
+
+
+ function GetExpKind(ek:TPasExprKind; var lbrak,rbrak:string):string;
+ begin
+ lbrak:='';
+ rbrak:='';
+ Result:='';
+ case ek of
+ pekIdent:Result:='ID';
+ pekNumber:Result:='NU';
+ pekString:begin lbrak:=#39; rbrak:=#39; Result:=#39; end;
+ pekSet:begin lbrak:='['; rbrak:=']'; Result:=','; end;
+ pekNil:Result:='NIL';
+ pekBoolConst:Result:='';
+ pekRange:Result:='..';
+ pekUnary:Result:='';
+ pekBinary:Result:='';
+ pekFuncParams:begin lbrak:='('; rbrak:=')'; Result:=','; end;
+ pekArrayParams:begin lbrak:='['; rbrak:=']'; Result:=','; end;
+ pekListOfExp:Result:=',';
+ pekInherited:Result:=' InheriteD';
+ pekSelf:Result:=' SelF';
+ end;
+ end;
+
+ function GetOp(lop:TExprOpCode):string;
+ begin
+ Result:='';
+ case lop of
+ eopNone:Result:='';
+ eopAdd:Result:='+';
+ eopSubtract:Result:='-';
+ eopMultiply:Result:='*';
+ eopDivide:Result:='/';
+ eopDiv:Result:=' div ';
+ eopMod:Result:=' mod ';
+ eopPower:Result:='^';
+ eopShr:Result:=' shr ';
+ eopSHl:Result:=' shl ';
+ eopNot:Result:=' not ';
+ eopAnd:Result:=' and ';
+ eopOr:Result:=' or ';
+ eopXor:Result:=' xor ';
+ eopEqual:Result:='=';
+ eopNotEqual:Result:='<>';
+ eopLessThan:Result:='<';
+ eopGreaterThan:Result:='>';
+ eopLessthanEqual:Result:='<=';
+ eopGreaterThanEqual:Result:='>=';
+ eopIn:Result:=' in ';
+ eopIs:Result:=' is ';
+ eopAs:Result:=' as ';
+ eopSymmetricaldifference:Result:='><';
+ eopAddress:Result:='@';
+ eopDeref:Result:='^';
+ eopSubIdent:Result:='.';
+ end;
+ end;
+
+ begin
+ if lex is TBinaryExpr then //compined constants
+ begin
+ sep:=GetExpKind(lex.Kind,lbk,rbk);
+ //write('|');
+ write(lbk);
+ GetTPasExpr(TBinaryExpr(lex).left);
+ write(GetOp(TBinaryExpr(lex).OpCode));
+ write(sep);
+ GetTPasExpr(TBinaryExpr(lex).right);
+ write(rbk);
+ //write('|');
+ //write(' [',lex.Name,' ',GetTPasExprKind(lex.Kind),']');
+ end
+ else
+ begin
+ //write('UNARY');
+ if lex is TUnaryExpr then
+ begin
+ lex1:=TUnaryExpr(lex).Operand;
+ if lex.OpCode = eopDeref then
+ begin
+ GetTPasExpr(lex1);
+ write(GetOp(lex.OpCode)); //unary last, only: p^
+ end
+ else
+ begin
+ write(GetOp(lex.OpCode)); //unary first: -1
+ GetTPasExpr(lex1);
+ end;
+ end;
+ if lex is TPrimitiveExpr then write(TPrimitiveExpr(lex).Value) //simple constant
+ else
+ if lex is TBoolConstExpr then write(TBoolConstExpr(lex).Value)
+ else
+ if lex is TNilExpr then write('nil')
+ else
+ if lex is TInheritedExpr then write('Inherited ')
+ else
+ if lex is TSelfExpr then write('Self')
+ else
+ if lex is TParamsExpr then //writeln(param1,param2,..,paramn);
+ begin
+ //write(' PAREX ');
+ lpe:=TParamsExpr(lex);
+ GetTPasExpr(lpe.Value);
+ if length(lpe.Params) >0 then
+ begin
+ sep:=GetExpKind(lpe.Kind,lbk,rbk);
+ write(lbk); //write('(');
+ for l:=0 to High(lpe.Params)-1 do
+ begin
+ GetTPasExpr(lpe.Params[l]);
+ write(sep); //seperator
+ end;
+ GetTPasExpr(lpe.Params[High(lpe.Params)]);
+ write(rbk);//write(')');
+ end
+ else
+ begin //funcion()
+ sep:=GetExpKind(lpe.Kind,lbk,rbk);
+ write(lbk,rbk);
+ end;
+ end
+ else if lex is TArrayValues then //const AnArrayConst: Array[1..3] of Integer = (1,2,3);
+ begin
+ write('(');
+ lav:=TArrayValues(lex);
+ if length(lav.Values) > 0 then
+ begin
+ for l:=0 to high(lav.Values)-1 do
+ begin
+ GetTPasExpr(TPasExpr(lav.Values[l]));
+ write(',');
+ end;
+ GetTPasExpr(TPasExpr(lav.Values[high(lav.Values)]));
+ end;
+ write(')');
+ end
+ else if lex is TRecordValues then
+ begin
+ write('(');
+ lrv:=TRecordValues(lex);
+ if length(lrv.Fields) > 0 then
+ begin
+ for l:=0 to high(lrv.Fields)-1 do
+ begin
+ rvi:=TRecordValuesItem(lrv.Fields[l]);
+ write(rvi.Name,':');
+ GetTPasExpr(rvi.ValueExp);
+ write(';');
+ end;
+ rvi:=TRecordValuesItem(lrv.Fields[high(lrv.Fields)]);
+ write(rvi.Name,':');
+ GetTPasExpr(rvi.ValueExp);
+ end;
+ write(')');
+ end
+ else
+ begin
+ //?
+ //writeln('{ Unknown Expression: ');
+ //if assigned(lex) then GetTPasExprKind(lex.Kind);
+ //writeln('}');
+ end;
+ end;
+ end;
+
+
+//NoFirstIndent only for block in case:
+procedure GetTPasSmt(lsmt:TPasImplStatement; lindent:integer; DoNoSem,NoFirstIndent:boolean);
+ var l:integer;
+ lics:TPasImplCaseStatement;
+ DoSem:boolean;
+ liwd:TPasImplWithDo;
+ liwhd:TPasImplWhileDo;
+ lieo:TPasImplExceptOn;
+ lifl:TPasImplForLoop;
+ lir:TPasImplRaise;
+ s,s1:String;//s1 only first line of block statement
+
+begin
+ DoSem:=true;
+ s:=GetIndent(lindent);
+ if NoFirstIndent then s1:=' ' else s1:=s;
+ if lsmt is TPasImplSimple then
+ begin
+ write(s1); GetTPasExpr(TPasImplSimple(lsmt).expr);
+ //DoSem:=true;
+ end
+ else if lsmt is TPasImplAssign then
+ begin
+ write(s1); GetTPasExpr(TPasImplAssign(lsmt).left);
+ write(':= ');
+ GetTPasExpr(TPasImplAssign(lsmt).right);
+ //DoSem:=true;
+ end
+ else if lsmt is TPasImplCaseStatement then
+ begin
+ lics:=TPasImplCaseStatement(lsmt);
+ if lics.Expressions.Count>0 then
+ begin
+ write(s);
+ for l:=0 to lics.Expressions.Count-2 do
+ write(DelQuot(lics.Expressions[l]),',');
+ write(DelQuot(lics.Expressions[lics.Expressions.Count-1]),': '); // !!bug too much ' in expression
+ //if not assigned(lics.Body) then writeln('TPasImplCaseStatement missing BODY');
+ //if assigned(lics.Body) and (TPasImplBlock(lics.Body).Elements.Count >0) then
+ // GetTPasImplBlock(TPasImplBlock(lics.Body),lindent+1,0,false,true)
+ // else GetTPasImplBlock(TPasImplBlock(lics),lindent+1,0,false,true); // !!bug missing body, assigned but empty
+ if assigned(lics.Body) then
+ begin
+ if not GetTPasImplElement(lics.Body,lindent+1,false,true) then ;//writeln(';');
+ end
+ else writeln(';');
+ end;
+ DoSem:=false;
+ end
+ else if lsmt is TPasImplWithDo then
+ begin
+ liwd:=TPasImplWithDo(lsmt); // !!Bug: missing with do at following with do !solved see Bug
+ write(s1,'with ',liwd.Name);
+ if liwd.Expressions.Count>0 then
+ begin
+ for l:=0 to liwd.Expressions.Count-2 do
+ write(liwd.Expressions[l],',');
+ write(liwd.Expressions[liwd.Expressions.Count-1]);
+ end;
+ writeln(' do');
+ //if TPasImplBlock(liwd.Body).Elements.Count >0 then
+ //GetTPasImplBlock(TPasImplBlock(liwd.Body),0); // !!Bug: BODY Not used
+ //else
+ GetTPasImplBlock(TPasImplBlock(liwd),lindent+1,0,false,false);
+ DoSem:=false;
+ end
+ else if lsmt is TPasImplWhileDo then
+ begin
+ liwhd:=TPasImplWhileDo(lsmt);
+ writeln(s1,'while ',DelQuot(liwhd.Condition),' do');
+ //if not GetTPasImplBlock(TPasImplBlock(liwhd.Body),0) then // !!Bug: BODY Not used
+ GetTPasImplBlock(TPasImplBlock(liwhd),lindent,0,DoNoSem,false); //OK for all constructs
+ DoNoSem:=false; //?
+ DoSem:=false;
+ end
+ else if lsmt is TPasImplExceptOn then
+ begin
+ lieo:=TPasImplExceptOn(lsmt);
+ writeln(s,'on ',lieo.VariableName,': ',lieo.TypeName,' do');
+ if TPasImplBlock(lieo.Body) is TPasImplRaise then
+ begin
+ write(s,'raise ');//raise is in TPasImplBlock in this case
+ GetTPasImplBlock(TPasImplBlock(lieo.Body),lindent+1,0,false,true);
+ end
+ else GetTPasImplBlock(TPasImplBlock(lieo.Body),lindent+1,0,false,false);
+ DoSem:=false;
+ end
+ else if lsmt is TPasImplForLoop then
+ begin
+ lifl:=TPasImplForLoop(lsmt);
+ //TODO variable
+ write(s1,'for ',lifl.VariableName,':= ',lifl.StartValue,' ');
+ if lifl.Down then write('down');
+ writeln('to ',lifl.EndValue,' do');
+ GetTPasImplBlock(TPasImplBlock(lifl),lindent+1,0,false,false);
+ DoSem:=false;
+ end
+ else if lsmt is TPasImplRaise then
+ begin
+ write(s1,'raise ');
+ lir:=TPasImplRaise(lsmt);
+ if not GetTPasImplBlock(TPasImplBlock(lir),lindent,0,DoNoSem,true) then
+ writeln(';');
+ DoNoSem:=false;
+ DoSem:=false;
+ end
+ else
+ begin
+ if assigned(lsmt.Elements) then
+ begin
+ writeln('{ Unknown SMT(s): '); //,lsmt.Name,' ',lsmt.ElementTypeName);
+ for l:=0 to lsmt.Elements.Count-1 do
+ write(s,' SMT ',l,' ',TPasElement(lsmt.Elements[l]).Name);
+ writeln('}');
+ end;
+ DoSem:=false;
+ end;
+ if not DoNoSem then
+ begin
+ if DoSem then writeln(';');
+ end
+ else writeln;
+end;
+
+
+ //result: result of TPasImplBlock or valid element
+ //NoFirstIndent only for block in case:
+ function GetTPasImplElement(le:TPasImplElement; lindent:integer;
+ lLastNoSem,NoFirstIndent:boolean):boolean;
+ var liie:TPasImplIfElse;
+ lico:TPasImplCaseOf;
+ lice:TPasImplCaseElse;
+ liru:TPasImplRepeatUntil;
+ lit:TPasImplTry;
+ //lic:TPasImplCommand;
+ s,s1:String;//s1 only first line of block statement
+
begin
- if Paramcount<1 then
+ Result:=true;
+ s:=GetIndent(lindent);
+ if NoFirstIndent then s1:=' ' else s1:=s;
+ if le is TPasImplStatement then
+ begin
+ if NoFirstIndent then lindent:=0;
+ GetTPasSmt(TPasImplStatement(le),lindent+1,lLastNoSem,NoFirstIndent);
+ end
+ else if le is TPasImplIfElse then
+ begin
+ liie:=TPasImplIfElse(le);
+ write(s1,'if ',DelQuot(liie.Condition),' then ');
+ if assigned(liie.ElseBranch) then
+ begin
+ writeln;
+ GetTPasImplElement(liie.IfBranch,lindent+1,true,false);
+ writeln(s,'else');// {if}');
+ GetTPasImplElement(liie.ElseBranch,lindent+1,lLastNoSem,false);
+ end
+ else
+ begin //no else part
+ if assigned(liie.IfBranch) then
+ begin
+ writeln;
+ if not GetTPasImplElement(liie.IfBranch,lindent+1,false,false) then
+ writeln(';');
+ end
+ else writeln(';'); //empty if then;
+ end;
+ end
+ else if le is TPasImplCaseOf then
+ begin
+ lico:=TPasImplCaseOf(le);
+ writeln(s1,'case ',lico.Expression,' of ');
+ if assigned(lico.ElseBranch) then //workaround duplicate bug
+ begin //reduce count of CaseOf as CaseElse is in there
+ lice:=lico.ElseBranch;
+ GetTPasImplBlock(TPasImplBlock(lico),lindent+1,1,false,false);
+ end
+ else GetTPasImplBlock(TPasImplBlock(lico),lindent+1,0,false,false); // !! else duplicate in here
+ if assigned(lico.ElseBranch) then
+ begin
+ writeln(s,'else');//' {case}');
+ lice:=lico.ElseBranch;
+ GetTPasImplBlock(TPasImplBlock(lice),lindent+1,0,false,false);
+ end;
+ if lLastNoSem then writeln(s,'end')//' {case}')
+ else writeln(s,'end;');// {case}');
+ //Result:=false; ??? GetTPasImplBlock
+ end
+ else if le is TPasImplRepeatUntil then
+ begin
+ liru:=TPasImplRepeatUntil(le);
+ writeln(s1,'repeat');
+ GetTPasImplBlock(TPasImplBlock(liru),lindent+1,0,false,false);
+ write(s,'until ',DelQuot(liru.Condition));
+ if lLastNoSem then writeln
+ else writeln(';');
+ end
+ else if le is TPasImplTryFinally then
+ begin
+ writeln(s,'finally');
+ GetTPasImplBlock(TPasImplBlock(le),lindent+1,0,false,false);
+ end
+ else if le is TPasImplTryExcept then
+ begin
+ writeln(s,'except');
+ GetTPasImplBlock(TPasImplBlock(le),lindent+1,0,false,false);
+ end
+ else if le is TPasImplTryExceptElse then
+ begin
+ writeln(s,'else');// {try}');
+ GetTPasImplBlock(TPasImplBlock(le),lindent+1,0,false,false);
+ end
+ else if le is TPasImplTry then
+ begin
+ lit:=TPasImplTry(le);
+ writeln(s1,'try');
+ GetTPasImplBlock(TPasImplBlock(le),lindent+1,0,false,false);
+ if assigned(lit.FinallyExcept) then
+ GetTPasImplElement(TPasImplElement(lit.FinallyExcept),lindent+1,false,false);
+ if assigned(lit.ElseBranch) then
+ GetTPasImplElement(TPasImplElement(lit.ElseBranch),lindent+1,false,false);
+ if lLastNoSem then writeln(s,'end')// {try} ') //there is no ImplBeginBlock
+ else writeln(s,'end;');// {try} ');
+ end
+ else if le is TPasImplCommand then
+ begin
+ //ignore because empty
+ // lic:=TPasImplCommand(le);
+ // writeln(' CMD ',lic.Command,' ',lic.Name,' ',lic.ElementTypeName);
+ end
+ else if le is TPasImplLabelMark then
+ begin
+ writeln(s1,'label ',TPasImplLabelMark(le).LabelId,';');
+ end
+ else if le is TPasImplBlock then
+ begin
+ //IfElse, case:
+ Result:=GetTPasImplBlock(TPasImplBlock(le),lindent+1,0,lLastNoSem,NoFirstIndent);
+ end
+ else
+ begin
+ Result:=false;
+ //writeln(s,';');
+ //writeln(' EL ',l);//,' ',le.Name)//,' ',le.ElementTypeName,' ',le.FullName);
+ end;
+ end;
+
+// indent: indent from page left side
+// DecListBy: dec(elements.count) because of case duplicate else bug
+// LastNoSem: only true on last expr before else in a if clause
+// NoFirstIndent: if line was started by other block like in case at -> 1:Noindent;
+// Result: true if elements not empty
+function GetTPasImplBlock(lb:TPasImplBlock; indent,declistby:integer;
+ LastNoSem,NoFirstIndent:boolean):boolean;
+ var l,n:integer;
+ lbe:TPasImplElement;
+ NoSem:boolean;
+ ls:String;
+
+begin
+ Result:=false;
+ NoSem:=false;
+ ls:=GetIndent(indent);
+ if not assigned(lb) then exit;
+ //if lb is TPasImplRaise then writeln('RAISE');
+ if assigned(lb.Elements) then
+ begin
+ if lb is TPasImplBeginBlock then
+ begin
+ NoSem:=LastNoSem;
+ LastNoSem:=false;
+ if NoFirstIndent then
+ begin
+ writeln('begin');////NFI');
+ NoFirstIndent:=false;
+ end
+ else writeln(ls,'begin');
+ inc(indent);
+ end;
+
+ if lb.Elements.Count >0 then
+ begin
+ Result:=true;
+ n:=lb.Elements.Count-1;
+ //workaround CaseOf duplicate bug
+ if (declistby >0)and(lb.Elements.Count >declistby) then dec(n,declistby);
+ for l:=0 to n do
+ begin
+ lbe:=TPasImplElement(lb.Elements[l]);
+ //write(l:2,'/',n:2,' '); //No of curent element, max element
+ if ((l = 0)and NoFirstIndent) then
+ begin //index0
+ if l=n then GetTPasImplElement(lbe,0,LastNoSem,false)
+ else GetTPasImplElement(lbe,0,false,false)
+ end
+ else if l<>n then GetTPasImplElement(lbe,indent,false,false) //other index
+ else GetTPasImplElement(lbe,indent,LastNoSem,false); //indexn
+ end;
+ end
+ else
+ begin //block is empty
+ //write(ls,' {!EMPTY!}');
+ {if not NoSem then
+ begin
+ if lb is TPasImplBeginBlock then writeln //empty compound need no ;
+ else writeln(';')
+ end
+ else
+ writeln;}
+ end;
+ if lb is TPasImplBeginBlock then
+ if not NoSem then writeln(ls,'end;')// {Block}')
+ else writeln(ls,'end');// {Block}');
+ end
+ else
+ writeln(';'); //writeln(' {!empty!};')
+end;
+
+
+//# Declarations (type,var,const,..)
+
+procedure GetTPasArrayType(lpat:TPasArrayType);
+ begin
+ if lpat.IsPacked then write('packed ');
+ write('Array');
+ if lpat.IndexRange <> '' then write('[',lpat.IndexRange,']');
+ if assigned(lpat.ElType) then write(' of ',lpat.ElType.Name);
+ // BUG: of const missing in Procedure ConstArrayArgProc(A: Array of const); pparser: 643
+ end;
+
+//write out one variable or constant declaration, also used in types
+//In spite of the use of GetPasVariables this is still used !
+procedure GetTPasVar(lpv:TPasVariable; lindent:integer; NoLF:boolean);//BUG string[] pparser: 482
+ var i,j:integer;
+ //lppt:TPasProcedureType;
+ //lpa:TPasArgument;
+ //lpat:TPasArrayType;
+ s,s1:string;
+ prct:TPasRecordType;
+
+ begin
+ if not Assigned(lpv) then exit;
+ s:=GetIndent(lindent);
+ write(s,lpv.Name);//,' ',lpv.value,' ',lpv.Modifiers,' ',lpv.AbsoluteLocation);
+ if assigned(lpv.VarType) then
+ begin
+ //if TPasType(lpa.ArgType).ElementTypeName <>'unresolved type reference' then
+ //,TPasType(lpa.ArgType).Name,' ');//,TPasType(lpa.ArgType).FullName,TPasType(lpa.ArgType).ElementTypeName)
+ // PParser 2099: ArgType := nil; if IsUntyped then => Arg.ArgType := ArgType;
+ // else write(':? ');
+ write(': ');
+ if lpv.VarType is TPasArrayType then
+ begin
+ GetTPasArrayType(TPasArrayType(lpv.VarType));
+ end
+ else if lpv.VarType is TPasSetType then
+ begin
+ write('set of ',TPasSetType(lpv.VarType).EnumType.Name);
+ end
+ else
+ begin
+ if lpv.VarType is TPasPointerType then
+ write('^',TPasPointerType(lpv.VarType).DestType.Name)
+ else if lpv.VarType is TPasRecordType then //var record
+ begin
+ j:=lindent+Length(lpv.Name)+4;
+ s1:=GetIndent(j);
+ prct:=TPasRecordType(lpv.VarType);
+ if prct.IsBitPacked then write('bitpacked ');
+ if prct.IsPacked then write('packed ');
+ writeln('Record');
+ for i:=0 to prct.Members.Count-1 do
+ begin
+ GetTPasVar(TPasVariable(prct.Members[i]),j+1,false);
+ end;
+ write(s1,'end');
+ end
+ else
+ begin
+ write(TPasType(lpv.VarType).Name);
+ //if TPasType(lpv.VarType) is TPasAliasType then write(TPasAliasType(lpv.VarType).Name);
+ end;
+ end;
+ end;
+ if lpv.Value <> '' then write('=',lpv.Value);
+ if assigned(lpv.Expr) then // var ?, const AnArrayConst : Array[1..3] of Integer = (1,2,3);
+ begin
+ write('=');
+ GetTPasExpr(lpv.Expr);
+ end;
+
+ if lpv.Modifiers <>'' then //Modifiers starts with ;
+ begin
+ write(' ',lpv.Modifiers,';');
+ if GetTPasMemberHints(lpv.Hints) then write(';');
+ end
+ else
begin
- // remember to put the whole cmdline in quotes, and
- // to always add some path options. Even if only -Fu. -Fi.
- writeln('usage: test_parser <commandline>');
- halt;
+ GetTPasMemberHints(lpv.Hints);
+ write(';');
end;
- cmdl:=paramstr(1);
- if paramcount>1 then
- for i:=2 to paramcount do
- cmdl:=cmdl+' '+paramstr(i);
+ if not NoLF then writeln;
+ end;
+
+//write out a list of variables only
+//more compact than the output of seperate calls of GetTPasVar
+procedure GetPasVariables(vl:TList; lindent:integer; NoLF,NoSEM:boolean);
+ var v,i,j:integer;
+ s,s1:string;
+ prct:TPasRecordType;
+ lpv:TPasVariable;
+
+ same:boolean;
+ samestr,tmpstr:Ansistring;
+ samevar:array of integer;
+ svi:integer;
+
+ begin
+ if vl.Count <= 0 then exit;
+ s:=GetIndent(lindent);
+ //> compare all variable types as string to find the ones with same type
+ samestr:='';
+ svi:=0;
+ SetLength(samevar,vl.count);
+ for v:=0 to vl.count-1 do
+ begin
+ tmpstr:='';
+ same:=true;
+ lpv:=TPasVariable(vl[v]);
+ //write(s,lpv.Name);
+ if assigned(lpv.VarType) then
+ begin
+ tmpstr:=tmpstr+': ';
+ if lpv.VarType is TPasArrayType then
+ begin
+ //GetTPasArrayType(TPasArrayType(lpv.VarType));
+ tmpstr:=tmpstr+'array'+TPasArrayType(lpv.VarType).IndexRange;
+ if assigned(TPasArrayType(lpv.VarType).ElType) then
+ tmpstr:=tmpstr+TPasArrayType(lpv.VarType).ElType.Name;
+ end
+ else if lpv.VarType is TPasSetType then
+ begin
+ tmpstr:=tmpstr+'set of '+TPasSetType(lpv.VarType).EnumType.Name;
+ end
+ else
+ begin
+ if lpv.VarType is TPasPointerType then
+ tmpstr:=tmpstr+'^'+TPasPointerType(lpv.VarType).DestType.Name
+ else if lpv.VarType is TPasRecordType then //var record
+ begin
+ prct:=TPasRecordType(lpv.VarType);
+ if prct.IsBitPacked then tmpstr:=tmpstr+'bitpacked ';
+ if prct.IsPacked then tmpstr:=tmpstr+'packed ';
+ tmpstr:=tmpstr+'Record ';
+ for i:=0 to prct.Members.Count-1 do
+ begin
+ //todo
+ //GetTPasVar(TPasVariable(prct.Members[i]),j+1,false);
+ end;
+ tmpstr:=tmpstr+'end';
+ end
+ else
+ begin
+ tmpstr:=tmpstr+TPasType(lpv.VarType).Name;
+ end;
+ end;
+ end
+ else same:=false;
+ if lpv.Value <> '' then same:=false;//=
+ if assigned(lpv.Expr) then // var ?, const AnArrayConst : Array[1..3] of Integer = (1,2,3);
+ begin
+ same:=false;//=
+ end;
+ if lpv.Modifiers <>'' then //Modifiers starts with ;
+ begin
+ tmpstr:=tmpstr+' '+lpv.Modifiers+';';
+ tmpstr:=tmpstr+ReturnTPasMemberHints(lpv.Hints);
+ end
+ else
+ begin
+ tmpstr:=tmpstr+ReturnTPasMemberHints(lpv.Hints);
+ end;
+ //if v = 0 then begin samestr:=tmpstr; end;
+ if (not same)or(samestr <> tmpstr) then
+ begin
+ samestr:=tmpstr;
+ inc(svi);
+ end;
+ samevar[v]:=svi;
+ end;
+ //compare <
+ //now print them
+ svi:=-1;
+ for v:=0 to vl.count-1 do
+ begin
+ lpv:=TPasVariable(vl[v]);
+ if not Assigned(lpv) then continue;
+ if svi <> samevar[v] then
+ begin
+ svi:=samevar[v];
+ if v>0 then writeln;
+ write(s,lpv.Name);//variblenname
+ end
+ else write(lpv.Name);
+ if (v < vl.Count-1)and(samevar[v+1]=svi) then write(',')
+ else
+ begin
+ if assigned(lpv.VarType) then
+ begin
+ write(': ');
+ if lpv.VarType is TPasArrayType then
+ begin
+ GetTPasArrayType(TPasArrayType(lpv.VarType));
+ end
+ else if lpv.VarType is TPasSetType then
+ begin
+ write('set of ',TPasSetType(lpv.VarType).EnumType.Name);
+ end
+ else
+ begin
+ if lpv.VarType is TPasPointerType then
+ write('^',TPasPointerType(lpv.VarType).DestType.Name)
+ else if lpv.VarType is TPasRecordType then //var record
+ begin
+ j:=lindent+Length(lpv.Name)+4;
+ s1:=GetIndent(j);
+ prct:=TPasRecordType(lpv.VarType);
+ if prct.IsBitPacked then write('bitpacked ');
+ if prct.IsPacked then write('packed ');
+ writeln('Record');
+ {for i:=0 to prct.Members.Count-1 do
+ begin
+ GetTPasVar(TPasVariable(prct.Members[i]),j+1,false);
+ end;}
+ if prct.Members.Count > 0 then
+ GetPasVariables(prct.Members,j+1,false,false);
+ write(s1,'end');
+ end
+ else
+ begin
+ write(TPasType(lpv.VarType).Name);
+ end;
+ end;
+ end;
+ if lpv.Value <> '' then write('=',lpv.Value);
+ if assigned(lpv.Expr) then // var ?, const AnArrayConst : Array[1..3] of Integer = (1,2,3);
+ begin
+ write('=');
+ GetTPasExpr(lpv.Expr);
+ end;
+
+ if lpv.Modifiers <>'' then //Modifiers starts with ;
+ begin
+ write(' ',lpv.Modifiers,';');
+ if GetTPasMemberHints(lpv.Hints) then write(';');
+ end
+ else
+ begin
+ GetTPasMemberHints(lpv.Hints);
+ if (v < vl.Count-1) then write(';')
+ else if (not NoSEM) then write(';');
+ end;
+ //if not NoLF then writeln;
+ end;
+ end;
+ if not NoLF then writeln;
+ end;
+
+
+procedure GetTypes(pe:TPasElement; lindent:integer);
+ var i,j,k:integer;
+ s,s1,s2:string;
+ pet:TPasEnumType;
+ pev:TPasEnumValue;
+
+ prt:TPasRangeType;
+ prct:TPasRecordType;
+ pv:TPasVariant;
+ pst:TPasSetType;
+
+
+ function GetVariantRecord(pe:TPasElement; lindent:integer):boolean;
+ var i,j,k:integer;
+ prct:TPasRecordType;
+ pv:TPasVariant;
+ s,s1:string;
+
+ begin
+ Result:=false;
+ j:=lindent+Length(pe.Name)+2;
+ s:=GetIndent(lindent);
+ s1:=GetIndent(lindent+2);
+ prct:=TPasRecordType(pe);
+ {Now i use GetPasVariables for more compact output
+ for i:=0 to prct.Members.Count-1 do
+ begin
+ GetTPasVar(TPasVariable(prct.Members[i]),1,true);
+ end;}
+ if prct.Members.Count > 0 then GetPasVariables(prct.Members,1,true,true);
+ if assigned(prct.Variants) then
+ begin
+ Result:=true;
+ writeln(';');
+ write(s,'case ');
+ if prct.VariantName <>'' then write(prct.VariantName,'=');
+ write(TPasType(prct.VariantType).Name);
+ writeln(' of');
+ if assigned(prct.Variants)then
+ if prct.Variants.Count >0 then
+ begin
+ for i:=0 to prct.Variants.Count-1 do
+ begin
+ pv:=TPasVariant(prct.Variants[i]);
+ write(s1,pv.Name);
+ for k:=0 to pv.Values.Count-1 do write(pv.Values[k]);
+ write(': (');
+ if GetVariantRecord(TPasElement(pv.Members),j+1) then
+ writeln(s1,');')
+ else writeln(');');
+ end;
+ end;
+ end;
+ end;
+
+ begin
+ s:=GetIndent(lindent);
+ write(s,pe.Name,'=');
+ if pe is TPasArrayType then
+ begin
+ GetTPasArrayType(TPasArrayType(pe));
+ writeln(';');
+ end
+ else if pe is TPasEnumType then
+ begin
+ pet:=TPasEnumType(pe);
+ write('(');
+ if pet.Values.Count > 0 then
+ begin
+ for j:=0 to pet.Values.Count-2 do
+ begin
+ pev:=TPasEnumValue(pet.Values[j]);
+ write(pev.name,',');
+ //pev.Value ?
+ //pev.AssignedValue ?
+ //pev.IsValueUsed ?
+ end;
+ pev:=TPasEnumValue(pet.Values[pet.Values.Count-1]);
+ write(pev.name);
+ end;
+ writeln(');');
+ end
+ else if pe is TPasFileType then
+ begin
+ writeln('file of ',TPasFileType(pe).ElType.Name,';');
+ end
+ else if pe is TPasProcedureType then
+ begin
+ writeln('procedure');
+ end
+ else if pe is TPasPointerType then
+ begin
+ //writeln('pointer');
+ writeln('^',TPasPointerType(pe).DestType.Name,';');
+ end
+ else if pe is TPasRangeType then
+ begin
+ prt:=TPasRangeType(pe);
+ writeln(prt.RangeStart,'..',prt.RangeEnd,';');
+ end
+ else if pe is TPasRecordType then
+ begin
+ j:=lindent+Length(pe.Name)+2;
+ s1:=GetIndent(j);
+ s2:=GetIndent(j+1);
+ prct:=TPasRecordType(pe);
+ if prct.IsBitPacked then write('bitpacket ');
+ if prct.IsPacked then write('packet');
+ writeln('record');
+ {Now i use GetPasVariables for more compact output
+ for i:=0 to prct.Members.Count-1 do
+ begin
+ GetTPasVar(TPasVariable(prct.Members[i]),j+1,false);
+ end;}
+ GetPasVariables(prct.Members,j+2,false,false);
+ if assigned(prct.Variants) then
+ begin
+ write(s1,'case ');
+ if prct.VariantName <>'' then write(prct.VariantName,'=');
+ write(TPasType(prct.VariantType).Name);
+ writeln(' of');
+ if assigned(prct.Variants)then
+ if prct.Variants.Count >0 then
+ begin
+ for i:=0 to prct.Variants.Count-1 do
+ begin
+ pv:=TPasVariant(prct.Variants[i]);
+ write(s2,pv.Name);
+ for k:=0 to pv.Values.Count-1 do write(pv.Values[k]);
+ write(': (');
+ if GetVariantRecord(TPasElement(pv.Members),j+2) then
+ writeln(s2,');')
+ else writeln(');');
+ end;
+ end;
+ end;
+ writeln(s1,'end;');
+ end
+ else if pe is TPasSetType then
+ begin
+ pst:=TPasSetType(pe);
+ writeln('set of ',pst.EnumType.Name,';');
+ end
+ else if pe is TPasClassOfType then writeln('Class of ',TPasClassOfType(pe).DestType.Name,';')
+ else
+ begin
+
+ writeln('{ Unknown TYPE(s): ');
+ writeln(s,pe.Name);
+ writeln('}');
+ writeln;
+ end;
+ end;
+
+
+ function GetTPasArgumentAccess(acc:TArgumentAccess):String;
+ begin
+ Result:='';
+ case acc of
+ //argDefault:Result:='default'; //normal proccall is default
+ argConst:Result:='const';
+ argVar:Result:='var';
+ argOut:Result:='out';
+ end;
+ end;
+
+ procedure GetTCallingConvention(cc:TCallingConvention); //TODO: test it
+ begin
+ case cc of
+ //ccDefault:write(' default;'); //normal proccall is default
+ ccRegister:WriteFmt(true,'Register;',false);
+ ccPascal :WriteFmt(true,'Pascal;',false);
+ ccCDecl :WriteFmt(true,'CDecl;',false);
+ ccStdCall :WriteFmt(true,'StdCall;',false);
+ ccOldFPCCall:WriteFmt(true,'OldFPCall;',false);
+ ccSafeCall:WriteFmt(true,'SaveCall;',false);
+ end;
+ end;
+
+ procedure GetHiddenModifiers(Mfs:TProcedureModifiers);
+ begin
+ if pmInline in Mfs then WriteFmt(true,'inline;',false);
+ if pmAssembler in Mfs then WriteFmt(true,'assembler;',false);
+ if pmVarargs in Mfs then WriteFmt(true,'varargs;',false);
+ if pmCompilerProc in Mfs then WriteFmt(true,'compilerproc;',false);
+ if pmExtdecl in Mfs then WriteFmt(true,'extdecl;',false);
+ end;
+
+ procedure GetTPasProcedure(lpp:TPasProcedure; indent:integer);
+ var l:integer;
+ lppt:TPasProcedureType;
+ lpa:TPasArgument;
+ s:String;
+
+ same:boolean;
+ samevar:array of integer;//same index same type
+ aktaa:TArgumentAccess;
+ aktname,tmpname:String;
+ svi:integer;
+
+ begin
+ if not Assigned(lpp) then exit;
+ s:=GetIndent(indent);
+ if lpp is TPasConstructor then write(s,'Constructor ')
+ else if TPasElement(lpp) is TPasConstructorImpl then write(s,'Constructor ')
+ else if lpp is TPasDestructor then write(s,'Destructor ')
+ else if TPasElement(lpp) is TPasDestructorImpl then write(s,'Destructor ')
+ else if lpp is TPasClassProcedure then write(s,'Class Procedure ') //pparser.pp: 3221
+ else if lpp is TPasClassFunction then write(s,'Class Function ')
+ else if lpp is TPasFunction then write(s,'Function ')
+ else write(s,'Procedure ');
+ write(lpp.Name);//,' ',lpp.TypeName);
+ if assigned(lpp.ProcType) then
+ begin
+ lppt:=lpp.ProcType;
+ if assigned(lppt.Args) and (lppt.Args.Count > 0) then
+ begin
+ write('(');
+ if lppt.Args.Count > 0 then
+ begin
+ //produce more compact output than the commented block below
+ //>find same declaration
+ //look ahead what is the same
+ SetLength(samevar,lppt.Args.Count);
+ svi:=0;
+ aktname:='';
+ for l:=0 to lppt.Args.Count-1 do
+ begin
+ same:=true;
+ tmpname:='';
+ lpa:=TPasArgument(lppt.Args.Items[l]);
+ if assigned(lpa.ArgType) then
+ begin
+ if lpa.ArgType is TPasArrayType then
+ begin
+ if assigned(TPasArrayType(lpa.ArgType).ElType) then tmpname:=TPasArrayType(lpa.ArgType).ElType.Name;
+ end
+ else tmpname:=TPasType(lpa.ArgType).Name;
+ end;
+ if l=0 then begin aktaa:=lpa.Access; aktname:=tmpname; end;
+ if lpa.Access <> aktaa then begin same:=false; aktaa:=lpa.Access; end;//access type
+ if (tmpname = '')or(tmpname <> aktname) then begin same:=false; aktname:=tmpname; end;//type name
+ if lpa.Value <> '' then same:=false;//var=value
+ if not same then inc(svi);
+ samevar[l]:=svi;
+ end;
+ //find same declaration<
+ svi:=-1;
+ same:=false;
+ for l:=0 to lppt.Args.Count-1 do
+ begin
+ lpa:=TPasArgument(lppt.Args.Items[l]);
+ if svi <> samevar[l] then
+ begin
+ svi:=samevar[l];
+ if lpa.Access <> argDefault then write(GetTPasArgumentAccess(lpa.Access),' ');
+ write(lpa.Name);//variblenname
+ end
+ else write(lpa.Name);
+ if (l < lppt.Args.Count-1)and(samevar[l+1]=svi) then write(',')
+ else
+ begin
+ if assigned(lpa.ArgType) then
+ begin
+ write(': ');
+ if lpa.ArgType is TPasArrayType then
+ GetTPasArrayType(TPasArrayType(lpa.ArgType))
+ else write(TPasType(lpa.ArgType).Name);
+ end;
+ if lpa.Value <> '' then write('=',lpa.Value);
+ if l< lppt.Args.Count-1 then write('; ');
+ end;
+ end;
+ {//simple version duplicates declarations of same type
+ for l:=0 to lppt.Args.Count-1 do
+ begin
+ lpa:=TPasArgument(lppt.Args.Items[l]);
+ if lpa.Access <> argDefault then write(GetTPasArgumentAccess(lpa.Access),' ');
+ write(lpa.Name);//variblenname
+ if assigned(lpa.ArgType) then
+ begin
+ //if TPasType(lpa.ArgType).ElementTypeName <>'unresolved type reference' then
+ //,TPasType(lpa.ArgType).Name,' ');
+ //,TPasType(lpa.ArgType).FullName,TPasType(lpa.ArgType).ElementTypeName)
+ // PParser 2099: ArgType := nil; if IsUntyped then => Arg.ArgType := ArgType;
+ // else write(':? ');
+ write(': ');
+ if lpa.ArgType is TPasArrayType then
+ begin
+ GetTPasArrayType(TPasArrayType(lpa.ArgType));
+ end
+ else write(TPasType(lpa.ArgType).Name);
+ end;
+ if lpa.Value <> '' then write('=',lpa.Value);
+ if l< lppt.Args.Count-1 then write('; ');
+ end;}
+ end;
+ write(')');
+ end;
+ if lppt.IsOfObject then write(' of Object');
+ if (TPasElement(lpp) is TPasFunction)or(TPasElement(lpp) is TPasClassFunction) then
+ write(': ',TPasFunctionType(lpp.ProcType).ResultEl.ResultType.Name);
+ end;
+ //writeln(';');
+ WriteFmt(false,'',true);
+ if lpp.IsVirtual then WriteFmt(true,'virtual;',false);
+ if lpp.IsOverload then WriteFmt(true,'overload;',false);
+ if lpp.IsAbstract then WriteFmt(true,'abstract;',false);
+ if lpp.IsDynamic then WriteFmt(true,'dynamic;',false);
+ if lpp.IsOverride then WriteFmt(true,'override;',false);
+ if lpp.IsExported then WriteFmt(true,'exported;',false);
+ if lpp.IsExternal then WriteFmt(true,'external;',false);
+ //pparser 2360: everyting behind external is ignored !!!
+ if lpp.IsMessage then
+ begin
+ write('message ');
+ if lpp.MessageType = pmtString then writeln(false,lpp.MessageName,true)
+ else WriteFmt(false,lpp.MessageName,true);//pmtInteger
+ end;
+ if lpp.IsReintroduced then WriteFmt(true,'reintroduce;',false);
+ if lpp.IsStatic then WriteFmt(true,'static;',false);
+ if lpp.IsForward then WriteFmt(true,'forward;',false);
+ GetHiddenModifiers(lpp.Modifiers);
+ GetTCallingConvention(lpp.CallingConvention);
+ if GetTPasMemberHints(TPasElement(lpp).Hints) then WriteFmt(false,'',true); //BUG ? missing hints
+ if not Unformated then writeln;
+ end;
+
+ procedure GetTPasProcedureBody(pb:TProcedureBody; indent:integer);
+ var j:integer;
+ pd:TPasDeclarations;
+ pib:TPasImplBlock;
+ begin
+ if assigned(pb) then
+ begin
+ if assigned(pb.Body)then
+ begin
+ if assigned(TPasDeclarations(pb).Functions)then
+ begin
+ pd:=TPasDeclarations(pb);
+ if isim then
+ begin
+ //writeln;
+ GetDecls(pd,indent+1); //~recursion
+ //PrintDecls(pd,indent+1); //~recursion
+ end
+ else
+ if pd.Functions.Count >0 then //sub-functions
+ begin
+ for j:=0 to pd.Functions.Count-1 do
+ GetTPasProcedure(TPasProcedure(pd.Functions[j]),indent+1);
+ end;
+ end;
+ pib:=TPasImplBlock(pb.Body);
+ if assigned(pib) then
+ begin
+ GetTPasImplBlock(pib,indent,0,false,false); //indent depend on sub function level
+ if not Unformated then writeln; //('//block');
+ end;
+ end;
+ end;
+ end;
+
+ procedure GetTpasOverloadedProc(pop:TPasOverloadedProc; indent:integer);
+ var pp:TPasProcedure;
+ j:integer;
+ begin
+ if assigned(pop) then
+ begin
+ if pop.Overloads.Count >0 then
+ begin
+ for j:=0 to pop.Overloads.Count-1 do
+ begin
+ pp:=TPasProcedure(pop.Overloads[j]);
+ GetTPasProcedure(pp,indent);
+ GetTPasProcedureBody(pp.Body,indent);
+ end;
+ end;
+ end;
+ end;
+
+ function GetVisibility(v:TPasMemberVisibility):String;
+ begin
+ Result:='';
+ case v of
+ //visDefault:Result:='default';
+ visPrivate:Result:='private';
+ visProtected:Result:='protected';
+ visPublic:Result:='public';
+ visPublished:Result:='published';
+ visAutomated:Result:='automated';
+ visStrictPrivate:Result:='strictprivate';
+ visStrictProtected:Result:='strictprotected';
+ end;
+ end;
+
+ procedure GetTPasClass(pc:TPasClassType; indent:integer);
+ var j,l:integer;
+ s,s1,s2:String;
+ lpe:TPasElement;
+ lpp:TPasProperty;
+ lpa:TPasArgument;
+ vis:TPasMemberVisibility;
+ vars:TList;
+ IsVar:boolean;
+
+ procedure PrintVars;
+ begin
+ if vars.Count > 0 then GetPasVariables(vars,indent+1,false,false);
+ IsVar:=False;
+ vars.Clear;
+ end;
+
+ begin
+ if assigned(pc) then
+ begin
+ s:=GetIndent(indent);
+ write(s,pc.Name,'=');
+ if pc.IsPacked then write('packed ');
+ case pc.ObjKind of
+ okObject:write('Object');
+ okClass:write('Class');
+ okInterface:write('Interface');
+ end;
+ if assigned(pc.AncestorType) and (pc.AncestorType.ElementTypeName <> '') then
+ write('(',pc.AncestorType.Name,')');
+
+ if pc.IsForward or pc.IsShortDefinition then //pparser.pp: 3417 :class(anchestor); is allowed !
+ begin
+ writeln(';');
+ exit;
+ end;
+ //Members: TList;
+ //InterfaceGUID: String;
+ //ClassVars: TList; //is this always empty ?
+ //Modifiers: TStringList;
+ //Interfaces: TList;
+ s1:=GetIndent(indent+1);
+ s2:=GetIndent(indent+2);
+ if pc.Members.Count > 0 then
+ begin
+ writeln;
+ vars:=TList.Create;
+ IsVar:=false;
+ for j:=0 to pc.Members.Count-1 do
+ begin
+ lpe:=TPasElement(pc.Members[j]);
+
+ //Class visibility, written on change
+ if j=0 then
+ begin
+ vis:=lpe.Visibility;
+ if GetVisibility(vis) <> '' then writeln(s1,GetVisibility(vis));
+ end
+ else
+ if vis <> lpe.Visibility then
+ begin
+ if IsVar then PrintVars;
+ if lpe.Visibility <> visDefault then //Class Function = visDefault
+ begin
+ vis:=lpe.Visibility;
+ if GetVisibility(vis) <> '' then writeln(s1,GetVisibility(vis));
+ end;
+ end;
+
+ if lpe is TPasOverloadedProc then
+ begin
+ if IsVar then PrintVars;
+ GetTPasOverloadedProc(TPasOverloadedProc(lpe),indent+2);
+ end
+ else if lpe is TPasProcedure then //TPasClassProcedure and
+ begin //TPasClassFunction are both child of TPasProcedure
+ if IsVar then PrintVars;
+ GetTPasProcedure(TPasProcedure(lpe),indent+2);
+ end
+ else if lpe is TPasProperty then
+ begin
+ if IsVar then PrintVars;
+ lpp:=TPasProperty(lpe);
+ write(s2,'property ',lpp.Name);
+ if lpp.Args.Count >0 then
+ begin
+ for l:=0 to lpp.Args.Count-1 do
+ begin
+ lpa:=TPasArgument(lpp.Args.Items[l]);
+ if GetTPasArgumentAccess(lpa.Access) <> '' then
+ write('[',GetTPasArgumentAccess(lpa.Access),' ',lpa.Name)
+ else write('[',lpa.Name); //variblename
+ if assigned(lpa.ArgType) then
+ begin
+ //if TPasType(lpa.ArgType).ElementTypeName <>'unresolved type reference' then
+ //,TPasType(lpa.ArgType).Name,' ');
+ //,TPasType(lpa.ArgType).FullName,TPasType(lpa.ArgType).ElementTypeName)
+ // PParser 2099: ArgType := nil; if IsUntyped then => Arg.ArgType := ArgType;
+ // else write(':? ');
+ write(': ');
+ if lpa.ArgType is TPasArrayType then
+ begin
+ GetTPasArrayType(TPasArrayType(lpa.ArgType));
+ end
+ else write(TPasType(lpa.ArgType).Name);
+ end;
+ if lpa.Value <> '' then write('=',lpa.Value);
+ write(']');
+ end;
+ end;//args
+ if assigned(lpp.VarType) then
+ begin
+ write(': ',TPasType(lpp.VarType).Name);
+ end;
+ if lpp.IndexValue <> '' then write(' Index ',lpp.IndexValue);
+ if lpp.ReadAccessorName <> '' then write(' Read ',lpp.ReadAccessorName);
+ if lpp.WriteAccessorName <> '' then write(' Write ',lpp.WriteAccessorName);
+ if lpp.ImplementsName <> '' then write(' Implements ',lpp.ImplementsName);
+ if lpp.IsDefault then write(' Default ',lpp.DefaultValue);
+ if lpp.IsNodefault then write(' NoDefault');
+ if lpp.StoredAccessorName <> '' then write(' Stored ',lpp.StoredAccessorName);
+ GetTPasMemberHints(lpp.Hints);
+ writeln(';');
+ end
+ else if lpe is TPasVariable then
+ begin
+ //this is done with printvars
+ //GetTPasVar(TPasVariable(lpe),indent+1,false);
+ IsVar:=true;
+ vars.add(lpe);
+ end
+ else
+ begin
+ if IsVar then PrintVars;
+ writeln('{ Unknown Declaration(s) in Class/Object/Interface: ');
+ writeln(s,lpe.Name);
+ writeln('}');
+ end;
+ end;
+ //writeln(s,'end;');//'//class');
+ if IsVar then PrintVars;
+ vars.free;
+ end
+ else writeln;//(';'); //x=class(y);
+ writeln(s,'end;');
+ end;
+ end;
+
+
+procedure GetDecls(Decl:TPasDeclarations; indent:integer);
+ var i,j:integer;
+ pe:TPasElement;
+ pp:TPasProcedure;
+ ps:TPasSection;
+ s:string;
+ x:(None,ResStrings,Types,Consts,Classes,Functions,Variables,Properties);
+ l:TList;
+
+ procedure PrintVars;
+ begin
+ if l.Count > 0 then GetPasVariables(l,indent+1,false,false);
+ end;
+
+begin
+ s:=GetIndent(indent);
+ x:=None;
+ if assigned(Decl)then
+ begin
+ l:=TList.Create;
+ pe:=TPasElement(Decl);
+ if pe is TPasSection then
+ begin
+ {(Decl is TInterfaceSection)or(Decl is TImplementationSection) or
+ (Decl is TProgramSection}
+ ps:=TPasSection(pe);
+ if ps.UsesList.Count >0 then
+ begin
+ write(s,'uses ');
+ ps:=TPasSection(Decl);
+ if not Unformated then begin writeln; write(s,' '); end;
+ for i:=0 to ps.UsesList.Count-2 do
+ if UpCase(TPasElement(ps.UsesList[i]).Name) = 'SYSTEM' then continue //do not print system
+ else write(TPasElement(ps.UsesList[i]).Name,','); //as it is added by parser
+ writeln(TPasElement(ps.UsesList[ps.UsesList.Count-1]).Name,';');
+ if not Unformated then writeln;
+ end;
+ end;
+ if assigned(Decl.Declarations)and(Decl.Declarations.Count > 0) then
+ for j:=0 to Decl.Declarations.Count-1 do
+ begin
+ pe:=TPasElement(Decl.Declarations[j]);
+ if pe is TPasResString then
+ begin
+ if x = Variables then PrintVars;
+ if x <> ResStrings then
+ begin
+ if not Unformated then writeln;
+ writeln(s,'ResourceString');
+ x:=ResStrings;
+ end;
+ writeln(s,pe.Name,'=',DelQuot(TPasResString(pe).Value),';'); //too much '''
+ end
+ else if pe is TPasConst then
+ begin
+ if x = Variables then PrintVars;
+ if x <> Consts then
+ begin
+ if not Unformated then writeln;
+ writeln(s,'const');
+ x:=Consts;
+ end;
+ GetTPasVar(TPasVariable(pe),indent+1,false);
+ end
+ else if pe is TPasVariable then
+ begin
+ if x <> Variables then
+ begin
+ if not Unformated then writeln;
+ writeln(s,'var');
+ x:=Variables;
+ l.Clear;
+ end;
+ l.Add(pe);
+ //this is done with printvars
+ //GetTPasVar(TPasVariable(pe),indent+1,false);
+ end
+ else if pe is TPasClassType then
+ begin
+ if x = Variables then PrintVars;
+ if x <> Types then
+ begin
+ if not Unformated then writeln;
+ writeln(s,'Type');
+ x:=Types;
+ end;
+ GetTPasClass(TPasClassType(pe),indent+1);
+ end
+ else if pe is TPasType then
+ begin
+ if x = Variables then PrintVars;
+ if x <> Types then
+ begin
+ if not Unformated then writeln;
+ writeln(s,'Type');
+ x:=Types;
+ end;
+ GetTypes(TPasElement(pe),indent+1);
+ end
+ else if pe is TPasProcedureBase then
+ begin
+ if x = Variables then PrintVars;
+ if (x <> Functions)and not Unformated then writeln;
+ x:=Functions;
+ if pe is TPasOverloadedProc then
+ begin
+ GetTpasOverloadedProc(TPasOverloadedProc(pe),indent);
+ end
+ else
+ begin
+ pp:=TPasProcedure(pe);
+ GetTPasProcedure(pp,indent);
+ GetTPasProcedureBody(pp.Body,indent);
+ end;
+ end
+ else
+ begin
+ if x = Variables then PrintVars;
+ x:=None;
+ writeln('{ Unknown Declaration: ',pe.Name,' }');
+ end;
+ end;
+ if x = Variables then PrintVars;
+ l.Free;
+ end;
+end;
+
+{replaced by GetDecls
+ this does the same but not in true order
+
+procedure PrintDecls(Decl:TPasDeclarations; indent:integer);
+ var i:integer;
+ pe:TPasElement;
+ pp:TPasProcedure;
+ ps:TPasSection;
+ s:string;
+ istype:boolean;
+
+begin
+ istype:=false;
+ s:=GetIndent(indent);
+ if (Decl is TInterfaceSection)or(Decl is TImplementationSection) or
+ (Decl is TProgramSection) then
+ if TPasSection(Decl).UsesList.Count >0 then
+ begin
+ write(s,'uses ');
+ ps:=TPasSection(Decl);
+ if not Unformated then begin writeln; write(s,' '); end;
+ for i:=0 to ps.UsesList.Count-2 do
+ if UpCase(TPasElement(ps.UsesList[i]).Name) = 'SYSTEM' then continue //do not print system
+ else write(TPasElement(ps.UsesList[i]).Name,','); //as it is added by parser
+ writeln(TPasElement(ps.UsesList[ps.UsesList.Count-1]).Name,';');
+ if not Unformated then writeln;
+ end;
+
+ if assigned(Decl.ResStrings) then
+ if Decl.ResStrings.Count >0 then
+ begin
+ writeln('ResourceString');
+ for i := 0 to Decl.ResStrings.Count - 1 do
+ begin
+ pe:=TPasElement(Decl.ResStrings[i]);
+ writeln(s,pe.Name,'=',DelQuot(TPasResString(pe).Value),';'); //too much '''
+ end;
+ if not Unformated then writeln;
+ end;
+
+ if assigned(Decl.Consts)then
+ if Decl.Consts.Count >0 then
+ begin
+ writeln(s,'const');
+ for i:=0 to Decl.Consts.Count-1 do GetTPasVar(TPasVariable(Decl.Consts[i]),indent+1,false);
+ if not Unformated then writeln;
+ end;
+
+ if assigned(Decl.Types) then
+ if Decl.Types.Count >0 then
+ begin
+ writeln(s,'Type');
+ for i := 0 to Decl.Types.Count - 1 do
+ begin
+ GetTypes(TPasElement(Decl.Types[i]),indent+1);
+ end;
+ if not Unformated then writeln;
+ istype:=true;
+ end;
+
+ if assigned(Decl.Classes) then
+ if Decl.Classes.Count >0 then
+ begin
+ if not istype then writeln('Type');
+ for i := 0 to Decl.Classes.Count - 1 do
+ begin
+ pe:=TPasElement(Decl.Classes[i]);
+ GetTPasClass(TPasClassType(pe),indent+1);
+ if not Unformated then writeln;
+ end;
+ end;
+
+ if assigned(Decl.Variables)then
+ if Decl.Variables.Count >0 then
+ begin
+ writeln(s,'var');
+ //Now i use GetPasVariables for more compact output
+ //for i:=0 to Decl.Variables.Count-1 do GetTPasVar(TPasVariable(Decl.Variables[i]),indent+1,false);
+ GetPasVariables(Decl.Variables,indent+1,false,false);
+ if not Unformated then writeln;
+ end;
+
+ if assigned(Decl.Functions) then
+ begin
+ for i := 0 to Decl.Functions.Count - 1 do
+ begin
+ pe:=TPasElement(Decl.Functions[i]);
+ if pe is TPasOverloadedProc then
+ begin
+ GetTpasOverloadedProc(TPasOverloadedProc(pe),indent);
+ end
+ else
+ begin
+ pp:=TPasProcedure(pe);
+ GetTPasProcedure(pp,indent);
+ GetTPasProcedureBody(pp.Body,indent);
+ end;
+ end;
+ end;
+end; }
+
+//# parameter
+
+ procedure PrintUsage;
+ begin
+ writeln('usage: test_parser1 <Options> <Commandline> File');
+ writeln;
+ writeln(' <Options> : Options for test_parser1');
+ writeln(' -u : Unformated output');
+ writeln(' -OS <os> : <os> = WINDOWS, LINUX (default), FREEBSD, NETBSD,');
+ writeln(' SUNOS, BEOS, QNX, GO32V2');
+ writeln(' -CPU <cpu> : <cpu> = i386 (default), x86_64');
+ writeln(' <Commandline> : is the commandline for the parser');
+ writeln(' -d<define> : <define> = Directive');
+ writeln(' -Fi<include_path> : <include_path> = ?');
+ writeln(' -I<include_path> : <include_path> = ?');
+ writeln(' -Sd : mode delphi');
+ writeln(' File : a pascal source file (Program or Unit)');
+ end;
+
+ procedure GetParam;
+ begin
+ if paramcount>0 then
+ begin
+ cmdl:='';
+ i:=1;
+ repeat
+ if paramstr(i) = '-h' then
+ begin
+ PrintUsage;
+ halt(0);
+ end
+ else if paramstr(i) = '-u' then Unformated:= true
+ else if paramstr(i) = '-OS' then
+ begin
+ if i < paramcount then
+ begin
+ inc(i);
+ TargetOS:=paramstr(i);
+ if (TargetOS = '')or(TargetOS[1] = '-') then halt(1);
+ end
+ else halt(1);
+ end
+ else if paramstr(i) = '-CPU' then
+ begin
+ if i < paramcount then
+ begin
+ inc(i);
+ TargetCPU:=paramstr(i);
+ if (TargetCPU = '')or(TargetCPU[1] = '-') then halt(1);
+ end
+ else halt(1);
+ end
+ else
+ cmdl:=cmdl+' '+paramstr(i);
+ inc(i);
+ until i > paramcount;
+ end;
+ if (Paramcount < 1)or(cmdl = '') then
+ begin
+ // remember to put the whole cmdline in quotes, and
+ // to always add some path options. Even if only -Fu. -Fi.
+ writeln('Error: No file for input given !');
+ PrintUsage;
+ halt(1);
+ end;
+ end;
+
+//# *** main ***
+
+begin
+ isim:=false;
+ Unformated:=false;//false to format output to be human readable
+ TargetOS:='linux';
+ TargetCPU:='i386';
+ GetParam;
+ //writeln(TargetOS,' ',TargetCPU,' ',cmdl);halt;
E := TSimpleEngine.Create;
try
try
- M := ParseSource(E, cmdl , 'linux', 'i386');
+ M := ParseSource(E, cmdl ,TargetOS ,TargetCPU);
except
on excep:EParserError do
begin
- writeln(excep.message,' line:',excep.row,' column:',excep.column,' file:',excep.filename);
+ writeln(excep.message,' line:',excep.row,' column:',excep.column,' file:',excep.filename);
raise;
+ end;
+ end;
+
+ if M is TPasProgram then
+ begin
+ writeln('Program ',M.Name,';');
+ if not Unformated then writeln;
+ if assigned(M.ImplementationSection) then
+ begin
+ isim:=true;
+ if not Unformated then writeln;
+ GetDecls(M.ImplementationSection as TPasDeclarations,0);
+ //PrintDecls(M.ImplementationSection as TPasDeclarations,0);
+ end;
+ if assigned(M.InitializationSection) then // MAIN BLOCK
+ begin
+ isim:=false;
+ if not Unformated then writeln;
+ writeln('begin');//writeln('begin {Begin MAIN Program}')
+ GetTPasImplBlock(M.InitializationSection as TPasImplBlock,1,0,false,false);
end;
- end;
- { Cool, we successfully parsed the unit.
- Now output some info about it. }
- Decls := M.InterfaceSection.Declarations;
- for I := 0 to Decls.Count - 1 do
- Writeln('Interface item ', I, ': ', (TObject(Decls[I]) as TPasElement).Name);
+ end
+ else
+ begin
+ { Cool, we successfully parsed the unit.
+ Now output some info about it. }
+ writeln('Unit ',M.Name,';');
+ if not Unformated then writeln;
+ Writeln('Interface');
+ if not Unformated then writeln;
+ GetDecls(M.InterfaceSection as TPasDeclarations,0);
+ //PrintDecls(M.InterfaceSection as TPasDeclarations,0);
- FreeAndNil(M);
- finally
- FreeAndNil(E)
+ if assigned(M.ImplementationSection) then
+ begin
+ isim:=true;
+ if not Unformated then writeln;
+ Writeln('Implementation');
+ if not Unformated then writeln;
+ GetDecls(M.ImplementationSection as TPasDeclarations,0);
+ //PrintDecls(M.ImplementationSection as TPasDeclarations,0);
+ if TPasElement(M.ImplementationSection) is TPasImplElement then writeln('{MAIN}');
+ end;
+ if assigned(M.InitializationSection) then //is this begin .. end. of a unit too ?
+ begin
+ isim:=true;
+ if not Unformated then writeln;
+ Writeln('Initialization');
+ if not Unformated then writeln;
+ GetTPasImplBlock(M.InitializationSection as TPasImplBlock,1,0,false,false);
+ if assigned(M.FinalizationSection) then
+ begin
+ isim:=true;
+ if not Unformated then writeln;
+ Writeln('Finalization');
+ if not Unformated then writeln;
+ GetTPasImplBlock(M.FinalizationSection as TPasImplBlock,1,0,false,false);
+ end;
+ end;
end;
+ if not Unformated then writeln('end.')
+ else
+ begin
+ writeln('end');
+ writeln('.');
+ end;
+ FreeAndNil(M);
+ finally
+ FreeAndNil(E);
+ end;
end.
diff --git a/packages/fcl-passrc/examples/testunit1.pp b/packages/fcl-passrc/examples/testunit1.pp
new file mode 100644
index 0000000000..263c8c7135
--- /dev/null
+++ b/packages/fcl-passrc/examples/testunit1.pp
@@ -0,0 +1,713 @@
+//This is only for testing the parser, it is not intended to be runable in a real
+//program but for checking the contructs to be parsed well.
+//All statements are written like testparser would print them out to diff the
+//result with this file again to show differences.
+//Based on /utils/fpdoc/testunit.pp
+{$mode objfpc}
+{$h+}
+unit testunit1;
+
+interface
+
+ uses
+ SysUtils,Classes;
+
+ const
+ AnIntegerConst=1;
+ AStringConst='Hello, World!';
+ AFLoatconst=1.23;
+ ABooleanConst=True;
+ ATypedConst: Integer=3;
+ AnArrayConst: Array[1..3] of Integer=(1,2,3);
+ ARecordConst: TMethod=(Code:nil;Data:nil);
+ ASetConst=[true,false];
+ ADeprecatedConst=1 deprecated;
+
+ Type
+ TAnEnumType=(one,two,three);
+ TASetType=set of TAnEnumType;
+ TAnArrayType=Array[1..10] of Integer;
+ TASubRangeType=one..two;
+ TABooleanArrayType=Array[Boolean] of Integer;
+ TARecordType=record
+ X,Y: Integer;
+ Z: String;
+ end;
+ TAVariantRecordType=record
+ A: String;
+ Case Integer of
+ 1: (X,Y : Integer);
+ 2: (phi,Omega : Real);
+ end;
+ TAVariantRecordType2=record
+ A: String;
+ Case Atype : Integer of
+ 1 : (X,Y : Integer);
+ 2 : (phi,Omega : Real);
+ end;
+
+ MyRec = Record
+ X : Longint;
+ Case byte of
+ 2 : (Y : Longint;
+ case byte of
+ 3 : (Z : Longint);
+ );
+ end;
+
+// TADeprecatedType = Integer deprecated;
+
+ { TMyParentClass }
+
+ TMyParentClass=Class(TComponent)
+ Private
+ FI: Integer;
+ Function GetA(AIndex: Integer): String;
+ Function GetIP(AIndex: integer): String;
+ procedure SetA(AIndex: Integer; const AValue: String);
+ procedure SetIP(AIndex: integer; const AValue: String);
+ Procedure WriteI(AI: Integer);
+ Function ReadI: Integer;
+ Protected
+ Procedure AProtectedMethod;
+ Property AProtectedProp: Integer Read FI Write FI;
+ Public
+ Constructor Create(AOwner: TComponent); override;
+ Destructor Destroy; override;
+ Procedure AVirtualProc; virtual;
+ Procedure AnAbstractProc; virtual; abstract;
+ Procedure AMessageProc(var Msg);message 123;
+ Procedure AStringMessageProc(var Msg);message '123';
+ Procedure ADeprecatedProc; deprecated;
+ Procedure APlatformProc; Platform;
+ Property IntProp: Integer Read FI Write Fi;
+ Property IntROProp: Integer Read FI;
+ Property GetIntProp: Integer Read ReadI Write WriteI;
+ Property AnArrayProp[AIndex: Integer]: String Read GetA Write SetA;
+ Property AnIndexProp: String Index 1 Read GetIP Write SetIP;
+ Property AnIndexProp2: String Index 2 Read GetIP Write SetIP;
+ Published
+ Procedure SomePublishedMethod;
+ end;
+
+ { TMyChildClass }
+
+ TMyChildClass=Class(TMyParentClass)
+ Public
+ Procedure AVirtualProc; Override;
+ Procedure AnAbstractProc; Override;
+ Published
+ Property AProtectedProp;
+ end;
+
+ TPasFunctionType=Class(TPasProcedureType)
+ public
+ destructor Destroy; override;
+ Class Function TypeName: string; override;
+ Function ElementTypeName: string; override;
+ Function GetDeclaration(Full: boolean): string; override;
+ public
+ ResultEl: TPasResultElement;
+ end;
+
+ var
+ ASimpleVar: Integer;
+ ATypedVar: TMethod;
+ ARecordVar: Record
+ A,B: Integer;
+ end;
+ AnArrayVar: Array[1..10] of Integer;
+ ATypedArray: Array[TanEnumType] of Integer;
+ AInitVar: Integer=1;
+
+ ADeprecatedVar: Integer deprecated;
+ ACVarVar: Integer ; cvar;
+ AnExternalVar: Integer ;external name 'avar';
+ AnExternalLibVar: Integer ;external 'library' name 'avar';
+
+ Procedure SimpleProc;
+ Procedure OverloadedProc(A: Integer);
+ Procedure OverloadedProc(B: String);
+ Function SimpleFunc: Integer;
+ Function OverloadedFunc(A: Integer): Integer;
+ Function OverloadedFunc(B: String): Integer;
+
+ Procedure ConstArgProc(const A: Integer);
+ Procedure VarArgProc(var A: Integer);
+ Procedure OutArgProc(out A: Integer);
+ Procedure UntypedVarArgProc(var A);
+ Procedure UntypedConstArgProc(const A);
+ Procedure UntypedOutArgProc(out A);
+
+ Procedure ArrayArgProc(A: TAnArrayType);
+ Procedure OpenArrayArgProc(A: Array of string);
+ Procedure ConstArrayArgProc(A: Array of const);
+
+ Procedure externalproc; external;
+ Procedure externalnameProc; external name 'aname';
+ Procedure externallibnameProc; external 'alibrary' name 'aname';
+
+
+Implementation
+
+
+ Procedure SimpleProc;
+
+ procedure SubProc;
+ begin
+ s:= s+'a';
+ end;
+
+ begin
+ a:= 1;
+ c:= a+b;
+ for i:= 1 to 10 do
+ write(a);
+ end;
+
+ Procedure OverloadedProc(A: Integer);
+ begin
+ if i=1 then ;
+ end;
+
+ Procedure OverloadedProc(B: String);
+ begin
+ end;
+
+ Function SimpleFunc: Integer;
+ begin
+ end;
+
+ Function OverloadedFunc(A: Integer): Integer;
+ begin
+ end;
+
+ Function OverloadedFunc(B: String): Integer;
+ begin
+ end;
+
+ Procedure ArrayArgProc(A: TAnArrayType);
+ begin
+ end;
+
+ Procedure OpenArrayArgProc(A: Array of String);
+ begin
+ end;
+
+ Procedure ConstArrayArgProc(A: Array of const);
+ begin
+ end;
+
+ Procedure ConstArgProc(const A: Integer);
+ begin
+ end;
+
+ Procedure VarArgProc(var A: Integer);
+ begin
+ end;
+
+ Procedure OutArgProc(out A: Integer);
+ begin
+ end;
+
+ Procedure UntypedVarArgProc(var A);
+ begin
+ end;
+
+ Procedure UntypedConstArgProc(const A);
+ begin
+ end;
+
+ Procedure UntypedOutArgProc(out A);
+ begin
+ end;
+
+{ TMyChildClass }
+ procedure TMyChildClass.AVirtualProc;
+ begin
+ inherited AVirtualProc;
+ end;
+
+ procedure TMyChildClass.AnAbstractProc;
+ procedure SubCProc;
+ begin
+ sc:= sc+'ac';
+ end;
+
+ begin
+ // Cannot call ancestor
+ end;
+
+{ TMyParentClass }
+ procedure TMyParentClass.WriteI(AI: Integer);
+ begin
+ end;
+
+ Function TMyParentClass.GetA(AIndex: Integer): String;
+ begin
+ end;
+
+ Function TMyParentClass.GetIP(AIndex: integer): String;
+ begin
+ end;
+
+ procedure TMyParentClass.SetA(AIndex: Integer; const AValue: String);
+ begin
+ end;
+
+ procedure TMyParentClass.SetIP(AIndex: integer; const AValue: String);
+ begin
+ end;
+
+ Function TMyParentClass.ReadI: Integer;
+ begin
+ end;
+
+ procedure TMyParentClass.AProtectedMethod;
+ begin
+ end;
+
+ constructor TMyParentClass.Create(AOwner: TComponent);
+ begin
+ inherited Create(AOwner);
+ end;
+
+ destructor TMyParentClass.Destroy;
+ begin
+ inherited Destroy;
+ end;
+
+ procedure TMyParentClass.AVirtualProc;
+ begin
+ end;
+
+ procedure TMyParentClass.AMessageProc(var Msg);
+ begin
+ end;
+
+ procedure TMyParentClass.AStringMessageProc(var Msg);
+ begin
+ end;
+
+ procedure TMyParentClass.ADeprecatedProc;
+ begin
+ end;
+
+ procedure TMyParentClass.APlatformProc;
+ begin
+ end;
+
+ procedure TMyParentClass.SomePublishedMethod;
+ begin
+ end;
+
+ Class Function TPasFunctionType.TypeName: String;
+ begin
+ Result:= 'Function';
+ end;
+
+ procedure Statements;
+ const
+ cint=1;
+ cint1=-1;
+ creal=3.1415;
+ Addi=1+2;
+ Subs=2-3;
+ Muti=3*3;
+ Divi=3/5;
+ //Powe=2^3;
+ Modu=5 mod 3;
+ IDiv=5 div 3;
+ fals= not TRUE;
+ cand=true and false;
+ cor=true or false;
+ cxor=true xor false;
+ lt=2<3;
+ gt=3>2;
+ let=2<=3;
+ get=3>=2;
+ LeftShift=2 shl 3;
+ RightShift=2 shr 3;
+ ConstString='01'+'ab';
+
+ Type
+ Passenger=Record
+ Name: String[30];
+ Flight: String[10];
+ end;
+
+ Type
+ AR=record
+ X,Y: LongInt;
+ end;
+ //PAR = Record;
+ var
+ TheCustomer: Passenger;
+ L: ^LongInt;
+ P: PPChar;
+ S,T: Ar;
+
+ begin
+ X:= X+Y;
+ //EparserError on C++ style
+ //X+=Y; { Same as X := X+Y, needs -Sc command line switch}
+ //x-=y;
+ //X/=2; { Same as X := X/2, needs -Sc command line switch}
+ //x*=y;
+ Done:= False;
+ Weather:= Good;
+ //MyPi := 4* Tan(1); warum * ?
+ L^:= 3;
+ P^^:= 'A';
+ Usage;
+ WriteLn('Pascal is an easy language !');
+ Doit();
+ //label jumpto;
+ //Jumpto :
+ // Statement;
+ //Goto jumpto;
+
+ Case i of
+ 3: DoSomething;
+ 1..5: DoSomethingElse;
+ end;
+
+ Case C of
+ 'a': WriteLn('A pressed');
+ 'b': WriteLn('B pressed');
+ 'c': WriteLn('C pressed');
+ else
+ WriteLn('unknown letter pressed : ',C);
+ end;
+
+ Case C of
+ 'a','e','i','o','u': WriteLn('vowel pressed');
+ 'y': WriteLn('This one depends on the language');
+ else
+ WriteLn('Consonant pressed');
+ end;
+
+ Case Number of
+ 1..10: WriteLn('Small number');
+ 11..100: WriteLn('Normal, medium number');
+ else
+ WriteLn('HUGE number');
+ end;
+
+ case block of
+ 1: begin
+ writeln('1');
+ end;
+ 2: writeln('2');
+ else
+ writeln('3');
+ writeln('4');
+ end;
+
+ If exp1 Then
+ If exp2 then
+ Stat1
+ else
+ stat2;
+
+ If exp3 Then
+ begin
+ If exp4 then
+ Stat5
+ else
+ stat6
+ end;
+
+ If exp7 Then
+ begin
+ If exp8 then
+ Stat9
+ end
+ else
+ stat2;
+
+ if i is integer then
+ begin
+ write('integer');
+ end
+ else
+ if i is real then
+ begin
+ write('real');
+ end
+ else
+ write('0');
+
+ if Today in[Monday..Friday] then
+ WriteLn('Must work harder')
+ else
+ WriteLn('Take a day off.');
+
+ for Day:= Monday to Friday do
+ Work;
+ for I:= 100 downto 1 do
+ WriteLn('Counting down : ',i);
+ for I:= 1 to 7*dwarfs do
+ KissDwarf(i);
+
+ for i:= 0 to 10 do
+ begin
+ j:= 2+1;
+ write(i,j);
+ end;
+
+ repeat
+ WriteLn('I =',i);
+ I:= I+2;
+ until I>100;
+
+ repeat
+ X:= X/2;
+ until x<10e-3;
+
+ I:= I+2;
+ while i<=100 do
+ begin
+ WriteLn('I =',i);
+ I:= I+2;
+ end;
+ X:= X/2;
+ while x>=10e-3 do
+ dec(x);
+
+ while x>0 do
+ while y>0 do
+ begin
+ dec(x);
+ dec(y);
+ end;
+
+ while x>0 do
+ if x>2 then
+ dec(x)
+ else
+ dec(x,2);
+
+ X:= 2+3;
+
+ TheCustomer.Name:= 'Michael';
+ TheCustomer.Flight:= 'PS901';
+
+ With TheCustomer do
+ begin
+ Name:= 'Michael';
+ Flight:= 'PS901';
+ end;
+
+ With A,B,C,D do
+ Statement;
+
+ With A do
+ With B do
+ With C do
+ With D do
+ Statement;
+
+ S.X:= 1;S.Y:= 1;
+ T.X:= 2;T.Y:= 2;
+ With S,T do
+ WriteLn(X,' ',Y);
+
+ {asm
+ Movl $1,%ebx
+ Movl $0,%eax
+ addl %eax,%ebx
+ end; ['EAX','EBX'];}
+
+ try
+ try
+ M:= ParseSource(E,cmdl,'linux','i386');
+ except
+ on excep: EParserError do
+ begin
+ writeln(excep.message,' line:',excep.row,' column:',excep.column,' file:',excep.filename);
+ raise ;
+ end;
+ end;
+ Decls:= M.InterfaceSection.Declarations;
+ for I:= 0 to Decls.Count-1 do
+ Writeln('Interface item ',I,': ');
+
+ FreeAndNil(M);
+ finally
+ FreeAndNil(E)
+ end;
+
+ raise EParserError.Create(Format(SParserErrorAtToken, [Msg, CurTokenName]) {$ifdef addlocation}+' ('+inttostr(scanner.currow)+' '+inttostr(scanner.curcolumn)+')'{$endif},Scanner.CurFilename, Scanner.CurRow, Scanner.CurColumn);
+
+ // try else
+ end;
+
+ procedure Expression;
+ begin
+ A:= a+b *c /(-e+f)*3 div 2 + 4 mod 5 - 2 shl 3 + 3 shr 1 ;
+ b:= (a and not b) or c xor d;
+ u:= i<=2 or a<>b or j>=3;
+ u:= i=1 or a>b or b<a or i<>2;
+ u:= i in [1..2];
+
+ If F=@AddOne Then
+ WriteLn('Functions are equal');
+
+ If F()=Addone then
+ WriteLn('Functions return same values ');
+
+ z:= [today,tomorrow];
+ z:= [Monday..Friday,Sunday];
+ z:= [2,3*2,6*2,9*2];
+ z:= ['A'..'Z','a'..'z','0'..'9'];
+
+ x:= Byte('A');
+ x:= Char(48);
+ x:= boolean(1);
+ x:= longint(@Buffer);
+ x:= Integer('A');
+ x:= Char(4875);
+ x:= Word(@Buffer);
+
+ B:= Byte(C);
+ Char(B):= C;
+
+ TWordRec(W).L:= $FF;
+ TWordRec(W).H:= 0;
+ S:= TObject(P).ClassName;
+
+ P:= @MyProc; //warum @ ? fix pparser 769 ?
+
+ Dirname:= Dirname+'\';
+
+ W:= [mon,tue]+[wed,thu,fri]; // equals [mon,tue,wed,thu,fri]
+ W:= [mon,tue,wed]-[wed]; // equals [mon,tue]
+ W:= [mon,tue,wed]*[wed,thu,fri]; // equals [wed] warum * ?
+
+ (C as TEdit).Text:= 'Some text';
+ C:= O as TComponent;
+
+ if A is TComponent then ;
+ If A is B then ;
+
+ Inherited ;
+ Inherited Test;
+
+ if true then
+ Inherited
+ else
+ DoNothing;
+
+ if true then
+ Inherited Test
+ else
+ DoNothing;
+
+ Inherited P:= 3;
+ Inherited SetP1(3);
+ Result:= Char(P and $FF);
+ Result:= Char((Inherited P) and $FF);
+ Inherited P:= Ord(AValue);
+ Result:= Inherited InterPretOption(Cmd,Arg);
+
+ raise Exception.Create(SErrMultipleSourceFiles);
+
+ if Filename<>'' then
+ raise Exception.Create(SErrMultipleSourceFiles);
+
+ if Filename<>'' then
+ raise Exception.Create(SErrMultipleSourceFiles)
+ else
+ Filename:= s;
+
+ Self.Write(EscapeText(AText));
+ TObject.Create(Self);
+ end;
+
+ constructor TPasPackage.Create(const AName: String; AParent: TPasElement);
+ begin
+ if (Length(AName)>0)and(AName[1]<>'#') then
+ Inherited Create('#'+AName,AParent)
+ else
+ Inherited Create(AName,AParent);
+ Modules:= TList.Create;
+ end;
+
+ Function TPascalScanner.FetchToken: TToken;
+ var
+ IncludeStackItem: TIncludeStackItem;
+
+ begin
+ while true do
+ begin
+ Result:= DoFetchToken;
+ if FCurToken=tkEOF then
+ if FIncludeStack.Count>0 then
+ begin
+ CurSourceFile.Free;
+ IncludeStackItem:= TIncludeStackItem(FIncludeStack[FIncludeStack.Count-1]);
+ FIncludeStack.Delete(FIncludeStack.Count-1);
+ FCurSourceFile:= IncludeStackItem.SourceFile;
+ FCurFilename:= IncludeStackItem.Filename;
+ FCurToken:= IncludeStackItem.Token;
+ FCurTokenString:= IncludeStackItem.TokenString;
+ FCurLine:= IncludeStackItem.Line;
+ FCurRow:= IncludeStackItem.Row;
+ TokenStr:= IncludeStackItem.TokenStr;
+ IncludeStackItem.Free;
+ Result:= FCurToken;
+ end
+ else
+ break
+ else
+ if not PPIsSkipping then
+ break;
+ end;
+ end;
+
+ Procedure IFS;
+ begin
+ if true then
+ repeat
+ until false
+ else
+ Noting;
+ end;
+
+
+ Procedure IFS(x: integer); overload;
+ begin
+ if true then
+ case x of
+ 1: writeln;
+ 2: write;
+ else
+ writeln('#');
+ end
+ else
+ Noting;
+ end;
+
+ Procedure IFS1;
+ begin
+ if true then
+ while true do
+ Something
+ else
+ Noting;
+ end;
+
+ Procedure IFS3;
+ begin
+ if true then
+ if true then
+ write
+ else
+ writeln;
+ end;
+
+Initialization
+
+ hallo:= valid;
+end.
diff --git a/packages/fcl-passrc/src/pastree.pp b/packages/fcl-passrc/src/pastree.pp
index 027047e825..57e2d887dd 100644
--- a/packages/fcl-passrc/src/pastree.pp
+++ b/packages/fcl-passrc/src/pastree.pp
@@ -121,7 +121,7 @@ type
end;
TPasExprKind = (pekIdent, pekNumber, pekString, pekSet, pekNil, pekBoolConst, pekRange,
- pekUnary, pekBinary, pekFuncParams, pekArrayParams, pekListOfExp);
+ pekUnary, pekBinary, pekFuncParams, pekArrayParams, pekListOfExp, pekInherited, pekSelf);
TExprOpCode = (eopNone,
eopAdd,eopSubtract,eopMultiply,eopDivide, eopDiv,eopMod, eopPower,// arithmetic
@@ -178,6 +178,20 @@ type
function GetDeclaration(full : Boolean) : string; override;
end;
+ { TInheritedExpr }
+
+ TInheritedExpr = class(TPasExpr)
+ constructor Create(AParent : TPasElement); overload;
+ function GetDeclaration(full : Boolean) : string; override;
+ end;
+
+ { TSelfExpr }
+
+ TSelfExpr = class(TPasExpr)
+ constructor Create(AParent : TPasElement); overload;
+ function GetDeclaration(full : Boolean) : string; override;
+ end;
+
{ TParamsExpr }
TParamsExpr = class(TPasExpr)
@@ -454,6 +468,7 @@ type
AncestorType: TPasType; // TPasClassType or TPasUnresolvedTypeRef
IsPacked: Boolean; // 12/04/04 - Dave - Added
IsForward : Boolean;
+ IsShortDefinition: Boolean;//class(anchestor); without end
Members: TList; // array of TPasElement objects
InterfaceGUID : string; // 15/06/07 - Inoussa
@@ -1346,6 +1361,7 @@ constructor TPasClassType.Create(const AName: string; AParent: TPasElement);
begin
inherited Create(AName, AParent);
IsPacked := False; // 12/04/04 - Dave - Added
+ IsShortDefinition := False;
Members := TList.Create;
Modifiers := TStringList.Create;
ClassVars := TList.Create;
@@ -1388,7 +1404,7 @@ var
begin
for i := 0 to Args.Count - 1 do
TPasArgument(Args[i]).Release;
- Args.Free;
+ FreeAndNil(Args);
inherited Destroy;
end;
@@ -1726,12 +1742,14 @@ begin
Result:=TPasImplAssign.Create('', Self);
Result.left:=left;
Result.right:=right;
+ AddElement(Result);
end;
function TPasImplBlock.AddSimple(exp:TPasExpr):TPasImplSimple;
begin
Result:=TPasImplSimple.Create('', Self);
Result.expr:=exp;
+ AddElement(Result);
end;
function TPasImplBlock.CloseOnSemicolon: boolean;
@@ -2591,7 +2609,7 @@ Var
I : Integer;
begin
- For I:=0 to Length(Params) do
+ For I:=0 to High(Params) do
begin
If (Result<>'') then
Result:=Result+', ';
@@ -2629,7 +2647,7 @@ Function TRecordValues.GetDeclaration(Full : Boolean):AnsiString;
Var
I : Integer;
begin
- For I:=0 to Length(Fields) do
+ For I:=0 to High(Fields) do
begin
If Result='' then
Result:=Result+'; ';
@@ -2661,20 +2679,36 @@ begin
Fields[i].ValueExp:=Value;
end;
-{ TArrayValues }
+{ TNilExpr }
Function TNilExpr.GetDeclaration(Full :Boolean):AnsiString;
begin
Result:='Nil';
end;
+{ TInheritedExpr }
+
+Function TInheritedExpr.GetDeclaration(Full :Boolean):AnsiString;
+begin
+ Result:='Inherited';
+end;
+
+{ TSelfExpr }
+
+Function TSelfExpr.GetDeclaration(Full :Boolean):AnsiString;
+begin
+ Result:='Self';
+end;
+
+{ TArrayValues }
+
Function TArrayValues.GetDeclaration(Full: Boolean):AnsiString;
Var
I : Integer;
begin
- For I:=0 to Length(Values) do
+ For I:=0 to High(Values) do
begin
If Result='' then
Result:=Result+', ';
@@ -2712,6 +2746,20 @@ begin
inherited Create(AParent,pekNil, eopNone);
end;
+{ TInheritedExpr }
+
+constructor TInheritedExpr.Create(AParent : TPasElement);
+begin
+ inherited Create(AParent,pekInherited, eopNone);
+end;
+
+{ TSelfExpr }
+
+constructor TSelfExpr.Create(AParent : TPasElement);
+begin
+ inherited Create(AParent,pekSelf, eopNone);
+end;
+
{ TPasLabels }
constructor TPasLabels.Create(const AName:string;AParent:TPasElement);
diff --git a/packages/fcl-passrc/src/pparser.pp b/packages/fcl-passrc/src/pparser.pp
index 1490282ce1..6d2bb965c8 100644
--- a/packages/fcl-passrc/src/pparser.pp
+++ b/packages/fcl-passrc/src/pparser.pp
@@ -766,6 +766,40 @@ begin
tkfalse, tktrue: x:=TBoolConstExpr.Create(Aparent,pekBoolConst, CurToken=tktrue);
tknil: x:=TNilExpr.Create(Aparent);
tkSquaredBraceOpen: x:=ParseParams(AParent,pekSet);
+ tkinherited: begin
+ //inherited; inherited function
+ x:=TInheritedExpr.Create(AParent);
+ NextToken;
+ if (length(CurTokenText)>0) and (CurTokenText[1] in ['A'..'_']) then begin
+ b:=TBinaryExpr.Create(AParent,x, DoParseExpression(AParent), eopNone);
+ if not Assigned(b.right) then Exit; // error
+ x:=b;
+ UngetToken;
+ end
+ else UngetToken;
+ end;
+ tkself: begin
+ x:=TPrimitiveExpr.Create(AParent,pekString, CurTokenText); //function(self);
+ x:=TSelfExpr.Create(AParent);
+ NextToken;
+ if CurToken = tkDot then begin // self.Write(EscapeText(AText));
+ optk:=CurToken;
+ NextToken;
+ b:=TBinaryExpr.Create(AParent,x, ParseExpIdent(AParent), TokenToExprOp(optk));
+ if not Assigned(b.right) then Exit; // error
+ x:=b;
+ end
+ else UngetToken;
+ end;
+ tkAt: begin
+ // P:=@function;
+ NextToken;
+ if (length(CurTokenText)=0) or not (CurTokenText[1] in ['A'..'_']) then begin
+ UngetToken;
+ ParseExc(SParserExpectedIdentifier);
+ end;
+ x:=TPrimitiveExpr.Create(AParent,pekString, '@'+CurTokenText);
+ end;
tkCaret: begin
// ^A..^_ characters. See #16341
NextToken;
@@ -2714,6 +2748,27 @@ begin
// empty then => add dummy command
CurBlock.AddCommand('');
end;
+ if TPasImplIfElse(CurBlock).ElseBranch<>nil then
+ begin
+ // this and the following 3 may solve TPasImplIfElse.AddElement BUG
+ // ifs without begin end
+ // if .. then
+ // if .. then
+ // else
+ // else
+ CloseBlock;
+ CloseStatement(false);
+ end;
+ end else if (CurBlock is TPasImplWhileDo) then
+ begin
+ //if .. then while .. do smt else ..
+ CloseBlock;
+ UngetToken;
+ end else if (CurBlock is TPasImplRaise) then
+ begin
+ //if .. then Raise Exception else ..
+ CloseBlock;
+ UngetToken;
end else if (CurBlock is TPasImplTryExcept) then
begin
CloseBlock;
@@ -2795,16 +2850,17 @@ begin
repeat
Expr:=ParseExpression(Parent);
//writeln(i,'CASE value="',Expr,'" Token=',CurTokenText);
- if CurBlock is TPasImplCaseStatement then
- TPasImplCaseStatement(CurBlock).Expressions.Add(Expr)
- else
- CurBlock:=TPasImplCaseOf(CurBlock).AddCase(Expr);
NextToken;
if CurToken=tkDotDot then
begin
Expr:=Expr+'..'+ParseExpression(Parent);
NextToken;
end;
+ // do not miss '..'
+ if CurBlock is TPasImplCaseStatement then
+ TPasImplCaseStatement(CurBlock).Expressions.Add(Expr)
+ else
+ CurBlock:=TPasImplCaseOf(CurBlock).AddCase(Expr);
//writeln(i,'CASE after value Token=',CurTokenText);
if CurToken=tkColon then break;
if CurToken<>tkComma then
@@ -2932,7 +2988,7 @@ begin
begin
// assign statement
NextToken;
- right:=ParseExpIdent(Parent);
+ right:=DoParseExpression(nil); // this may solve TPasImplWhileDo.AddElement BUG
CmdElem:=CurBlock.AddAssign(left, right);
UngetToken;
end;
@@ -2943,7 +2999,7 @@ begin
// label mark. todo: check mark identifier in the list of labels
CmdElem:=CurBlock.AddLabelMark(TPrimitiveExpr(left).Value);
left.Free;
- end
+ end;
else
// simple statement (function call)
CmdElem:=CurBlock.AddSimple(left);
@@ -3130,36 +3186,62 @@ function TPasParser.ParseClassDecl(Parent: TPasElement;
var
CurVisibility: TPasMemberVisibility;
- procedure ProcessMethod(const MethodTypeName: String; HasReturnValue: Boolean);
+ procedure ProcessMethod(ProcType: TProcType);
var
Owner: TPasElement;
Proc: TPasProcedure;
- s: String;
+ s,Name: String;
pt: TProcType;
+ HasReturnValue: Boolean;
+
begin
+ HasReturnValue:=false;
ExpectIdentifier;
- Owner := CheckIfOverloaded(TPasClassType(Result), CurTokenString);
- if HasReturnValue then
+ Name := CurTokenString;
+ Owner := CheckIfOverloaded(TPasClassType(Result), Name);
+ case ProcType of
+ ptFunction:
begin
- Proc := TPasFunction(CreateElement(TPasFunction, CurTokenString, Owner,
+ Proc := TPasFunction(CreateElement(TPasFunction, Name, Owner,
CurVisibility));
Proc.ProcType := Engine.CreateFunctionType('', 'Result', Proc, True,
Scanner.CurFilename, Scanner.CurRow);
- end else
+ HasReturnValue:=true;
+ end;
+ ptClassFunction:
begin
- // !!!: The following is more than ugly
- if MethodTypeName = 'constructor' then
- Proc := TPasConstructor(CreateElement(TPasConstructor, CurTokenString,
- Owner, CurVisibility))
- else if MethodTypeName = 'destructor' then
- Proc := TPasDestructor(CreateElement(TPasDestructor, CurTokenString,
- Owner, CurVisibility))
+ Proc := TPasClassFunction(CreateElement(TPasClassFunction, Name, Owner));
+ Proc.ProcType := Engine.CreateFunctionType('', 'Result', Proc, True,
+ Scanner.CurFilename, Scanner.CurRow);
+ HasReturnValue:=true;
+ end;
+ ptClassProcedure:
+ begin
+ Proc := TPasClassProcedure(CreateElement(TPasClassProcedure, Name, Owner));
+ Proc.ProcType := TPasProcedureType(CreateElement(TPasProcedureType, '',
+ Proc, CurVisibility));
+ end;
+ ptConstructor:
+ begin
+ Proc := TPasConstructor(CreateElement(TPasConstructor, Name,
+ Owner, CurVisibility));
+ Proc.ProcType := TPasProcedureType(CreateElement(TPasProcedureType, '',
+ Proc, CurVisibility));
+ end;
+ ptDestructor:
+ begin
+ Proc := TPasDestructor(CreateElement(TPasDestructor, Name,
+ Owner, CurVisibility));
+ Proc.ProcType := TPasProcedureType(CreateElement(TPasProcedureType, '',
+ Proc, CurVisibility));
+ end;
else
- Proc := TPasProcedure(CreateElement(TPasProcedure, CurTokenString,
+ Proc := TPasProcedure(CreateElement(TPasProcedure, Name,
Owner, CurVisibility));
Proc.ProcType := TPasProcedureType(CreateElement(TPasProcedureType, '',
Proc, CurVisibility));
end;
+
if Owner.ClassType = TPasOverloadedProc then
TPasOverloadedProc(Owner).Overloads.Add(Proc)
else
@@ -3302,6 +3384,8 @@ begin
end
else
TPasClassType(Result).isForward:=CurToken=tkSemicolon;
+ if CurToken = tkSemicolon then
+ TPasClassType(Result).IsShortDefinition:=true;
if CurToken <> tkSemicolon then
begin
@@ -3364,13 +3448,19 @@ begin
end;
tkProcedure:
- ProcessMethod('procedure', False);
+ ProcessMethod(ptProcedure);
tkFunction:
- ProcessMethod('function', True);
+ ProcessMethod(ptFunction);
tkConstructor:
- ProcessMethod('constructor', False);
+ ProcessMethod(ptConstructor);
tkDestructor:
- ProcessMethod('destructor', False);
+ ProcessMethod(ptDestructor);
+ tkclass:
+ begin
+ NextToken;
+ if CurToken = tkprocedure then ProcessMethod(ptClassProcedure)
+ else ProcessMethod(ptClassFunction);
+ end;
tkProperty:
begin
ExpectIdentifier;
diff --git a/packages/fcl-process/Makefile b/packages/fcl-process/Makefile
index 899cdd1708..98e126ea6b 100644
--- a/packages/fcl-process/Makefile
+++ b/packages/fcl-process/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/05/05]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/10/20]
#
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 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
@@ -245,7 +245,7 @@ endif
ifndef CROSSBINDIR
CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
endif
-ifeq ($(OS_TARGET),darwin)
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
ifeq ($(OS_SOURCE),darwin)
DARWIN2DARWIN=1
endif
@@ -326,6 +326,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_UNITS+=pipes process
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_UNITS+=pipes process
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_UNITS+=pipes process simpleipc dbugmsg dbugintf
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_UNITS+=pipes process simpleipc dbugmsg dbugintf
endif
@@ -389,6 +395,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_UNITS+=pipes process simpleipc dbugmsg dbugintf
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_UNITS+=pipes process simpleipc dbugmsg dbugintf
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_UNITS+=pipes process simpleipc dbugmsg dbugintf
endif
@@ -440,6 +449,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_UNITS+=pipes process
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_UNITS+=pipes process simpleipc dbugmsg dbugintf
+endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_RSTS+=process simpleipc
endif
@@ -500,6 +512,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_RSTS+=process simpleipc
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_RSTS+=process simpleipc
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_RSTS+=process simpleipc
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_RSTS+=process simpleipc
endif
@@ -563,6 +581,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_RSTS+=process simpleipc
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_RSTS+=process simpleipc
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_RSTS+=process simpleipc
endif
@@ -614,6 +635,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_RSTS+=process simpleipc
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_RSTS+=process simpleipc
+endif
override INSTALL_FPCPACKAGE=y
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_OPTIONS+=-S2h
@@ -675,6 +699,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_OPTIONS+=-S2h
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_OPTIONS+=-S2h
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_OPTIONS+=-S2h
endif
@@ -738,6 +768,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_OPTIONS+=-S2h
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_OPTIONS+=-S2h
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_OPTIONS+=-S2h
endif
@@ -789,6 +822,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_OPTIONS+=-S2h
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src src/unix src/dummy
endif
@@ -849,6 +885,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src src/unix src/dummy
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src src/unix src/dummy
endif
@@ -912,6 +954,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src src/unix src/dummy
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src src/unix src/dummy
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src src/unix src/dummy
endif
@@ -963,6 +1008,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override COMPILER_INCLUDEDIR+=src/$(OS_TARGET) src src/unix src/dummy
+endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
endif
@@ -1023,6 +1071,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
endif
@@ -1086,6 +1140,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
endif
@@ -1137,6 +1194,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override COMPILER_SOURCEDIR+=src/$(OS_TARGET) src
+endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@@ -1464,7 +1524,7 @@ DEBUGSYMEXT=.xcoff
SHORTSUFFIX=mac
IMPORTLIBPREFIX=imp
endif
-ifeq ($(OS_TARGET),darwin)
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
BATCHEXT=.sh
EXEEXT=
HASSHAREDLIB=1
@@ -1479,6 +1539,10 @@ 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
@@ -1964,6 +2028,12 @@ 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
@@ -2027,6 +2097,9 @@ 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
@@ -2078,6 +2151,9 @@ 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),)
@@ -2087,9 +2163,9 @@ else
UNITDIR_RTL=$(PACKAGEDIR_RTL)
endif
ifdef CHECKDEPEND
-$(PACKAGEDIR_RTL)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_RTL) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(FPCMADE)
+$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
endif
else
PACKAGEDIR_RTL=
@@ -2459,7 +2535,7 @@ ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
ifdef USETAR
ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
-ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
+ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *
else
ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
@@ -2504,6 +2580,9 @@ fpc_zipdistinstall:
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
@@ -2551,6 +2630,9 @@ 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)
diff --git a/packages/fcl-registry/src/regini.inc b/packages/fcl-registry/src/regini.inc
index 78e525cbe5..227405619e 100644
--- a/packages/fcl-registry/src/regini.inc
+++ b/packages/fcl-registry/src/regini.inc
@@ -83,30 +83,44 @@ procedure TRegIniFile.WriteBool(const Section, Ident: string; Value: Boolean);
begin
if not OpenKey(fPath+Section,true) then Exit;
try
- inherited WriteBool(Ident,Value);
- finally
- CloseKey;
+ if not fPreferStringValues then
+ inherited WriteBool(Ident,Value)
+ else begin
+ if ValueExists(Ident) and (GetDataType(Ident)=rdInteger) then
+ inherited WriteBool(Ident,Value)
+ else
+ inherited WriteString(Ident,BoolToStr(Value));
+ end;
+ finally
+ CloseKey;
end;
end;
procedure TRegIniFile.WriteInteger(const Section, Ident: string; Value: LongInt);
begin
if not OpenKey(fPath+Section,true) then Exit;
- try
- inherited WriteInteger(Ident,Value);
- finally
- CloseKey;
- end;
+ try
+ if not fPreferStringValues then
+ inherited WriteInteger(Ident,Value)
+ else begin
+ if ValueExists(Ident) and (GetDataType(Ident)=rdInteger) then
+ inherited WriteInteger(Ident,Value)
+ else
+ inherited WriteString(Ident,IntToStr(Value));
+ end;
+ finally
+ CloseKey;
+ end;
end;
procedure TRegIniFile.WriteString(const Section, Ident, Value: String);
begin
- if not OpenKey(fPath+Section,true) then Exit;
- try
+ if not OpenKey(fPath+Section,true) then Exit;
+ try
inherited WriteString(Ident,Value);
- finally
+ finally
CloseKey;
- end;
+ end;
end;
function TRegIniFile.ReadBool(const Section, Ident: string; Default: Boolean): Boolean;
@@ -115,7 +129,10 @@ begin
if not OpenKey(fPath+Section,false) then Exit;
try
if ValueExists(Ident) then
- Result := inherited ReadBool(Ident);
+ if (not fPreferStringValues) or (GetDataType(Ident)=rdInteger) then
+ Result := inherited ReadBool(Ident)
+ else
+ Result := StrToBool(inherited ReadString(Ident));
finally
CloseKey;
end;
@@ -127,7 +144,10 @@ begin
if not OpenKey(fPath+Section,false) then Exit;
try
if ValueExists(Ident) then
- Result := inherited ReadInteger(Ident);
+ if (not fPreferStringValues) or (GetDataType(Ident)=rdInteger) then
+ Result := inherited ReadInteger(Ident)
+ else
+ Result := StrToInt(inherited ReadString(Ident));
finally
CloseKey;
end;
diff --git a/packages/fcl-registry/src/registry.pp b/packages/fcl-registry/src/registry.pp
index 8a3ea3f6c1..5bce60501c 100644
--- a/packages/fcl-registry/src/registry.pp
+++ b/packages/fcl-registry/src/registry.pp
@@ -130,8 +130,9 @@ type
---------------------------------------------------------------------}
TRegIniFile = class(TRegistry)
private
- fFileName: String;
- fPath : String;
+ fFileName : String;
+ fPath : String;
+ fPreferStringValues: Boolean;
public
constructor Create(const FN: string); overload;
constructor Create(const FN: string;aaccess:longword); overload;
@@ -150,6 +151,8 @@ type
procedure DeleteKey(const Section, Ident: String);
property FileName: String read fFileName;
+ property PreferStringValues: Boolean read fPreferStringValues
+ write fPreferStringValues;
end;
{ ---------------------------------------------------------------------
diff --git a/packages/fcl-registry/src/xmlreg.pp b/packages/fcl-registry/src/xmlreg.pp
index ef0274340b..1fca47aae2 100644
--- a/packages/fcl-registry/src/xmlreg.pp
+++ b/packages/fcl-registry/src/xmlreg.pp
@@ -352,22 +352,24 @@ begin
begin
Node[SType]:=IntToStr(Ord(DataType));
DataNode:=Node.FirstChild;
- Result:=DataNode<>Nil; // Bug 9879. Create child here?
- If Result Then
- begin
- Case DataType of
- dtDWORD : DataNode.NodeValue:=IntToStr(PCardinal(@Data)^);
- dtString : begin
- SetLength(S,DataSize);
- If (DataSize>0) then
- Move(Data,S[1],DataSize);
- DataNode.NodeValue:=S;
- end;
- dtBinary : begin
- S:=BufToHex(Data,DataSize);
- DataNode.NodeValue:=S;
- end;
- end;
+ // Reading <value></value> results in <value/>, i.e. no subkey exists any more. Create textnode.
+ if (DataNode=nil) then
+ begin
+ DataNode:=FDocument.CreateTextNode('');
+ Node.AppendChild(DataNode);
+ end;
+ Case DataType of
+ dtDWORD : DataNode.NodeValue:=IntToStr(PCardinal(@Data)^);
+ dtString : begin
+ SetLength(S,DataSize);
+ If (DataSize>0) then
+ Move(Data,S[1],DataSize);
+ DataNode.NodeValue:=S;
+ end;
+ dtBinary : begin
+ S:=BufToHex(Data,DataSize);
+ DataNode.NodeValue:=S;
+ end;
end;
end;
If Result then
diff --git a/packages/fcl-registry/tests/testbasics.pp b/packages/fcl-registry/tests/testbasics.pp
index 9248555ebb..6de7106e84 100644
--- a/packages/fcl-registry/tests/testbasics.pp
+++ b/packages/fcl-registry/tests/testbasics.pp
@@ -19,6 +19,7 @@ type
protected
published
procedure TestSimpleWinRegistry;
+ procedure TestDoubleWrite;
end;
implementation
@@ -37,15 +38,49 @@ begin
// use a hopefully non existing key
AssertFalse(Registry.KeyExists('FPC1234'));
-
+{$ifdef windows}
AssertTrue(Registry.KeyExists('SOFTWARE'));
-
- // Registry.OpenKey('FPC', False);
- // Result:=Registry.ReadString('VALUE1');
+{$endif}
Registry.Free;
end;
+procedure TTestBasics.TestDoubleWrite;
+
+{$ifndef windows}
+Var
+ FN : String;
+{$endif}
+
+begin
+{$ifndef windows}
+ FN:=includetrailingpathdelimiter(GetAppConfigDir(False))+'reg.xml';
+ if FileExists(FN) then
+ AssertTrue(DeleteFile(FN));
+{$endif}
+ with TRegistry.Create do
+ try
+ OpenKey('test', true);
+ WriteString('LAYOUT', '');
+ CloseKey;
+ finally
+ Free;
+ end;
+ with TRegistry.Create do
+ try
+ OpenKey('test', true);
+ WriteString('LAYOUT', '');
+ CloseKey;
+ finally
+ Free;
+ end;
+{$ifndef windows}
+ FN:=includetrailingpathdelimiter(GetAppConfigDir(False))+'reg.xml';
+ if FileExists(FN) then
+ AssertTrue(DeleteFile(FN));
+{$endif}
+end;
+
initialization
RegisterTest(TTestBasics);
end.
diff --git a/packages/fcl-stl/Makefile b/packages/fcl-stl/Makefile
new file mode 100644
index 0000000000..c94d564fd7
--- /dev/null
+++ b/packages/fcl-stl/Makefile
@@ -0,0 +1,2427 @@
+#
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/03/21]
+#
+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 powerpc-wii 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)
+override PACKAGE_NAME=fcl-stl
+override PACKAGE_VERSION=2.5.1
+ifeq ($(FULL_TARGET),i386-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-darwin)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_UNITS+=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+endif
+override INSTALL_FPCPACKAGE=y
+ifeq ($(FULL_TARGET),i386-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-darwin)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override COMPILER_OPTIONS+=-S2h
+endif
+ifeq ($(FULL_TARGET),i386-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-go32v2)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-win32)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-os2)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-freebsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-beos)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-haiku)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-netbsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-solaris)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-qnx)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-netware)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-openbsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-wdosx)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-emx)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-watcom)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-netwlibc)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-wince)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-symbian)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-freebsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-netbsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-amiga)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-atari)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-openbsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-palmos)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),m68k-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-netbsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-amiga)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-macos)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-darwin)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-morphos)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),sparc-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),sparc-netbsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),sparc-solaris)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),sparc-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),x86_64-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),x86_64-freebsd)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),x86_64-darwin)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),x86_64-win64)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),x86_64-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-palmos)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-darwin)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-wince)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-gba)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-nds)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),arm-symbian)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc64-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc64-darwin)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),powerpc64-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),avr-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),armeb-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),armeb-embedded)
+override COMPILER_SOURCEDIR+=src
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override COMPILER_SOURCEDIR+=src
+endif
+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
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+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),powerpc-wii)
+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_units
+ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)
+override ALLTARGET+=fpc_units
+override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
+override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITUNITS))
+override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
+override CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)
+endif
+fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)
+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_distinstall
+fpc_distinstall: install exampleinstall
+.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
+ifndef PACKDIR
+ifndef inUnix
+PACKDIR=$(BASEDIR)/../fpc-pack
+else
+PACKDIR=/tmp/fpc-pack
+endif
+endif
+ifndef ZIPNAME
+ifdef DIST_ZIPNAME
+ZIPNAME=$(DIST_ZIPNAME)
+else
+ZIPNAME=$(PACKAGE_NAME)
+endif
+endif
+ifndef FULLZIPNAME
+FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)
+endif
+ifndef ZIPTARGET
+ifdef DIST_ZIPTARGET
+ZIPTARGET=DIST_ZIPTARGET
+else
+ZIPTARGET=install
+endif
+endif
+ifndef USEZIP
+ifdef inUnix
+USETAR=1
+endif
+endif
+ifndef inUnix
+USEZIPWRAPPER=1
+endif
+ifdef USEZIPWRAPPER
+ZIPPATHSEP=$(PATHSEP)
+ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))
+else
+ZIPPATHSEP=/
+endif
+ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))
+ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
+ifdef USETAR
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)
+ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *
+else
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)
+ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
+endif
+fpc_zipinstall:
+ $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
+ $(MKDIR) $(DIST_DESTDIR)
+ $(DEL) $(ZIPDESTFILE)
+ifdef USEZIPWRAPPER
+ifneq ($(ECHOREDIR),echo)
+ $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPER)
+ $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)
+ $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPPER)
+else
+ echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
+ echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
+ echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
+endif
+ifdef inUnix
+ /bin/sh $(ZIPWRAPPER)
+else
+ifdef RUNBATCH
+ $(RUNBATCH) $(ZIPWRAPPER)
+else
+ $(ZIPWRAPPER)
+endif
+endif
+ $(DEL) $(ZIPWRAPPER)
+else
+ $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
+endif
+ $(DELTREE) $(PACKDIR)
+fpc_zipsourceinstall:
+ $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIPSOURCESUFFIX)
+fpc_zipexampleinstall:
+ifdef HASEXAMPLES
+ $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZIPEXAMPLESUFFIX)
+endif
+fpc_zipdistinstall:
+ $(MAKE) fpc_zipinstall ZIPTARGET=distinstall
+.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: fpc_distinstall
+zipinstall: fpc_zipinstall
+zipsourceinstall: fpc_zipsourceinstall
+zipexampleinstall: fpc_zipexampleinstall
+zipdistinstall: fpc_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
+.NOTPARALLEL:
diff --git a/packages/fcl-stl/Makefile.fpc b/packages/fcl-stl/Makefile.fpc
new file mode 100644
index 0000000000..59ec0f3c9d
--- /dev/null
+++ b/packages/fcl-stl/Makefile.fpc
@@ -0,0 +1,23 @@
+#
+# Makefile.fpc for Free Component Library
+#
+
+[package]
+name=fcl-stl
+version=2.5.1
+
+[target]
+units=garrayutils gdeque gmap gpriorityqueue gqueue gset gstack gutil gvector
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[compiler]
+options=-S2h
+sourcedir=src
+
+[rules]
+.NOTPARALLEL:
diff --git a/packages/fcl-stl/doc/arrayutils.tex b/packages/fcl-stl/doc/arrayutils.tex
new file mode 100644
index 0000000000..b53f8bbf4c
--- /dev/null
+++ b/packages/fcl-stl/doc/arrayutils.tex
@@ -0,0 +1,47 @@
+\chapter{TArrayUtils}
+
+Set of utilities for manipulating arrays data.
+
+Takes 3 arguements for specialization. First one is type of array (can be anything, which is
+accesible by [] operator, e. g. ordinary array, vector, ...), second one is type of array element.
+
+%Usage example for sorting:
+
+%\lstinputlisting[language=Pascal]{sortingexample.pp}
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!procedure RandomShuffle(arr: TArr, size:SizeUint)! &
+O(N)\\ \hline
+\multicolumn{2}{|m{15cm}|}{Shuffles elements in array in random way} \\\hline\hline
+
+\end{longtable}\chapter{TOrderingArrayUtils}
+
+Set of utilities for manipulating arrays data.
+
+Takes 3 arguements for specialization. First one is type of array (can be anything, which is
+accesible by [] operator, e. g. ordinary array, vector, ...), second one is type of array element,
+third one is comparator class (see TPriorityQueue for definition of comparator class).
+
+Usage example for sorting:
+
+\lstinputlisting[language=Pascal]{sortingexample.pp}
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!procedure Sort(arr: TArr, size:SizeUint)! &
+O(N log N) average and worst case. Uses QuickSort, backed up by HeapSort, when QuickSort ends up in
+using too much recursion.\\ \hline
+\multicolumn{2}{|m{15cm}|}{Sort array arr, with specified size. Array indexing should be 0 based.} \\\hline\hline
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/deque.tex b/packages/fcl-stl/doc/deque.tex
new file mode 100644
index 0000000000..d3b85045bd
--- /dev/null
+++ b/packages/fcl-stl/doc/deque.tex
@@ -0,0 +1,81 @@
+\chapter{TDeque}
+
+Implements selfresizing array. Indexing is 0-based.
+Also implement constant time insertion from front.
+
+Usage example:
+
+\lstinputlisting[language=Pascal]{dequeexample.pp}
+
+Memory complexity:
+Uses at most 3times bigger memory than maximal array size (this is only case during reallocation).
+Normal consumption is at most twice as maximal array size.
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!Create! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Constructor. Creates empty array.} \\ \hline\hline
+
+\verb!function Size(): SizeUInt! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns size of array.} \\\hline\hline
+
+\verb!procedure PushBack(value: T)! & Amortized
+O(1), some operations might take O(N) time, when array needs to be reallocated, but sequence of N
+operations takes O(N) time. \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts at the end of array (increases size by 1)} \\\hline\hline
+
+\verb!procedure PopBack()! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Removes element from the end of array (decreases size by 1). When array
+is empty, does nothing.} \\\hline\hline
+
+\verb!procedure PushFront(value: T)! & Same as PushBack. \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts at the beginning of array (increases size by 1)} \\\hline\hline
+
+\verb!procedure PopFront()! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Removes element from the beginning of array (decreases size by 1). When array
+is empty, does nothing.} \\\hline\hline
+
+\verb!function IsEmpty(): boolean! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns true when array is empty} \\\hline\hline
+
+\verb!procedure Insert(position: SizeUInt; value: T)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Inserts value at position. When position is greater than size, puts value
+at the end of array.} \\\hline\hline
+
+\verb!procedure Erase(positine: SizeUInt; value: T)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Erases element from position. When position is outside of array does
+nothing.} \\\hline\hline
+
+\verb!procedure Clear! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Clears array (set size to zero). But doesn't free memory used by array.}
+\\\hline\hline
+
+\verb!function Front: T! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns first element from array.} \\\hline\hline
+
+\verb!function Back: T! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns last element from array.} \\\hline\hline
+
+\verb!procedure Resize(num: SizeUInt)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Changes size of array to num. Doesn't guarantte anything about value of
+newly alocated elements.} \\\hline\hline
+
+\verb!procedure Reserve(num: SizeUInt)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Alocates at least num elements for array. Usefull when you want to
+pushback big number of elements and want to avoid frequent reallocation.} \\\hline\hline
+
+\verb!property item[i: SizeUInt]: T; default;! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Property for accessing i-th element in array. Can be used just by square
+brackets (its default property).} \\\hline\hline
+
+\verb!property mutable[i: SizeUInt]: T;! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns pointer to i-th element in array. Usefull when you store records.} \\\hline
+
+
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/dequeexample.pp b/packages/fcl-stl/doc/dequeexample.pp
new file mode 100644
index 0000000000..f24a54111a
--- /dev/null
+++ b/packages/fcl-stl/doc/dequeexample.pp
@@ -0,0 +1,24 @@
+uses gdeque;
+
+type TDequelli = specialize TDeque<longint>;
+
+var Buffer:TDequelli; i:longint;
+
+begin
+ Buffer := TDequelli.Create;
+ {Push 5 elements at the end of array}
+ for i:=1 to 5 do
+ Buffer.PushBack(i);
+ {change 3rd element to 47}
+ Buffer[2] := 47;
+ {pop last element}
+ Buffer.PopBack;
+ {push 3 element to front}
+ for i:=1 to 3 do
+ Buffer.PushFront(i*10);
+ {print all elements}
+ for i:=0 to Buffer.Size-1 do
+ writeln(Buffer[i]);
+
+ Buffer.Destroy;
+end.
diff --git a/packages/fcl-stl/doc/main.tex b/packages/fcl-stl/doc/main.tex
new file mode 100644
index 0000000000..454306a4ee
--- /dev/null
+++ b/packages/fcl-stl/doc/main.tex
@@ -0,0 +1,63 @@
+
+%% Template by Michal Forisek
+
+
+\documentclass[a4paper]{report}
+\usepackage[utf8]{inputenc}
+\usepackage{a4wide}
+\usepackage{tabularx}
+\usepackage{amsfonts}
+\usepackage{amssymb}
+\usepackage{amsmath}
+\usepackage{epsfig}
+\usepackage{color}
+\usepackage{mathrsfs}
+\usepackage{verbatim}
+\usepackage{hyperref}
+\usepackage{subfigure}
+\usepackage{float}
+\usepackage{listings}
+\usepackage{longtable}
+\input{makra.tex}
+
+\renewcommand{\chaptername}{}
+\renewcommand{\thechapter}{}
+
+\begin{document}
+
+\thispagestyle{empty}
+\vfill
+\vfill
+\begin{center}
+\begin{minipage}{0.8\textwidth}
+\hrule
+\bigskip\bigskip
+\centerline{\LARGE\sc FreePascal generic container library}
+\smallskip
+\centerline{(manual)}
+\smallskip
+\centerline{\url{http://code.google.com/p/stlpascal}}
+\bigskip
+\bigskip
+\bigskip\bigskip
+\hrule
+\end{minipage}
+\end{center}
+\vfill
+{~}
+\hfill version 1.0
+\eject % EOP i
+
+\tableofcontents
+
+\input{vector.tex}
+\input{stack.tex}
+\input{deque.tex}
+\input{queue.tex}
+\input{util.tex}
+\input{priorityqueue.tex}
+\input{arrayutils.tex}
+\input{set.tex}
+\input{map.tex}
+
+\end{document}
diff --git a/packages/fcl-stl/doc/makra.tex b/packages/fcl-stl/doc/makra.tex
new file mode 100644
index 0000000000..c1e3419d7d
--- /dev/null
+++ b/packages/fcl-stl/doc/makra.tex
@@ -0,0 +1,263 @@
+% vim: set fdm=marker:
+%% Original by Michal Forisek
+
+
+%% zakladne definicie
+\newcommand{\quoteme}[1]{\clqq#1\crqq}
+\def\todo#1{[{\color{red} TODO:} {\bf #1}]}
+\def\fixme#1{[{\color{red} FIXME:} {\bf #1}]}
+\def\verify#1{\todo{verify: #1}}
+
+\def\xor{\oplus}
+\def\concat{\|}
+%\def\inr{\in_{R}}
+\def\toa #1 {\overset{#1}{\rightarrow}}
+\def\inr{\overset{\$}{\leftarrow}}
+\def\assign{\leftarrow}
+\def\send{\rightarrow}
+\def\isomorph{\cong}
+\def\nsd{NSD}
+\def\union{\cup}
+\newcommand{\unit}[1]{\ensuremath{\, \mathrm{#1}}}
+\DeclareMathOperator{\dlog}{dlog}
+
+\def\compactlist{
+ \setlength{\itemsep}{1pt}
+ \setlength{\parskip}{0pt}
+ \setlength{\parsep}{0pt}
+}
+\def\mod{\,{\rm mod}\,}
+
+%%% original od Misofa:
+%% {{{
+
+\catcode`\@=11
+
+\def\R{{\cal R}}
+\def\cent{{c\kern-0.3em|\kern0.1em}}
+\def\N{{N}} % FIXME FIXME
+
+\let\eps=\varepsilon
+
+\def\relupdown#1#2#3{\mathrel{\mathop{#1}\limits^{#2}_{#3}} }
+
+\let\then=\Rightarrow
+\let\neht=\Leftarrow
+
+\def\krok#1{\relupdown{\Longrightarrow}{}{#1}}
+\def\thenrm{\relupdown{\Longrightarrow}{}{rm}}
+
+\def\bicik{\upharpoonright}
+\def\B{{\mathbf B}}
+\def\kodTS#1{{\tt <}#1{\tt >}}
+
+\newtheorem{definicia}{Definícia}[section]
+\newtheorem{HLPpoznamka}{Poznámka}[section]
+\newtheorem{HLPpriklad}{Príklad}[section]
+\newtheorem{HLPcvicenie}[HLPpriklad]{CviÄenie}
+\newtheorem{zadanie}{Úloha}[section]
+\newenvironment{poznamka}{\begin{HLPpoznamka}\rm}{\end{HLPpoznamka}}
+\newenvironment{priklad}{\begin{HLPpriklad}\rm}{\end{HLPpriklad}}
+\newenvironment{cvicenie}{\begin{HLPcvicenie}\rm}{\end{HLPcvicenie}}
+\newtheorem{veta}{Veta}[section]
+\newtheorem{lema}[veta]{Lema}
+\newtheorem{dosledok}[veta]{Dôsledok}
+\newtheorem{teza}[veta]{Téza}
+% \newtheorem{dokaz}{Dôkaz}[section]
+
+\long\def\odsadene#1{
+\leftskip=\parindent
+\parindent=0pt
+\vskip-5pt
+
+\parskip=5pt
+#1
+\parskip=0pt
+
+\parindent=\leftskip
+\leftskip=0pt
+
+} % end \odsadene
+
+
+
+
+%%%%%%%%%%% PROSTREDIE PRE PISANIE KOMENTAROV
+
+%\newenvironment{komentar}{%
+%\vskip\baselineskip
+%\tabularx{0.95\textwidth}{|X|}
+%\sl
+%}
+%{\endtabularx
+%\vskip\baselineskip
+%}
+
+\newenvironment{komentar}{%
+\vskip\baselineskip\noindent
+\tabularx{\textwidth}{>{\hsize=.2\hsize}X>{\hsize=1.8\hsize}X}
+\sl ~ & \sl
+}
+{\endtabularx
+\vskip\baselineskip
+}
+
+%\newenvironment{komentar}{%
+%\vskip\baselineskip
+%\trivlist\vspace{-4pt}\raggedleft\item\relax\tabularx{0.9\textwidth}{X}\sl}
+%{\endtabularx\vspace{-4pt}\endtrivlist
+%\vskip\baselineskip
+%}
+
+\newenvironment{dokaz}{\trivlist
+ \item[\hskip \labelsep{\bfseries Dôkaz.}]}{\endtrivlist}
+
+%\newenvironment{dokaz}{%
+%\vskip\baselineskip\noindent
+%\tabularx{\textwidth}{||X||}
+%\sl
+%}
+%{\endtabularx
+%\vskip\baselineskip
+%}
+
+%%%%%%%%%%% PROSTREDIE PRE MOJE ITEMIZE
+
+\newenvironment{myitemize}{%
+\begin{itemize}
+\itemsep-3pt
+}
+{\end{itemize}
+}
+
+%%%%%%%%%%% MATICKE MAKRA
+
+\font\tenrm=csr10
+
+\def\eps{\varepsilon}
+% \def\R{{\mathbb R}}
+\def\lvec#1{\overrightarrow{#1}}
+\def\uhol{{\measuredangle}}
+\def\then{\Rightarrow}
+% \def\lg{{\rm lg}}
+\def\lg{\log_2}
+%\def\div{\mathbin{\rm div}}
+\def\div{{\rm div}}
+
+%%%%%%%%%%% PDF
+
+\newif\ifpdf
+\ifx\pdfoutput\undefined
+ \pdffalse
+\else
+ \pdfoutput=1 \pdftrue
+\fi
+
+%%%%%%%%%%% OBRAZKY
+
+\newcommand{\myincludegraphics}[2][]{\includegraphics[#1]{images/#2}}
+
+%%%%%%%%%%% SLOVNICEK
+
+\openout2=\jobname.slo
+
+\newcommand{\definuj}[3][]{%
+\def\tmpvoid{}\def\tmpfirst{#1}%
+\ifx\tmpvoid\tmpfirst%
+ {\sl #2}\label{definicia:#2}\write2{#2 & #3 & \pageref{definicia:#2} \cr}%
+\else%
+ {\sl #2}\label{definicia:#2}\write2{#1 & #3 & \pageref{definicia:#2} \cr}%
+\fi}
+
+\newcommand{\definujsilent}[2]{%
+\label{definicia:#1}\write2{#1 & #2 & \pageref{definicia:#1} \cr}%
+}
+
+\newcommand\myglossary{
+ \immediate\closeout2
+ %\if@twocolumn\@restonecoltrue\onecolumn\else\@restonecolfalse\fi
+ \chapter{SlovníÄek pojmov}
+ \begin{tabular}{|l|l|r|}
+ \hline
+ {\bfseries slovenský pojem} & {\bfseries anglický preklad} & {\bfseries str.} \\
+ \hline
+ \InputIfFileExists{\jobname.srs}{}{~ & ~ & ~ \\}
+ \hline
+ \end{tabular}
+ %\if@restonecol\twocolumn\fi
+}
+
+%%%%%%%%%%% UVODZOVKY
+
+\catcode`\"=13
+\def "{\begingroup\clqq\def "{\endgroup\crqq}}
+\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~\do\"}
+
+%%%%%%%%%%% DANGER BENDS
+
+\font\manual=manfnt % font used for the METAFONT logo, etc.
+\def\dbend{{\manual\char127}} % dangerous bend sign
+
+\newlength{\bendwidth} \settowidth{\bendwidth}{\dbend} \newlength{\hangwidth}
+
+\def\hangone{%
+ \hangwidth=\bendwidth%
+ \advance\hangwidth 5pt%
+ \hangindent\hangwidth%
+}
+\def\hangtwo{%
+ \hangwidth=\bendwidth%
+ \multiply\hangwidth 2%
+ \advance\hangwidth 6pt%
+ \hangindent\hangwidth%
+}
+
+\def\medbreak{\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi}
+\let\endgraf=\par
+
+\def\d@nger{\medbreak\begingroup\clubpenalty=10000
+%\def\d@nger{\begingroup\clubpenalty=10000
+% \def\par{\endgraf\endgroup\medbreak} \noindent\hangone\hangafter=-2
+ \def\par{\endgraf\endgroup} \noindent\hangone\hangafter=-2
+ \hbox to0pt{\hskip-\hangindent\dbend\hfill}}
+\outer\def\danger{\d@nger}
+
+\def\dd@nger{\medbreak\begingroup\clubpenalty=10000
+% \def\par{\endgraf\endgroup\medbreak} \noindent\hangtwo\hangafter=-2
+ \def\par{\endgraf\endgroup} \noindent\hangtwo\hangafter=-2
+ \hbox to0pt{\hskip-\hangindent\dbend\kern1pt\dbend\hfill}}
+\outer\def\ddanger{\dd@nger}
+
+\def\enddanger{\endgraf\endgroup} % omits the \medbreak
+\def\enddangerhop{\endgraf\endgroup\medbreak}
+
+
+
+
+\def\@nakedcite#1#2{{#1\if@tempswa , #2\fi}}
+\DeclareRobustCommand\nakedcite{%
+ \@ifnextchar [{\@tempswatrue\@nakedcitex}{\@tempswafalse\@nakedcitex[]}}
+\def\@nakedcitex[#1]#2{%
+ \let\@citea\@empty
+ \@nakedcite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{,\penalty\@m\ }%
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue
+ \@latex@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\hbox{\csname b@\@citeb\endcsname}} }}{#1}}
+
+\long\def\FIXME#1{
+ \begin{center}
+ \begin{minipage}{0.8\textwidth}
+ {\bf FIXME:~}\sl #1
+ \end{minipage}
+ \end{center}
+}
+
+
+\catcode`\@=12
+%% }}}
diff --git a/packages/fcl-stl/doc/map.tex b/packages/fcl-stl/doc/map.tex
new file mode 100644
index 0000000000..72edbb0e3d
--- /dev/null
+++ b/packages/fcl-stl/doc/map.tex
@@ -0,0 +1,87 @@
+\chapter{TMap}
+
+Implements container for ordered associative array with unique keys.
+Takes 3 arguments for specialization, first one is type of keys, second one is type of values, third
+one is comparator class for keys.
+Usage example:
+
+\lstinputlisting[language=Pascal]{mapexample.pp}
+
+Some methods return type TMSet.PNode. Usefull fields are Data.Key, Data.Value, for retrieving
+actual Key and Value from node. This node can be also used for navigation between elements by methods of set class.
+You can also change value in node (but not key).
+(But don't do anything else with it, you can lose data integrity.)
+
+Memory complexity:
+Size of stored base + constant overhead for each stored element (3 pointers + one boolean).
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!Create! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Constructor. Creates empty map.} \\ \hline\hline
+
+\verb!function Size(): SizeUInt! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns number of elements in map.} \\\hline\hline
+
+\verb!procedure Insert(key: TKey; value: TValue)! &
+O(lg N), N is number of elements in map \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts key value pair into map. If key was already there, it will have
+new value assigned.} \\\hline\hline
+
+\verb!procedure Delete(key: TKey)! &
+O(lg N) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Deletes key (and associated value) from map. If element is not in map, nothing happens.} \\\hline\hline
+
+\verb!function Find(key: T):TMSet.PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for key in map. If value is not there returns nil. Otherwise
+returns pointer to tree node (type TMSet.PNode), which can be used for retrieving data from map.} \\\hline\hline
+
+\verb!function FindLess(key: T):TMSet.PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for greatest element less than key in map. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type TMSet.PNode), which can be used for retrieving data from map.} \\\hline\hline
+
+\verb!function FindLessEqual(key: T):TMSet.PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for greatest element less or equal than key in map. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type TMSet.PNode), which can be used for retrieving data from map.} \\\hline\hline
+
+\verb!function FindGreater(key: T):TMSet.PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for smallest element greater than key in map. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type TMSet.PNode), which can be used for retrieving data from map.} \\\hline\hline
+
+\verb!function FindGreaterEqual(key: T):TMSet.PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for smallest element greater or equal than key in map. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type TMSet.PNode), which can be used for retrieving data from map.} \\\hline\hline
+
+\verb!function Min:TMSet.PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns node containing smallest key of map. If map is empty returns
+nil.} \\\hline\hline
+
+\verb!function Max:TMSet.PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns node containing largest key of map. If map is empty returns
+nil.} \\\hline\hline
+
+\verb!function Next(x:TMSet.PNode):TMSet.PNode! & O(lg N) worst case, but traversal from smallest element to
+largest takes O(N) time \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns successor of x. If x is largest key of map, returns nil.} \\\hline\hline
+
+\verb!function Prev(x:TMSet.PNode):TMSet.PNode! & O(lg N) worst case, but traversal from largest element to
+smallest takes O(N) time \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns predecessor of x. If x is smallest key of map, returns nil.} \\\hline\hline
+
+\verb!function IsEmpty(): boolean! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns true when map is empty.} \\\hline
+
+\verb!function GetValue(key:TKey):TValue! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns value associated with key. Is key isn't in map crashes.} \\\hline
+
+\verb!property item[i: Key]: TValue; default;! & O(ln N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Property for accessing key i in map. Can be used just by square
+brackets (its default property).} \\\hline\hline
+
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/mapexample.pp b/packages/fcl-stl/doc/mapexample.pp
new file mode 100644
index 0000000000..679c73b03f
--- /dev/null
+++ b/packages/fcl-stl/doc/mapexample.pp
@@ -0,0 +1,24 @@
+uses gmap, gutil;
+
+type lesslli=specialize TLess<longint>;
+ maplli=specialize TMap<longint, longint, lesslli>;
+
+var data:maplli; i:longint; iterator:maplli.TMSet.PNode;
+
+begin
+ data:=maplli.Create;
+
+ for i:=0 to 10 do
+ data[i]:=10*i;
+
+ {Iteration through elements}
+ iterator:=data.Min;
+ while iterator<>nil do begin
+ writeln(iterator^.Data.Key, ' ', iterator^.Data.Value);
+ iterator:=data.next(iterator);
+ end;
+
+ writeln(data.FindLess(7)^.Data.Value);
+
+ data.Destroy;
+end.
diff --git a/packages/fcl-stl/doc/priorityqueue.tex b/packages/fcl-stl/doc/priorityqueue.tex
new file mode 100644
index 0000000000..192010c030
--- /dev/null
+++ b/packages/fcl-stl/doc/priorityqueue.tex
@@ -0,0 +1,44 @@
+\chapter{TPriorityQueue}
+
+Implements priority queue. It's container which allow insertions of elements and then retrieval of
+the biggest one.
+
+For specialization it needs two arguements. First is the type T of stored element. Second one is type
+comparator class, which should have class function \verb!c(a,b: T):boolean! which return true, when
+a is stricly less then b (or in other words, a should be poped out after b).
+
+Usage example:
+
+\lstinputlisting[language=Pascal]{priorityqueueexample.pp}
+
+Memory complexity:
+Since underlaying structure is TVector, memory complexity is same.
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!Create! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Constructor. Creates empty priority queue.} \\ \hline\hline
+
+\verb!function Size(): SizeUInt! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns number of elements in priority queue.} \\\hline\hline
+
+\verb!procedure Push(value: T)! & Amortized
+O(lg N), some operations might take O(N) time, when underlaying array needs to be reallocated, but sequence of N
+operations takes O(N lg N) time. \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts element at the back of queue.} \\\hline\hline
+
+\verb!procedure Pop()! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Removes the biggest element from queue. If queue is empty does nothing.} \\\hline\hline
+
+\verb!function IsEmpty(): boolean! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns true when queue is empty.} \\\hline\hline
+
+\verb!function Top: T! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns the biggest element from queue.} \\\hline
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/priorityqueueexample.pp b/packages/fcl-stl/doc/priorityqueueexample.pp
new file mode 100644
index 0000000000..32756bc2d4
--- /dev/null
+++ b/packages/fcl-stl/doc/priorityqueueexample.pp
@@ -0,0 +1,30 @@
+{$mode objfpc}
+
+uses gpriorityqueue;
+
+type
+ lesslli = class
+ public
+ class function c(a,b: longint):boolean;inline;
+ end;
+
+class function lesslli.c(a,b: longint):boolean;inline;
+begin
+ c:=a<b;
+end;
+
+type priorityqueuelli = specialize TPriorityQueue<longint, lesslli>;
+
+var data:priorityqueuelli; i:longint;
+
+begin
+ data:=priorityqueuelli.Create;
+ for i:=1 to 10 do
+ data.Push(random(1000));
+ while not data.IsEmpty do begin
+ writeln(data.Top);
+ data.Pop;
+ end;
+
+ data.Destroy;
+end.
diff --git a/packages/fcl-stl/doc/queue.tex b/packages/fcl-stl/doc/queue.tex
new file mode 100644
index 0000000000..0105a6c1b3
--- /dev/null
+++ b/packages/fcl-stl/doc/queue.tex
@@ -0,0 +1,39 @@
+\chapter{TQueue}
+
+Implements queue.
+
+Usage example:
+
+\lstinputlisting[language=Pascal]{queueexample.pp}
+
+Memory complexity:
+Since underlaying structure is TDeque, memory complexity is same.
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!Create! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Constructor. Creates empty queue.} \\ \hline\hline
+
+\verb!function Size(): SizeUInt! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns number of elements in queue.} \\\hline\hline
+
+\verb!procedure Push(value: T)! & Amortized
+O(1), some operations might take O(N) time, when array needs to be reallocated, but sequence of N
+operations takes O(N) time \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts element at the back of queue.} \\\hline\hline
+
+\verb!procedure Pop()! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Removes element from the beginning of queue. If queue is empty does nothing.} \\\hline\hline
+
+\verb!function IsEmpty(): boolean! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns true when queue is empty.} \\\hline\hline
+
+\verb!function Front: T! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns the first element from queue.} \\\hline
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/queueexample.pp b/packages/fcl-stl/doc/queueexample.pp
new file mode 100644
index 0000000000..1206c9f660
--- /dev/null
+++ b/packages/fcl-stl/doc/queueexample.pp
@@ -0,0 +1,17 @@
+uses gqueue;
+
+type queuelli = specialize TQueue<longint>;
+
+var data:queuelli; i:longint;
+
+begin
+ data:=queuelli.Create;
+ for i:=1 to 10 do
+ data.Push(10*i);
+ while not data.IsEmpty do begin
+ writeln(data.Front);
+ data.Pop;
+ end;
+
+ data.Destroy;
+end.
diff --git a/packages/fcl-stl/doc/set.tex b/packages/fcl-stl/doc/set.tex
new file mode 100644
index 0000000000..2dc006573b
--- /dev/null
+++ b/packages/fcl-stl/doc/set.tex
@@ -0,0 +1,76 @@
+\chapter{TSet}
+
+Implements container for storing ordered set of unique elements.
+Takes 2 arguments for specialization, first one is type of elements, second one is comparator class.
+Usage example:
+
+\lstinputlisting[language=Pascal]{setexample.pp}
+
+Some methods return type of PNode. It has field Data, which can be used for retrieving data from
+that node. This node can be also used for navigation between elements by methods of set class.
+(But don't do anything else with it, you can lose data integrity.)
+
+Memory complexity:
+Size of stored elements + constant overhead for each stored element (3 pointers + one boolean).
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!Create! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Constructor. Creates empty set.} \\ \hline\hline
+
+\verb!function Size(): SizeUInt! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns number of elements in set.} \\\hline\hline
+
+\verb!procedure Insert(value: T)! &
+O(lg N), N is number of elements in set \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts element into set.} \\\hline\hline
+
+\verb!procedure Delete(value: T)! &
+O(lg N), N is number of elements in set \\ \hline
+\multicolumn{2}{|m{15cm}|}{Deletes value from set. If element is not in set, nothing happens.} \\\hline\hline
+
+\verb!function Find(value: T):PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for value in set. If value is not there returns nil. Otherwise
+returns pointer to tree node (type PNode), which can be used for retrieving data from set.} \\\hline\hline
+
+\verb!function FindLess(value: T):PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for greatest element less than value in set. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type PNode), which can be used for retrieving data from set.} \\\hline\hline
+
+\verb!function FindLessEqual(value: T):PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for greatest element less or equal than value in set. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type PNode), which can be used for retrieving data from set.} \\\hline\hline
+
+\verb!function FindGreater(value: T):PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for smallest element greater than value in set. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type PNode), which can be used for retrieving data from set.} \\\hline\hline
+
+\verb!function FindGreaterEqual(value: T):PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Searches for smallest element greater or equal than value in set. If such element is not there returns nil. Otherwise
+returns pointer to tree node (type PNode), which can be used for retrieving data from set.} \\\hline\hline
+
+\verb!function Min:PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns node containing smallest element of set. If set is empty returns
+nil.} \\\hline\hline
+
+\verb!function Max:PNode! & O(lg N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns node containing largest element of set. If set is empty returns
+nil.} \\\hline\hline
+
+\verb!function Next(x:PNode):PNode! & O(lg N) worst case, but traversal from smallest element to
+largest takes O(N) time \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns successor of x. If x is largest element of set, returns nil.} \\\hline\hline
+
+\verb!function Prev(x:PNode):PNode! & O(lg N) worst case, but traversal from largest element to
+smallest takes O(N) time \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns predecessor of x. If x is smallest element of set, returns nil.} \\\hline\hline
+
+\verb!function IsEmpty(): boolean! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns true when set is empty.} \\\hline
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/setexample.pp b/packages/fcl-stl/doc/setexample.pp
new file mode 100644
index 0000000000..758b1a5245
--- /dev/null
+++ b/packages/fcl-stl/doc/setexample.pp
@@ -0,0 +1,24 @@
+uses gset, gutil;
+
+type lesslli=specialize TLess<longint>;
+ setlli=specialize TSet<longint, lesslli>;
+
+var data:setlli; i:longint; iterator:setlli.PNode;
+
+begin
+ data:=setlli.Create;
+
+ for i:=0 to 10 do
+ data.insert(i);
+
+ {Iteration through elements}
+ iterator:=data.Min;
+ while iterator<>nil do begin
+ writeln(iterator^.Data);
+ iterator:=data.next(iterator);
+ end;
+
+ writeln(data.FindLess(7)^.Data);
+
+ data.Destroy;
+end.
diff --git a/packages/fcl-stl/doc/sortingexample.pp b/packages/fcl-stl/doc/sortingexample.pp
new file mode 100644
index 0000000000..4aa155909d
--- /dev/null
+++ b/packages/fcl-stl/doc/sortingexample.pp
@@ -0,0 +1,20 @@
+uses garrayutils, gutil, gvector;
+
+type vectorlli = specialize TVector<longint>;
+ lesslli = specialize TLess<longint>;
+ sortlli = specialize TOrderingArrayUtils<vectorlli, longint, lesslli>;
+
+var data:vectorlli; n,i:longint;
+
+begin
+ randomize;
+ data:=vectorlli.Create;
+ read(n);
+ for i:=1 to n do
+ data.pushback(random(1000000000));
+ sortlli.sort(data, data.size());
+ for i:=1 to n do
+ writeln(data[i-1]);
+
+ data.Destroy;
+end.
diff --git a/packages/fcl-stl/doc/stack.tex b/packages/fcl-stl/doc/stack.tex
new file mode 100644
index 0000000000..64d11f594c
--- /dev/null
+++ b/packages/fcl-stl/doc/stack.tex
@@ -0,0 +1,39 @@
+\chapter{TStack}
+
+Implements stack.
+
+Usage example:
+
+\lstinputlisting[language=Pascal]{stackexample.pp}
+
+Memory complexity:
+Since underlaying structure is TVector, memory complexity is same.
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!Create! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Constructor. Creates empty stack.} \\ \hline\hline
+
+\verb!function Size(): SizeUInt! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns number of elements in stack.} \\\hline\hline
+
+\verb!procedure Push(value: T)! & Amortized
+O(1), some operations might take O(N) time, when array needs to be reallocated, but sequence of N
+operations takes O(N) time \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts element on the top of stack.} \\\hline\hline
+
+\verb!procedure Pop()! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Removes element from the top of stack. If stack is empty does nothing.} \\\hline\hline
+
+\verb!function IsEmpty(): boolean! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns true when stack is empty} \\\hline\hline
+
+\verb!function Top: T! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns top element from stack.} \\\hline
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/stackexample.pp b/packages/fcl-stl/doc/stackexample.pp
new file mode 100644
index 0000000000..31d3bb57e0
--- /dev/null
+++ b/packages/fcl-stl/doc/stackexample.pp
@@ -0,0 +1,17 @@
+uses gstack;
+
+type stacklli = specialize TStack<longint>;
+
+var data:stacklli; i:longint;
+
+begin
+ data:=stacklli.Create;
+ for i:=1 to 10 do
+ data.Push(10*i);
+ while not data.IsEmpty do begin
+ writeln(data.Top);
+ data.Pop;
+ end;
+
+ data.Destroy;
+end.
diff --git a/packages/fcl-stl/doc/util.tex b/packages/fcl-stl/doc/util.tex
new file mode 100644
index 0000000000..7a02f8ac0a
--- /dev/null
+++ b/packages/fcl-stl/doc/util.tex
@@ -0,0 +1,9 @@
+\chapter{TLess, TGreater}
+
+Comparators classes. Can be used in PriorityQueue and Sorting as comparator functions.
+TLess is used for ordering from smallest element to largest, TGreater is used for oposite ordering.
+
+%Usage example:
+
+%\lstinputlisting[language=Pascal]{queueexample.pp}
+
diff --git a/packages/fcl-stl/doc/vector.tex b/packages/fcl-stl/doc/vector.tex
new file mode 100644
index 0000000000..c0097262d3
--- /dev/null
+++ b/packages/fcl-stl/doc/vector.tex
@@ -0,0 +1,73 @@
+\chapter{TVector}
+
+Implements selfresizing array. Indexing is 0-based.
+
+Usage example:
+
+\lstinputlisting[language=Pascal]{vectorexample.pp}
+
+Memory complexity:
+Uses at most 3times bigger memory than maximal array size (this is only case during reallocation).
+Normal consumption is at most twice as maximal array size.
+
+Members list:
+
+\begin{longtable}{|m{10cm}|m{5cm}|}
+\hline
+Method & Complexity guarantees \\ \hline
+\multicolumn{2}{|m{15cm}|}{Description} \\ \hline\hline
+
+\verb!Create! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Constructor. Creates empty array.} \\ \hline\hline
+
+\verb!function Size(): SizeUInt! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns size of array.} \\\hline\hline
+
+\verb!procedure PushBack(value: T)! & Amortized
+O(1), some operations might take O(N) time, when array needs to be reallocated, but sequence of N
+operations takes O(N) time \\ \hline
+\multicolumn{2}{|m{15cm}|}{Inserts at the end of array (increases size by 1)} \\\hline\hline
+
+\verb!procedure PopBack()! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Removes element from the end of array (decreases size by 1). When array
+is empty, does nothing.} \\\hline\hline
+
+\verb!function IsEmpty(): boolean! & O(1) \\ \hline
+\multicolumn{2}{|m{15cm}|}{Returns true when array is empty} \\\hline\hline
+
+\verb!procedure Insert(position: SizeUInt; value: T)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Inserts value at position. When position is greater than size, puts value
+at the end of array.} \\\hline\hline
+
+\verb!procedure Erase(positine: SizeUInt; value: T)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Erases element from position. When position is outside of array does
+nothing.} \\\hline\hline
+
+\verb!procedure Clear! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Clears array (set size to zero). But doesn't free memory used by array.}
+\\\hline\hline
+
+\verb!function Front: T! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns first element from array.} \\\hline\hline
+
+\verb!function Back: T! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns last element from array.} \\\hline\hline
+
+\verb!procedure Resize(num: SizeUInt)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Changes size of array to num. Doesn't guarantte anything about value of
+newly alocated elements.} \\\hline\hline
+
+\verb!procedure Reserve(num: SizeUInt)! & O(N) \\\hline
+\multicolumn{2}{|m{15cm}|}{Alocates at least num elements for array. Usefull when you want to
+pushback big number of elements and want to avoid frequent reallocation.} \\\hline\hline
+
+\verb!property item[i: SizeUInt]: T; default;! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Property for accessing i-th element in array. Can be used just by square
+brackets (its default property).} \\\hline\hline
+
+\verb!property mutable[i: SizeUInt]: T;! & O(1) \\\hline
+\multicolumn{2}{|m{15cm}|}{Returns pointer to i-th element in array. Usefull when you store records.} \\\hline
+
+
+
+\end{longtable}
diff --git a/packages/fcl-stl/doc/vectorexample.pp b/packages/fcl-stl/doc/vectorexample.pp
new file mode 100644
index 0000000000..5b0e4eba0f
--- /dev/null
+++ b/packages/fcl-stl/doc/vectorexample.pp
@@ -0,0 +1,21 @@
+uses gvector;
+
+type TVectorlli = specialize TVector<longint>;
+
+var Buffer:TVectorlli; i:longint;
+
+begin
+ Buffer := TVectorlli.Create;
+ {Push 5 elements at the end of array}
+ for i:=1 to 5 do
+ Buffer.PushBack(i);
+ {change 3rd element to 47}
+ Buffer[2] := 47;
+ {pop last element}
+ Buffer.PopBack;
+ {print all elements}
+ for i:=0 to Buffer.Size-1 do
+ writeln(Buffer[i]);
+
+ Buffer.Destroy;
+end.
diff --git a/packages/fcl-stl/src/garrayutils.pp b/packages/fcl-stl/src/garrayutils.pp
new file mode 100644
index 0000000000..f9773b63db
--- /dev/null
+++ b/packages/fcl-stl/src/garrayutils.pp
@@ -0,0 +1,254 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit garrayutils;
+
+interface
+
+const MaxDepth=60;
+const InsertSortThreshold=16;
+
+{TCompare is comparing class, which should have class method c(a,b:TValue):boolean, which returns true if a is less than b}
+type
+ generic TOrderingArrayUtils<TArr, Tvalue, TCompare>=class
+ private
+ class procedure Sortrange(var Arr:TArr; Start,Fin,d:SizeUInt);
+ class procedure HeapSort(var Arr:TArr; Start,Fin:SizeUInt);
+ class procedure InsertSort(var Arr:TArr; Start,Fin:SizeUInt);
+ class function Left(a:SizeUInt):SizeUInt;inline;
+ class function Right(a:SizeUInt):SizeUInt;inline;
+ class procedure Heapify(var Arr: TArr; Position:SizeUInt; Start,Fin:SizeUInt);
+ class function Parent(a:SizeUInt):SizeUInt;inline;
+ public
+ class procedure Sort(var Arr: TArr; size:SizeUInt);
+ class function NextPermutation(var Arr: TArr; size:SizeUInt):boolean;
+ end;
+
+ generic TArrayUtils<TArr, Tvalue>=class
+ public
+ class procedure RandomShuffle(Arr: TArr; size: SizeUInt);
+ end;
+
+implementation
+
+class function TOrderingArrayUtils.Left(a:SizeUInt):SizeUInt;inline;
+begin
+ Left:=((a+1)shl 1)-1;
+end;
+
+class function TOrderingArrayUtils.Right(a:SizeUInt):SizeUInt;inline;
+begin
+ Right:=(a+1) shl 1;
+end;
+
+class function TOrderingArrayUtils.Parent(a:SizeUInt):SizeUInt;inline;
+begin
+ Parent:=(a-1)shr 1;
+end;
+
+class procedure TOrderingArrayUtils.Heapify(var Arr: TArr; Position:SizeUInt; Start,Fin:SizeUInt);
+var mpos,l,r:SizeUInt; temp:TValue;
+begin
+ while(true) do
+ begin
+ mpos:=Position;
+ l:=Left(Position-Start)+Start;
+ r:=Right(Position-Start)+Start;
+ if (l<Fin) AND (TCompare.c(Arr[mpos],Arr[l])) then
+ mpos:=l;
+ if (r<Fin) AND (TCompare.c(Arr[mpos],Arr[r])) then
+ mpos:=r;
+ if mpos = Position then break;
+
+ temp:=Arr[Position];
+ Arr[Position]:=Arr[mpos];
+ Arr[mpos]:=temp;
+ Position:=mpos;
+ end;
+end;
+
+class procedure TOrderingArrayUtils.Sort(var Arr:TArr; size:SizeUInt);inline;
+begin
+ Sortrange(Arr,0,size,0);
+ InsertSort(Arr,0,size);
+end;
+
+class procedure TOrderingArrayUtils.Sortrange(var Arr:TArr; Start,Fin,d:SizeUInt);
+var pivot,temp:Tvalue; i,j,k,l:SizeUInt;
+begin
+ if (Fin-Start) <= InsertSortThreshold then
+ begin
+ InsertSort(Arr,Start,Fin);
+ exit;
+ end;
+ if d>=maxdepth then
+ begin
+ HeapSort(Arr, Start, Fin);
+ exit;
+ end;
+{median of 3}
+ j:=Start;
+ k:=Fin-1;
+ l:=(Start+Fin)div 2;
+ if(TCompare.c(Arr[j],Arr[k])) and (TCompare.c(Arr[j],Arr[l])) then
+ begin
+ if(TCompare.c(Arr[k],Arr[l])) then
+ begin
+ temp:=Arr[k];
+ Arr[k]:=Arr[j];
+ Arr[j]:=temp;
+ end else
+ begin
+ temp:=Arr[l];
+ Arr[l]:=Arr[j];
+ Arr[j]:=temp;
+ end;
+ end
+ else if(TCompare.c(Arr[k],Arr[j])) and (TCompare.c(Arr[l],Arr[j])) then
+ begin
+ if(TCompare.c(Arr[l],Arr[k])) then
+ begin
+ temp:=Arr[k];
+ Arr[k]:=Arr[j];
+ Arr[j]:=temp;
+ end else
+ begin
+ temp:=Arr[l];
+ Arr[l]:=Arr[j];
+ Arr[j]:=temp;
+ end;
+ end;
+
+{partition}
+ pivot:=Arr[Start];
+
+ i:=Start-1;
+ j:=Fin;
+ repeat
+ repeat
+ dec(j);
+ until (not (TCompare.c(pivot,Arr[j])));
+
+
+ repeat
+ inc(i);
+ until (not (TCompare.c(Arr[i],pivot)));
+ if(i < j) then
+ begin
+ temp:=Arr[i];
+ Arr[i]:=Arr[j];
+ Arr[j]:=temp;
+ end;
+ until (i>=j);
+
+ Sortrange(Arr, Start, j+1, d+1);
+ Sortrange(Arr, j+1, Fin, d+1);
+end;
+
+class procedure TOrderingArrayUtils.InsertSort(var Arr:TArr; Start,Fin:SizeUInt);inline;
+var i,j:SizeUInt; temp:Tvalue;
+begin
+ for i:=Start+1 to Fin-1 do
+ begin
+ j:=i;
+ temp:=Arr[i];
+ while (j>0) and (TCompare.c(temp,Arr[j-1])) do
+ begin
+ Arr[j]:=Arr[j-1];
+ dec(j);
+ end;
+ Arr[j]:=temp;
+ end;
+end;
+
+class procedure TOrderingArrayUtils.HeapSort(var Arr: TArr; Start,Fin:SizeUInt);
+var i,cur,next,l,r,size:SizeUInt; temp:Tvalue;
+begin
+{buildHeap}
+ size:=Fin-Start;
+ for i:=((size div 2)-1) downto 0 do
+ Heapify(Arr, i+Start, Start, Fin);
+{bottomup HeapSort}
+ for i:=size-1 downto 1 do
+ begin
+ Fin:=Fin-1;
+ cur:=Start;
+ temp:=Arr[Start];
+ while(true) do
+ begin
+ l:=Left(cur-Start)+Start;
+ if l>=Fin then
+ break;
+ next:=l;
+ r:=Right(cur-Start)+Start;
+ if (r<Fin) AND (TCompare.c(Arr[l],Arr[r])) then
+ next:=r;
+ Arr[cur]:=Arr[next];
+ cur:=next;
+ end;
+ Arr[cur]:=temp;
+ temp:=Arr[i+Start];
+ Arr[i+Start]:=Arr[cur];
+ Arr[cur]:=temp;
+ l:=Parent(cur-Start)+Start;
+ while (cur <> 0) AND (TCompare.c(Arr[l],Arr[cur])) do
+ begin
+ temp:=Arr[cur];
+ Arr[cur]:=Arr[l];
+ Arr[l]:=temp;
+ cur:=l;
+ l:=Parent(cur-Start)+Start;
+ end;
+ end;
+end;
+
+class function TOrderingArrayUtils.NextPermutation(var Arr: TArr; size: SizeUInt):boolean;
+var i,f:SizeUInt; temp:TValue;
+begin
+ f := -1;
+ for i:=size-1 downto 1 do begin
+ if (TCompare.c(arr[i-1], arr[i])) then begin
+ f := i-1;
+ break;
+ end;
+ end;
+ if f = -1 then exit(false);
+ for i:=size-1 downto 1 do begin
+ if (TCompare.c(arr[f], arr[i])) then begin
+ temp:=arr[f]; arr[f] := arr[i]; arr[i] := temp;
+ break;
+ end;
+ end;
+ i:= size-1;
+ inc(f);
+ while (i > f) do begin
+ temp:=arr[f]; arr[f] := arr[i]; arr[i] := temp;
+ dec(i); inc(f);
+ end;
+ NextPermutation := true;
+end;
+
+class procedure TArrayUtils.RandomShuffle(Arr: TArr; size: SizeUInt);
+var i,r:SizeUInt; temp:Tvalue;
+begin
+ for i:=size-1 downto 1 do begin
+ r:=random(Int64(i));
+ temp:=Arr[r];
+ Arr[r]:=Arr[i];
+ Arr[i]:=temp;
+ end;
+end;
+
+
+end.
diff --git a/packages/fcl-stl/src/gdeque.pp b/packages/fcl-stl/src/gdeque.pp
new file mode 100644
index 0000000000..f83956f3c5
--- /dev/null
+++ b/packages/fcl-stl/src/gdeque.pp
@@ -0,0 +1,204 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gdeque;
+
+interface
+
+type
+ generic TDeque<T>=class
+ private
+ type
+ PT=^T;
+ TArr=array of T;
+ var
+ FData:TArr;
+ FDataSize:SizeUInt;
+ FCapacity:SizeUInt;
+ FStart:SizeUInt;
+ procedure SetValue(position:SizeUInt; value:T);inline;
+ function GetValue(position:SizeUInt):T;inline;
+ function GetMutable(position:SizeUInt):PT;inline;
+ procedure IncreaseCapacity();inline;
+ public
+ function Size():SizeUInt;inline;
+ constructor Create();
+ procedure PushBack(value:T);inline;
+ procedure PushFront(value:T);inline;
+ procedure PopBack();inline;
+ procedure PopFront();inline;
+ function Front():T;inline;
+ function Back():T;inline;
+ function IsEmpty():boolean;inline;
+ procedure Reserve(cap:SizeUInt);inline;
+ procedure Resize(cap:SizeUInt);inline;
+ procedure Insert(Position:SizeUInt; Value:T);inline;
+ procedure Erase(Position:SIzeUInt);inline;
+ property Items[i : SizeUInt]: T read GetValue write SetValue; default;
+ property Mutable[i : SizeUInt]:PT read GetMutable;
+end;
+
+implementation
+
+constructor TDeque.Create();
+begin
+ FDataSize:=0;
+ FCapacity:=0;
+ FStart:=0;
+end;
+
+function TDeque.Size():SizeUInt;inline;
+begin
+ Size:=FDataSize;
+end;
+
+function TDeque.IsEmpty():boolean;inline;
+begin
+ if Size()=0 then
+ IsEmpty:=true
+ else
+ IsEmpty:=false;
+end;
+
+procedure TDeque.PushBack(value:T);inline;
+begin
+ if(FDataSize=FCapacity) then
+ IncreaseCapacity;
+ FData[(FStart+FDataSize)mod FCapacity]:=value;
+ inc(FDataSize);
+end;
+
+procedure TDeque.PopFront();inline;
+begin
+ if(FDataSize>0) then
+ begin
+ inc(FStart);
+ dec(FDataSize);
+ if(FStart=FCapacity) then
+ FStart:=0;
+ end;
+end;
+
+procedure TDeque.PopBack();inline;
+begin
+ if(FDataSize>0) then
+ dec(FDataSize);
+end;
+
+procedure TDeque.PushFront(value:T);inline;
+begin
+ if(FDataSize=FCapacity) then
+ IncreaseCapacity;
+ if(FStart=0) then
+ FStart:=FCapacity-1
+ else
+ dec(FStart);
+ FData[FStart]:=value;
+ inc(FDataSize);
+end;
+
+function TDeque.Front():T;inline;
+begin
+ Assert(size > 0, 'Accessing empty deque');
+ Front:=FData[FStart];
+end;
+
+function TDeque.Back():T;inline;
+begin
+ Assert(size > 0, 'Accessing empty deque');
+ Back:=FData[(FStart+FDataSize-1)mod FCapacity];
+end;
+
+procedure TDeque.SetValue(position:SizeUInt; value:T);inline;
+begin
+ Assert(position < size, 'Deque access out of range');
+ FData[(FStart+position)mod FCapacity]:=value;
+end;
+
+function TDeque.GetValue(position:SizeUInt):T;inline;
+begin
+ Assert(position < size, 'Deque access out of range');
+ GetValue:=FData[(FStart+position) mod FCapacity];
+end;
+
+function TDeque.GetMutable(position:SizeUInt):PT;inline;
+begin
+ Assert(position < size, 'Deque access out of range');
+ GetMutable:=@FData[(FStart+position) mod FCapacity];
+end;
+
+procedure TDeque.IncreaseCapacity;inline;
+var i,OldEnd:SizeUInt;
+begin
+ OldEnd:=FCapacity;
+ if(FCapacity=0) then
+ FCapacity:=1
+ else
+ FCapacity:=FCapacity*2;
+ SetLength(FData, FCapacity);
+ if (FStart>0) then
+ for i:=0 to FStart-1 do
+ FData[OldEnd+i]:=FData[i];
+end;
+
+procedure TDeque.Reserve(cap:SizeUInt);inline;
+var i,OldEnd:SizeUInt;
+begin
+ if(cap<FCapacity) then
+ exit
+ else if(cap<=2*FCapacity) then
+ IncreaseCapacity
+ else
+ begin
+ OldEnd:=FCapacity;
+ FCapacity:=cap;
+ SetLength(FData, FCapacity);
+ if FStart > 0 then
+ for i:=0 to FStart-1 do
+ FData[OldEnd+i]:=FData[i];
+ end;
+end;
+
+procedure TDeque.Resize(cap:SizeUInt);inline;
+begin
+ Reserve(cap);
+ FDataSize:=cap;
+end;
+
+procedure TDeque.Insert(Position:SizeUInt; Value: T);inline;
+var i:SizeUInt;
+begin
+ pushBack(Value);
+ for i:=Size-1 downto Position+1 do
+ begin
+ Items[i]:=Items[i-1];
+ end;
+ Items[Position]:=Value;
+end;
+
+procedure TDeque.Erase(Position:SizeUInt);inline;
+var i:SizeUInt;
+begin
+ if Position <= Size then
+ begin
+ for i:=Position to Size-2 do
+ begin
+ Items[i]:=Items[i+1];
+ end;
+ popBack();
+ end;
+end;
+
+
+end.
diff --git a/packages/fcl-stl/src/gmap.pp b/packages/fcl-stl/src/gmap.pp
new file mode 100644
index 0000000000..fb64db26b5
--- /dev/null
+++ b/packages/fcl-stl/src/gmap.pp
@@ -0,0 +1,163 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gmap;
+
+interface
+
+uses gset;
+
+type
+ generic TMapCompare<TPair, TKeyCompare>=class
+ class function c(a,b :TPair):boolean;
+ end;
+
+ generic TMap<TKey, TValue, TCompare>=class
+ public
+ type
+ TPair=record
+ Value:TValue;
+ Key:TKey;
+ end;
+ TMCompare = specialize TMapCompare<TPair, TCompare>;
+ TMSet = specialize TSet<TPair, TMCompare>;
+ PTValue = ^TValue;
+ PTPair = ^TPair;
+ var
+ private
+ FSet:TMSet;
+ public
+ function Find(key:TKey):TMSet.PNode;inline;
+ function FindLess(key:TKey):TMSet.PNode;inline;
+ function FindLessEqual(key:TKey):TMSet.PNode;inline;
+ function FindGreater(key:TKey):TMSet.PNode;inline;
+ function FindGreaterEqual(key:TKey):TMSet.PNode;inline;
+ function GetValue(key:TKey):TValue;inline;
+ procedure Insert(key:TKey; value:TValue);inline;
+ function Min:TMSet.PNode;inline;
+ function Max:TMSet.PNode;inline;
+ function Next(x:TMSet.PNode):TMSet.PNode;inline;
+ function Prev(x:TMSet.PNode):TMSet.PNode;inline;
+ procedure Delete(key:TKey);inline;
+ function Size:SizeUInt;inline;
+ function IsEmpty:boolean;inline;
+ constructor Create;
+ destructor Destroy;override;
+ property Items[i : TKey]: TValue read GetValue write Insert; default;
+ end;
+
+implementation
+
+class function TMapCompare.c(a,b: TPair):boolean;
+begin
+ c:= TKeyCompare.c(a.Key, b.Key);
+end;
+
+constructor TMap.Create;
+begin
+ FSet:=TMSet.Create;
+end;
+
+destructor TMap.Destroy;
+begin
+ FSet.Destroy;
+end;
+
+procedure TMap.Delete(key:TKey);inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ FSet.Delete(Pair);
+end;
+
+function TMap.Find(key:TKey):TMSet.PNode;inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ Find:=FSet.Find(Pair);
+end;
+
+function TMap.FindLess(key:TKey):TMSet.PNode;inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ FindLess:=FSet.FindLess(Pair);
+end;
+
+function TMap.FindLessEqual(key:TKey):TMSet.PNode;inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ FindLessEqual:=FSet.FindLessEqual(Pair);
+end;
+
+function TMap.FindGreater(key:TKey):TMSet.PNode;inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ FindGreater:=FSet.FindGreater(Pair);
+end;
+
+function TMap.FindGreaterEqual(key:TKey):TMSet.PNode;inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ FindGreaterEqual:=FSet.FindGreaterEqual(Pair);
+end;
+
+function TMap.GetValue(key:TKey):TValue;inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ GetValue:=FSet.Find(Pair)^.Data.Value;
+end;
+
+procedure TMap.Insert(key:TKey; value:TValue);inline;
+var Pair:TPair;
+begin
+ Pair.Key:=key;
+ FSet.Insert(Pair)^.Data.Value := value;
+end;
+
+function TMap.Min:TMSet.PNode;inline;
+begin
+ Min:=FSet.Min;
+end;
+
+function TMap.Max:TMSet.PNode;inline;
+begin
+ Max:=FSet.Max;
+end;
+
+function TMap.Next(x:TMSet.PNode):TMSet.PNode;inline;
+begin
+ Next:=FSet.Next(x);
+end;
+
+function TMap.Prev(x:TMSet.PNode):TMSet.PNode;inline;
+begin
+ Prev:=FSet.Prev(x);
+end;
+
+function TMap.Size:SizeUInt;inline;
+begin
+ Size:=FSet.Size;
+end;
+
+function TMap.IsEmpty:boolean;inline;
+begin
+ IsEmpty:=FSet.IsEmpty;
+end;
+
+end.
diff --git a/packages/fcl-stl/src/gpriorityqueue.pp b/packages/fcl-stl/src/gpriorityqueue.pp
new file mode 100644
index 0000000000..7aa3d32cbc
--- /dev/null
+++ b/packages/fcl-stl/src/gpriorityqueue.pp
@@ -0,0 +1,141 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gpriorityqueue;
+
+interface
+
+uses gvector;
+
+{TCompare is comparing class, which should have class method c(a,b:T):boolean, which returns true is a is less than b}
+
+type
+ generic TPriorityQueue<T, TCompare>=class
+ private
+ type
+ TContainer=specialize TVector<T>;
+ var
+ FData:TContainer;
+
+ procedure PushUp(position:SizeUInt);
+ function Left(a:SizeUInt):SizeUInt;inline;
+ function Right(a:SizeUInt):SizeUInt;inline;
+ procedure Heapify(position:SizeUInt);
+ function Parent(a:SizeUInt):SizeUInt;inline;
+ public
+ constructor Create;
+ destructor Destroy;override;
+ function Top:T;inline;
+ procedure Pop;inline;
+ procedure Push(value:T);inline;
+ function Size:SizeUInt;inline;
+ function IsEmpty:boolean;inline;
+ end;
+
+implementation
+
+constructor TPriorityQueue.Create;
+begin
+ FData:=TContainer.Create;
+end;
+
+destructor TPriorityQueue.Destroy;
+begin;
+ FData.Destroy;
+end;
+
+function TPriorityQueue.Size:SizeUInt;inline;
+begin
+ Size:=FData.Size;
+end;
+
+function TPriorityQueue.IsEmpty:boolean;inline;
+begin
+ IsEmpty:=FData.Size=0;
+end;
+
+function TPriorityQueue.Top:T;inline;
+begin
+ Top:=FData[0];
+end;
+
+procedure TPriorityQueue.Pop;inline;
+begin
+ if not IsEmpty then begin
+ FData[0]:=FData.back;
+ FData.PopBack;
+ Heapify(0);
+ end;
+end;
+
+procedure TPriorityQueue.PushUp(position:SizeUInt);
+var np:SizeUInt; temp:T;
+begin
+ while(position>0) do
+ begin
+ np := Parent(position);
+ if(TCompare.c(FData[np],FData[position])) then
+ begin
+ temp:=FData[np];
+ FData[np]:=FData[position];
+ FData[position]:=temp;
+ position:=np;
+ end else
+ break;
+ end;
+end;
+
+procedure TPriorityQueue.Push(value:T);inline;
+begin
+ FData.PushBack(value);
+ PushUp(FData.Size-1);
+end;
+
+function TPriorityQueue.Left(a:SizeUInt):SizeUInt;inline;
+begin
+ Left:=((a+1)shl 1)-1;
+end;
+
+function TPriorityQueue.Right(a:SizeUInt):SizeUInt;inline;
+begin
+ Right:=(a+1) shl 1;
+end;
+
+function TPriorityQueue.Parent(a:SizeUInt):SizeUInt;inline;
+begin
+ Parent:=(a-1)shr 1;
+end;
+
+procedure TPriorityQueue.Heapify(position:SizeUInt);
+var mpos,l,r:SizeUInt; temp:T;
+begin
+ while(true) do
+ begin
+ mpos:=position;
+ l:=Left(position);
+ r:=Right(position);
+ if (l<FData.Size) AND (TCompare.c(FData[mpos],FData[l])) then
+ mpos:=l;
+ if (r<FData.Size) AND (TCompare.c(FData[mpos],FData[r])) then
+ mpos:=r;
+ if mpos = position then break;
+
+ temp:=FData[position];
+ FData[position]:=FData[mpos];
+ FData[mpos]:=temp;
+ position:=mpos;
+ end;
+end;
+
+end.
diff --git a/packages/fcl-stl/src/gqueue.pp b/packages/fcl-stl/src/gqueue.pp
new file mode 100644
index 0000000000..a56aef4e47
--- /dev/null
+++ b/packages/fcl-stl/src/gqueue.pp
@@ -0,0 +1,75 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gqueue;
+
+interface
+
+uses gdeque;
+
+type
+ generic TQueue<T>=class
+ private
+ type
+ TContainer = specialize TDeque<T>;
+ var
+ FData:TContainer;
+ public
+ procedure Push(value:T);inline;
+ procedure Pop();inline;
+ function Front():T;inline;
+ function Size():SizeUInt;inline;
+ function IsEmpty():boolean;inline;
+ constructor Create;
+ destructor Destroy;override;
+end;
+
+implementation
+
+constructor TQueue.Create;
+begin
+ FData:=TContainer.Create;
+end;
+
+destructor TQueue.Destroy;
+begin
+ FData.Destroy;
+end;
+
+procedure TQueue.Push(value:T);inline;
+begin
+ FData.PushBack(value);
+end;
+
+procedure TQueue.Pop();inline;
+begin
+ FData.PopFront;
+end;
+
+function TQueue.Front:T;inline;
+begin
+ Front:=FData.Front;
+end;
+
+function TQueue.Size:SizeUInt;inline;
+begin
+ Size:=FData.Size;
+end;
+
+function TQueue.IsEmpty:boolean;inline;
+begin
+ IsEmpty:=FData.IsEmpty;
+end;
+
+end.
diff --git a/packages/fcl-stl/src/gset.pp b/packages/fcl-stl/src/gset.pp
new file mode 100644
index 0000000000..01f2937644
--- /dev/null
+++ b/packages/fcl-stl/src/gset.pp
@@ -0,0 +1,423 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gset;
+
+interface
+
+const RED=true;
+const BLACK=false;
+
+type
+ generic TSet<T, TCompare>=class
+ public
+ type
+ PNode=^Node;
+ Node=record
+ Data:T;
+ Left,Right:PNode;
+ Parent:PNode;
+ Color:boolean;
+ end;
+ var
+ private
+ FBase:PNode;
+ FSize:SizeUInt;
+
+ function CreateNode(Data:T):PNode;inline;
+ procedure DestroyNodeAndChilds(nod:PNode);
+ procedure DestroyNode(nod:PNode);
+ function RotateRight(nod:PNode):PNode;inline;
+ function RotateLeft(nod:PNode):PNode;inline;
+ procedure FlipColors(nod:PNode);inline;
+ function IsRed(nod:PNode):boolean;inline;
+ function Insert(value:T; nod:PNode; var position:PNode):PNode;
+ function FixUp(nod:PNode):PNode;inline;
+ function MoveRedLeft(nod:PNode):PNode;inline;
+ function MoveRedRight(nod:PNode):PNode;inline;
+ function DeleteMin(nod:PNode):PNode;
+ function Delete(value:T; nod:PNode):PNode;
+ function Min(nod:PNode):PNode;inline;
+
+ public
+ function Find(value:T):PNode;inline;
+ function FindLess(value:T):PNode;inline;
+ function FindLessEqual(value:T):PNode;inline;
+ function FindGreater(value:T):PNode;inline;
+ function FindGreaterEqual(value:T):PNode;inline;
+ function Insert(value:T):PNode;inline;
+ function Min:PNode;inline;
+ function Max:PNode;inline;
+ function Next(x:PNode):PNode;inline;
+ function Prev(x:PNode):PNode;inline;
+ procedure Delete(value:T);inline;
+ public constructor Create;
+ public destructor Destroy;override;
+ function Size:SizeUInt;
+ function IsEmpty:boolean;
+ end;
+
+implementation
+
+constructor TSet.Create;
+begin
+ FBase:=nil;
+ FSize:=0;
+end;
+
+destructor TSet.Destroy;
+begin
+ DestroyNodeAndChilds(FBase);
+end;
+
+function TSet.Size:SizeUInt;
+begin
+ Size:=FSize;
+end;
+
+function TSet.IsEmpty:boolean;
+begin
+ IsEmpty := FSize=0;
+end;
+
+procedure TSet.DestroyNodeAndChilds(nod:PNode);
+begin
+ if nod = nil then exit;
+ DestroyNodeAndChilds(nod^.left);
+ DestroyNodeAndChilds(nod^.right);
+ DestroyNode(nod);
+end;
+
+procedure TSet.DestroyNode(nod:PNode);
+begin
+ Finalize(nod^.Data);
+ dispose(nod);
+ dec(FSize);
+end;
+
+function TSet.CreateNode(Data:T):PNode;inline;
+var temp:PNode;
+begin
+ temp:=new(PNode);
+ Initialize(temp^.Data);
+ temp^.Data:=Data;
+ temp^.Left:=nil;
+ temp^.Right:=nil;
+ temp^.Parent:=nil;
+ temp^.Color:=RED;
+ inc(FSize);
+ CreateNode:=temp;
+end;
+
+function TSet.RotateRight(nod:PNode):PNode;inline;
+var temp:PNode;
+begin
+ temp:=nod^.Left;
+
+ temp^.Parent:=nod^.Parent;
+ nod^.Parent:=temp;
+
+ nod^.Left:=temp^.Right;
+ temp^.Right:=nod;
+
+ if(nod^.Left<>nil) then nod^.Left^.Parent:=nod;
+
+ temp^.Color:=nod^.Color;
+ nod^.Color:=RED;
+ exit(temp);
+end;
+
+function TSet.RotateLeft(nod:PNode):PNode;inline;
+var temp:PNode;
+begin
+ temp:=nod^.Right;
+
+ temp^.Parent:=nod^.Parent;
+ nod^.Parent:=temp;
+
+ nod^.Right:=temp^.Left;
+ temp^.Left:=nod;
+
+ if(nod^.Right<>nil) then nod^.Right^.Parent:=nod;
+
+ temp^.Color:=nod^.Color;
+ nod^.Color:=RED;
+ exit(temp);
+end;
+
+procedure TSet.FlipColors(nod:PNode);inline;
+begin
+ nod^.Color:= not nod^.Color;
+ nod^.Left^.Color := not nod^.Left^.Color;
+ nod^.Right^.Color := not nod^.Right^.Color;
+end;
+
+
+function TSet.FixUp(nod:PNode):PNode;inline;
+begin
+ if(IsRed(nod^.Right)) and (not IsRed(nod^.Left)) then nod := rotateLeft(nod);
+ if(IsRed(nod^.Left)) and (IsRed(nod^.Left^.Left)) then nod := rotateRight(nod);
+ if(IsRed(nod^.Right)) and (IsRed(nod^.Left)) then flipColors(nod);
+ FixUp:=nod;
+end;
+
+function TSet.MoveRedLeft(nod:PNode):PNode;inline;
+begin
+ flipColors(nod);
+ if (IsRed(nod^.Right^.Left)) then begin
+ nod^.Right := rotateRight(nod^.Right);
+ nod := rotateLeft(nod);
+ flipColors(nod);
+ end;
+ MoveRedLeft:=nod;
+end;
+
+function TSet.MoveRedRight(nod:PNode):PNode;inline;
+begin
+ flipColors(nod);
+ if (IsRed(nod^.Left^.Left)) then begin
+ nod := rotateRight(nod);
+ flipColors(nod);
+ end;
+ MoveRedRight:=nod;
+end;
+
+function TSet.DeleteMin(nod:PNode):PNode;
+begin
+ if (nod^.Left = nil) then begin
+ DestroyNode(nod);
+ exit(nil);
+ end;
+
+ if ((not IsRed(nod^.Left)) and (not IsRed(nod^.Left^.Left))) then nod := MoveRedLeft(nod);
+
+ nod^.Left := DeleteMin(nod^.Left);
+
+ exit(FixUp(nod));
+end;
+
+function TSet.Delete(value:T; nod:PNode):PNode;
+begin
+ if (TCompare.c(value, nod^.Data)) then begin
+ if (nod^.Left=nil) then exit(nod);
+ if ((not IsRed(nod^.Left)) and ( not IsRed(nod^.Left^.Left))) then
+ nod := MoveRedLeft(nod);
+ nod^.Left := Delete(value, nod^.Left);
+ end
+ else begin
+ if (IsRed(nod^.Left)) then begin
+ nod := rotateRight(nod);
+ end;
+ if ((not TCompare.c(value,nod^.Data)) and (not TCompare.c(nod^.Data,value)) and (nod^.Right = nil)) then
+ begin
+ DestroyNode(nod);
+ exit(nil);
+ end;
+ if (nod^.Right=nil) then exit(nod);
+ if ((not IsRed(nod^.Right)) and (not IsRed(nod^.Right^.Left))) then nod := MoveRedRight(nod);
+ if ((not TCompare.c(value,nod^.Data)) and (not TCompare.c(nod^.Data,value))) then begin
+ nod^.Data := Min(nod^.Right)^.Data;
+ nod^.Right := DeleteMin(nod^.Right);
+ end
+ else nod^.Right := Delete(value, nod^.Right);
+ end;
+ exit(FixUp(nod));
+end;
+
+procedure TSet.Delete(value:T);inline;
+begin
+ if(FBase<>nil) then FBase:=Delete(value, FBase);
+ if(FBase<>nil) then FBase^.Color:=BLACK;
+end;
+
+
+function TSet.Find(value:T):PNode;inline;
+var x:PNode;
+begin
+ x:=FBase;
+ while(x <> nil) do begin
+ if(TCompare.c(value,x^.Data)) then x:=x^.Left
+ else if(TCompare.c(x^.Data,value)) then x:=x^.Right
+ else exit(x);
+ end;
+ exit(nil);
+end;
+
+function TSet.FindLess(value:T):PNode;inline;
+var x,cur:PNode;
+begin
+ x:=nil;
+ cur:=FBase;
+ while (cur <> nil) do begin
+ if (TCompare.c(cur^.Data, value)) then
+ begin
+ x:=cur;
+ cur:=cur^.right;
+ end else
+ cur:=cur^.left;
+ end;
+ FindLess:=x;
+end;
+
+function TSet.FindLessEqual(value:T):PNode;inline;
+var x,cur:PNode;
+begin
+ x:=nil;
+ cur:=FBase;
+ while (cur <> nil) do begin
+ if (not TCompare.c(value, cur^.data)) then
+ begin
+ x:=cur;
+ cur:=cur^.right;
+ end else
+ cur:=cur^.left;
+ end;
+ FindLessEqual:=x;
+end;
+
+function TSet.FindGreater(value:T):PNode;inline;
+var x,cur:PNode;
+begin
+ x:=nil;
+ cur:=FBase;
+ while (cur <> nil) do begin
+ if (TCompare.c(value, cur^.Data)) then
+ begin
+ x:=cur;
+ cur:=cur^.left;
+ end else
+ cur:=cur^.right;
+ end;
+ FindGreater:=x;
+end;
+
+function TSet.FindGreaterEqual(value:T):PNode;inline;
+var x,cur:PNode;
+begin
+ x:=nil;
+ cur:=FBase;
+ while (cur <> nil) do begin
+ if (not TCompare.c(cur^.Data, value)) then
+ begin
+ x:=cur;
+ cur:=cur^.left;
+ end else
+ cur:=cur^.right;
+ end;
+ FindGreaterEqual:=x;
+end;
+
+function TSet.Insert(value:T):PNode;inline;
+var position:PNode;
+begin
+ FBase:=Insert(value, FBase, position);
+ FBase^.Color:=BLACK;
+ Insert:=position;
+end;
+
+function TSet.Insert(value:T; nod:PNode; var position:PNode):PNode;
+begin
+ if(nod=nil) then begin
+ nod:=CreateNode(value);
+ position:=nod;
+ exit(nod);
+ end;
+ if(TCompare.c(value,nod^.Data)) then begin
+ nod^.Left:=Insert(value, nod^.Left, position);
+ nod^.Left^.Parent:=nod;
+ end
+ else if TCompare.c(nod^.Data,value) then begin
+ nod^.Right:=Insert(value, nod^.Right, position);
+ nod^.Right^.Parent:=nod;
+ end
+ else begin
+ position:=nod;
+ exit(nod);
+ end;
+
+ if(IsRed(nod^.Right)) and (not IsRed(nod^.Left)) then nod := rotateLeft(nod);
+ if(IsRed(nod^.Left)) and (IsRed(nod^.Left^.Left)) then nod := rotateRight(nod);
+ if(IsRed(nod^.Right)) and (IsRed(nod^.Left)) then flipColors(nod);
+
+ Insert:=nod;
+end;
+
+function TSet.IsRed(nod:PNode):boolean;inline;
+begin
+ if(nod=nil) then exit(false);
+ exit(nod^.Color);
+end;
+
+function TSet.Min(nod:PNode):PNode;inline;
+var temp:PNode;
+begin
+ temp:=nod;
+ while(temp^.Left<>nil) do temp:=temp^.Left;
+ exit(temp);
+end;
+
+function TSet.Min:PNode;inline;
+begin
+ if FBase=nil then exit(nil);
+ Min:=Min(FBase);
+end;
+
+function TSet.Max:PNode;inline;
+var temp:PNode;
+begin
+ if FBase=nil then exit(nil);
+ temp:=FBase;
+ while(temp^.Right<>nil) do temp:=temp^.Right;
+ exit(temp);
+end;
+
+function TSet.Next(x:PNode):PNode;inline;
+var temp:PNode;
+begin
+ if(x=nil) then exit(nil);
+ if(x^.Right<>nil) then begin
+ temp:=x^.Right;
+ while(temp^.Left<>nil) do temp:=temp^.Left;
+ end
+ else begin
+ temp:=x;
+ while(true) do begin
+ if(temp^.Parent=nil) then begin temp:=temp^.Parent; break; end;
+ if(temp^.Parent^.Left=temp) then begin temp:=temp^.Parent; break; end;
+ temp:=temp^.Parent;
+ end;
+ end;
+ exit(temp);
+end;
+
+function TSet.Prev(x:PNode):PNode;inline;
+var temp:PNode;
+begin
+ if(x=nil) then exit(nil);
+ if(x^.Left<>nil) then begin
+ temp:=x^.Left;
+ while(temp^.Right<>nil) do temp:=temp^.Right;
+ end
+ else begin
+ temp:=x;
+ while(true) do begin
+ if(temp^.Parent=nil) then begin temp:=temp^.Parent; break; end;
+ if(temp^.Parent^.Right=temp) then begin temp:=temp^.Parent; break; end;
+ temp:=temp^.Parent;
+ end;
+ end;
+ exit(temp);
+end;
+
+end.
diff --git a/packages/fcl-stl/src/gstack.pp b/packages/fcl-stl/src/gstack.pp
new file mode 100644
index 0000000000..2d5cfe4020
--- /dev/null
+++ b/packages/fcl-stl/src/gstack.pp
@@ -0,0 +1,73 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gstack;
+
+interface
+
+uses gvector;
+
+type
+ generic TStack<T>=class
+ private
+ type TContainer= specialize TVector<T>;
+ var FData:TContainer;
+ public
+ procedure Push(x:T);inline;
+ procedure Pop();inline;
+ function Top():T;inline;
+ function Size():longint;inline;
+ function IsEmpty():boolean;inline;
+ constructor Create;
+ destructor Destroy;override;
+end;
+
+implementation
+
+constructor TStack.Create;
+begin
+ FData:=TContainer.Create;
+end;
+
+destructor TStack.Destroy;
+begin
+ FData.Destroy;
+end;
+
+procedure TStack.Push(x:T);inline;
+begin
+ FData.PushBack(x);
+end;
+
+procedure TStack.Pop;inline;
+begin
+ FData.PopBack;
+end;
+
+function TStack.Top:T;inline;
+begin
+ Top:=FData.Back;
+end;
+
+function TStack.Size:longint;inline;
+begin
+ Size:=FData.Size;
+end;
+
+function TStack.IsEmpty:boolean;inline;
+begin
+ IsEmpty:=FData.IsEmpty;
+end;
+
+end.
diff --git a/packages/fcl-stl/src/gutil.pp b/packages/fcl-stl/src/gutil.pp
new file mode 100644
index 0000000000..f653940f2b
--- /dev/null
+++ b/packages/fcl-stl/src/gutil.pp
@@ -0,0 +1,39 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gutil;
+
+interface
+
+type generic TLess<T>=class
+ class function c(a,b:T):boolean;inline;
+end;
+
+type generic TGreater<T>=class
+ class function c(a,b:T):boolean;inline;
+end;
+
+implementation
+
+class function TLess.c(a,b:T):boolean;inline;
+begin
+ c:=a<b;
+end;
+
+class function TGreater.c(a,b:T):boolean;inline;
+begin
+ c:=b<a;
+end;
+
+end.
diff --git a/packages/fcl-stl/src/gvector.pp b/packages/fcl-stl/src/gvector.pp
new file mode 100644
index 0000000000..96fb6bce76
--- /dev/null
+++ b/packages/fcl-stl/src/gvector.pp
@@ -0,0 +1,173 @@
+{
+ This file is part of the Free Pascal FCL library.
+ BSD parts (c) 2011 Vlado Boza
+
+ 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.
+
+**********************************************************************}
+{$mode objfpc}
+
+unit gvector;
+
+interface
+
+type
+ generic TVector<T>=class
+ private
+ type
+ PT=^ T;
+ TArr=array of T;
+ var
+ FCapacity:SizeUInt;
+ FDataSize:SizeUInt;
+ FData:TArr;
+
+ procedure SetValue(Position:SizeUInt; Value:T);inline;
+ function GetValue(Position:SizeUInt):T;inline;
+ function GetMutable(Position:SizeUInt):PT;inline;
+ procedure IncreaseCapacity;inline;
+ public
+ constructor Create;
+ function Size:SizeUInt;inline;
+ procedure PushBack(Value:T);inline;
+ procedure PopBack;inline;
+ function IsEmpty:boolean;inline;
+ procedure Insert(Position:SizeUInt; Value:T);inline;
+ procedure Erase(Position:SizeUInt);inline;
+ procedure Clear;inline;
+ function Front:T;inline;
+ function Back:T;inline;
+ procedure Reserve(Num:SizeUInt);inline;
+ procedure Resize(Num:SizeUInt);inline;
+
+ property Items[i : SizeUInt]: T read getValue write setValue; default;
+ property Mutable[i : SizeUInt]: PT read getMutable;
+end;
+
+implementation
+
+constructor TVector.Create();
+begin
+ FCapacity:=0;
+ FDataSize:=0;
+end;
+
+procedure TVector.SetValue(Position:SizeUInt; Value:T);inline;
+begin
+ Assert(position < size, 'Vector position out of range');
+ FData[Position]:=Value;
+end;
+
+function TVector.GetValue(Position:SizeUInt):T;inline;
+begin
+ Assert(position < size, 'Vector position out of range');
+ GetValue:=FData[Position];
+end;
+
+function TVector.GetMutable(Position:SizeUInt):PT;inline;
+begin
+ Assert(position < size, 'Vector position out of range');
+ GetMutable:=@FData[Position];
+end;
+
+function TVector.Front():T;inline;
+begin
+ Assert(size > 0, 'Accessing element of empty vector');
+ Front:=FData[0];
+end;
+
+function TVector.Back():T;inline;
+begin
+ Assert(size > 0, 'Accessing element of empty vector');
+ Back:=FData[FDataSize-1];
+end;
+
+function TVector.Size():SizeUInt;inline;
+begin
+ Size:=FDataSize;
+end;
+
+function TVector.IsEmpty():boolean;inline;
+begin
+ if Size()=0 then
+ IsEmpty:=true
+ else
+ IsEmpty:=false;
+end;
+
+procedure TVector.PushBack(Value:T);inline;
+begin
+ if FDataSize=FCapacity then
+ IncreaseCapacity;
+ FData[FDataSize]:=Value;
+ inc(FDataSize);
+end;
+
+procedure TVector.IncreaseCapacity();inline;
+begin
+ if FCapacity=0 then
+ FCapacity:=1
+ else
+ FCapacity:=FCapacity*2;
+ SetLength(FData, FCapacity);
+end;
+
+procedure TVector.PopBack();inline;
+begin
+ if FDataSize>0 then
+ FDataSize:=FDataSize-1;
+end;
+
+procedure TVector.Insert(Position:SizeUInt; Value: T);inline;
+var i:SizeUInt;
+begin
+ pushBack(Value);
+ for i:=Size-1 downto Position+1 do
+ begin
+ FData[i]:=FData[i-1];
+ end;
+ FData[Position]:=Value;
+end;
+
+procedure TVector.Erase(Position:SizeUInt);inline;
+var i:SizeUInt;
+begin
+ if Position <= Size then
+ begin
+ for i:=Position to Size-2 do
+ begin
+ FData[i]:=FData[i+1];
+ end;
+ popBack();
+ end;
+end;
+
+procedure TVector.Clear;inline;
+begin
+ FDataSize:=0;
+end;
+
+procedure TVector.Reserve(Num:SizeUInt);inline;
+begin
+ if(Num < FCapacity) then
+ exit
+ else if(Num <= 2*FCapacity) then
+ IncreaseCapacity
+ else begin
+ SetLength(FData, Num);
+ FCapacity:=Num;
+ end;
+end;
+
+procedure TVector.Resize(Num:SizeUInt);inline;
+begin
+ Reserve(Num);
+ FDataSize:=Num;
+end;
+
+end.
diff --git a/packages/fcl-stl/tests/clean b/packages/fcl-stl/tests/clean
new file mode 100755
index 0000000000..e58cd16dae
--- /dev/null
+++ b/packages/fcl-stl/tests/clean
@@ -0,0 +1,2 @@
+#!/bin/bash
+rm *.o *.ppu ../*.o ../*.ppu
diff --git a/packages/fcl-stl/tests/garrayutilstest.pp b/packages/fcl-stl/tests/garrayutilstest.pp
new file mode 100644
index 0000000000..3a1bb20605
--- /dev/null
+++ b/packages/fcl-stl/tests/garrayutilstest.pp
@@ -0,0 +1,116 @@
+{$mode objfpc}
+
+unit garrayutilstest;
+
+interface
+
+uses fpcunit, testregistry, gvector, garrayutils, gutil;
+
+type vectorlli=specialize TVector<longint>;
+ lesslli=specialize TLess<longint>;
+ sortlli=specialize TOrderingArrayUtils<vectorlli, longint, lesslli>;
+
+type TGArrayUtilsTest = class(TTestCase)
+ Published
+ procedure SortRandomTest;
+ procedure SortZeroOneTest;
+ procedure NextPermutationTest1;
+ procedure NextPermutationTest2;
+ procedure NextPermutationTest3;
+ procedure NextPermutationTest4;
+ public
+ procedure Setup;override;
+ private
+ data:vectorlli;
+ end;
+
+implementation
+
+procedure TGArrayUtilsTest.SortRandomTest;
+var i:longint;
+begin
+ for i:=0 to 5000 do
+ data.pushBack(random(10000));
+ sortlli.sort(data, 5001);
+ for i:=0 to 4999 do
+ AssertEquals('Wrong order', false, data[i+1]<data[i]);
+end;
+
+procedure TGArrayUtilsTest.SortZeroOneTest;
+var i:longint;
+begin
+ for i:=0 to 5000 do
+ data.pushBack(random(2));
+ sortlli.sort(data, 5001);
+ for i:=0 to 4999 do
+ AssertEquals('Wrong order', false, data[i+1]<data[i]);
+end;
+
+procedure TGArrayUtilsTest.NextPermutationTest1;
+begin
+ data.pushBack(1);
+ data.pushBack(2);
+ data.pushBack(3);
+ data.pushBack(4);
+ AssertEquals('Wrong ret', true, sortlli.NextPermutation(data, 4));
+ AssertEquals('Wrong perm 1', 1, data[0]);
+ AssertEquals('Wrong perm 2', 2, data[1]);
+ AssertEquals('Wrong perm 3', 4, data[2]);
+ AssertEquals('Wrong perm 4', 3, data[3]);
+end;
+
+procedure TGArrayUtilsTest.NextPermutationTest2;
+begin
+ data.pushBack(4);
+ data.pushBack(3);
+ data.pushBack(2);
+ data.pushBack(1);
+ AssertEquals('Wrong ret', false, sortlli.NextPermutation(data, 4));
+ AssertEquals('Wrong perm 1', 4, data[0]);
+ AssertEquals('Wrong perm 2', 3, data[1]);
+ AssertEquals('Wrong perm 3', 2, data[2]);
+ AssertEquals('Wrong perm 4', 1, data[3]);
+end;
+
+procedure TGArrayUtilsTest.NextPermutationTest3;
+begin
+ data.pushBack(5);
+ data.pushBack(10);
+ data.pushBack(9);
+ data.pushBack(8);
+ data.pushBack(7);
+ data.pushBack(3);
+ AssertEquals('Wrong ret', true, sortlli.NextPermutation(data, 6));
+ AssertEquals('Wrong perm 1', 7, data[0]);
+ AssertEquals('Wrong perm 2', 3, data[1]);
+ AssertEquals('Wrong perm 3', 5, data[2]);
+ AssertEquals('Wrong perm 4', 8, data[3]);
+ AssertEquals('Wrong perm 5', 9, data[4]);
+ AssertEquals('Wrong perm 6', 10, data[5]);
+end;
+
+procedure TGArrayUtilsTest.NextPermutationTest4;
+begin
+ data.pushBack(0);
+ data.pushBack(1);
+ data.pushBack(0);
+ data.pushBack(1);
+ data.pushBack(1);
+ data.pushBack(0);
+ AssertEquals('Wrong ret', true, sortlli.NextPermutation(data, 6));
+ AssertEquals('Wrong perm 1', 0, data[0]);
+ AssertEquals('Wrong perm 2', 1, data[1]);
+ AssertEquals('Wrong perm 3', 1, data[2]);
+ AssertEquals('Wrong perm 4', 0, data[3]);
+ AssertEquals('Wrong perm 5', 0, data[4]);
+ AssertEquals('Wrong perm 6', 1, data[5]);
+end;
+
+procedure TGArrayUtilsTest.Setup;
+begin
+ data:=vectorlli.create;
+end;
+
+initialization
+ RegisterTest(TGArrayUtilsTest);
+end.
diff --git a/packages/fcl-stl/tests/gdequetest.pp b/packages/fcl-stl/tests/gdequetest.pp
new file mode 100644
index 0000000000..9dfb8a0e9a
--- /dev/null
+++ b/packages/fcl-stl/tests/gdequetest.pp
@@ -0,0 +1,55 @@
+{$mode objfpc}
+
+unit gdequetest;
+
+interface
+
+uses fpcunit, testregistry, gdeque;
+
+type dequelli=specialize TDeque<longint>;
+
+type TGDequeTest = class(TTestCase)
+ Published
+ procedure BackTest;
+ procedure PushTest;
+ public
+ procedure Setup;override;
+ private
+ data:dequelli;
+ end;
+
+implementation
+
+procedure TGDequeTest.BackTest;
+var i:longint;
+begin
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+ for i:=0 to 10 do
+ data.pushback(i);
+ for i:=0 to 10 do begin
+ AssertEquals('Wrong data', 10-i, data.back);
+ AssertEquals('Wrong size', 11-i, data.size);
+ data.popback;
+ end;
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+end;
+
+procedure TGDequeTest.PushTest;
+var i:longint;
+begin
+ for i:=6 to 10 do
+ data.pushBack(i);
+ for i:=5 downto 0 do
+ data.pushFront(i);
+ for i:=0 to 10 do
+ AssertEquals('Wrong data', i, data[i]);
+end;
+
+procedure TGDequeTest.Setup;
+begin
+ data:=dequelli.create;
+end;
+
+initialization
+ RegisterTest(TGDequeTest);
+end.
diff --git a/packages/fcl-stl/tests/gmaptest.pp b/packages/fcl-stl/tests/gmaptest.pp
new file mode 100644
index 0000000000..6d5325b26f
--- /dev/null
+++ b/packages/fcl-stl/tests/gmaptest.pp
@@ -0,0 +1,84 @@
+{$mode objfpc}
+
+unit gmaptest;
+
+interface
+
+uses fpcunit, testregistry, gmap, gutil;
+
+type lesslli=specialize TLess<longint>;
+ maplli=specialize TMap<longint,longint, lesslli>;
+
+type TGMapTest = class(TTestCase)
+ Published
+ procedure MapTest;
+ public
+ procedure Setup;override;
+ private
+ data:maplli;
+ end;
+
+implementation
+
+procedure TGMapTest.MapTest;
+var it:maplli.TMSet.pnode;
+begin
+ data[3]:=3;
+ data[5]:=5;
+ data[7]:=7;
+ AssertEquals('Wrong min key', 3, data.min()^.data.key);
+ AssertEquals('Wrong max key', 7, data.max()^.data.key);
+ AssertEquals('Wrong min val', 3, data.min()^.data.value);
+ AssertEquals('Wrong max val', 7, data.max()^.data.value);
+
+ AssertEquals('Wrong val', 5, data[5]);
+
+ data.delete(3);
+ AssertEquals('Wrong min key', 5, data.min()^.data.key);
+ AssertEquals('Wrong max key', 7, data.max()^.data.key);
+ AssertEquals('Wrong min val', 5, data.min()^.data.value);
+ AssertEquals('Wrong max val', 7, data.max()^.data.value);
+
+
+ data[3]:=3;
+ data[3]:=47;
+ AssertEquals('Wrong val 2', 47, data[3]);
+
+ if(data.find(4)<>nil) then
+ AssertEquals('Found key which not there', 0, 1);
+
+ data[17]:=42;
+
+ it:=data.min;
+ AssertEquals('Wrong min', 3, it^.Data.key);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 5, it^.Data.key);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 7, it^.Data.key);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 17, it^.Data.key);
+ it:=data.next(it);
+ if(it<>nil) then
+ AssertEquals('Last not nil', 0, 1);
+
+ it:=data.max;
+ AssertEquals('Wrong max', 17, it^.Data.key);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 7, it^.Data.key);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 5, it^.Data.key);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 3, it^.Data.key);
+ it:=data.prev(it);
+ if(it<>nil) then
+ AssertEquals('First not nil', 0, 1);
+end;
+
+procedure TGMapTest.Setup;
+begin
+ data:=maplli.create;
+end;
+
+initialization
+ RegisterTest(TGMapTest);
+end.
diff --git a/packages/fcl-stl/tests/gmaptestzal.pp b/packages/fcl-stl/tests/gmaptestzal.pp
new file mode 100644
index 0000000000..ce8b05b860
--- /dev/null
+++ b/packages/fcl-stl/tests/gmaptestzal.pp
@@ -0,0 +1,84 @@
+{$mode objfpc}
+
+unit gmaptest;
+
+interface
+
+uses fpcunit, testregistry, gmap, gutil;
+
+type lesslli=specialize TLess<longint>;
+ maplli=specialize TMap<longint,longint, lesslli>;
+
+type TGMapTest = class(TTestCase)
+ Published
+ procedure MapTest;
+ public
+ procedure Setup;override;
+ private
+ data:maplli;
+ end;
+
+implementation
+
+procedure TGMapTest.MapTest;
+var it:maplli.TMSet.pnode;
+begin
+ data[3]:=3;
+ data[5]:=5;
+ data[7]:=7;
+ AssertEquals('Wrong min key', 3, data.min()^.key);
+ AssertEquals('Wrong max key', 7, data.max()^.key);
+ AssertEquals('Wrong min val', 3, data.min()^.value);
+ AssertEquals('Wrong max val', 7, data.max()^.value);
+
+ AssertEquals('Wrong val', 5, data[5]);
+
+ data.delete(3);
+ AssertEquals('Wrong min key', 5, data.min()^.key);
+ AssertEquals('Wrong max key', 7, data.max()^.key);
+ AssertEquals('Wrong min val', 5, data.min()^.value);
+ AssertEquals('Wrong max val', 7, data.max()^.value);
+
+
+ data[3]:=3;
+ data[3]:=47;
+ AssertEquals('Wrong val 2', 47, data[3]);
+
+ if(data.find(4)<>nil) then
+ AssertEquals('Found key which not there', 0, 1);
+
+ data[17]:=42;
+
+ it:=data.min;
+ AssertEquals('Wrong min', 3, it^.key);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 5, it^.key);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 7, it^.key);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 17, it^.key);
+ it:=data.next(it);
+ if(it<>nil) then
+ AssertEquals('Last not nil', 0, 1);
+
+ it:=data.max;
+ AssertEquals('Wrong max', 17, it^.key);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 7, it^.key);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 5, it^.key);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 3, it^.key);
+ it:=data.prev(it);
+ if(it<>nil) then
+ AssertEquals('First not nil', 0, 1);
+end;
+
+procedure TGMapTest.Setup;
+begin
+ data:=maplli.create;
+end;
+
+initialization
+ RegisterTest(TGMapTest);
+end.
diff --git a/packages/fcl-stl/tests/gpriorityqueuetest.pp b/packages/fcl-stl/tests/gpriorityqueuetest.pp
new file mode 100644
index 0000000000..63af405bdf
--- /dev/null
+++ b/packages/fcl-stl/tests/gpriorityqueuetest.pp
@@ -0,0 +1,47 @@
+{$mode objfpc}
+
+unit gpriorityqueuetest;
+
+interface
+
+uses fpcunit, testregistry, gpriorityqueue, gutil;
+
+{type lesslli=specialize TLess<longint>;
+ queuelli=specialize TPriorityQueue<longint,lesslli>;}
+
+type TGPQueueTest = class(TTestCase)
+ Published
+ procedure QueueTest;
+ public
+ procedure Setup;override;
+ private
+ { data:queuelli;}
+ end;
+
+implementation
+
+procedure TGPQueueTest.QueueTest;
+var i,last:longint;
+begin
+{ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+ for i:=0 to 10 do
+ data.push(random(10000));
+ last:=data.top;
+ data.pop;
+ for i:=0 to 9 do begin
+ AssertEquals('Wrong order', true, data.top<last);
+ AssertEquals('Wrong size', 10-i, data.size);
+ last:=data.top;
+ data.pop;
+ end;
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);}
+end;
+
+procedure TGPQueueTest.Setup;
+begin
+{ data:=queuelli.create;}
+end;
+
+initialization
+ RegisterTest(TGPQueueTest);
+end.
diff --git a/packages/fcl-stl/tests/gqueuetest.pp b/packages/fcl-stl/tests/gqueuetest.pp
new file mode 100644
index 0000000000..ca4a2a16e4
--- /dev/null
+++ b/packages/fcl-stl/tests/gqueuetest.pp
@@ -0,0 +1,43 @@
+{$mode objfpc}
+
+unit gqueuetest;
+
+interface
+
+uses fpcunit, testregistry, gqueue;
+
+type TQueuelli=specialize TQueue<longint>;
+
+type TGTQueueTest = class(TTestCase)
+ Published
+ procedure TQueueTest;
+ public
+ procedure Setup;override;
+ private
+ data:TQueuelli;
+ end;
+
+implementation
+
+procedure TGTQueueTest.TQueueTest;
+var i:longint;
+begin
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+ for i:=0 to 10 do
+ data.push(i);
+ for i:=0 to 10 do begin
+ AssertEquals('Wrong data', i, data.front);
+ AssertEquals('Wrong size', 11-i, data.size);
+ data.pop;
+ end;
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+end;
+
+procedure TGTQueueTest.Setup;
+begin
+ data:=TQueuelli.create;
+end;
+
+initialization
+ RegisterTest(TGTQueueTest);
+end.
diff --git a/packages/fcl-stl/tests/gsetrefcounttest.pp b/packages/fcl-stl/tests/gsetrefcounttest.pp
new file mode 100644
index 0000000000..c381367fc1
--- /dev/null
+++ b/packages/fcl-stl/tests/gsetrefcounttest.pp
@@ -0,0 +1,59 @@
+{$mode objfpc}
+
+unit gsetrefcounttest;
+
+interface
+
+uses fpcunit, testregistry, gset, gutil;
+
+type
+ arr = class
+ a:longint;
+ end;
+ lll=class
+ class function c(a,b: arr):boolean;
+ end;
+
+type setlli=specialize RBSet<arr,lll>;
+
+type TGSetRefCountTest = class(TTestCase)
+ Published
+ procedure SetTest;
+ public
+ procedure Setup;override;
+ private
+ data:setlli;
+ end;
+
+implementation
+
+class function lll.c(a,b: arr):boolean;
+begin
+ c:=a.a<b.a;
+end;
+
+procedure TGSetRefCountTest.SetTest;
+var x:arr; i:longint;
+ it:setlli.pnode;
+begin
+ for i:=0 to 20000 do begin
+ x:=arr.create;
+ x.a:=i;
+ {code should crash on this insert}
+ data.insert(x);
+ end;
+ it:=data.min;
+ while it<>nil do begin
+ writeln(it^.data.a);
+ it:=data.next(it);
+ end;
+end;
+
+procedure TGSetRefCountTest.Setup;
+begin
+ data:=setlli.create;
+end;
+
+initialization
+ RegisterTest(TGSetRefCountTest);
+end.
diff --git a/packages/fcl-stl/tests/gsettest.pp b/packages/fcl-stl/tests/gsettest.pp
new file mode 100644
index 0000000000..e828236e90
--- /dev/null
+++ b/packages/fcl-stl/tests/gsettest.pp
@@ -0,0 +1,110 @@
+{$mode objfpc}
+
+unit gsettest;
+
+interface
+
+uses fpcunit, testregistry, gset, gutil;
+
+type lesslli=specialize TLess<longint>;
+ setlli=specialize TSet<longint,lesslli>;
+
+type TGSetTest = class(TTestCase)
+ Published
+ procedure SetTest;
+ public
+ procedure Setup;override;
+ private
+ data:setlli;
+ end;
+
+implementation
+
+procedure TGSetTest.SetTest;
+var it:setlli.pnode;
+begin
+ data.insert(3);
+ data.insert(5);
+ data.insert(7);
+ AssertEquals('Wrong min', 3, data.min()^.data);
+ AssertEquals('Wrong max', 7, data.max()^.data);
+ data.delete(3);
+ AssertEquals('Wrong size', 2, data.size);
+ AssertEquals('Wrong min', 5, data.min()^.data);
+ data.insert(3);
+ data.insert(3);
+ data.insert(3);
+ AssertEquals('Wrong size', 3, data.size);
+ AssertEquals('Wrong min', 3, data.min()^.data);
+ if(data.find(4)<>nil) then
+ Fail('Found key which not there');
+ if(data.find(5)=nil) then
+ Fail('Not found key which was there');
+
+ if(data.FindLess(8)^.data<>7) then
+ Fail('Wrong less than 8');
+ if(data.FindLess(7)^.data<>5) then
+ Fail('Wrong less than 7');
+ if(data.FindLess(3)<>nil) then
+ Fail('Wrong less than 3');
+
+ if(data.FindLessEqual(8)^.data<>7) then
+ Fail('Wrong less equal than 8');
+ if(data.FindLessEqual(7)^.data<>7) then
+ Fail('Wrong less equal than 7');
+ if(data.FindLessEqual(6)^.data<>5) then
+ Fail('Wrong less equal than 6');
+ if(data.FindLessEqual(2)<>nil) then
+ Fail('Wrong less equal than 2');
+
+ if(data.FindGreater(2)^.data<>3) then
+ Fail('Wrong greater than 2');
+ if(data.Findgreater(3)^.data<>5) then
+ Fail('Wrong greater than 3');
+ if(data.Findgreater(7)<>nil) then
+ Fail('Wrong greater than 7');
+
+ if(data.FindGreaterEqual(2)^.data<>3) then
+ Fail('Wrong greater equal than 2');
+ if(data.FindGreaterEqual(3)^.data<>3) then
+ Fail('Wrong greater equal than 3');
+ if(data.FindGreaterEqual(4)^.data<>5) then
+ Fail('Wrong greater equal than 4');
+ if(data.FindGreaterEqual(8)<>nil) then
+ Fail('Wrong greater equal than 8');
+
+ data.insert(17);
+
+ it:=data.min;
+ AssertEquals('Wrong min', 3, it^.data);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 5, it^.data);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 7, it^.data);
+ it:=data.next(it);
+ AssertEquals('Wrong next', 17, it^.data);
+ it:=data.next(it);
+ if(it<>nil) then
+ AssertEquals('Last not nil', 0, 1);
+
+ it:=data.max;
+ AssertEquals('Wrong max', 17, it^.data);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 7, it^.data);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 5, it^.data);
+ it:=data.prev(it);
+ AssertEquals('Wrong prev', 3, it^.data);
+ it:=data.prev(it);
+ if(it<>nil) then
+ AssertEquals('First not nil', 0, 1);
+end;
+
+procedure TGSetTest.Setup;
+begin
+ data:=setlli.create;
+end;
+
+initialization
+ RegisterTest(TGSetTest);
+end.
diff --git a/packages/fcl-stl/tests/gstacktest.pp b/packages/fcl-stl/tests/gstacktest.pp
new file mode 100644
index 0000000000..397a2b5292
--- /dev/null
+++ b/packages/fcl-stl/tests/gstacktest.pp
@@ -0,0 +1,43 @@
+{$mode objfpc}
+
+unit gstacktest;
+
+interface
+
+uses fpcunit, testregistry, gstack;
+
+type TStacklli=specialize TStack<longint>;
+
+type TGTStackTest = class(TTestCase)
+ Published
+ procedure TStackTest;
+ public
+ procedure Setup;override;
+ private
+ data:TStacklli;
+ end;
+
+implementation
+
+procedure TGTStackTest.TStackTest;
+var i:longint;
+begin
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+ for i:=0 to 10 do
+ data.push(i);
+ for i:=0 to 10 do begin
+ AssertEquals('Wrong data', 10-i, data.top);
+ AssertEquals('Wrong size', 11-i, data.size);
+ data.pop;
+ end;
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+end;
+
+procedure TGTStackTest.Setup;
+begin
+ data:=TStacklli.create;
+end;
+
+initialization
+ RegisterTest(TGTStackTest);
+end.
diff --git a/packages/fcl-stl/tests/gvectortest.pp b/packages/fcl-stl/tests/gvectortest.pp
new file mode 100644
index 0000000000..660f6eead8
--- /dev/null
+++ b/packages/fcl-stl/tests/gvectortest.pp
@@ -0,0 +1,111 @@
+{$mode objfpc}
+
+unit gvectortest;
+
+interface
+
+uses fpcunit, testregistry, gvector;
+
+type vectorlli=specialize TVector<longint>;
+ rec=record
+ a,b:longint;
+ end;
+ vectorrec=specialize TVector<rec>;
+
+type TGVectorTest = class(TTestCase)
+ Published
+ procedure PushBackTest;
+ procedure ResizeTest;
+ procedure PopbackTest;
+ procedure InsertEraseTest;
+ procedure MutableTest;
+ public
+ procedure Setup;override;
+ private
+ data:vectorlli;
+ end;
+
+implementation
+
+procedure TGVectorTest.PushBackTest;
+var i:longint;
+begin
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+ for i:=0 to 10 do
+ data.pushBack(i);
+ for i:=0 to 10 do
+ AssertEquals('Wrong data', i, data[i]);
+
+ AssertEquals('Wrong size', 11, data.size);
+ AssertEquals('IsEmpty', false, data.IsEmpty);
+end;
+
+procedure TGVectorTest.ResizeTest;
+var i:longint;
+begin
+ AssertEquals('Not IsEmpty', true, data.IsEmpty);
+ data.resize(50);
+ AssertEquals('IsEmpty', false, data.IsEmpty);
+ for i:=0 to 49 do
+ data[i]:=3*i;
+ for i:=0 to 49 do
+ AssertEquals('Wrong data', 3*i, data[i]);
+ AssertEquals('Wrong size', 50, data.size);
+end;
+
+procedure TGVectorTest.PopbackTest;
+var i:longint;
+begin
+ for i:=0 to 49 do begin
+ data.pushBack(5*i);
+ AssertEquals('Wrong end', 5*i, data.back);
+ AssertEquals('Wrong front', 0, data.front);
+ end;
+ for i:=1 to 10 do begin
+ data.popBack;
+ AssertEquals('Wrong end after popback', 5*(49-i), data.back);
+ end;
+end;
+
+procedure TGVectorTest.InsertEraseTest;
+var i:longint;
+begin
+ for i:=0 to 9 do
+ data.pushBack(i);
+ data.insert(3,100);
+ for i:=0 to 2 do
+ AssertEquals('Wrong data before insert', i, data[i]);
+ AssertEquals('Wrong data', 100, data[3]);
+ for i:=4 to 10 do
+ AssertEquals('Wrong data after insert', i-1, data[i]);
+ data.erase(4);
+ for i:=4 to 9 do
+ AssertEquals('Wrong data after erase', i, data[i]);
+ AssertEquals('Wrong data before erase', 100, data[3]);
+ for i:=0 to 2 do
+ AssertEquals('Wrong data before erase', i, data[i]);
+end;
+
+procedure TGVectorTest.MutableTest;
+var dat:vectorrec;
+begin
+ dat:=vectorrec.create;
+ dat.resize(2);
+ dat.mutable[0]^.a:=5;
+ dat.mutable[0]^.b:=7;
+ AssertEquals('Wrong data', 5, dat[0].a);
+ AssertEquals('Wrong data', 7, dat[0].b);
+ dat.mutable[0]^.a:=45;
+ dat.mutable[0]^.b:=47;
+ AssertEquals('Wrong data', 45, dat[0].a);
+ AssertEquals('Wrong data', 47, dat[0].b);
+end;
+
+procedure TGVectorTest.Setup;
+begin
+ data:=vectorlli.create;
+end;
+
+initialization
+ RegisterTest(TGVectorTest);
+end.
diff --git a/packages/fcl-stl/tests/run-all-tests b/packages/fcl-stl/tests/run-all-tests
new file mode 100755
index 0000000000..14145b7abb
--- /dev/null
+++ b/packages/fcl-stl/tests/run-all-tests
@@ -0,0 +1,4 @@
+#!/bin/bash
+rm *.o *.ppu testrunner
+fpc -Fu../units/x86_64-linux -gttt testrunner.pp -Sa
+./testrunner --all
diff --git a/packages/fcl-stl/tests/suiteconfig.pp b/packages/fcl-stl/tests/suiteconfig.pp
new file mode 100644
index 0000000000..30ac5b51a0
--- /dev/null
+++ b/packages/fcl-stl/tests/suiteconfig.pp
@@ -0,0 +1,27 @@
+{$mode objfpc}
+{$h+}
+{
+ This file is part of the Free Component Library (FCL)
+ Copyright (c) 2004 by Dean Zobec, Michael Van Canneyt
+
+ a unit to register the tests to be runned.
+
+ 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.
+
+ **********************************************************************}
+unit suiteconfig;
+
+interface
+
+uses
+ gvectortest, gstacktest, gqueuetest, gdequetest, garrayutilstest,
+ gsettest, gmaptest;
+
+implementation
+
+end.
diff --git a/packages/fcl-stl/tests/testrunner.pp b/packages/fcl-stl/tests/testrunner.pp
new file mode 100644
index 0000000000..3995c05738
--- /dev/null
+++ b/packages/fcl-stl/tests/testrunner.pp
@@ -0,0 +1,138 @@
+{
+ This file is part of the Free Component Library (FCL)
+ Copyright (c) 2004 by Dean Zobec, Michael Van Canneyt
+
+ an example of a console test runner of FPCUnit tests.
+
+ 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.
+}
+program testrunner;
+
+{$mode objfpc}
+{$h+}
+
+uses
+ custapp, Classes, SysUtils, fpcunit, suiteconfig, testreport, testregistry;
+
+
+const
+ ShortOpts = 'alh';
+ Longopts: Array[1..5] of String = (
+ 'all','list','format:','suite:','help');
+ Version = 'Version 0.2';
+
+
+type
+ TTestRunner = Class(TCustomApplication)
+ private
+ FXMLResultsWriter: TXMLResultsWriter;
+ protected
+ procedure DoRun ; Override;
+ procedure doTestRun(aTest: TTest); virtual;
+ public
+ constructor Create(AOwner: TComponent); override;
+ destructor Destroy; override;
+ end;
+
+
+constructor TTestRunner.Create(AOwner: TComponent);
+begin
+ inherited Create(AOwner);
+ FXMLResultsWriter := TXMLResultsWriter.Create;
+end;
+
+
+destructor TTestRunner.Destroy;
+begin
+ FXMLResultsWriter.Free;
+end;
+
+
+procedure TTestRunner.doTestRun(aTest: TTest);
+var
+ testResult: TTestResult;
+begin
+ testResult := TTestResult.Create;
+ try
+ testResult.AddListener(FXMLResultsWriter);
+ aTest.Run(testResult);
+ FXMLResultsWriter.WriteResult(testResult);
+ finally
+ testResult.Free;
+ end;
+end;
+
+
+procedure TTestRunner.DoRun;
+var
+ I : Integer;
+ S : String;
+begin
+ S:=CheckOptions(ShortOpts,LongOpts);
+ If (S<>'') then
+ Writeln(S);
+ if HasOption('h', 'help') or (ParamCount = 0) then
+ begin
+ writeln(Title);
+ writeln(Version);
+ writeln('Usage: ');
+ writeln('-l or --list to show a list of registered tests');
+ writeln('default format is xml, add --format=latex to output the list as latex source');
+ writeln('-a or --all to run all the tests and show the results in xml format');
+ writeln('The results can be redirected to an xml file,');
+ writeln('for example: ./testrunner --all > results.xml');
+ writeln('use --suite=MyTestSuiteName to run only the tests in a single test suite class');
+ end
+ else;
+ if HasOption('l', 'list') then
+ begin
+ if HasOption('format') then
+ begin
+ if GetOptionValue('format') = 'latex' then
+ writeln(GetSuiteAsLatex(GetTestRegistry))
+ else
+ writeln(GetSuiteAsXML(GetTestRegistry));
+ end
+ else
+ writeln(GetSuiteAsXML(GetTestRegistry));
+ end;
+ if HasOption('a', 'all') then
+ begin
+ doTestRun(GetTestRegistry)
+ end
+ else
+ if HasOption('suite') then
+ begin
+ S := '';
+ S:=GetOptionValue('suite');
+ if S = '' then
+ for I := 0 to GetTestRegistry.Tests.count - 1 do
+ writeln(GetTestRegistry[i].TestName)
+ else
+ for I := 0 to GetTestRegistry.Tests.count - 1 do
+ if GetTestRegistry[i].TestName = S then
+ begin
+ doTestRun(GetTestRegistry[i]);
+ end;
+ end;
+ Terminate;
+end;
+
+
+var
+ App: TTestRunner;
+
+
+begin
+ App := TTestRunner.Create(nil);
+ App.Initialize;
+ App.Title := 'FPCUnit Console Test Case runner.';
+ App.Run;
+ App.Free;
+end.
+
diff --git a/packages/fcl-web/Makefile b/packages/fcl-web/Makefile
index f634824cce..7761608145 100644
--- a/packages/fcl-web/Makefile
+++ b/packages/fcl-web/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/04/05]
#
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
+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 powerpc-wii 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
@@ -266,379 +266,17 @@ endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
override PACKAGE_NAME=fcl-web
override PACKAGE_VERSION=2.5.1
-ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
+FPMAKE_BIN_CLEAN=$(wildcard ./fpmake$(SRCEXEEXT))
+ifeq ($(FPMAKE_BIN_CLEAN),)
+FPMAKE_BIN_CLEAN=$(ECHO)
endif
-ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
endif
-ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_DIRS+=src/base src/webdata src/jsonrpc
-endif
-override INSTALL_FPCPACKAGE=y
-ifeq ($(FULL_TARGET),i386-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-go32v2)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-win32)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-os2)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-freebsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-beos)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-haiku)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-netbsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-solaris)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-qnx)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-netware)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-openbsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-wdosx)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-darwin)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-emx)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-watcom)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-netwlibc)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-wince)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-symbian)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-nativent)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),i386-iphonesim)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-freebsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-netbsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-amiga)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-atari)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-openbsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-palmos)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),m68k-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc-netbsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc-amiga)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc-macos)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc-darwin)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc-morphos)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),sparc-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),sparc-netbsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),sparc-solaris)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),sparc-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),x86_64-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),x86_64-freebsd)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),x86_64-solaris)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),x86_64-darwin)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),x86_64-win64)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),x86_64-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-palmos)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-darwin)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-wince)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-gba)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-nds)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),arm-symbian)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc64-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc64-darwin)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),powerpc64-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),avr-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),armeb-linux)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),armeb-embedded)
-override COMPILER_OPTIONS+=-S2h
-endif
-ifeq ($(FULL_TARGET),mipsel-linux)
-override COMPILER_OPTIONS+=-S2h
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(EXEEXT)
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@@ -835,37 +473,6 @@ endif
else
CROSSBINDIR=
endif
-ifeq ($(OS_SOURCE),linux)
-ifndef GCCLIBDIR
-ifeq ($(CPU_TARGET),i386)
-ifneq ($(findstring x86_64,$(shell uname -a)),)
-ifeq ($(BINUTILSPREFIX),)
-GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
-endif
-endif
-endif
-ifeq ($(CPU_TARGET),powerpc64)
-ifeq ($(BINUTILSPREFIX),)
-GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
-endif
-endif
-endif
-ifndef GCCLIBDIR
-CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
-ifneq ($(CROSSGCC),)
-GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)
-endif
-endif
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-ifdef inUnix
-ifeq ($(OS_SOURCE),netbsd)
-OTHERLIBDIR+=/usr/pkg/lib
-endif
-export GCCLIBDIR OTHERLIB
-endif
BATCHEXT=.bat
LOADEREXT=.as
EXEEXT=.exe
@@ -1016,6 +623,11 @@ ifeq ($(OS_TARGET),NativeNT)
SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
else
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
@@ -1440,1180 +1052,524 @@ else
TAROPT=vz
TAREXT=.tar.gz
endif
-override REQUIRE_PACKAGES=fcl-base fcl-xml fcl-db fcl-json fcl-net fcl-process
+override REQUIRE_PACKAGES=rtl fpmkunit
ifeq ($(FULL_TARGET),i386-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-go32v2)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-win32)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-os2)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-freebsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-beos)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-haiku)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-netbsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-solaris)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-qnx)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-netware)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-openbsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-wdosx)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-darwin)
-REQUIRE_PACKAGES_UNIVINT=1
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-emx)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-watcom)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-wince)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-symbian)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-nativent)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),i386-iphonesim)
-REQUIRE_PACKAGES_UNIVINT=1
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-amiga)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-atari)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-palmos)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),m68k-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc-macos)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
-REQUIRE_PACKAGES_UNIVINT=1
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+REQUIRE_PACKAGES_FPMKUNIT=1
+endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),sparc-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),sparc-solaris)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),sparc-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),x86_64-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
-REQUIRE_PACKAGES_UNIVINT=1
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),x86_64-win64)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-palmos)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-darwin)
-REQUIRE_PACKAGES_UNIVINT=1
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-wince)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-gba)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-nds)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),arm-symbian)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
-REQUIRE_PACKAGES_UNIVINT=1
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),avr-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),armeb-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),armeb-embedded)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
ifeq ($(FULL_TARGET),mipsel-linux)
-REQUIRE_PACKAGES_FCL-BASE=1
-REQUIRE_PACKAGES_ICONVENC=1
-REQUIRE_PACKAGES_FCL-XML=1
-REQUIRE_PACKAGES_FCL-DB=1
-REQUIRE_PACKAGES_FCL-JSON=1
-REQUIRE_PACKAGES_FCL-PASSRC=1
-REQUIRE_PACKAGES_FCL-ASYNC=1
-REQUIRE_PACKAGES_FCL-NET=1
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-PROCESS=1
-REQUIRE_PACKAGES_IBASE=1
-REQUIRE_PACKAGES_POSTGRES=1
-REQUIRE_PACKAGES_MYSQL=1
-REQUIRE_PACKAGES_ODBC=1
-REQUIRE_PACKAGES_ORACLE=1
-REQUIRE_PACKAGES_SQLITE=1
-REQUIRE_PACKAGES_PXLIB=1
-REQUIRE_PACKAGES_HTTPD22=1
-REQUIRE_PACKAGES_FASTCGI=1
-endif
-ifdef REQUIRE_PACKAGES_FCL-BASE
-PACKAGEDIR_FCL-BASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-base/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL-BASE),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL-BASE)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL-BASE=$(PACKAGEDIR_FCL-BASE)/units/$(TARGETSUFFIX)
-else
-UNITDIR_FCL-BASE=$(PACKAGEDIR_FCL-BASE)
+REQUIRE_PACKAGES_FPMKUNIT=1
endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL-BASE)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FCL-BASE) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-BASE)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_FCL-BASE=
-UNITDIR_FCL-BASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-base/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL-BASE),)
-UNITDIR_FCL-BASE:=$(firstword $(UNITDIR_FCL-BASE))
-else
-UNITDIR_FCL-BASE=
-endif
-endif
-ifdef UNITDIR_FCL-BASE
-override COMPILER_UNITDIR+=$(UNITDIR_FCL-BASE)
-endif
-endif
-ifdef REQUIRE_PACKAGES_ICONVENC
-PACKAGEDIR_ICONVENC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /iconvenc/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_ICONVENC),)
-ifneq ($(wildcard $(PACKAGEDIR_ICONVENC)/units/$(TARGETSUFFIX)),)
-UNITDIR_ICONVENC=$(PACKAGEDIR_ICONVENC)/units/$(TARGETSUFFIX)
-else
-UNITDIR_ICONVENC=$(PACKAGEDIR_ICONVENC)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_ICONVENC)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_ICONVENC) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_ICONVENC)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_ICONVENC=
-UNITDIR_ICONVENC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /iconvenc/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_ICONVENC),)
-UNITDIR_ICONVENC:=$(firstword $(UNITDIR_ICONVENC))
-else
-UNITDIR_ICONVENC=
-endif
-endif
-ifdef UNITDIR_ICONVENC
-override COMPILER_UNITDIR+=$(UNITDIR_ICONVENC)
-endif
-endif
-ifdef REQUIRE_PACKAGES_FCL-XML
-PACKAGEDIR_FCL-XML:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-xml/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL-XML),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL-XML)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL-XML=$(PACKAGEDIR_FCL-XML)/units/$(TARGETSUFFIX)
-else
-UNITDIR_FCL-XML=$(PACKAGEDIR_FCL-XML)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL-XML)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FCL-XML) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-XML)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_FCL-XML=
-UNITDIR_FCL-XML:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-xml/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL-XML),)
-UNITDIR_FCL-XML:=$(firstword $(UNITDIR_FCL-XML))
-else
-UNITDIR_FCL-XML=
-endif
-endif
-ifdef UNITDIR_FCL-XML
-override COMPILER_UNITDIR+=$(UNITDIR_FCL-XML)
-endif
-endif
-ifdef REQUIRE_PACKAGES_FCL-DB
-PACKAGEDIR_FCL-DB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-db/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL-DB),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL-DB)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL-DB=$(PACKAGEDIR_FCL-DB)/units/$(TARGETSUFFIX)
-else
-UNITDIR_FCL-DB=$(PACKAGEDIR_FCL-DB)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL-DB)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FCL-DB) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-DB)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_FCL-DB=
-UNITDIR_FCL-DB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-db/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL-DB),)
-UNITDIR_FCL-DB:=$(firstword $(UNITDIR_FCL-DB))
+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_FCL-DB=
-endif
-endif
-ifdef UNITDIR_FCL-DB
-override COMPILER_UNITDIR+=$(UNITDIR_FCL-DB)
-endif
-endif
-ifdef REQUIRE_PACKAGES_FCL-JSON
-PACKAGEDIR_FCL-JSON:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-json/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL-JSON),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL-JSON)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL-JSON=$(PACKAGEDIR_FCL-JSON)/units/$(TARGETSUFFIX)
-else
-UNITDIR_FCL-JSON=$(PACKAGEDIR_FCL-JSON)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
endif
ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL-JSON)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FCL-JSON) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-JSON)/$(FPCMADE)
+$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE)
endif
else
-PACKAGEDIR_FCL-JSON=
-UNITDIR_FCL-JSON:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-json/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL-JSON),)
-UNITDIR_FCL-JSON:=$(firstword $(UNITDIR_FCL-JSON))
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
else
-UNITDIR_FCL-JSON=
+UNITDIR_RTL=
endif
endif
-ifdef UNITDIR_FCL-JSON
-override COMPILER_UNITDIR+=$(UNITDIR_FCL-JSON)
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
endif
endif
-ifdef REQUIRE_PACKAGES_FCL-PASSRC
-PACKAGEDIR_FCL-PASSRC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-passrc/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL-PASSRC),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL-PASSRC)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL-PASSRC=$(PACKAGEDIR_FCL-PASSRC)/units/$(TARGETSUFFIX)
+ifdef REQUIRE_PACKAGES_HASH
+PACKAGEDIR_HASH:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /hash/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_HASH),)
+ifneq ($(wildcard $(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)),)
+UNITDIR_HASH=$(PACKAGEDIR_HASH)/units/$(TARGETSUFFIX)
else
-UNITDIR_FCL-PASSRC=$(PACKAGEDIR_FCL-PASSRC)
+UNITDIR_HASH=$(PACKAGEDIR_HASH)
endif
ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL-PASSRC)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FCL-PASSRC) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-PASSRC)/$(FPCMADE)
+$(PACKAGEDIR_HASH)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_HASH) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_HASH)/$(FPCMADE)
endif
else
-PACKAGEDIR_FCL-PASSRC=
-UNITDIR_FCL-PASSRC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-passrc/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL-PASSRC),)
-UNITDIR_FCL-PASSRC:=$(firstword $(UNITDIR_FCL-PASSRC))
+PACKAGEDIR_HASH=
+UNITDIR_HASH:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /hash/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_HASH),)
+UNITDIR_HASH:=$(firstword $(UNITDIR_HASH))
else
-UNITDIR_FCL-PASSRC=
+UNITDIR_HASH=
endif
endif
-ifdef UNITDIR_FCL-PASSRC
-override COMPILER_UNITDIR+=$(UNITDIR_FCL-PASSRC)
+ifdef UNITDIR_HASH
+override COMPILER_UNITDIR+=$(UNITDIR_HASH)
endif
endif
-ifdef REQUIRE_PACKAGES_FCL-ASYNC
-PACKAGEDIR_FCL-ASYNC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-async/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL-ASYNC),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL-ASYNC)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL-ASYNC=$(PACKAGEDIR_FCL-ASYNC)/units/$(TARGETSUFFIX)
+ifdef REQUIRE_PACKAGES_PASZLIB
+PACKAGEDIR_PASZLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_PASZLIB),)
+ifneq ($(wildcard $(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)),)
+UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)/units/$(TARGETSUFFIX)
else
-UNITDIR_FCL-ASYNC=$(PACKAGEDIR_FCL-ASYNC)
+UNITDIR_PASZLIB=$(PACKAGEDIR_PASZLIB)
endif
ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL-ASYNC)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FCL-ASYNC) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-ASYNC)/$(FPCMADE)
+$(PACKAGEDIR_PASZLIB)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_PASZLIB) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_PASZLIB)/$(FPCMADE)
endif
else
-PACKAGEDIR_FCL-ASYNC=
-UNITDIR_FCL-ASYNC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-async/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL-ASYNC),)
-UNITDIR_FCL-ASYNC:=$(firstword $(UNITDIR_FCL-ASYNC))
+PACKAGEDIR_PASZLIB=
+UNITDIR_PASZLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /paszlib/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_PASZLIB),)
+UNITDIR_PASZLIB:=$(firstword $(UNITDIR_PASZLIB))
else
-UNITDIR_FCL-ASYNC=
+UNITDIR_PASZLIB=
endif
endif
-ifdef UNITDIR_FCL-ASYNC
-override COMPILER_UNITDIR+=$(UNITDIR_FCL-ASYNC)
-endif
-endif
-ifdef REQUIRE_PACKAGES_FCL-NET
-PACKAGEDIR_FCL-NET:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl-net/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FCL-NET),)
-ifneq ($(wildcard $(PACKAGEDIR_FCL-NET)/units/$(TARGETSUFFIX)),)
-UNITDIR_FCL-NET=$(PACKAGEDIR_FCL-NET)/units/$(TARGETSUFFIX)
-else
-UNITDIR_FCL-NET=$(PACKAGEDIR_FCL-NET)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_FCL-NET)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FCL-NET) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FCL-NET)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_FCL-NET=
-UNITDIR_FCL-NET:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fcl-net/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FCL-NET),)
-UNITDIR_FCL-NET:=$(firstword $(UNITDIR_FCL-NET))
-else
-UNITDIR_FCL-NET=
-endif
-endif
-ifdef UNITDIR_FCL-NET
-override COMPILER_UNITDIR+=$(UNITDIR_FCL-NET)
+ifdef UNITDIR_PASZLIB
+override COMPILER_UNITDIR+=$(UNITDIR_PASZLIB)
endif
endif
ifdef REQUIRE_PACKAGES_FCL-PROCESS
@@ -2642,264 +1598,30 @@ ifdef UNITDIR_FCL-PROCESS
override COMPILER_UNITDIR+=$(UNITDIR_FCL-PROCESS)
endif
endif
-ifdef REQUIRE_PACKAGES_IBASE
-PACKAGEDIR_IBASE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /ibase/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_IBASE),)
-ifneq ($(wildcard $(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX)),)
-UNITDIR_IBASE=$(PACKAGEDIR_IBASE)/units/$(TARGETSUFFIX)
-else
-UNITDIR_IBASE=$(PACKAGEDIR_IBASE)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_IBASE)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_IBASE) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_IBASE)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_IBASE=
-UNITDIR_IBASE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /ibase/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_IBASE),)
-UNITDIR_IBASE:=$(firstword $(UNITDIR_IBASE))
-else
-UNITDIR_IBASE=
-endif
-endif
-ifdef UNITDIR_IBASE
-override COMPILER_UNITDIR+=$(UNITDIR_IBASE)
-endif
-endif
-ifdef REQUIRE_PACKAGES_POSTGRES
-PACKAGEDIR_POSTGRES:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /postgres/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_POSTGRES),)
-ifneq ($(wildcard $(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX)),)
-UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES)/units/$(TARGETSUFFIX)
-else
-UNITDIR_POSTGRES=$(PACKAGEDIR_POSTGRES)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_POSTGRES)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_POSTGRES) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_POSTGRES)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_POSTGRES=
-UNITDIR_POSTGRES:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /postgres/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_POSTGRES),)
-UNITDIR_POSTGRES:=$(firstword $(UNITDIR_POSTGRES))
-else
-UNITDIR_POSTGRES=
-endif
-endif
-ifdef UNITDIR_POSTGRES
-override COMPILER_UNITDIR+=$(UNITDIR_POSTGRES)
-endif
-endif
-ifdef REQUIRE_PACKAGES_MYSQL
-PACKAGEDIR_MYSQL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /mysql/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_MYSQL),)
-ifneq ($(wildcard $(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX)),)
-UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)/units/$(TARGETSUFFIX)
-else
-UNITDIR_MYSQL=$(PACKAGEDIR_MYSQL)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_MYSQL)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_MYSQL) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_MYSQL)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_MYSQL=
-UNITDIR_MYSQL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /mysql/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_MYSQL),)
-UNITDIR_MYSQL:=$(firstword $(UNITDIR_MYSQL))
-else
-UNITDIR_MYSQL=
-endif
-endif
-ifdef UNITDIR_MYSQL
-override COMPILER_UNITDIR+=$(UNITDIR_MYSQL)
-endif
-endif
-ifdef REQUIRE_PACKAGES_ODBC
-PACKAGEDIR_ODBC:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /odbc/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_ODBC),)
-ifneq ($(wildcard $(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX)),)
-UNITDIR_ODBC=$(PACKAGEDIR_ODBC)/units/$(TARGETSUFFIX)
-else
-UNITDIR_ODBC=$(PACKAGEDIR_ODBC)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_ODBC)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_ODBC) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_ODBC)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_ODBC=
-UNITDIR_ODBC:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /odbc/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_ODBC),)
-UNITDIR_ODBC:=$(firstword $(UNITDIR_ODBC))
-else
-UNITDIR_ODBC=
-endif
-endif
-ifdef UNITDIR_ODBC
-override COMPILER_UNITDIR+=$(UNITDIR_ODBC)
-endif
-endif
-ifdef REQUIRE_PACKAGES_ORACLE
-PACKAGEDIR_ORACLE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /oracle/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_ORACLE),)
-ifneq ($(wildcard $(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX)),)
-UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE)/units/$(TARGETSUFFIX)
-else
-UNITDIR_ORACLE=$(PACKAGEDIR_ORACLE)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_ORACLE)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_ORACLE) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_ORACLE)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_ORACLE=
-UNITDIR_ORACLE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /oracle/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_ORACLE),)
-UNITDIR_ORACLE:=$(firstword $(UNITDIR_ORACLE))
-else
-UNITDIR_ORACLE=
-endif
-endif
-ifdef UNITDIR_ORACLE
-override COMPILER_UNITDIR+=$(UNITDIR_ORACLE)
-endif
-endif
-ifdef REQUIRE_PACKAGES_SQLITE
-PACKAGEDIR_SQLITE:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_SQLITE),)
-ifneq ($(wildcard $(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX)),)
-UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE)/units/$(TARGETSUFFIX)
-else
-UNITDIR_SQLITE=$(PACKAGEDIR_SQLITE)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_SQLITE)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_SQLITE) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_SQLITE)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_SQLITE=
-UNITDIR_SQLITE:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /sqlite/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_SQLITE),)
-UNITDIR_SQLITE:=$(firstword $(UNITDIR_SQLITE))
-else
-UNITDIR_SQLITE=
-endif
-endif
-ifdef UNITDIR_SQLITE
-override COMPILER_UNITDIR+=$(UNITDIR_SQLITE)
-endif
-endif
-ifdef REQUIRE_PACKAGES_PXLIB
-PACKAGEDIR_PXLIB:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /pxlib/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_PXLIB),)
-ifneq ($(wildcard $(PACKAGEDIR_PXLIB)/units/$(TARGETSUFFIX)),)
-UNITDIR_PXLIB=$(PACKAGEDIR_PXLIB)/units/$(TARGETSUFFIX)
+ifdef REQUIRE_PACKAGES_FPMKUNIT
+PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
+ifneq ($(PACKAGEDIR_FPMKUNIT),)
+ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)),)
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units/$(TARGETSUFFIX)
else
-UNITDIR_PXLIB=$(PACKAGEDIR_PXLIB)
+UNITDIR_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
endif
ifdef CHECKDEPEND
-$(PACKAGEDIR_PXLIB)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_PXLIB) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_PXLIB)/$(FPCMADE)
+$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
+ $(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
+override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
endif
else
-PACKAGEDIR_PXLIB=
-UNITDIR_PXLIB:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /pxlib/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_PXLIB),)
-UNITDIR_PXLIB:=$(firstword $(UNITDIR_PXLIB))
+PACKAGEDIR_FPMKUNIT=
+UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_FPMKUNIT),)
+UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
else
-UNITDIR_PXLIB=
+UNITDIR_FPMKUNIT=
endif
endif
-ifdef UNITDIR_PXLIB
-override COMPILER_UNITDIR+=$(UNITDIR_PXLIB)
-endif
-endif
-ifdef REQUIRE_PACKAGES_HTTPD22
-PACKAGEDIR_HTTPD22:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /httpd22/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_HTTPD22),)
-ifneq ($(wildcard $(PACKAGEDIR_HTTPD22)/units/$(TARGETSUFFIX)),)
-UNITDIR_HTTPD22=$(PACKAGEDIR_HTTPD22)/units/$(TARGETSUFFIX)
-else
-UNITDIR_HTTPD22=$(PACKAGEDIR_HTTPD22)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_HTTPD22)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_HTTPD22) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_HTTPD22)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_HTTPD22=
-UNITDIR_HTTPD22:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /httpd22/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_HTTPD22),)
-UNITDIR_HTTPD22:=$(firstword $(UNITDIR_HTTPD22))
-else
-UNITDIR_HTTPD22=
-endif
-endif
-ifdef UNITDIR_HTTPD22
-override COMPILER_UNITDIR+=$(UNITDIR_HTTPD22)
-endif
-endif
-ifdef REQUIRE_PACKAGES_FASTCGI
-PACKAGEDIR_FASTCGI:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fastcgi/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_FASTCGI),)
-ifneq ($(wildcard $(PACKAGEDIR_FASTCGI)/units/$(TARGETSUFFIX)),)
-UNITDIR_FASTCGI=$(PACKAGEDIR_FASTCGI)/units/$(TARGETSUFFIX)
-else
-UNITDIR_FASTCGI=$(PACKAGEDIR_FASTCGI)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_FASTCGI)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FASTCGI) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_FASTCGI)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_FASTCGI=
-UNITDIR_FASTCGI:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fastcgi/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_FASTCGI),)
-UNITDIR_FASTCGI:=$(firstword $(UNITDIR_FASTCGI))
-else
-UNITDIR_FASTCGI=
-endif
-endif
-ifdef UNITDIR_FASTCGI
-override COMPILER_UNITDIR+=$(UNITDIR_FASTCGI)
-endif
-endif
-ifdef REQUIRE_PACKAGES_UNIVINT
-PACKAGEDIR_UNIVINT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /univint/Makefile.fpc,$(PACKAGESDIR))))))
-ifneq ($(PACKAGEDIR_UNIVINT),)
-ifneq ($(wildcard $(PACKAGEDIR_UNIVINT)/units/$(TARGETSUFFIX)),)
-UNITDIR_UNIVINT=$(PACKAGEDIR_UNIVINT)/units/$(TARGETSUFFIX)
-else
-UNITDIR_UNIVINT=$(PACKAGEDIR_UNIVINT)
-endif
-ifdef CHECKDEPEND
-$(PACKAGEDIR_UNIVINT)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_UNIVINT) $(FPCMADE)
-override ALLDEPENDENCIES+=$(PACKAGEDIR_UNIVINT)/$(FPCMADE)
-endif
-else
-PACKAGEDIR_UNIVINT=
-UNITDIR_UNIVINT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /univint/Package.fpc,$(UNITSDIR)))))
-ifneq ($(UNITDIR_UNIVINT),)
-UNITDIR_UNIVINT:=$(firstword $(UNITDIR_UNIVINT))
-else
-UNITDIR_UNIVINT=
-endif
-endif
-ifdef UNITDIR_UNIVINT
-override COMPILER_UNITDIR+=$(UNITDIR_UNIVINT)
+ifdef UNITDIR_FPMKUNIT
+override COMPILER_UNITDIR+=$(UNITDIR_FPMKUNIT)
endif
endif
ifndef NOCPUDEF
@@ -3021,12 +1743,6 @@ endif
endif
ifdef LINKSHARED
endif
-ifdef GCCLIBDIR
-override FPCOPT+=-Fl$(GCCLIBDIR)
-endif
-ifdef OTHERLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
-endif
ifdef OPT
override FPCOPT+=$(OPT)
endif
@@ -3400,473 +2116,37 @@ 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
-ifeq ($(FULL_TARGET),i386-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-go32v2)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-win32)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-os2)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-freebsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-beos)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-haiku)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-netbsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-solaris)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-qnx)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-netware)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-openbsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-wdosx)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-darwin)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-emx)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-watcom)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-netwlibc)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-wince)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-symbian)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-nativent)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),i386-iphonesim)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-freebsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-netbsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-amiga)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-atari)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-openbsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-palmos)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),m68k-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc-netbsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc-amiga)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc-macos)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc-darwin)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc-morphos)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),sparc-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),sparc-netbsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),sparc-solaris)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),sparc-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),x86_64-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),x86_64-freebsd)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),x86_64-solaris)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),x86_64-darwin)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),x86_64-win64)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),x86_64-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-palmos)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-darwin)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-wince)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-gba)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-nds)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),arm-symbian)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc64-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc64-darwin)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),powerpc64-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),avr-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),armeb-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),armeb-embedded)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifeq ($(FULL_TARGET),mipsel-linux)
-TARGET_DIRS_SRC/BASE=1
-TARGET_DIRS_SRC/WEBDATA=1
-TARGET_DIRS_SRC/JSONRPC=1
-endif
-ifdef TARGET_DIRS_SRC/BASE
-src/base_all:
- $(MAKE) -C src/base all
-src/base_debug:
- $(MAKE) -C src/base debug
-src/base_smart:
- $(MAKE) -C src/base smart
-src/base_release:
- $(MAKE) -C src/base release
-src/base_units:
- $(MAKE) -C src/base units
-src/base_examples:
- $(MAKE) -C src/base examples
-src/base_shared:
- $(MAKE) -C src/base shared
-src/base_install:
- $(MAKE) -C src/base install
-src/base_sourceinstall:
- $(MAKE) -C src/base sourceinstall
-src/base_exampleinstall:
- $(MAKE) -C src/base exampleinstall
-src/base_distinstall:
- $(MAKE) -C src/base distinstall
-src/base_zipinstall:
- $(MAKE) -C src/base zipinstall
-src/base_zipsourceinstall:
- $(MAKE) -C src/base zipsourceinstall
-src/base_zipexampleinstall:
- $(MAKE) -C src/base zipexampleinstall
-src/base_zipdistinstall:
- $(MAKE) -C src/base zipdistinstall
-src/base_clean:
- $(MAKE) -C src/base clean
-src/base_distclean:
- $(MAKE) -C src/base distclean
-src/base_cleanall:
- $(MAKE) -C src/base cleanall
-src/base_info:
- $(MAKE) -C src/base info
-src/base_makefiles:
- $(MAKE) -C src/base makefiles
-src/base:
- $(MAKE) -C src/base all
-.PHONY: src/base_all src/base_debug src/base_smart src/base_release src/base_units src/base_examples src/base_shared src/base_install src/base_sourceinstall src/base_exampleinstall src/base_distinstall src/base_zipinstall src/base_zipsourceinstall src/base_zipexampleinstall src/base_zipdistinstall src/base_clean src/base_distclean src/base_cleanall src/base_info src/base_makefiles src/base
-endif
-ifdef TARGET_DIRS_SRC/WEBDATA
-src/webdata_all:
- $(MAKE) -C src/webdata all
-src/webdata_debug:
- $(MAKE) -C src/webdata debug
-src/webdata_smart:
- $(MAKE) -C src/webdata smart
-src/webdata_release:
- $(MAKE) -C src/webdata release
-src/webdata_units:
- $(MAKE) -C src/webdata units
-src/webdata_examples:
- $(MAKE) -C src/webdata examples
-src/webdata_shared:
- $(MAKE) -C src/webdata shared
-src/webdata_install:
- $(MAKE) -C src/webdata install
-src/webdata_sourceinstall:
- $(MAKE) -C src/webdata sourceinstall
-src/webdata_exampleinstall:
- $(MAKE) -C src/webdata exampleinstall
-src/webdata_distinstall:
- $(MAKE) -C src/webdata distinstall
-src/webdata_zipinstall:
- $(MAKE) -C src/webdata zipinstall
-src/webdata_zipsourceinstall:
- $(MAKE) -C src/webdata zipsourceinstall
-src/webdata_zipexampleinstall:
- $(MAKE) -C src/webdata zipexampleinstall
-src/webdata_zipdistinstall:
- $(MAKE) -C src/webdata zipdistinstall
-src/webdata_clean:
- $(MAKE) -C src/webdata clean
-src/webdata_distclean:
- $(MAKE) -C src/webdata distclean
-src/webdata_cleanall:
- $(MAKE) -C src/webdata cleanall
-src/webdata_info:
- $(MAKE) -C src/webdata info
-src/webdata_makefiles:
- $(MAKE) -C src/webdata makefiles
-src/webdata:
- $(MAKE) -C src/webdata all
-.PHONY: src/webdata_all src/webdata_debug src/webdata_smart src/webdata_release src/webdata_units src/webdata_examples src/webdata_shared src/webdata_install src/webdata_sourceinstall src/webdata_exampleinstall src/webdata_distinstall src/webdata_zipinstall src/webdata_zipsourceinstall src/webdata_zipexampleinstall src/webdata_zipdistinstall src/webdata_clean src/webdata_distclean src/webdata_cleanall src/webdata_info src/webdata_makefiles src/webdata
-endif
-ifdef TARGET_DIRS_SRC/JSONRPC
-src/jsonrpc_all:
- $(MAKE) -C src/jsonrpc all
-src/jsonrpc_debug:
- $(MAKE) -C src/jsonrpc debug
-src/jsonrpc_smart:
- $(MAKE) -C src/jsonrpc smart
-src/jsonrpc_release:
- $(MAKE) -C src/jsonrpc release
-src/jsonrpc_units:
- $(MAKE) -C src/jsonrpc units
-src/jsonrpc_examples:
- $(MAKE) -C src/jsonrpc examples
-src/jsonrpc_shared:
- $(MAKE) -C src/jsonrpc shared
-src/jsonrpc_install:
- $(MAKE) -C src/jsonrpc install
-src/jsonrpc_sourceinstall:
- $(MAKE) -C src/jsonrpc sourceinstall
-src/jsonrpc_exampleinstall:
- $(MAKE) -C src/jsonrpc exampleinstall
-src/jsonrpc_distinstall:
- $(MAKE) -C src/jsonrpc distinstall
-src/jsonrpc_zipinstall:
- $(MAKE) -C src/jsonrpc zipinstall
-src/jsonrpc_zipsourceinstall:
- $(MAKE) -C src/jsonrpc zipsourceinstall
-src/jsonrpc_zipexampleinstall:
- $(MAKE) -C src/jsonrpc zipexampleinstall
-src/jsonrpc_zipdistinstall:
- $(MAKE) -C src/jsonrpc zipdistinstall
-src/jsonrpc_clean:
- $(MAKE) -C src/jsonrpc clean
-src/jsonrpc_distclean:
- $(MAKE) -C src/jsonrpc distclean
-src/jsonrpc_cleanall:
- $(MAKE) -C src/jsonrpc cleanall
-src/jsonrpc_info:
- $(MAKE) -C src/jsonrpc info
-src/jsonrpc_makefiles:
- $(MAKE) -C src/jsonrpc makefiles
-src/jsonrpc:
- $(MAKE) -C src/jsonrpc all
-.PHONY: src/jsonrpc_all src/jsonrpc_debug src/jsonrpc_smart src/jsonrpc_release src/jsonrpc_units src/jsonrpc_examples src/jsonrpc_shared src/jsonrpc_install src/jsonrpc_sourceinstall src/jsonrpc_exampleinstall src/jsonrpc_distinstall src/jsonrpc_zipinstall src/jsonrpc_zipsourceinstall src/jsonrpc_zipexampleinstall src/jsonrpc_zipdistinstall src/jsonrpc_clean src/jsonrpc_distclean src/jsonrpc_cleanall src/jsonrpc_info src/jsonrpc_makefiles src/jsonrpc
-endif
-all: $(addsuffix _all,$(TARGET_DIRS))
-debug: $(addsuffix _debug,$(TARGET_DIRS))
-smart: $(addsuffix _smart,$(TARGET_DIRS))
-release: $(addsuffix _release,$(TARGET_DIRS))
-units: $(addsuffix _units,$(TARGET_DIRS))
-examples: $(addsuffix _examples,$(TARGET_DIRS))
-shared: $(addsuffix _shared,$(TARGET_DIRS))
-install: fpc_install $(addsuffix _install,$(TARGET_DIRS))
+units:
+examples:
+shared:
sourceinstall: fpc_sourceinstall
-exampleinstall: fpc_exampleinstall $(addsuffix _exampleinstall,$(TARGET_DIRS))
+exampleinstall: fpc_exampleinstall
distinstall: fpc_distinstall
zipinstall: fpc_zipinstall
zipsourceinstall: fpc_zipsourceinstall
-zipexampleinstall: fpc_zipexampleinstall $(addsuffix _zipexampleinstall,$(TARGET_DIRS))
+zipexampleinstall: fpc_zipexampleinstall
zipdistinstall: fpc_zipdistinstall
+distclean:
+cleanall:
info: fpc_info
makefiles: fpc_makefiles
-.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall info makefiles
+.PHONY: units examples shared sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
-.NOTPARALLEL:
-distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_distclean
-clean: $(addsuffix _clean,$(TARGET_DIRS)) fpc_clean
-cleanall: $(addsuffix _cleanall,$(TARGET_DIRS)) fpc_cleanall
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+fpmake: $(COMPILER_UNITTARGETDIR) fpmake.pp
+ $(FPC) fpmake.pp $(FPCOPT)
+all: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+smart: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-XX -CX"
+release: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-dRELEASE"
+debug: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-dDEBUG"
+clean:
+ $(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+install: fpmake
+ $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX)
diff --git a/packages/fcl-web/Makefile.fpc b/packages/fcl-web/Makefile.fpc
index 8325fa92ad..d99a1e9fc2 100644
--- a/packages/fcl-web/Makefile.fpc
+++ b/packages/fcl-web/Makefile.fpc
@@ -6,25 +6,43 @@
name=fcl-web
version=2.5.1
-[target]
-dirs=src/base src/webdata src/jsonrpc
-
[require]
-packages=fcl-base fcl-xml fcl-db fcl-json fcl-net fcl-process
-
-[compiler]
-options=-S2h
-
-[install]
-fpcpackage=y
+packages=rtl fpmkunit
[default]
fpcdir=../..
-[rules]
-.NOTPARALLEL:
-distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_distclean
-clean: $(addsuffix _clean,$(TARGET_DIRS)) fpc_clean
-cleanall: $(addsuffix _cleanall,$(TARGET_DIRS)) fpc_cleanall
+[prerules]
+# If no fpmake exists and clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared. So simply skip the
+# clean by replacing the command with 'echo'
+FPMAKE_BIN_CLEAN=$(wildcard ./fpmake$(SRCEXEEXT))
+ifeq ($(FPMAKE_BIN_CLEAN),)
+FPMAKE_BIN_CLEAN=$(ECHO)
+endif
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(EXEEXT)
+[rules]
+$(COMPILER_UNITTARGETDIR):
+ $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
+fpmake: $(COMPILER_UNITTARGETDIR) fpmake.pp
+ $(FPC) fpmake.pp $(FPCOPT)
+all: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+smart: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-XX -CX"
+release: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-dRELEASE"
+debug: fpmake
+ $(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-dDEBUG"
+clean:
+ $(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
+install: fpmake
+ $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX)
diff --git a/packages/fcl-web/Makefile.org b/packages/fcl-web/Makefile.org
new file mode 100644
index 0000000000..8325fa92ad
--- /dev/null
+++ b/packages/fcl-web/Makefile.org
@@ -0,0 +1,30 @@
+#
+# Makefile.fpc for TDataSet for FCL
+#
+
+[package]
+name=fcl-web
+version=2.5.1
+
+[target]
+dirs=src/base src/webdata src/jsonrpc
+
+[require]
+packages=fcl-base fcl-xml fcl-db fcl-json fcl-net fcl-process
+
+[compiler]
+options=-S2h
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_distclean
+clean: $(addsuffix _clean,$(TARGET_DIRS)) fpc_clean
+cleanall: $(addsuffix _cleanall,$(TARGET_DIRS)) fpc_cleanall
+
+
diff --git a/packages/fcl-web/examples/combined/combined.html b/packages/fcl-web/examples/combined/combined.html
new file mode 100644
index 0000000000..377a592a90
--- /dev/null
+++ b/packages/fcl-web/examples/combined/combined.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+<title>ExtJS application demo</title>
+<link rel="stylesheet" type="text/css" href="/ext/resources/css/ext-all.css"/>
+<script src="/ext/adapter/ext/ext-base.js"></script>
+<script src="/ext/ext-all-debug.js"></script>
+<script src="combined.cgi/Login/API"></script>
+<script src="login.js"></script>
+<script>
+Ext.onReady(function() {
+ // API is registered under FPWeb by default.
+ Ext.Direct.addProvider(FPWeb);
+ fpWeb.login=new fpWeb.LoginForm({});
+ fpWeb.login.show();
+});
+</script>
+</head>
+<body>
+</body>
+</html> \ No newline at end of file
diff --git a/packages/fcl-web/examples/combined/combined.ico b/packages/fcl-web/examples/combined/combined.ico
new file mode 100644
index 0000000000..0341321b5d
--- /dev/null
+++ b/packages/fcl-web/examples/combined/combined.ico
Binary files differ
diff --git a/packages/fcl-web/examples/combined/combined.ini b/packages/fcl-web/examples/combined/combined.ini
new file mode 100644
index 0000000000..4220bcf27d
--- /dev/null
+++ b/packages/fcl-web/examples/combined/combined.ini
@@ -0,0 +1,4 @@
+[Database]
+Path=/home/firebird/combined.fb
+UserName=WISASOFT
+Password=SysteemD
diff --git a/packages/fcl-web/examples/combined/combined.lpi b/packages/fcl-web/examples/combined/combined.lpi
new file mode 100644
index 0000000000..beb1bbc61e
--- /dev/null
+++ b/packages/fcl-web/examples/combined/combined.lpi
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <SaveOnlyProjectUnits Value="True"/>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ <Runnable Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="Combined RPC/Webdata example"/>
+ <ResourceType Value="res"/>
+ <UseXPManifest Value="True"/>
+ <Icon Value="0"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <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="5">
+ <Item1>
+ <PackageName Value="SQLDBLaz"/>
+ <MinVersion Major="1" Release="1" Valid="True"/>
+ </Item1>
+ <Item2>
+ <PackageName Value="lazwebextra"/>
+ <MinVersion Minor="9" Valid="True"/>
+ </Item2>
+ <Item3>
+ <PackageName Value="WebLaz"/>
+ </Item3>
+ <Item4>
+ <PackageName Value="LCL"/>
+ </Item4>
+ <Item5>
+ <PackageName Value="FCL"/>
+ </Item5>
+ </RequiredPackages>
+ <Units Count="5">
+ <Unit0>
+ <Filename Value="combined.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <UnitName Value="combined"/>
+ </Unit0>
+ <Unit1>
+ <Filename Value="wmlogin.pp"/>
+ <IsPartOfProject Value="True"/>
+ <ComponentName Value="SessionManagement"/>
+ <ResourceBaseClass Value="DataModule"/>
+ <UnitName Value="wmlogin"/>
+ </Unit1>
+ <Unit2>
+ <Filename Value="wmusers.pp"/>
+ <IsPartOfProject Value="True"/>
+ <ComponentName Value="CombinedModule"/>
+ <HasResources Value="True"/>
+ <ResourceBaseClass Value="DataModule"/>
+ <UnitName Value="wmusers"/>
+ </Unit2>
+ <Unit3>
+ <Filename Value="login.js"/>
+ <IsPartOfProject Value="True"/>
+ </Unit3>
+ <Unit4>
+ <Filename Value="users.js"/>
+ <IsPartOfProject Value="True"/>
+ </Unit4>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="10"/>
+ <Target>
+ <Filename Value="combined.cgi"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ </SearchPaths>
+ <Other>
+ <CompilerMessages>
+ <UseMsgFile Value="True"/>
+ </CompilerMessages>
+ <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>
diff --git a/packages/fcl-web/examples/combined/combined.lpr b/packages/fcl-web/examples/combined/combined.lpr
new file mode 100644
index 0000000000..a1450e60c6
--- /dev/null
+++ b/packages/fcl-web/examples/combined/combined.lpr
@@ -0,0 +1,15 @@
+program combined;
+
+{$mode objfpc}{$H+}
+
+uses
+ fpCGI, wmusers, httpdefs, websession,wmlogin;
+
+{$R *.res}
+
+begin
+ Application.Title:='Combined RPC/Webdata example';
+ Application.Initialize;
+ Application.Run;
+end.
+
diff --git a/packages/fcl-web/examples/combined/combined.res b/packages/fcl-web/examples/combined/combined.res
new file mode 100644
index 0000000000..7c6cf3e4be
--- /dev/null
+++ b/packages/fcl-web/examples/combined/combined.res
Binary files differ
diff --git a/packages/fcl-web/examples/combined/combined.sql b/packages/fcl-web/examples/combined/combined.sql
new file mode 100644
index 0000000000..e5b4c595aa
--- /dev/null
+++ b/packages/fcl-web/examples/combined/combined.sql
@@ -0,0 +1,11 @@
+CREATE TABLE USERS (
+ U_ID BIGINT NOT NULL,
+ U_LOGIN VARCHAR(40) NOT NULL,
+ U_NAME VARCHAR(30) NOT NULL,
+ U_EMAIL VARCHAR(100),
+ U_PASSWORD VARCHAR(100) NOT NULL,
+ CONSTRAINT PK_FPCUSERS PRIMARY KEY (U_ID),
+ CONSTRAINT U_USERNAME UNIQUE (U_LOGIN)
+);
+
+ \ No newline at end of file
diff --git a/packages/fcl-web/examples/combined/login.js b/packages/fcl-web/examples/combined/login.js
new file mode 100644
index 0000000000..8d78375d30
--- /dev/null
+++ b/packages/fcl-web/examples/combined/login.js
@@ -0,0 +1,105 @@
+Ext.ns("fpWeb");
+fpWeb.LoginForm = Ext.extend (Ext.Window, {
+ /* Control references */
+ blogin : null,
+ eusername : null,
+ epassword : null,
+ plock : null,
+ fform : null,
+ /* Callbacks */
+ OnLogin : function (Provider,Response) {
+ if (!Ext.isEmpty(Response.error)) {
+ Ext.Msg.show({
+ title : 'Login failed',
+ msg : 'An error occurred during login: '+Response.error.message+'. Please try again.',
+ icon : Ext.Msg.ERROR,
+ buttons : Ext.Msg.OK
+ });
+ } else if (Response.result > 0) {
+ // here code to switch to data editing
+ window.location='users.html';
+/*
+ Ext.Msg.show({
+ title : 'Login OK',
+ msg : 'Your username/pasword was accepted. We will now proceed to the editing form',
+ icon : Ext.Msg.ERROR,
+ buttons : Ext.Msg.OK
+ });
+*/
+ } else {
+ Ext.Msg.show({
+ title : 'Login failed',
+ msg : 'Your username/pasword is incorrect. Please try again.',
+ icon : Ext.Msg.ERROR,
+ buttons : Ext.Msg.OK
+ });
+ }
+ },
+ loginbuttonclick : function (sender) {
+ SessionManagement.Login(this.eusername.getValue(), this.epassword.getValue(),this.OnLogin.createDelegate(this));
+ },
+ focususer : function () {
+ this.eusername.focus();
+ },
+ /* Build the actual form */
+ constructor : function (config) {
+ this.eusername = new Ext.form.TextField({
+ name:"user",
+ fieldLabel:"Login",
+ inputType:"text"
+ });
+ this.epassword = new Ext.form.TextField({
+ name:"pass",
+ fieldLabel:"Password",
+ inputType:"password"
+ });
+ this.blogin = new Ext.Button({
+ text:"Login",
+ handler : this.loginbuttonclick,
+ scope : this
+ });
+ this.fform = new Ext.form.FormPanel({
+ width: 350,
+ labelWidth:150,
+ border:false,
+ xtype: "form",
+ buttonAlign: "right",
+ bodyStyle: "padding: 10px 15px",
+ defaultType: "textfield",
+ defaults: {width: 150},
+ items: [this.eusername,this.epassword],
+ buttons:[this.blogin],
+ keys: {key: Ext.EventObject.ENTER,
+ handler: function(){
+ this.blogin.focus();
+ },
+ scope: this
+ }
+ });
+ this.plock = new Ext.Panel({
+ border:false,
+ html:"<img src='login.png' width=114 height=128/>",
+ width:114,
+ height:128
+ });
+ Ext.apply(config, {
+ title: "Login",
+ width: 500,
+ height: 200,
+ plain: true,
+ layout: "hbox",
+ defaultButton: this.eusername,
+ layoutConfig: {
+ align : "middle",
+ pack: "center"
+ },
+ closable: false,
+ listeners: {
+ 'show' : { fn: this.focususer.createDelegate(this) }
+ },
+ items: [ this.fform, this.plock ]
+ });
+ fpWeb.LoginForm.superclass.constructor.call(this,config);
+ } /* constructor*/
+});
+
diff --git a/packages/fcl-web/examples/combined/login.png b/packages/fcl-web/examples/combined/login.png
new file mode 100644
index 0000000000..e1a2633df2
--- /dev/null
+++ b/packages/fcl-web/examples/combined/login.png
Binary files differ
diff --git a/packages/fcl-web/examples/combined/users.html b/packages/fcl-web/examples/combined/users.html
new file mode 100644
index 0000000000..ea47d6f45d
--- /dev/null
+++ b/packages/fcl-web/examples/combined/users.html
@@ -0,0 +1,18 @@
+<html>
+<head>
+<title>Edit users in database</title>
+<link rel="stylesheet" type="text/css" href="/ext/resources/css/ext-all.css"/>
+<script src="/ext/adapter/ext/ext-base.js"></script>
+<script src="/ext/ext-all-debug.js"></script>
+<script src="combined.cgi/Login/API"></script>
+<script src="users.js"></script>
+<script>
+Ext.onReady(function() {
+ // API is registered under FPWeb by default.
+ Ext.Direct.addProvider(FPWeb);
+});
+</script>
+</head>
+<body>
+</body>
+</html> \ No newline at end of file
diff --git a/packages/fcl-web/examples/combined/users.js b/packages/fcl-web/examples/combined/users.js
new file mode 100644
index 0000000000..063c2dca6f
--- /dev/null
+++ b/packages/fcl-web/examples/combined/users.js
@@ -0,0 +1,108 @@
+Ext.ns('fpWeb');
+
+fpWeb.ShowPage = function () {
+ var myproxy = new Ext.data.HttpProxy ( {
+ api : {
+ read: "combined.cgi/Provider/Users/Read/",
+ update: "combined.cgi/Provider/Users/Update/",
+ create: "combined.cgi/Provider/Users/Insert/",
+ destroy: "combined.cgi/Provider/Users/Delete/"
+ }
+ });
+ var myreader = new Ext.data.JsonReader ({
+ root: "rows",
+ successProperty : 'success',
+ idProperty: "U_ID",
+ messageProperty: 'message', // Must be specified here
+ fields: ["U_ID","U_LOGIN","U_NAME","U_EMAIL", "U_PASSWORD"]
+ });
+ var mywriter = new Ext.data.JsonWriter({
+ encode: true,
+ writeAllFields: true,
+ idProperty: "U_ID"
+ });
+ var data = new Ext.data.Store({
+ proxy: myproxy,
+ reader: myreader,
+ writer: mywriter,
+ autoSave: false,
+ idProperty: "U_ID",
+ });
+ // Listen to errors.
+ data.addListener('exception', function(proxy, type, action, options, res) {
+ if (type === 'remote') {
+ Ext.Msg.show({
+ title: 'REMOTE EXCEPTION',
+ msg: res.message,
+ icon: Ext.MessageBox.ERROR,
+ buttons: Ext.Msg.OK
+ });
+ }
+ });
+ data.load({ params:{start: 0, limit: 30}});
+ var grid = new Ext.grid.EditorGridPanel({
+ renderTo: Ext.getBody(),
+ frame: true,
+ title: "Known users",
+ height: 600,
+ width: 800,
+ store: data,
+ columns: [
+ {header: 'ID', dataIndex: "U_ID", sortable: true, hidden: true},
+ {header: 'Login', dataIndex: "U_LOGIN", sortable: true, editor: new Ext.form.TextField({allowBlank: false})},
+ {header: 'Name', dataIndex: "U_NAME", sortable: true, editor: new Ext.form.TextField({allowBlank: false}), width : 200},
+ {header: 'Email', dataIndex: "U_EMAIL", sortable: true, editor: new Ext.form.TextField({allowBlank: false}), width : 200},
+ {header: 'Password', dataIndex: "U_PASSWORD", sortable: true, editor: new Ext.form.TextField()},
+ ],
+ bbar: new Ext.PagingToolbar({
+ pageSize: 30,
+ store: data,
+ displayInfo: true
+ }),
+ tbar : [{
+ text: 'Add',
+ iconCls: 'icon-add',
+ handler: function(btn, ev) {
+ var u = new grid.store.recordType();
+ grid.stopEditing();
+ grid.store.insert(0, u);
+ grid.startEditing(0, 1);
+ },
+ scope: grid
+ }, '-', {
+ text: 'Delete',
+ iconCls: 'icon-delete',
+ handler: function(btn, ev) {
+ var index = grid.getSelectionModel().getSelectedCell();
+ if (!index) {
+ return false;
+ }
+ var rec = grid.store.getAt(index[0]);
+ grid.store.remove(rec);
+ },
+ scope: grid
+ }, '-', {
+ text: 'Save',
+ iconCls: 'icon-save',
+ handler: function(btn, ev) {
+ grid.store.save();
+ },
+ scope: grid
+ },'->', {
+ text: 'Log out',
+ iconCls: 'logout',
+ handler: function () {
+ SessionManagement.Logout(function (provider,response) {
+ if (response.result=='Bye') {
+ window.location='combined.html';
+ }
+ });
+ }
+ }
+ ]
+ // F.ContentToStream(M);
+
+ });
+ grid.show();
+}
+Ext.onReady(fpWeb.ShowPage);
diff --git a/packages/fcl-web/examples/combined/users.sql b/packages/fcl-web/examples/combined/users.sql
new file mode 100644
index 0000000000..daec6fb64d
--- /dev/null
+++ b/packages/fcl-web/examples/combined/users.sql
@@ -0,0 +1,15 @@
+CREATE TABLE USERS (
+U_ID BIGINT Not Null ,
+U_LOGIN VARCHAR(40) Not Null,
+U_NAME VARCHAR(30) Not Null,
+U_EMAIL VARCHAR(100),
+U_PASSWORD VARCHAR(100) Not Null,
+CONSTRAINT PK_FPCUSERS Primary key (U_ID),
+CONSTRAINT U_USERNAME Unique key (U_LOGIN)
+);
+
+COMMIT;
+
+CREATE GENERATOR GEN_USERS;
+
+COMMIT;
diff --git a/packages/fcl-web/examples/combined/wmlogin.lfm b/packages/fcl-web/examples/combined/wmlogin.lfm
new file mode 100644
index 0000000000..e41c9d2bc0
--- /dev/null
+++ b/packages/fcl-web/examples/combined/wmlogin.lfm
@@ -0,0 +1,76 @@
+object SessionManagement: TSessionManagement
+ OnCreate = DataModuleCreate
+ OldCreateOrder = False
+ DispatchOptions = [jdoSearchRegistry, jdoSearchOwner, jdoJSONRPC1, jdoJSONRPC2, jdoNotifications]
+ APIPath = 'API'
+ RouterPath = 'router'
+ Height = 200
+ HorizontalOffset = 582
+ VerticalOffset = 455
+ Width = 295
+ object Login: TJSONRPCHandler
+ OnExecute = LoginExecute
+ Options = []
+ ParamDefs = <
+ item
+ Name = 'UserName'
+ end
+ item
+ Name = 'Password'
+ end>
+ left = 24
+ top = 24
+ end
+ object IBConnection1: TIBConnection
+ Connected = False
+ LoginPrompt = False
+ KeepConnection = False
+ Transaction = SQLTransaction1
+ LogEvents = []
+ left = 24
+ top = 117
+ end
+ object SQLTransaction1: TSQLTransaction
+ Active = False
+ Action = caNone
+ Database = IBConnection1
+ left = 26
+ top = 72
+ end
+ object QAuthenticate: TSQLQuery
+ AutoCalcFields = False
+ Database = IBConnection1
+ Transaction = SQLTransaction1
+ ReadOnly = False
+ SQL.Strings = (
+ 'SELECT'
+ ' U_ID, U_NAME'
+ 'From'
+ ' USERS'
+ 'WHERE'
+ ' (U_LOGIN = :LOGIN)'
+ ' AND (U_PASSWORD=:PASSWORD);'
+ ''
+ )
+ Params = <
+ item
+ DataType = ftUnknown
+ Name = 'LOGIN'
+ ParamType = ptUnknown
+ end
+ item
+ DataType = ftUnknown
+ Name = 'PASSWORD'
+ ParamType = ptUnknown
+ end>
+ left = 128
+ top = 117
+ end
+ object Logout: TJSONRPCHandler
+ OnExecute = LogoutExecute
+ Options = []
+ ParamDefs = <>
+ left = 120
+ top = 16
+ end
+end
diff --git a/packages/fcl-web/examples/combined/wmlogin.pp b/packages/fcl-web/examples/combined/wmlogin.pp
new file mode 100644
index 0000000000..671dedcd27
--- /dev/null
+++ b/packages/fcl-web/examples/combined/wmlogin.pp
@@ -0,0 +1,129 @@
+unit wmlogin;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, HTTPDefs, websession, fpHTTP, fpWeb, fpjsonrpc,
+ fpjson, IBConnection, sqldb, webjsonrpc, fpextdirect, sqldbwebdata;
+
+type
+
+ { TSessionManagement }
+
+ TSessionManagement = class(TExtDirectModule)
+ IBConnection1: TIBConnection;
+ Logout: TJSONRPCHandler;
+ Login: TJSONRPCHandler;
+ SessionManagement: TJSONRPCHandler;
+ QAuthenticate: TSQLQuery;
+ SQLTransaction1: TSQLTransaction;
+ procedure DataModuleCreate(Sender: TObject);
+ procedure LoginExecute(Sender: TObject; const Params: TJSONData;
+ out Res: TJSONData);
+ procedure LogoutExecute(Sender: TObject; const Params: TJSONData;
+ out Res: TJSONData);
+ private
+ function AuthenticateUser(AUsername, APassword: String): Integer;
+ procedure DoOnNewSession(Sender: TObject);
+ { private declarations }
+ public
+ { public declarations }
+ end;
+
+var
+ SessionManagement: TSessionManagement;
+
+implementation
+
+uses inifiles;
+
+{$R *.lfm}
+
+{ TSessionManagement }
+
+function TSessionManagement.AuthenticateUser(AUsername,APassword : String) : Integer;
+
+begin
+ With QAuthenticate do
+ begin
+ ParamByName('Login').AsString:=AUserName;
+ ParamByName('Password').AsString:=APassword;
+ Open;
+ try
+ if (EOF and BOF) then
+ Result:=-1
+ else
+ begin
+ Result:=FieldByName('U_ID').AsInteger;
+ Session.Variables['UserName']:=FieldByName('U_NAME').AsString;
+ end;
+ Session.Variables['UserID']:=IntToStr(Result);
+ finally
+ Close;
+ end;
+ end;
+end;
+
+procedure TSessionManagement.LoginExecute(Sender: TObject;
+ const Params: TJSONData; out Res: TJSONData);
+
+Var
+ A : TJSONArray ;
+ AUserName,APassword : String;
+begin
+ A:=Params as TJSONArray;
+ AUserName:=A.Strings[0];
+ APassword:=A.Strings[1];
+ Res:=TJSONIntegerNumber.Create(AuthenticateUser(AUsername,APassword));
+end;
+
+procedure TSessionManagement.LogoutExecute(Sender: TObject;
+ const Params: TJSONData; out Res: TJSONData);
+begin
+ // To be sure
+ Session.Variables['UserID']:='-1';
+ Session.Terminate;
+ // A result must always be sent back.
+ Res:=TJSONString.Create('Bye');
+end;
+
+procedure TSessionManagement.DoOnNewSession(Sender : TObject);
+
+begin
+ // The cookies must all originate from the same path, otherwise the 2 datamodules will use a different session.
+ (Sender as TFPWebSession).SessionCookiePath:='/';
+end;
+
+procedure TSessionManagement.DataModuleCreate(Sender: TObject);
+Var
+ FN : String;
+ Ini : TMemIniFile;
+
+begin
+ // The following 2 statements are needed because the 2 properties are (currently) not published.
+ OnNewSession:=@DoOnNewSession;
+ CreateSession:=True;
+ FN:=ChangeFileExt(Paramstr(0),'.ini');
+ If FileExists(FN) then
+ begin
+ Ini:=TMemIniFile.Create(FN);
+ try
+ With IBConnection1 do
+ begin
+ DatabaseName:=Ini.ReadString('Database','Path',DatabaseName);
+ UserName:=Ini.ReadString('Database','UserName',UserName);
+ Password:=Ini.ReadString('Database','Password',Password);
+ end;
+ finally
+ Ini.Free;
+ end;
+ end;
+ IBConnection1.Connected:=True;
+end;
+
+initialization
+ RegisterHTTPModule('Login', TSessionManagement);
+end.
+
diff --git a/packages/fcl-web/examples/combined/wmusers.lfm b/packages/fcl-web/examples/combined/wmusers.lfm
new file mode 100644
index 0000000000..15f6dcad02
--- /dev/null
+++ b/packages/fcl-web/examples/combined/wmusers.lfm
@@ -0,0 +1,94 @@
+object CombinedModule: TCombinedModule
+ OnCreate = DataModuleCreate
+ OldCreateOrder = False
+ InputAdaptor = ProviderInputAdaptor
+ ContentProducer = ProviderFormatter
+ OnGetContentProducer = DataModuleGetContentProducer
+ OnGetInputAdaptor = DataModuleGetInputAdaptor
+ OnNewSession = DataModuleNewSession
+ Height = 300
+ HorizontalOffset = 635
+ VerticalOffset = 230
+ Width = 400
+ object ProviderFormatter: TExtJSJSONDataFormatter
+ AllowPageSize = False
+ BeforeDataToJSON = ProviderFormatterBeforeDataToJSON
+ BeforeUpdate = ProviderFormatterBeforeUpdate
+ BeforeInsert = ProviderFormatterBeforeInsert
+ BeforeDelete = ProviderFormatterBeforeDelete
+ left = 272
+ top = 72
+ end
+ object Users: TSQLDBWebDataProvider
+ SelectSQL.Strings = (
+ 'SELECT FIRST :limit SKIP :start U_ID, U_NAME, U_LOGIN, U_PASSWORD, U_EMAIL FROM USERS'
+ )
+ UpdateSQL.Strings = (
+ 'UPDATE USERS SET'
+ ' U_NAME=:U_NAME,'
+ ' U_LOGIN=:U_LOGIN,'
+ ' U_EMAIL=:U_EMAIL,'
+ ' U_PASSWORD=:U_PASSWORD'
+ 'WHERE'
+ ' (U_ID=:U_ID)'
+ )
+ DeleteSQL.Strings = (
+ 'DELETE FROM USERS WHERE (U_ID=:ID)'
+ )
+ InsertSQL.Strings = (
+ 'INSERT INTO USERS'
+ '(U_ID, U_LOGIN, U_NAME, U_EMAIL, U_PASSWORD)'
+ 'VALUES'
+ '(:U_ID, :U_LOGIN, :U_NAME, :U_EMAIL, :U_PASSWORD)'
+ )
+ Connection = IBConnection1
+ IDFieldName = 'U_ID'
+ OnGetNewID = UsersGetNewID
+ Options = []
+ Params = <
+ item
+ DataType = ftUnknown
+ Name = 'limit'
+ ParamType = ptUnknown
+ end
+ item
+ DataType = ftUnknown
+ Name = 'start'
+ ParamType = ptUnknown
+ end>
+ left = 32
+ top = 72
+ end
+ object IBConnection1: TIBConnection
+ Connected = False
+ LoginPrompt = False
+ KeepConnection = False
+ Transaction = SQLTransaction1
+ LogEvents = []
+ left = 32
+ top = 16
+ end
+ object QGetID: TSQLQuery
+ AutoCalcFields = False
+ Database = IBConnection1
+ Transaction = SQLTransaction1
+ ReadOnly = False
+ SQL.Strings = (
+ 'SELECT GEN_ID(GEN_USERS,1) AS THEID FROM RDB$DATABASE'
+ )
+ Params = <>
+ left = 32
+ top = 128
+ end
+ object SQLTransaction1: TSQLTransaction
+ Active = False
+ Action = caNone
+ Database = IBConnection1
+ left = 144
+ top = 16
+ end
+ object ProviderInputAdaptor: TExtJSJSonWebdataInputAdaptor
+ left = 272
+ top = 16
+ end
+end
diff --git a/packages/fcl-web/examples/combined/wmusers.lrs b/packages/fcl-web/examples/combined/wmusers.lrs
new file mode 100644
index 0000000000..7d7cb7082d
--- /dev/null
+++ b/packages/fcl-web/examples/combined/wmusers.lrs
@@ -0,0 +1,35 @@
+{ This is an automatically generated lazarus resource file }
+
+LazarusResources.Add('TCombinedModule','FORMDATA',[
+ 'TPF0'#15'TCombinedModule'#14'CombinedModule'#8'OnCreate'#7#16'DataModuleCrea'
+ +'te'#14'OldCreateOrder'#8#12'InputAdaptor'#7#20'ProviderInputAdaptor'#15'Con'
+ +'tentProducer'#7#17'ProviderFormatter'#20'OnGetContentProducer'#7#28'DataMod'
+ +'uleGetContentProducer'#17'OnGetInputAdaptor'#7#25'DataModuleGetInputAdaptor'
+ +#12'OnNewSession'#7#20'DataModuleNewSession'#6'Height'#3','#1#16'HorizontalO'
+ +'ffset'#3'{'#2#14'VerticalOffset'#3#230#0#5'Width'#3#144#1#0#23'TExtJSJSONDa'
+ +'taFormatter'#17'ProviderFormatter'#13'AllowPageSize'#8#16'BeforeDataToJSON'
+ +#7'!ProviderFormatterBeforeDataToJSON'#12'BeforeUpdate'#7#29'ProviderFormatt'
+ +'erBeforeUpdate'#12'BeforeInsert'#7#29'ProviderFormatterBeforeInsert'#12'Bef'
+ +'oreDelete'#7#29'ProviderFormatterBeforeDelete'#4'left'#3#16#1#3'top'#2'H'#0
+ +#0#21'TSQLDBWebDataProvider'#5'Users'#17'SelectSQL.Strings'#1#6'USELECT FIRS'
+ +'T :limit SKIP :start U_ID, U_NAME, U_LOGIN, U_PASSWORD, U_EMAIL FROM USERS'
+ +#0#17'UpdateSQL.Strings'#1#6#16'UPDATE USERS SET'#6#17' U_NAME=:U_NAME,'#6
+ +#19' U_LOGIN=:U_LOGIN,'#6#19' U_EMAIL=:U_EMAIL,'#6#24' U_PASSWORD=:U_PASS'
+ +'WORD'#6#5'WHERE'#6#14' (U_ID=:U_ID)'#0#17'DeleteSQL.Strings'#1#6'"DELETE F'
+ +'ROM USERS WHERE (U_ID=:ID)'#0#17'InsertSQL.Strings'#1#6#17'INSERT INTO USER'
+ +'S'#6',(U_ID, U_LOGIN, U_NAME, U_EMAIL, U_PASSWORD)'#6#6'VALUES'#6'1(:U_ID, '
+ +':U_LOGIN, :U_NAME, :U_EMAIL, :U_PASSWORD)'#0#10'Connection'#7#13'IBConnecti'
+ +'on1'#11'IDFieldName'#6#4'U_ID'#10'OnGetNewID'#7#13'UsersGetNewID'#7'Options'
+ +#11#0#6'Params'#14#1#8'DataType'#7#9'ftUnknown'#4'Name'#6#5'limit'#9'ParamTy'
+ +'pe'#7#9'ptUnknown'#0#1#8'DataType'#7#9'ftUnknown'#4'Name'#6#5'start'#9'Para'
+ +'mType'#7#9'ptUnknown'#0#0#4'left'#2' '#3'top'#2'H'#0#0#13'TIBConnection'#13
+ +'IBConnection1'#9'Connected'#8#11'LoginPrompt'#8#14'KeepConnection'#8#11'Tra'
+ +'nsaction'#7#15'SQLTransaction1'#9'LogEvents'#11#0#4'left'#2' '#3'top'#2#16#0
+ +#0#9'TSQLQuery'#6'QGetID'#14'AutoCalcFields'#8#8'Database'#7#13'IBConnection'
+ +'1'#11'Transaction'#7#15'SQLTransaction1'#8'ReadOnly'#8#11'SQL.Strings'#1#6
+ +'6SELECT GEN_ID(GEN_USERS,1) AS THEID FROM RDB$DATABASE'#0#6'Params'#14#0#4
+ +'left'#2' '#3'top'#3#128#0#0#0#15'TSQLTransaction'#15'SQLTransaction1'#6'Act'
+ +'ive'#8#6'Action'#7#6'caNone'#8'Database'#7#13'IBConnection1'#4'left'#3#144#0
+ +#3'top'#2#16#0#0#29'TExtJSJSonWebdataInputAdaptor'#20'ProviderInputAdaptor'#4
+ +'left'#3#16#1#3'top'#2#16#0#0#0
+]);
diff --git a/packages/fcl-web/examples/combined/wmusers.pp b/packages/fcl-web/examples/combined/wmusers.pp
new file mode 100644
index 0000000000..752b03af52
--- /dev/null
+++ b/packages/fcl-web/examples/combined/wmusers.pp
@@ -0,0 +1,145 @@
+unit wmusers;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, LResources, HTTPDefs, websession, fpHTTP, fpWeb,
+ IBConnection, sqldb, fpwebdata, fpjson, extjsjson, extjsxml, sqldbwebdata;
+
+type
+
+ { TCombinedModule }
+
+ TCombinedModule = class(TFPWebProviderDataModule)
+ ProviderFormatter: TExtJSJSONDataFormatter;
+ ProviderInputAdaptor: TExtJSJSonWebdataInputAdaptor;
+ IBConnection1: TIBConnection;
+ Users: TSQLDBWebDataProvider;
+ QGetID: TSQLQuery;
+ SQLTransaction1: TSQLTransaction;
+ procedure DataModuleNewSession(Sender: TObject);
+ procedure ProviderFormatterBeforeDataToJSON(Sender: TObject;
+ AObject: TJSONObject);
+ procedure ProviderFormatterBeforeDelete(Sender: TObject);
+ procedure ProviderFormatterBeforeInsert(Sender: TObject);
+ procedure ProviderFormatterBeforeUpdate(Sender: TObject);
+ procedure UsersGetNewID(Sender: TObject; out AID: String);
+ procedure DataModuleCreate(Sender: TObject);
+ procedure DataModuleGetContentProducer(Sender: TObject;
+ var AContentProducer: TCustomHTTPDataContentProducer);
+ procedure DataModuleGetInputAdaptor(Sender: TObject;
+ var AInputAdaptor: TCustomWebdataInputAdaptor);
+ private
+ procedure CheckLoggedIn;
+ { private declarations }
+ public
+ { public declarations }
+ end;
+
+var
+ CombinedModule: TCombinedModule;
+
+implementation
+
+uses inifiles;
+
+{ TCombinedModule }
+
+procedure TCombinedModule.DataModuleGetContentProducer(
+ Sender: TObject; var AContentProducer: TCustomHTTPDataContentProducer);
+begin
+end;
+
+procedure TCombinedModule.DataModuleCreate(Sender: TObject);
+
+Var
+ FN : String;
+ Ini : TMemIniFile;
+
+begin
+ // Not yet published.
+ CreateSession:=True;
+ FN:=ChangeFileExt(Paramstr(0),'.ini');
+ If FileExists(FN) then
+ begin
+ Ini:=TMemIniFile.Create(FN);
+ try
+ With IBConnection1 do
+ begin
+ DatabaseName:=Ini.ReadString('Database','Path',DatabaseName);
+ UserName:=Ini.ReadString('Database','UserName',UserName);
+ Password:=Ini.ReadString('Database','Password',Password);
+ end;
+ finally
+ Ini.Free;
+ end;
+ end;
+ IBConnection1.Connected:=True;
+end;
+
+procedure TCombinedModule.UsersGetNewID(Sender: TObject; out
+ AID: String);
+begin
+ With QGetID Do
+ begin
+ Close;
+ Open;
+ try
+ if (EOF and BOF) then
+ Raise Exception.Create('No ID generated');
+ AID:=Fields[0].AsString;
+ finally
+ Close;
+ end;
+ end;
+end;
+
+procedure TCombinedModule.CheckLoggedIn;
+
+begin
+ If StrToIntDef(Session.Variables['UserID'],-1)=-1 then
+ Raise Exception.Create('You must be logged in to see or modify data');
+end;
+procedure TCombinedModule.ProviderFormatterBeforeDataToJSON(
+ Sender: TObject; AObject: TJSONObject);
+begin
+ CheckLoggedIn;
+end;
+
+procedure TCombinedModule.DataModuleNewSession(Sender: TObject);
+begin
+ // The cookies must all originate from the same path, otherwise the 2 datamodules will use a different session.
+ (Sender as TFPWebSession).SessionCookiePath:='/';
+end;
+
+procedure TCombinedModule.ProviderFormatterBeforeDelete(
+ Sender: TObject);
+begin
+ CheckLoggedIn;
+end;
+
+procedure TCombinedModule.ProviderFormatterBeforeInsert(
+ Sender: TObject);
+begin
+ CheckLoggedIn;
+end;
+
+procedure TCombinedModule.ProviderFormatterBeforeUpdate(
+ Sender: TObject);
+begin
+ CheckLoggedIn;
+end;
+
+procedure TCombinedModule.DataModuleGetInputAdaptor(Sender: TObject;
+ var AInputAdaptor: TCustomWebdataInputAdaptor);
+begin
+end;
+
+initialization
+ {$I wmusers.lrs}
+
+ RegisterHTTPModule('Provider', TCombinedModule);
+end.
+
diff --git a/packages/fcl-web/fpmake.pp b/packages/fcl-web/fpmake.pp
index 6920f54124..7d3de265ed 100644
--- a/packages/fcl-web/fpmake.pp
+++ b/packages/fcl-web/fpmake.pp
@@ -25,6 +25,8 @@ begin
P.Dependencies.Add('fcl-process');
P.Dependencies.Add('fastcgi');
P.Dependencies.Add('httpd22');
+ // (Temporary) indirect dependencies, not detected by fpcmake:
+ P.Dependencies.Add('univint',[MacOSX]);
P.Author := 'FreePascal development team';
P.License := 'LGPL with modification, ';
diff --git a/packages/fcl-web/src/base/custfcgi.pp b/packages/fcl-web/src/base/custfcgi.pp
index 65660994fd..4be71d53f1 100644
--- a/packages/fcl-web/src/base/custfcgi.pp
+++ b/packages/fcl-web/src/base/custfcgi.pp
@@ -21,7 +21,13 @@ unit custfcgi;
Interface
uses
- Classes,SysUtils, httpdefs,custweb, custcgi, fastcgi;
+ Classes,SysUtils, httpdefs,
+{$ifdef unix}
+ BaseUnix, TermIO,
+{$else}
+ winsock2,
+{$endif}
+ Sockets, custweb, custcgi, fastcgi;
Type
{ TFCGIRequest }
@@ -29,7 +35,8 @@ Type
TFCGIRequest = Class;
TFCGIResponse = Class;
- TProtocolOption = (poNoPadding,poStripContentLength, poFailonUnknownRecord );
+ TProtocolOption = (poNoPadding,poStripContentLength, poFailonUnknownRecord,
+ poReuseAddress, poUseSelect );
TProtocolOptions = Set of TProtocolOption;
TUnknownRecordEvent = Procedure (ARequest : TFCGIRequest; AFCGIRecord: PFCGI_Header) Of Object;
@@ -60,9 +67,7 @@ Type
TFCGIResponse = Class(TCGIResponse)
private
- FNoPadding: Boolean;
FPO: TProtoColOptions;
- FStripCL: Boolean;
procedure Write_FCGIRecord(ARecord : PFCGI_Header);
Protected
Procedure DoSendHeaders(Headers : TStrings); override;
@@ -75,6 +80,8 @@ Type
Response : TFCgiResponse;
end;
+ { TFCgiHandler }
+
TFCgiHandler = class(TWebHandler)
Private
FOnUnknownRecord: TUnknownRecordEvent;
@@ -84,10 +91,14 @@ Type
FHandle : THandle;
Socket: longint;
FAddress: string;
+ FTimeOut,
FPort: integer;
function Read_FCGIRecord : PFCGI_Header;
+ function DataAvailable : Boolean;
protected
- function WaitForRequest(out ARequest : TRequest; out AResponse : TResponse) : boolean; override;
+ function ProcessRecord(AFCGI_Record: PFCGI_Header; out ARequest: TRequest; out AResponse: TResponse): boolean; virtual;
+ procedure SetupSocket(var IAddress: TInetSockAddr; var AddressLength: tsocklen); virtual;
+ function WaitForRequest(out ARequest : TRequest; out AResponse : TResponse) : boolean; override;
procedure EndRequest(ARequest : TRequest;AResponse : TResponse); override;
Public
constructor Create(AOwner: TComponent); override;
@@ -96,6 +107,7 @@ Type
property Address: string read FAddress write FAddress;
Property ProtocolOptions : TProtoColOptions Read FPO Write FPO;
Property OnUnknownRecord : TUnknownRecordEvent Read FOnUnknownRecord Write FOnUnknownRecord;
+ Property TimeOut : Integer Read FTimeOut Write FTimeOut;
end;
{ TCustomFCgiApplication }
@@ -126,14 +138,16 @@ ResourceString
SListenFailed = 'Failed to listen to port %d. Socket Error: %d';
SErrReadingSocket = 'Failed to read data from socket. Error: %d';
SErrReadingHeader = 'Failed to read FastCGI header. Read only %d bytes';
+ SErrWritingSocket = 'Failed to write data to socket. Error: %d';
Implementation
-uses
{$ifdef CGIDEBUG}
- dbugintf,
+uses
+ dbugintf;
{$endif}
- Sockets;
+
+
{$undef nosignal}
@@ -315,9 +329,13 @@ begin
P:=PByte(Arecord);
Repeat
BytesWritten := sockets.fpsend(TFCGIRequest(Request).Handle, P, BytesToWrite, NoSignalAttr);
+ If (BytesWritten<0) then
+ begin
+ // TODO : Better checking for closed connection, EINTR
+ Raise HTTPError.CreateFmt(SErrWritingSocket,[BytesWritten]);
+ end;
Inc(P,BytesWritten);
Dec(BytesToWrite,BytesWritten);
-// Assert(BytesWritten=BytesToWrite);
until (BytesToWrite=0) or (BytesWritten=0);
end;
@@ -346,15 +364,18 @@ begin
pl := 8-(cl mod 8);
ARespRecord:=nil;
Getmem(ARespRecord,8+cl+pl);
- FillChar(ARespRecord^,8+cl+pl,0);
- ARespRecord^.header.version:=FCGI_VERSION_1;
- ARespRecord^.header.reqtype:=FCGI_STDOUT;
- ARespRecord^.header.paddingLength:=pl;
- ARespRecord^.header.contentLength:=NtoBE(cl);
- ARespRecord^.header.requestId:=NToBE(TFCGIRequest(Request).RequestID);
- move(str[1],ARespRecord^.ContentData,cl);
- Write_FCGIRecord(PFCGI_Header(ARespRecord));
- Freemem(ARespRecord);
+ try
+ FillChar(ARespRecord^,8+cl+pl,0);
+ ARespRecord^.header.version:=FCGI_VERSION_1;
+ ARespRecord^.header.reqtype:=FCGI_STDOUT;
+ ARespRecord^.header.paddingLength:=pl;
+ ARespRecord^.header.contentLength:=NtoBE(cl);
+ ARespRecord^.header.requestId:=NToBE(TFCGIRequest(Request).RequestID);
+ move(str[1],ARespRecord^.ContentData,cl);
+ Write_FCGIRecord(PFCGI_Header(ARespRecord));
+ finally
+ Freemem(ARespRecord);
+ end;
end;
procedure TFCGIResponse.DoSendContent;
@@ -392,14 +413,17 @@ begin
pl := 8-(cl mod 8);
ARespRecord:=Nil;
Getmem(ARespRecord,8+cl+pl);
- ARespRecord^.header.version:=FCGI_VERSION_1;
- ARespRecord^.header.reqtype:=FCGI_STDOUT;
- ARespRecord^.header.paddingLength:=pl;
- ARespRecord^.header.contentLength:=NtoBE(cl);
- ARespRecord^.header.requestId:=NToBE(TFCGIRequest(Request).RequestID);
- move(Str[BS+1],ARespRecord^.ContentData,cl);
- Write_FCGIRecord(PFCGI_Header(ARespRecord));
- Freemem(ARespRecord);
+ try
+ ARespRecord^.header.version:=FCGI_VERSION_1;
+ ARespRecord^.header.reqtype:=FCGI_STDOUT;
+ ARespRecord^.header.paddingLength:=pl;
+ ARespRecord^.header.contentLength:=NtoBE(cl);
+ ARespRecord^.header.requestId:=NToBE(TFCGIRequest(Request).RequestID);
+ move(Str[BS+1],ARespRecord^.ContentData,cl);
+ Write_FCGIRecord(PFCGI_Header(ARespRecord));
+ finally
+ Freemem(ARespRecord);
+ end;
Inc(BS,cl);
Until (BS=L);
FillChar(EndRequest,SizeOf(FCGI_EndRequestRecord),0);
@@ -420,6 +444,7 @@ begin
FRequestsAvail:=5;
SetLength(FRequestsArray,FRequestsAvail);
FHandle := THandle(-1);
+ FTimeOut:=50;
end;
destructor TFCgiHandler.Destroy;
@@ -452,6 +477,30 @@ begin
end;
function TFCgiHandler.Read_FCGIRecord : PFCGI_Header;
+{ $DEFINE DUMPRECORD}
+{$IFDEF DUMPRECORD}
+ Procedure DumpFCGIRecord (Var Header :FCGI_Header; ContentLength : word; PaddingLength : byte; ResRecord : Pointer);
+
+ Var
+ s : string;
+ I : Integer;
+
+ begin
+ Writeln('Dumping record ', Sizeof(Header),',',Contentlength,',',PaddingLength);
+ For I:=0 to Sizeof(Header)+ContentLength+PaddingLength-1 do
+ begin
+ Write(Format('%:3d ',[PByte(ResRecord)[i]]));
+ If PByte(ResRecord)[i]>30 then
+ S:=S+char(PByte(ResRecord)[i]);
+ if (I mod 16) = 0 then
+ begin
+ writeln(' ',S);
+ S:='';
+ end;
+ end;
+ Writeln(' ',S)
+ end;
+{$ENDIF DUMPRECORD}
function ReadBytes(ReadBuf: Pointer; ByteAmount : Word) : Integer;
@@ -477,12 +526,11 @@ function TFCgiHandler.Read_FCGIRecord : PFCGI_Header;
end;
var Header : FCGI_Header;
- {I,}BytesRead : integer;
+ BytesRead : integer;
ContentLength : word;
PaddingLength : byte;
ResRecord : pointer;
ReadBuf : pointer;
- s : string;
begin
@@ -490,119 +538,183 @@ begin
ResRecord:=Nil;
ReadBuf:=@Header;
BytesRead:=ReadBytes(ReadBuf,Sizeof(Header));
- If (BytesRead<>Sizeof(Header)) then
+ If (BytesRead=0) then
+ Exit // Connection closed gracefully.
+ // TODO : if connection closed gracefully, the request should no longer be handled.
+ // Need to discard request/response
+ else If (BytesRead<>Sizeof(Header)) then
Raise HTTPError.CreateFmt(SErrReadingHeader,[BytesRead]);
ContentLength:=BetoN(Header.contentLength);
PaddingLength:=Header.paddingLength;
Getmem(ResRecord,BytesRead+ContentLength+PaddingLength);
- PFCGI_Header(ResRecord)^:=Header;
- ReadBuf:=ResRecord+BytesRead;
- BytesRead:=ReadBytes(ReadBuf,ContentLength);
- ReadBuf:=ReadBuf+BytesRead;
- BytesRead:=ReadBytes(ReadBuf,PaddingLength);
- Result := ResRecord;
-{
- Writeln('Dumping record ', Sizeof(Header),',',Contentlength,',',PaddingLength);
- For I:=0 to Sizeof(Header)+ContentLength+PaddingLength-1 do
+ try
+ PFCGI_Header(ResRecord)^:=Header;
+ ReadBuf:=ResRecord+BytesRead;
+ BytesRead:=ReadBytes(ReadBuf,ContentLength);
+ If (BytesRead=0) and (ContentLength>0) then
+ begin
+ FreeMem(resRecord);
+ Exit // Connection closed gracefully.
+ // TODO : properly handle connection close
+ end;
+ ReadBuf:=ReadBuf+BytesRead;
+ BytesRead:=ReadBytes(ReadBuf,PaddingLength);
+ If (BytesRead=0) and (PaddingLength>0) then
+ begin
+ FreeMem(resRecord);
+ Exit // Connection closed gracefully.
+ // TODO : properly handle connection close
+ end;
+ Result := ResRecord;
+ except
+ FreeMem(resRecord);
+ Raise;
+ end;
+end;
+
+procedure TFCgiHandler.SetupSocket(var IAddress : TInetSockAddr; Var AddressLength : tsocklen);
+
+begin
+ AddressLength:=Sizeof(IAddress);
+ Socket := fpsocket(AF_INET,SOCK_STREAM,0);
+ if Socket=-1 then
+ raise EFPWebError.CreateFmt(SNoSocket,[socketerror]);
+ IAddress.sin_family:=AF_INET;
+ IAddress.sin_port:=htons(Port);
+ if FAddress<>'' then
+ Iaddress.sin_addr := StrToHostAddr(FAddress)
+ else
+ IAddress.sin_addr.s_addr:=0;
+ {$IFDEF Unix}
+ // remedy socket port locking on Posix platforms
+ If (poReuseAddress in ProtocolOptions) then
+ fpSetSockOpt(Socket, SOL_SOCKET, SO_REUSEADDR, @IAddress, SizeOf(IAddress));
+ {$ENDIF}
+ if fpbind(Socket,@IAddress,AddressLength)=-1 then
+ begin
+ CloseSocket(socket);
+ Socket:=0;
+ Terminate;
+ raise Exception.CreateFmt(SBindFailed,[port,socketerror]);
+ end;
+ if fplisten(Socket,1)=-1 then
begin
- Write(Format('%:3d ',[PByte(ResRecord)[i]]));
- If PByte(ResRecord)[i]>30 then
- S:=S+char(PByte(ResRecord)[i]);
- if (I mod 16) = 0 then
- begin
- writeln(' ',S);
- S:='';
- end;
+ CloseSocket(socket);
+ Socket:=0;
+ Terminate;
+ raise Exception.CreateFmt(SListenFailed,[port,socketerror]);
+ end;
+end;
+
+{$ifdef unix}
+function TFCgiHandler.DataAvailable: Boolean;
+
+var
+ FDS: TFDSet;
+ TimeV: TTimeVal;
+
+begin
+ fpFD_Zero(FDS);
+ fpFD_Set(FHandle, FDS);
+ TimeV.tv_usec := (Timeout mod 1000) * 1000;
+ TimeV.tv_sec := Timeout div 1000;
+ Result := fpSelect(FHandle + 1, @FDS, @FDS, @FDS, @TimeV) > 0;
+end;
+{$else}
+function TFCgiHandler.DataAvailable: Boolean;
+
+var
+ FDS: TFDSet;
+ TimeV: TTimeVal;
+
+begin
+ FD_Zero(FDS);
+ FD_Set(FHandle, FDS);
+ TimeV.tv_usec := (Timeout mod 1000) * 1000;
+ TimeV.tv_sec := Timeout div 1000;
+ Result := Select(FHandle + 1, @FDS, @FDS, @FDS, @TimeV) <> 0;
+end;
+{$endif}
+
+function TFCgiHandler.ProcessRecord(AFCGI_Record : PFCGI_Header; out ARequest: TRequest; out AResponse: TResponse): boolean;
+
+var
+ ARequestID : word;
+ ATempRequest : TFCGIRequest;
+begin
+ Result:=False;
+ ARequestID:=BEtoN(AFCGI_Record^.requestID);
+ if AFCGI_Record^.reqtype = FCGI_BEGIN_REQUEST then
+ begin
+ if ARequestID>FRequestsAvail then
+ begin
+ inc(FRequestsAvail,10);
+ SetLength(FRequestsArray,FRequestsAvail);
+ end;
+ assert(not assigned(FRequestsArray[ARequestID].Request));
+ assert(not assigned(FRequestsArray[ARequestID].Response));
+ ATempRequest:=TFCGIRequest.Create;
+ ATempRequest.RequestID:=ARequestID;
+ ATempRequest.Handle:=FHandle;
+ ATempRequest.ProtocolOptions:=Self.Protocoloptions;
+ ATempRequest.OnUnknownRecord:=Self.OnUnknownRecord;
+ FRequestsArray[ARequestID].Request := ATempRequest;
+ end;
+ if (ARequestID>FRequestsAvail) then
+ begin
+ // TODO : ARequestID can be invalid. What to do ?
+ // in each case not try to access the array with requests.
+ end
+ else if FRequestsArray[ARequestID].Request.ProcessFCGIRecord(AFCGI_Record) then
+ begin
+ ARequest:=FRequestsArray[ARequestID].Request;
+ FRequestsArray[ARequestID].Response := TFCGIResponse.Create(ARequest);
+ FRequestsArray[ARequestID].Response.ProtocolOptions:=Self.ProtocolOptions;
+ AResponse:=FRequestsArray[ARequestID].Response;
+ Result := True;
end;
- Writeln(' ',S)
-}
end;
function TFCgiHandler.WaitForRequest(out ARequest: TRequest; out AResponse: TResponse): boolean;
+
var
IAddress : TInetSockAddr;
AddressLength : tsocklen;
- ARequestID : word;
AFCGI_Record : PFCGI_Header;
- ATempRequest : TFCGIRequest;
begin
Result := False;
- AddressLength:=Sizeof(IAddress);
-
if Socket=0 then
- begin
if Port<>0 then
- begin
- Socket := fpsocket(AF_INET,SOCK_STREAM,0);
- if Socket=-1 then
- raise EFPWebError.CreateFmt(SNoSocket,[socketerror]);
- IAddress.sin_family:=AF_INET;
- IAddress.sin_port:=htons(Port);
- if FAddress<>'' then
- Iaddress.sin_addr := StrToHostAddr(FAddress)
- else
- IAddress.sin_addr.s_addr:=0;
- if fpbind(Socket,@IAddress,AddressLength)=-1 then
- begin
- CloseSocket(socket);
- Socket:=0;
- raise Exception.CreateFmt(SBindFailed,[port,socketerror]);
- end;
- if fplisten(Socket,1)=-1 then
- begin
- CloseSocket(socket);
- Socket:=0;
- raise Exception.CreateFmt(SListenFailed,[port,socketerror]);
- end;
- end
+ SetupSocket(IAddress,AddressLength)
else
Socket:=StdInputHandle;
- end;
-
if FHandle=THandle(-1) then
begin
FHandle:=fpaccept(Socket,psockaddr(@IAddress),@AddressLength);
if FHandle=THandle(-1) then
+ begin
+ Terminate;
raise Exception.CreateFmt(SNoInputHandle,[socketerror]);
+ end;
end;
-
repeat
- AFCGI_Record:=Read_FCGIRecord;
- if assigned(AFCGI_Record) then
+ If (poUseSelect in ProtocolOptions) then
+ begin
+ While Not DataAvailable do
+ If (OnIdle<>Nil) then
+ OnIdle(Self);
+ end;
+ AFCGI_Record:=Read_FCGIRecord;
+
+ if assigned(AFCGI_Record) then
try
- ARequestID:=BEtoN(AFCGI_Record^.requestID);
- if AFCGI_Record^.reqtype = FCGI_BEGIN_REQUEST then
- begin
- if ARequestID>FRequestsAvail then
- begin
- inc(FRequestsAvail,10);
- SetLength(FRequestsArray,FRequestsAvail);
- end;
- assert(not assigned(FRequestsArray[ARequestID].Request));
- assert(not assigned(FRequestsArray[ARequestID].Response));
-
- ATempRequest:=TFCGIRequest.Create;
- ATempRequest.RequestID:=ARequestID;
- ATempRequest.Handle:=FHandle;
- ATempRequest.ProtocolOptions:=Self.Protocoloptions;
- ATempRequest.OnUnknownRecord:=Self.OnUnknownRecord;
- FRequestsArray[ARequestID].Request := ATempRequest;
- end;
- if FRequestsArray[ARequestID].Request.ProcessFCGIRecord(AFCGI_Record) then
- begin
- ARequest:=FRequestsArray[ARequestID].Request;
- FRequestsArray[ARequestID].Response := TFCGIResponse.Create(ARequest);
- FRequestsArray[ARequestID].Response.ProtocolOptions:=Self.ProtocolOptions;
- AResponse:=FRequestsArray[ARequestID].Response;
- Result := True;
- Break;
- end;
+ Result:=ProcessRecord(AFCGI_Record,ARequest,AResponse);
Finally
FreeMem(AFCGI_Record);
AFCGI_Record:=Nil;
end;
- until (1<>1);
+ until Result;
end;
{ TCustomFCgiApplication }
diff --git a/packages/fcl-web/src/base/custweb.pp b/packages/fcl-web/src/base/custweb.pp
index 20b35f60f8..f0820619dd 100644
--- a/packages/fcl-web/src/base/custweb.pp
+++ b/packages/fcl-web/src/base/custweb.pp
@@ -557,6 +557,7 @@ end;
constructor TCustomWebApplication.Create(AOwner: TComponent);
begin
+ Inherited Create(AOwner);
FWebHandler := InitializeWebHandler;
FWebHandler.FOnTerminate:=@DoOnTerminate;
end;
diff --git a/packages/fcl-web/src/base/fphtml.pp b/packages/fcl-web/src/base/fphtml.pp
index 6c5bdb96d5..a6645732c1 100644
--- a/packages/fcl-web/src/base/fphtml.pp
+++ b/packages/fcl-web/src/base/fphtml.pp
@@ -42,15 +42,18 @@ type
TWebController = class;
THTMLContentProducer = class;
+ TJavaType = (jtOther, jtClientSideEvent);
+
TJavaScriptStack = class(TObject)
private
+ FJavaType: TJavaType;
FMessageBoxHandler: TMessageBoxHandler;
FScript: TStrings;
FWebController: TWebController;
protected
function GetWebController: TWebController;
public
- constructor Create(const AWebController: TWebController); virtual;
+ constructor Create(const AWebController: TWebController; const AJavaType: TJavaType); virtual;
destructor Destroy; override;
procedure AddScriptLine(ALine: String); virtual;
procedure MessageBox(AText: String; Buttons: TWebButtons; Loaded: string = ''); virtual;
@@ -61,6 +64,7 @@ type
function ScriptIsEmpty: Boolean; virtual;
function GetScript: String; virtual;
property WebController: TWebController read GetWebController;
+ property JavaType: TJavaType read FJavaType;
end;
{ TContainerStylesheet }
@@ -85,6 +89,35 @@ type
property Items[Index: integer]: TContainerStylesheet read GetItem write SetItem;
end;
+ { TJavaVariable }
+
+ TJavaVariable = class(TCollectionItem)
+ private
+ FBelongsTo: string;
+ FGetValueFunc: string;
+ FID: string;
+ FIDSuffix: string;
+ FName: string;
+ public
+ property BelongsTo: string read FBelongsTo write FBelongsTo;
+ property GetValueFunc: string read FGetValueFunc write FGetValueFunc;
+ property Name: string read FName write FName;
+ property ID: string read FID write FID;
+ property IDSuffix: string read FIDSuffix write FIDSuffix;
+ end;
+
+ { TJavaVariables }
+
+ TJavaVariables = class(TCollection)
+ private
+ function GetItem(Index: integer): TJavaVariable;
+ procedure SetItem(Index: integer; const AValue: TJavaVariable);
+ public
+ function Add: TJavaVariable;
+ property Items[Index: integer]: TJavaVariable read GetItem write SetItem;
+ end;
+
+
{ TWebController }
TWebController = class(TComponent)
@@ -94,9 +127,13 @@ type
FMessageBoxHandler: TMessageBoxHandler;
FScriptName: string;
FScriptStack: TFPObjectList;
+ FIterationIDs: array of string;
+ FJavaVariables: TJavaVariables;
procedure SetBaseURL(const AValue: string);
procedure SetScriptName(const AValue: string);
protected
+ function GetJavaVariables: TJavaVariables;
+ function GetJavaVariablesCount: integer;
function GetScriptFileReferences: TStringList; virtual; abstract;
function GetCurrentJavaScriptStack: TJavaScriptStack; virtual;
function GetStyleSheetReferences: TContainerStylesheets; virtual; abstract;
@@ -107,8 +144,8 @@ type
destructor Destroy; override;
procedure AddScriptFileReference(AScriptFile: String); virtual; abstract;
procedure AddStylesheetReference(Ahref, Amedia: String); virtual; abstract;
- function CreateNewJavascriptStack: TJavaScriptStack; virtual; abstract;
- function InitializeJavaScriptStack: TJavaScriptStack;
+ function CreateNewJavascriptStack(AJavaType: TJavaType): TJavaScriptStack; virtual; abstract;
+ function InitializeJavaScriptStack(AJavaType: TJavaType): TJavaScriptStack;
procedure FreeJavascriptStack; virtual;
function HasJavascriptStack: boolean; virtual; abstract;
function GetUrl(ParamNames, ParamValues, KeepParams: array of string; Action: string = ''): string; virtual; abstract;
@@ -117,12 +154,20 @@ type
procedure CleanupShowRequest; virtual;
procedure CleanupAfterRequest; virtual;
procedure BeforeGenerateHead; virtual;
+ function AddJavaVariable(AName, ABelongsTo, AGetValueFunc, AID, AIDSuffix: string): TJavaVariable;
procedure BindJavascriptCallstackToElement(AComponent: TComponent; AnElement: THtmlCustomElement; AnEvent: string); virtual; abstract;
function MessageBox(AText: String; Buttons: TWebButtons; ALoaded: string = ''): string; virtual;
function DefaultMessageBoxHandler(Sender: TObject; AText: String; Buttons: TWebButtons; ALoaded: string = ''): string; virtual; abstract;
function CreateNewScript: TStringList; virtual; abstract;
function AddrelativeLinkPrefix(AnURL: string): string;
procedure FreeScript(var AScript: TStringList); virtual; abstract;
+ procedure ShowRegisteredScript(ScriptID: integer); virtual; abstract;
+
+ function IncrementIterationLevel: integer; virtual;
+ procedure SetIterationIDSuffix(AIterationLevel: integer; IDSuffix: string); virtual;
+ function GetIterationIDSuffix: string; virtual;
+ procedure DecrementIterationLevel; virtual;
+
property ScriptFileReferences: TStringList read GetScriptFileReferences;
property StyleSheetReferences: TContainerStylesheets read GetStyleSheetReferences;
property Scripts: TFPObjectList read GetScripts;
@@ -190,6 +235,7 @@ type
FDocument: THTMLDocument;
FElement: THTMLCustomElement;
FWriter: THTMLWriter;
+ FIDSuffix: string;
procedure SetDocument(const AValue: THTMLDocument);
procedure SetWriter(const AValue: THTMLWriter);
private
@@ -201,6 +247,8 @@ type
procedure SetParent(const AValue: TComponent);
Protected
function CreateWriter (Doc : THTMLDocument) : THTMLWriter; virtual;
+ function GetIDSuffix: string; virtual;
+ procedure SetIDSuffix(const AValue: string); virtual;
protected
// Methods for streaming
FAcceptChildsAtDesignTime: boolean;
@@ -211,6 +259,7 @@ type
procedure AddEvent(var Events: TEventRecords; AServerEventID: integer; AServerEvent: THandleAjaxEvent; AJavaEventName: string; AcsCallBack: TCSAjaxEvent); virtual;
procedure DoOnEventCS(AnEvent: TEventRecord; AJavascriptStack: TJavaScriptStack; var Handled: boolean); virtual;
procedure SetupEvents(AHtmlElement: THtmlCustomElement); virtual;
+ function GetWebPage: TDataModule;
function GetWebController(const ExceptIfNotAvailable: boolean = true): TWebController;
property ContentProducerList: TFPList read GetContentProducerList;
public
@@ -221,6 +270,7 @@ type
property ParentElement : THTMLCustomElement read FElement write FElement;
property Writer : THTMLWriter read FWriter write SetWriter;
Property HTMLDocument : THTMLDocument read FDocument write SetDocument;
+ Property IDSuffix : string read GetIDSuffix write SetIDSuffix;
public
// for streaming
constructor Create(AOwner: TComponent); override;
@@ -480,6 +530,23 @@ resourcestring
SErrRequestNotHandled = 'Web request was not handled by actions.';
SErrNoContentProduced = 'The content producer "%s" didn''t produce any content.';
+{ TJavaVariables }
+
+function TJavaVariables.GetItem(Index: integer): TJavaVariable;
+begin
+ result := TJavaVariable(Inherited GetItem(Index));
+end;
+
+procedure TJavaVariables.SetItem(Index: integer; const AValue: TJavaVariable);
+begin
+ inherited SetItem(Index, AValue);
+end;
+
+function TJavaVariables.Add: TJavaVariable;
+begin
+ result := inherited Add as TJavaVariable;
+end;
+
{ TcontainerStylesheets }
function TcontainerStylesheets.GetItem(Index: integer): TContainerStylesheet;
@@ -505,10 +572,11 @@ begin
result := FWebController;
end;
-constructor TJavaScriptStack.Create(const AWebController: TWebController);
+constructor TJavaScriptStack.Create(const AWebController: TWebController; const AJavaType: TJavaType);
begin
FWebController := AWebController;
FScript := TStringList.Create;
+ FJavaType := AJavaType;
end;
destructor TJavaScriptStack.Destroy;
@@ -591,6 +659,16 @@ begin
Result:=THTMLContentProducer(ContentProducerList[Index]);
end;
+function THTMLContentProducer.GetIDSuffix: string;
+begin
+ result := FIDSuffix;
+end;
+
+procedure THTMLContentProducer.SetIDSuffix(const AValue: string);
+begin
+ FIDSuffix := AValue;
+end;
+
function THTMLContentProducer.GetContentProducerList: TFPList;
begin
if not assigned(FChilds) then
@@ -679,7 +757,7 @@ begin
wc := GetWebController(false);
if assigned(wc) then
begin
- AJSClass := wc.InitializeJavaScriptStack;
+ AJSClass := wc.InitializeJavaScriptStack(jtClientSideEvent);
try
for i := 0 to high(Events) do
begin
@@ -702,24 +780,44 @@ begin
end;
end;
+function THTMLContentProducer.GetWebPage: TDataModule;
+var
+ aowner: TComponent;
+begin
+ result := nil;
+ aowner := Owner;
+ while assigned(aowner) do
+ begin
+ if aowner.InheritsFrom(TWebPage) then
+ begin
+ result := TWebPage(aowner);
+ break;
+ end;
+ aowner:=aowner.Owner;
+ end;
+end;
+
function THTMLContentProducer.GetWebController(const ExceptIfNotAvailable: boolean): TWebController;
-var i : integer;
+var
+ i : integer;
+ wp: TWebPage;
begin
result := nil;
- if assigned(owner) then
+ wp := TWebPage(GetWebPage);
+ if assigned(wp) then
begin
- if (owner is TWebPage) and TWebPage(owner).HasWebController then
+ if wp.HasWebController then
begin
- result := TWebPage(owner).WebController;
+ result := wp.WebController;
exit;
- end
- else //if (owner is TDataModule) then
+ end;
+ end
+ else if assigned(Owner) then //if (owner is TDataModule) then
+ begin
+ for i := 0 to owner.ComponentCount-1 do if owner.Components[i] is TWebController then
begin
- for i := 0 to owner.ComponentCount-1 do if owner.Components[i] is TWebController then
- begin
- result := TWebController(Owner.Components[i]);
- Exit;
- end;
+ result := TWebController(Owner.Components[i]);
+ Exit;
end;
end;
if ExceptIfNotAvailable then
@@ -1199,7 +1297,7 @@ begin
FSendXMLAnswer:=true;
FResponse:=AResponse;
FWebController := AWebController;
- FJavascriptCallStack:=FWebController.InitializeJavaScriptStack;
+ FJavascriptCallStack:=FWebController.InitializeJavaScriptStack(jtOther);
end;
destructor TAjaxResponse.Destroy;
@@ -1248,6 +1346,21 @@ end;
{ TWebController }
+function TWebController.GetJavaVariables: TJavaVariables;
+begin
+ if not assigned(FJavaVariables) then
+ FJavaVariables := TJavaVariables.Create(TJavaVariable);
+ Result := FJavaVariables;
+end;
+
+function TWebController.GetJavaVariablesCount: integer;
+begin
+ if assigned(FJavaVariables) then
+ result := FJavaVariables.Count
+ else
+ result := 0;
+end;
+
procedure TWebController.SetBaseURL(const AValue: string);
begin
if FBaseURL=AValue then exit;
@@ -1262,7 +1375,10 @@ end;
function TWebController.GetCurrentJavaScriptStack: TJavaScriptStack;
begin
- result := TJavaScriptStack(FScriptStack.Items[FScriptStack.Count-1]);
+ if FScriptStack.Count>0 then
+ result := TJavaScriptStack(FScriptStack.Items[FScriptStack.Count-1])
+ else
+ result := nil;
end;
procedure TWebController.InitializeAjaxRequest;
@@ -1290,6 +1406,16 @@ begin
// do nothing
end;
+function TWebController.AddJavaVariable(AName, ABelongsTo, AGetValueFunc, AID, AIDSuffix: string): TJavaVariable;
+begin
+ result := GetJavaVariables.Add;
+ result.BelongsTo := ABelongsTo;
+ result.GetValueFunc := AGetValueFunc;
+ result.Name := AName;
+ result.IDSuffix := AIDSuffix;
+ result.ID := AID;
+end;
+
function TWebController.MessageBox(AText: String; Buttons: TWebButtons; ALoaded: string = ''): string;
begin
if assigned(MessageBoxHandler) then
@@ -1308,6 +1434,36 @@ begin
result := AnURL;
end;
+function TWebController.IncrementIterationLevel: integer;
+begin
+ result := Length(FIterationIDs)+1;
+ SetLength(FIterationIDs,Result);
+end;
+
+procedure TWebController.SetIterationIDSuffix(AIterationLevel: integer; IDSuffix: string);
+begin
+ FIterationIDs[AIterationLevel-1]:=IDSuffix;
+end;
+
+function TWebController.GetIterationIDSuffix: string;
+var
+ i: integer;
+begin
+ result := '';
+ for i := 0 to length(FIterationIDs)-1 do
+ result := result + '_' + FIterationIDs[i];
+end;
+
+procedure TWebController.DecrementIterationLevel;
+var
+ i: integer;
+begin
+ i := length(FIterationIDs);
+ if i=0 then
+ raise Exception.Create('DecrementIterationLevel can not be called more times then IncrementIterationLevel');
+ SetLength(FIterationIDs,i-1);
+end;
+
function TWebController.GetRequest: TRequest;
begin
if assigned(Owner) and (owner is TWebPage) then
@@ -1329,12 +1485,13 @@ begin
if (Owner is TWebPage) and (TWebPage(Owner).WebController=self) then
TWebPage(Owner).WebController := nil;
FScriptStack.Free;
+ if assigned(FJavaVariables) then FJavaVariables.Free;
inherited Destroy;
end;
-function TWebController.InitializeJavaScriptStack: TJavaScriptStack;
+function TWebController.InitializeJavaScriptStack(AJavaType: TJavaType): TJavaScriptStack;
begin
- result := CreateNewJavascriptStack;
+ result := CreateNewJavascriptStack(AJavaType);
FScriptStack.Add(result);
end;
diff --git a/packages/fcl-web/src/base/webpage.pp b/packages/fcl-web/src/base/webpage.pp
index 21911f1e29..c644c57bf8 100644
--- a/packages/fcl-web/src/base/webpage.pp
+++ b/packages/fcl-web/src/base/webpage.pp
@@ -31,6 +31,13 @@ type
property Designer: IWebPageDesigner read GetDesigner write SetDesigner;
end;
+ IHTMLIterationGroup = interface(IUnknown)
+ ['{95575CB6-7D96-4F72-AF72-D2EAF0BECE71}']
+ procedure SetIDSuffix(const AHTMLContentProducer: THTMLContentProducer);
+ procedure SetAjaxIterationID(AValue: String);
+ end;
+
+
{ TStandardWebController }
TStandardWebController = class(TWebController)
@@ -45,13 +52,14 @@ type
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
- function CreateNewJavascriptStack: TJavaScriptStack; override;
+ function CreateNewJavascriptStack(AJavaType: TJavaType): TJavaScriptStack; override;
function GetUrl(ParamNames, ParamValues, KeepParams: array of string; Action: string = ''): string; override;
procedure BindJavascriptCallstackToElement(AComponent: TComponent; AnElement: THtmlCustomElement; AnEvent: string); override;
procedure AddScriptFileReference(AScriptFile: String); override;
procedure AddStylesheetReference(Ahref, Amedia: String); override;
function DefaultMessageBoxHandler(Sender: TObject; AText: String; Buttons: TWebButtons; ALoaded: string = ''): string; override;
function CreateNewScript: TStringList; override;
+ procedure ShowRegisteredScript(ScriptID: integer); override;
procedure FreeScript(var AScript: TStringList); override;
end;
@@ -114,9 +122,22 @@ type
property BaseURL: string read FBaseURL write FBaseURL;
end;
+ function RegisterScript(AScript: string) : integer;
+
implementation
-uses rtlconsts, typinfo, XMLWrite;
+uses rtlconsts, typinfo, XMLWrite, strutils;
+
+var RegisteredScriptList : TStrings;
+
+function RegisterScript(AScript: string) : integer;
+begin
+ if not Assigned(RegisteredScriptList) then
+ begin
+ RegisteredScriptList := TStringList.Create;
+ end;
+ result := RegisteredScriptList.Add(AScript);
+end;
{ TWebPage }
@@ -184,6 +205,40 @@ var Handled: boolean;
CompName: string;
AComponent: TComponent;
AnAjaxResponse: TAjaxResponse;
+ i: integer;
+ ASuffixID: string;
+ AIterationGroup: IHTMLIterationGroup;
+ AIterComp: TComponent;
+ wc: TWebController;
+ Iterationlevel: integer;
+
+ procedure SetIdSuffixes(AComp: THTMLContentProducer);
+ var
+ i: integer;
+ s: string;
+ begin
+ if assigned(AComp.parent) and (acomp.parent is THTMLContentProducer) then
+ SetIdSuffixes(THTMLContentProducer(AComp.parent));
+ if supports(AComp,IHTMLIterationGroup,AIterationGroup) then
+ begin
+ if assigned(FWebController) then
+ begin
+ iterationlevel := FWebController.IncrementIterationLevel;
+ assert(length(ASuffixID)>0);
+ i := PosEx('_',ASuffixID,2);
+ if i > 0 then
+ s := copy(ASuffixID,2,i-2)
+ else
+ s := copy(ASuffixID,2,length(ASuffixID)-1);
+
+ acomp.IDSuffix := s;
+ AIterationGroup.SetAjaxIterationID(s);
+ FWebController.SetIterationIDSuffix(iterationlevel,s);
+ acomp.ForeachContentProducer(@AIterationGroup.SetIDSuffix,true);
+ ASuffixID := copy(ASuffixID,i,length(ASuffixID)-i+1);
+ end;
+ end;
+ end;
begin
SetRequest(ARequest);
FWebModule := AWebModule;
@@ -203,9 +258,28 @@ begin
begin
CompName := Request.QueryFields.Values['AjaxID'];
if CompName='' then CompName := Request.GetNextPathInfo;
- AComponent := FindComponent(CompName);
+
+ i := pos('$',CompName);
+ AComponent:=self;
+ while (i > 0) and (assigned(AComponent)) do
+ begin
+ AComponent := FindComponent(copy(CompName,1,i-1));
+ CompName := copy(compname,i+1,length(compname)-i);
+ i := pos('$',CompName);
+ end;
+ if assigned(AComponent) then
+ AComponent := AComponent.FindComponent(CompName);
+
if assigned(AComponent) and (AComponent is THTMLContentProducer) then
+ begin
+ // Handle the SuffixID, search for iteration-groups and set their iteration-id-values
+ ASuffixID := ARequest.QueryFields.Values['IterationID'];
+ if ASuffixID<>'' then
+ begin
+ SetIdSuffixes(THTMLContentProducer(AComponent));
+ end;
THTMLContentProducer(AComponent).HandleAjaxRequest(ARequest, AnAjaxResponse);
+ end;
end;
DoAfterAjaxRequest(ARequest, AnAjaxResponse);
except on E: Exception do
@@ -346,8 +420,13 @@ end;
function TWebPage.IsAjaxCall: boolean;
var s : string;
begin
- s := Request.HTTPXRequestedWith;
- result := sametext(s,'XmlHttpRequest');
+ if assigned(request) then
+ begin
+ s := Request.HTTPXRequestedWith;
+ result := sametext(s,'XmlHttpRequest');
+ end
+ else
+ result := false;
end;
{ TStandardWebController }
@@ -378,6 +457,22 @@ begin
GetScripts.Add(result);
end;
+procedure TStandardWebController.ShowRegisteredScript(ScriptID: integer);
+var
+ i: Integer;
+ s: string;
+begin
+ s := '// ' + inttostr(ScriptID);
+ for i := 0 to GetScripts.Count -1 do
+ if tstrings(GetScripts.Items[i]).Strings[0]=s then
+ Exit;
+ with CreateNewScript do
+ begin
+ Append(s);
+ Append(RegisteredScriptList.Strings[ScriptID]);
+ end;
+end;
+
procedure TStandardWebController.FreeScript(var AScript: TStringList);
begin
with GetScripts do
@@ -431,9 +526,9 @@ begin
inherited Destroy;
end;
-function TStandardWebController.CreateNewJavascriptStack: TJavaScriptStack;
+function TStandardWebController.CreateNewJavascriptStack(AJavaType: TJavaType): TJavaScriptStack;
begin
- Result:=TJavaScriptStack.Create(self);
+ Result:=TJavaScriptStack.Create(self, AJavaType);
end;
function TStandardWebController.GetUrl(ParamNames, ParamValues,
@@ -542,5 +637,10 @@ begin
end;
end;
+initialization
+ RegisteredScriptList := nil;
+finalization
+ if assigned(RegisteredScriptList) then
+ RegisteredScriptList.Free;
end.
diff --git a/packages/fcl-web/src/base/websession.pp b/packages/fcl-web/src/base/websession.pp
index e4bb54c2cd..4a607db441 100644
--- a/packages/fcl-web/src/base/websession.pp
+++ b/packages/fcl-web/src/base/websession.pp
@@ -332,6 +332,7 @@ begin
begin
{$ifdef cgidebug}SendDebug('Getting default session');{$endif}
FSession:=GetDefaultSession;
+ FSession.FreeNotification(Self);
end;
Result:=FSession
end;
diff --git a/packages/fcl-web/src/jsonrpc/fpextdirect.pp b/packages/fcl-web/src/jsonrpc/fpextdirect.pp
index 645042ed26..c8fde13c81 100644
--- a/packages/fcl-web/src/jsonrpc/fpextdirect.pp
+++ b/packages/fcl-web/src/jsonrpc/fpextdirect.pp
@@ -130,6 +130,7 @@ Type
Property DispatchOptions;
Property APIPath;
Property RouterPath;
+ Property CreateSession;
Property NameSpace;
end;
diff --git a/packages/fcl-web/src/jsonrpc/fpjsonrpc.pp b/packages/fcl-web/src/jsonrpc/fpjsonrpc.pp
index 8bb8676813..6fe9ba9d50 100644
--- a/packages/fcl-web/src/jsonrpc/fpjsonrpc.pp
+++ b/packages/fcl-web/src/jsonrpc/fpjsonrpc.pp
@@ -357,6 +357,10 @@ resourcestring
implementation
+{$IFDEF WMDEBUG}
+uses dbugintf;
+{$ENDIF}
+
function CreateJSONErrorObject(Const AMessage : String; Const ACode : Integer) : TJSONObject;
begin
@@ -1014,7 +1018,7 @@ Var
begin
Result:=Nil;
- {$ifdef wmdebug}SendDebug(Format('Creating instance for %s',[Self.ProviderName]));{$endif}
+ {$ifdef wmdebug}SendDebug(Format('Creating instance for %s',[Self.HandlerMethodName]));{$endif}
If Assigned(FDataModuleClass) then
begin
{$ifdef wmdebug}SendDebug(Format('Creating datamodule from class %d ',[Ord(Assigned(FDataModuleClass))]));{$endif}
diff --git a/packages/fcl-web/src/webdata/extjsjson.pp b/packages/fcl-web/src/webdata/extjsjson.pp
index 447a223580..01595bdc74 100644
--- a/packages/fcl-web/src/webdata/extjsjson.pp
+++ b/packages/fcl-web/src/webdata/extjsjson.pp
@@ -28,6 +28,8 @@ type
{ TExtJSJSONDataFormatter }
TJSONObjectEvent = Procedure(Sender : TObject; AObject : TJSONObject) of Object;
TJSONExceptionObjectEvent = Procedure(Sender : TObject; E : Exception; AResponse : TJSONObject) of Object;
+ TJSONObjectAllowRowEvent = Procedure(Sender : TObject; Dataset : TDataset; Var Allow : Boolean) of Object;
+ TJSONObjectAllowEvent = Procedure(Sender : TObject; AObject : TJSONObject; Var Allow : Boolean) of Object;
TExtJSJSONDataFormatter = Class(TExtJSDataFormatter)
private
@@ -37,13 +39,18 @@ type
FAfterRowToJSON: TJSONObjectEvent;
FAfterUpdate: TJSONObjectEvent;
FBeforeDataToJSON: TJSONObjectEvent;
+ FBeforeDelete: TNotifyEvent;
+ FBeforeInsert: TNotifyEvent;
FBeforeRowToJSON: TJSONObjectEvent;
+ FBeforeUpdate: TNotifyEvent;
+ FOnAllowRow: TJSONObjectAllowRowEvent;
FOnErrorResponse: TJSONExceptionObjectEvent;
FOnMetaDataToJSON: TJSONObjectEvent;
FBatchResult : TJSONArray;
Function AddIdToBatch : TJSONObject;
procedure SendSuccess(ResponseContent: TStream; AddIDValue : Boolean = False);
protected
+ function AllowRow(ADataset : TDataset) : Boolean; virtual;
Procedure StartBatch(ResponseContent : TStream); override;
Procedure NextBatchItem(ResponseContent : TStream); override;
Procedure EndBatch(ResponseContent : TStream); override;
@@ -77,12 +84,18 @@ type
Property BeforeDataToJSON : TJSONObjectEvent Read FBeforeDataToJSON Write FBeforeDataToJSON;
// Called when an exception is caught and formatted.
Property OnErrorResponse : TJSONExceptionObjectEvent Read FOnErrorResponse Write FOnErrorResponse;
+ // Called to decide whether a record is sent to the client;
+ Property OnAllowRow : TJSONObjectAllowRowEvent Read FOnAllowRow Write FOnAllowRow;
// After a record was succesfully updated
Property AfterUpdate : TJSONObjectEvent Read FAfterUpdate Write FAfterUpdate;
// After a record was succesfully inserted.
Property AfterInsert : TJSONObjectEvent Read FAfterInsert Write FAfterInsert;
// After a record was succesfully inserted.
Property AfterDelete : TJSONObjectEvent Read FAfterDelete Write FAfterDelete;
+ // From TCustomHTTPDataContentProducer
+ Property BeforeUpdate;
+ Property BeforeInsert;
+ Property BeforeDelete;
end;
implementation
@@ -337,9 +350,12 @@ begin
ACount:=PageSize;
While (not DS.EOF) and ((PageSize=0) or (ACount>0)) do
begin
- Inc(RCount);
- Dec(ACount);
- Rows.Add(RowToJSON);
+ If AllowRow(DS) then
+ begin
+ Inc(RCount);
+ Dec(ACount);
+ Rows.Add(RowToJSON);
+ end;
DS.Next;
end;
If (PageSize>0) then
@@ -411,6 +427,13 @@ begin
end;
end;
+function TExtJSJSONDataFormatter.AllowRow(ADataset: TDataset): Boolean;
+begin
+ Result:=True;
+ If Assigned(FOnAllowRow) then
+ FOnAllowRow(Self,Dataset,Result);
+end;
+
procedure TExtJSJSONDataFormatter.StartBatch(ResponseContent: TStream);
begin
If Assigned(FBatchResult) then
diff --git a/packages/fcl-web/src/webdata/fpwebdata.pp b/packages/fcl-web/src/webdata/fpwebdata.pp
index ea47199a9a..68c3591e61 100644
--- a/packages/fcl-web/src/webdata/fpwebdata.pp
+++ b/packages/fcl-web/src/webdata/fpwebdata.pp
@@ -132,6 +132,9 @@ type
TCustomHTTPDataContentProducer = Class(THTTPContentProducer)
Private
FAllowPageSize: Boolean;
+ FBeforeDelete: TNotifyEvent;
+ FBeforeInsert: TNotifyEvent;
+ FBeforeUpdate: TNotifyEvent;
FDataProvider: TFPCustomWebDataProvider;
FMetadata: Boolean;
FOnTranscode: TOnTranscodeEvent;
@@ -159,6 +162,12 @@ type
Procedure DoExceptionToStream(E : Exception; ResponseContent : TStream); virtual; abstract;
procedure Notification(AComponent: TComponent; Operation: TOperation);override;
Property Dataset: TDataset Read GetDataSet;
+ // Before a record is about to be updated
+ Property BeforeUpdate : TNotifyEvent Read FBeforeUpdate Write FBeforeUpdate;
+ // Before a record is about to be inserted
+ Property BeforeInsert : TNotifyEvent Read FBeforeInsert Write FBeforeInsert;
+ // Before a record is about to be deleted
+ Property BeforeDelete : TNotifyEvent Read FBeforeDelete Write FBeforeDelete;
Public
Constructor Create(AOwner : TComponent); override;
Property Adaptor : TCustomWebDataInputAdaptor Read FAdaptor Write SetAdaptor;
@@ -464,6 +473,7 @@ type
TFPWebProviderDataModule = Class(TFPCustomWebProviderDataModule)
Published
+ Property CreateSession;
Property InputAdaptor;
Property ContentProducer;
Property UseProviderManager;
@@ -975,17 +985,23 @@ end;
procedure TCustomHTTPDataContentProducer.DoUpdateRecord(ResponseContent: TStream);
begin
{$ifdef wmdebug}SendDebug('DoUpdateRecord: Updating record');{$endif}
+ If Assigned(FBeforeUpdate) then
+ FBeforeUpdate(Self);
Provider.Update;
{$ifdef wmdebug}SendDebug('DoUpdateRecord: Updated record');{$endif}
end;
procedure TCustomHTTPDataContentProducer.DoInsertRecord(ResponseContent: TStream);
begin
+ If Assigned(FBeforeInsert) then
+ FBeforeInsert(Self);
Provider.Insert;
end;
procedure TCustomHTTPDataContentProducer.DoDeleteRecord(ResponseContent: TStream);
begin
+ If Assigned(FBeforeDelete) then
+ FBeforeDelete(Self);
Provider.Delete;
end;
@@ -1663,6 +1679,7 @@ begin
Exit;
end;
end;
+ P:=Nil;
C:=FindComponent(AProviderName);
{$ifdef wmdebug}SendDebug(Format('Searching provider "%s" 1 : %d ',[AProvidername,Ord(Assigned(C))]));{$endif}
If (C<>Nil) and (C is TFPCustomWebDataProvider) then
@@ -1675,7 +1692,9 @@ begin
begin
{$ifdef wmdebug}SendDebug(Format('Found providerdef "%s" 1 : %d ',[AProvidername,Ord(Assigned(C))]));{$endif}
P:=WebDataProviderManager.GetProvider(ADef,Self,AContainer);
- end;
+ end
+ else
+ P:=Nil;
end;
{$ifdef wmdebug}SendDebug(Format('Searching provider "%s" 2 : %d ',[AProvidername,Ord(Assigned(C))]));{$endif}
Result:=P;
diff --git a/packages/fcl-web/src/webdata/sqldbwebdata.pp b/packages/fcl-web/src/webdata/sqldbwebdata.pp
index 33b1d7f8e1..28b5356045 100644
--- a/packages/fcl-web/src/webdata/sqldbwebdata.pp
+++ b/packages/fcl-web/src/webdata/sqldbwebdata.pp
@@ -17,6 +17,7 @@ Type
TCustomSQLDBWebDataProvider = Class(TFPCustomWebDataProvider)
private
FIDFieldName: String;
+ FONGetDataset: TNotifyEvent;
FOnGetNewID: TNewIDEvent;
FOnGetParamValue: TGetParamValueEvent;
FParams: TParams;
@@ -44,6 +45,7 @@ Type
Procedure DoApplyParams; override;
Function SQLQuery : TSQLQuery;
Function GetDataset : TDataset; override;
+ Function DoGetNewID : String; virtual;
Function GetNewID : String;
Function IDFieldValue : String; override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
@@ -55,6 +57,7 @@ Type
Property OnGetNewID : TNewIDEvent Read FOnGetNewID Write FOnGetNewID;
property OnGetParameterType : TGetParamTypeEvent Read FOnGetParamType Write FOnGetParamType;
property OnGetParameterValue : TGetParamValueEvent Read FOnGetParamValue Write FOnGetParamValue;
+ Property OnGetDataset : TNotifyEvent Read FONGetDataset Write FOnGetDataset;
Property Params : TParams Read FParams Write SetParams;
Public
Constructor Create(AOwner : TComponent); override;
@@ -72,6 +75,7 @@ Type
Property OnGetNewID;
property OnGetParameterType;
property OnGetParameterValue;
+ Property OnGetDataset;
Property Options;
Property Params;
end;
@@ -273,7 +277,12 @@ Var
begin
ft:=GetParamtype(P,AValue);
- If ft<>ftUnknown then
+ If (AValue='') and (not (ft in [ftString,ftFixedChar,ftWideString,ftFixedWideChar])) then
+ begin
+ P.Clear;
+ exit;
+ end;
+ If (ft<>ftUnknown) then
begin
try
case ft of
@@ -358,7 +367,10 @@ begin
if not B then
begin
If (P.Name=IDFieldName) and DoNewID then
- SetTypedParam(P,GetNewID)
+ begin
+ GetNewID;
+ SetTypedParam(P,FLastNewID)
+ end
else If Adaptor.TryFieldValue(P.Name,S) then
SetTypedParam(P,S)
else If Adaptor.TryParamValue(P.Name,S) then
@@ -385,6 +397,8 @@ end;
function TCustomSQLDBWebDataProvider.GetDataset: TDataset;
begin
{$ifdef wmdebug}SendDebug('Get dataset: checking dataset');{$endif}
+ If Assigned(FonGetDataset) then
+ FOnGetDataset(Self);
CheckDataset;
FLastNewID:='';
Result:=FQuery;
@@ -394,12 +408,17 @@ begin
{$ifdef wmdebug}SendDebug('Get dataset: done');{$endif}
end;
-function TCustomSQLDBWebDataProvider.GetNewID: String;
-
+function TCustomSQLDBWebDataProvider.DoGetNewID: String;
begin
If Not Assigned(FOnGetNewID) then
Raise EFPHTTPError.CreateFmt(SErrNoNewIDEvent,[Self.Name]);
FOnGetNewID(Self,Result);
+end;
+
+function TCustomSQLDBWebDataProvider.GetNewID: String;
+
+begin
+ Result:=DoGetNewID;
FLastNewID:=Result;
end;
diff --git a/packages/fcl-xml/src/dom.pp b/packages/fcl-xml/src/dom.pp
index 30370455e7..2524784fee 100644
--- a/packages/fcl-xml/src/dom.pp
+++ b/packages/fcl-xml/src/dom.pp
@@ -2484,7 +2484,7 @@ end;
}
procedure TDOMDocument.NodeListDestroyed(aList: TDOMNodeList);
begin
- if not (nfDestroying in FFlags) then
+ if (not (nfDestroying in FFlags)) and (FNodeLists <> nil) then
FNodeLists.RemoveData(aList);
end;
diff --git a/packages/fpmkunit/src/fpmkunit.pp b/packages/fpmkunit/src/fpmkunit.pp
index 6586444eeb..78ac12c3b3 100644
--- a/packages/fpmkunit/src/fpmkunit.pp
+++ b/packages/fpmkunit/src/fpmkunit.pp
@@ -69,7 +69,7 @@ Type
linux,go32v2,win32,os2,freebsd,beos,netbsd,
amiga,atari, solaris, qnx, netware, openbsd,wdosx,
palmos,macos,darwin,emx,watcom,morphos,netwlibc,
- win64,wince,gba,nds,embedded,symbian
+ win64,wince,gba,nds,embedded,symbian,haiku
);
TOSes = Set of TOS;
@@ -114,7 +114,7 @@ Const
AllOSes = [Low(TOS)..High(TOS)];
AllCPUs = [Low(TCPU)..High(TCPU)];
- AllUnixOSes = [Linux,FreeBSD,NetBSD,OpenBSD,Darwin,QNX,BeOS,Solaris];
+ AllUnixOSes = [Linux,FreeBSD,NetBSD,OpenBSD,Darwin,QNX,BeOS,Solaris,Haiku];
AllBSDOSes = [FreeBSD,NetBSD,OpenBSD,Darwin];
AllWindowsOSes = [Win32,Win64,WinCE];
@@ -148,7 +148,8 @@ Const
{ gba } ( false, false, false, false, false, false, true, false, false, false),
{ nds } ( false, false, false, false, false, false, true, false, false, false),
{ embedded }( false, true, true, true, true, true, true, true, true, true ),
- { symbian } ( false, true, false, false, false, false, true, false, false, false)
+ { symbian } ( false, true, false, false, false, false, true, false, false, false),
+ { haiku } ( false, true, false, false, false, false, false, false, false, false)
);
// Useful
@@ -4462,6 +4463,7 @@ end;
function TBuildEngine.CheckExternalPackage(Const APackageName : String):TPackage;
var
S : String;
+ F : String;
I : Integer;
begin
// Already checked?
@@ -4481,11 +4483,25 @@ begin
Log(vldebug, SDbgExternalDependency, [APackageName,S]);
Result.FTargetState:=tsInstalled;
// Load unit config if it exists
- S:=IncludeTrailingPathDelimiter(S)+UnitConfigFile;
- if FileExists(S) then
+ F:=IncludeTrailingPathDelimiter(S)+UnitConfigFile;
+ if FileExists(F) then
begin
- Log(vlDebug, Format(SDbgLoading, [S]));
- Result.LoadUnitConfigFromFile(S);
+ Log(vlDebug, Format(SDbgLoading, [F]));
+ Result.LoadUnitConfigFromFile(F);
+ end
+ else if FileExists(IncludeTrailingPathDelimiter(S)+FPMakePPFile) then
+ begin
+ // The package is not installed, but the source-path is given.
+ // It is an external package so it is impossible to compile it, so
+ // assume that it has been compiled earlier.
+ F := IncludeTrailingPathDelimiter(Result.UnitDir) + Result.GetUnitsOutputDir(Defaults.CPU,Defaults.OS);
+ // If the unit-directory does not exist, you know for sure that
+ // the package is not compiled
+ if DirectoryExists(F) then
+ begin
+ Result.UnitDir := F;
+ Result.FTargetState:=tsCompiled;
+ end;
end;
// Check recursive implicit dependencies
CompileDependencies(Result);
diff --git a/packages/fpvectorial/src/avisocncgcodewriter.pas b/packages/fpvectorial/src/avisocncgcodewriter.pas
index cc31e608a1..eddb18cad9 100644
--- a/packages/fpvectorial/src/avisocncgcodewriter.pas
+++ b/packages/fpvectorial/src/avisocncgcodewriter.pas
@@ -36,6 +36,10 @@ var
i, j: Integer;
Str: string;
APath: TPath;
+ CurSegment: T2DSegment;
+ Cur3DSegment: T3DSegment;
+ Cur2DBezierSegment: T2DBezierSegment;
+ Cur3DBezierSegment: T3DBezierSegment;
begin
AStrings.Clear;
@@ -51,25 +55,39 @@ begin
// levanta a broca
AStrings.Add('P01 // Sobe a cabeça de gravação');
// vai para o ponto inicial
+ CurSegment := T2DSegment(APath.Points);
AStrings.Add(Format('G01 X%f Y%f',
- [APath.Points[0].X, APath.Points[0].Y]));
+ [CurSegment.X, CurSegment.Y]));
AStrings.Add('P02 // Abaixa a cabeça de gravação');
for j := 1 to APath.Len - 1 do
begin
- case APath.Points[j].SegmentType of
+ CurSegment := T2DSegment(CurSegment.Next);
+ case CurSegment.SegmentType of
st2DLine: AStrings.Add(Format('G01 X%f Y%f',
- [APath.Points[j].X, APath.Points[j].Y]));
- st3DLine: AStrings.Add(Format('G01 X%f Y%f Z%f',
- [APath.Points[j].X, APath.Points[j].Y, APath.Points[j].Z]));
- st2DBezier: AStrings.Add(Format('B02 X%f Y%f X%f Y%f X%f Y%f',
- [APath.Points[j].X2, APath.Points[j].Y2,
- APath.Points[j].X3, APath.Points[j].Y3,
- APath.Points[j].X, APath.Points[j].Y]));
- st3DBezier: AStrings.Add(Format('B03 X%f Y%f Z%f X%f Y%f Z%f X%f Y%f Z%f',
- [APath.Points[j].X2, APath.Points[j].Y2, APath.Points[j].Z2,
- APath.Points[j].X3, APath.Points[j].Y3, APath.Points[j].Z3,
- APath.Points[j].X, APath.Points[j].Y, APath.Points[j].Z]));
+ [CurSegment.X, CurSegment.Y]));
+ st3DLine:
+ begin
+ Cur3DSegment := T3DSegment(CurSegment);
+ AStrings.Add(Format('G01 X%f Y%f Z%f',
+ [Cur3DSegment.X, Cur3DSegment.Y, Cur3DSegment.Z]));
+ end;
+ st2DBezier:
+ begin
+ Cur2DBezierSegment := T2DBezierSegment(CurSegment);
+ AStrings.Add(Format('B02 X%f Y%f X%f Y%f X%f Y%f',
+ [Cur2DBezierSegment.X2, Cur2DBezierSegment.Y2,
+ Cur2DBezierSegment.X3, Cur2DBezierSegment.Y3,
+ Cur2DBezierSegment.X, Cur2DBezierSegment.Y]));
+ end;
+ st3DBezier:
+ begin
+ Cur3DBezierSegment := T3DBezierSegment(CurSegment);
+ AStrings.Add(Format('B03 X%f Y%f Z%f X%f Y%f Z%f X%f Y%f Z%f',
+ [Cur3DBezierSegment.X2, Cur3DBezierSegment.Y2, Cur3DBezierSegment.Z2,
+ Cur3DBezierSegment.X3, Cur3DBezierSegment.Y3, Cur3DBezierSegment.Z3,
+ Cur3DBezierSegment.X, Cur3DBezierSegment.Y, Cur3DBezierSegment.Z]));
+ end;
end;
end;
end;
diff --git a/packages/fpvectorial/src/dxfvectorialreader.pas b/packages/fpvectorial/src/dxfvectorialreader.pas
index 02f5ab7dac..f185084947 100644
--- a/packages/fpvectorial/src/dxfvectorialreader.pas
+++ b/packages/fpvectorial/src/dxfvectorialreader.pas
@@ -29,11 +29,10 @@ unit dxfvectorialreader;
interface
uses
- Classes, SysUtils,
+ Classes, SysUtils, Math,
fpvectorial;
type
-
{ Used by tcutils.SeparateString }
T10Strings = array[0..9] of shortstring;
@@ -70,6 +69,9 @@ type
// HEADER data
ANGBASE: Double;
ANGDIR: Integer;
+ INSBASE, EXTMIN, EXTMAX, LIMMIN, LIMMAX: T3DPoint;
+ // Calculated HEADER data
+ DOC_OFFSET: T3DPoint;
//
function SeparateString(AString: string; ASeparator: Char): T10Strings;
procedure ReadHEADER(ATokens: TDXFTokens; AData: TvVectorialDocument);
@@ -77,6 +79,7 @@ type
procedure ReadENTITIES_LINE(ATokens: TDXFTokens; AData: TvVectorialDocument);
procedure ReadENTITIES_ARC(ATokens: TDXFTokens; AData: TvVectorialDocument);
procedure ReadENTITIES_CIRCLE(ATokens: TDXFTokens; AData: TvVectorialDocument);
+ procedure ReadENTITIES_DIMENSION(ATokens: TDXFTokens; AData: TvVectorialDocument);
procedure ReadENTITIES_ELLIPSE(ATokens: TDXFTokens; AData: TvVectorialDocument);
procedure ReadENTITIES_TEXT(ATokens: TDXFTokens; AData: TvVectorialDocument);
function GetCoordinateValue(AStr: shortstring): Double;
@@ -326,8 +329,9 @@ end;
procedure TvDXFVectorialReader.ReadHEADER(ATokens: TDXFTokens;
AData: TvVectorialDocument);
var
- i: Integer;
+ i, j: Integer;
CurToken: TDXFToken;
+ CurField: P3DPoint;
begin
i := 0;
while i < ATokens.Count do
@@ -344,10 +348,71 @@ begin
CurToken := TDXFToken(ATokens.Items[i+1]);
ANGDIR := StrToInt(CurToken.StrValue);
Inc(i);
+ end
+ // This indicates the size of the document
+ else if (CurToken.StrValue = '$INSBASE') or
+ (CurToken.StrValue = '$EXTMIN') or (CurToken.StrValue = '$EXTMAX') or
+ (CurToken.StrValue = '$LIMMIN') or (CurToken.StrValue = '$LIMMAX') then
+ begin
+ if (CurToken.StrValue = '$INSBASE') then CurField := @INSBASE
+ else if (CurToken.StrValue = '$EXTMIN') then CurField := @EXTMIN
+ else if (CurToken.StrValue = '$EXTMAX') then CurField := @EXTMAX
+ else if (CurToken.StrValue = '$LIMMIN') then CurField := @LIMMIN
+ else if (CurToken.StrValue = '$LIMMAX') then CurField := @LIMMAX;
+
+ // Check the next 2 items and verify if they are the values of the size of the document
+ for j := 0 to 1 do
+ begin
+ CurToken := TDXFToken(ATokens.Items[i+1]);
+ case CurToken.GroupCode of
+ 10:
+ begin;
+ CurField^.X := StrToFloat(CurToken.StrValue, FPointSeparator);
+ Inc(i);
+ end;
+ 20:
+ begin
+ CurField^.Y := StrToFloat(CurToken.StrValue, FPointSeparator);
+ Inc(i);
+ end;
+ end;
+ end;
end;
Inc(i);
end;
+
+ // After getting all the data, we can try to make some sense out of it
+
+ // Sometimes EXTMIN comes as 10^20 and EXTMAX as -10^20, which makes no sence
+ // In these cases we need to ignore them.
+ if (EXTMIN.X > 10000000000) or (EXTMIN.X < -10000000000)
+ or (EXTMAX.X > 10000000000) or (EXTMAX.X < -10000000000) then
+ begin
+ DOC_OFFSET.X := 0;
+ DOC_OFFSET.Y := 0;
+
+ AData.Width := LIMMAX.X;
+ AData.Height := LIMMAX.Y;
+ end
+ else
+ begin
+ // The size of the document seams to be given by:
+ // DOC_SIZE = min(EXTMAX, LIMMAX) - DOC_OFFSET;
+ // if EXTMIN is <> -infinite then DOC_OFFSET = EXTMIN else DOC_OFFSET = (0, 0)
+ // We will shift the whole document so that it has only positive coordinates and
+ // DOC_OFFSET will be utilized for that
+
+ if EXTMIN.X > -100 then
+ begin
+ DOC_OFFSET.X := EXTMIN.X;
+ DOC_OFFSET.Y := EXTMIN.Y;
+ end
+ else FillChar(DOC_OFFSET, sizeof(T3DPoint), #0);
+
+ AData.Width := min(EXTMAX.X, LIMMAX.X) - DOC_OFFSET.X;
+ AData.Height := min(EXTMAX.Y, LIMMAX.Y) - DOC_OFFSET.Y;
+ end;
end;
procedure TvDXFVectorialReader.ReadENTITIES(ATokens: TDXFTokens; AData: TvVectorialDocument);
@@ -360,9 +425,11 @@ begin
CurToken := TDXFToken(ATokens.Items[i]);
if CurToken.StrValue = 'ARC' then ReadENTITIES_ARC(CurToken.Childs, AData)
else if CurToken.StrValue = 'CIRCLE' then ReadENTITIES_CIRCLE(CurToken.Childs, AData)
+ else if CurToken.StrValue = 'DIMENSION' then ReadENTITIES_DIMENSION(CurToken.Childs, AData)
else if CurToken.StrValue = 'ELLIPSE' then ReadENTITIES_ELLIPSE(CurToken.Childs, AData)
else if CurToken.StrValue = 'LINE' then ReadENTITIES_LINE(CurToken.Childs, AData)
- else if CurToken.StrValue = 'TEXT' then
+ else if CurToken.StrValue = 'TEXT' then ReadENTITIES_TEXT(CurToken.Childs, AData)
+ else
begin
// ...
end;
@@ -406,9 +473,15 @@ begin
end;
end;
+ // Position fixing for documents with negative coordinates
+ LineStartX := LineStartX - DOC_OFFSET.X;
+ LineStartY := LineStartY - DOC_OFFSET.Y;
+ LineEndX := LineEndX - DOC_OFFSET.X;
+ LineEndY := LineEndY - DOC_OFFSET.Y;
+
// And now write it
{$ifdef FPVECTORIALDEBUG}
- WriteLn(Format('Adding Line from %f,%f to %f,%f', [LineStartX, LineStartY, LineEndX, LineEndY]));
+ // WriteLn(Format('Adding Line from %f,%f to %f,%f', [LineStartX, LineStartY, LineEndX, LineEndY]));
{$endif}
AData.StartPath(LineStartX, LineStartY);
AData.AddLineToPath(LineEndX, LineEndY);
@@ -416,6 +489,8 @@ begin
end;
{
+Arcs are always counter-clockwise in DXF
+
100 Subclass marker (AcDbCircle)
39 Thickness (optional; default = 0)
10 Center point (in OCS) DXF: X value; APP: 3D point
@@ -462,6 +537,18 @@ begin
end;
end;
+ // In DXF the EndAngle is always greater then the StartAngle.
+ // If it isn't then sum 360 to it to make sure we don't get wrong results
+ if EndAngle < StartAngle then EndAngle := EndAngle + 360;
+
+ // Position fixing for documents with negative coordinates
+ CenterX := CenterX - DOC_OFFSET.X;
+ CenterY := CenterY - DOC_OFFSET.Y;
+
+ {$ifdef FPVECTORIALDEBUG}
+ WriteLn(Format('Adding Arc Center=%f,%f Radius=%f StartAngle=%f EndAngle=%f',
+ [CenterX, CenterY, Radius, StartAngle, EndAngle]));
+ {$endif}
AData.AddCircularArc(CenterX, CenterY, CenterZ, Radius, StartAngle, EndAngle);
end;
@@ -506,11 +593,176 @@ begin
end;
end;
+ // Position fixing for documents with negative coordinates
+ CircleCenterX := CircleCenterX - DOC_OFFSET.X;
+ CircleCenterY := CircleCenterY - DOC_OFFSET.Y;
+
AData.AddCircle(CircleCenterX, CircleCenterY,
CircleCenterZ, CircleRadius);
end;
{
+Group codes Description
+100 Subclass marker (AcDbDimension)
+2 Name of the block that contains the entities that make up the dimension picture
+10 Definition point (in WCS) DXF: X value; APP: 3D point
+20, 30 DXF: Y and Z values of definition point (in WCS)
+11 Middle point of dimension text (in OCS) DXF: X value; APP: 3D point
+21, 31 DXF: Y and Z values of middle point of dimension text (in OCS)
+70 Dimension type.
+ Values 0-6 are integer values that represent the dimension type.
+ Values 32, 64, and 128 are bit values, which are added to the integer values
+ (value 32 is always set in R13 and later releases).
+ 0 = Rotated, horizontal, or vertical; 1 = Aligned;
+ 2 = Angular; 3 = Diameter; 4 = Radius;
+ 5 = Angular 3 point; 6 = Ordinate;
+ 32 = Indicates that the block reference (group code 2) is referenced by this dimension only.
+ 64 = Ordinate type. This is a bit value (bit 7) used only with integer value 6.
+ If set, ordinate is X-type; if not set, ordinate is Y-type.
+ 128 = This is a bit value (bit 8) added to the other group 70 values
+ if the dimension text has been positioned at a user-defined location
+ rather than at the default location.
+71 Attachment point:
+ 1 = Top left; 2 = Top center; 3 = Top right;
+ 4 = Middle left; 5 = Middle center; 6 = Middle right;
+ 7 = Bottom left; 8 = Bottom center; 9 = Bottom right
+72 Dimension text line spacing style (optional):
+ 1(or missing) = At least (taller characters will override)
+ 2 = Exact (taller characters will not override)
+41 Dimension text line spacing factor (optional):
+ Percentage of default (3-on-5) line spacing to be applied. Valid values range from 0.25 to 4.00.
+42 Actual measurement (optional; read-only value)
+1 Dimension text explicitly entered by the user. Optional; default is the measurement.
+ If null or "<>", the dimension measurement is drawn as the text,
+ if " " (one blank space), the text is suppressed. Anything else is drawn as the text.
+53 The optional group code 53 is the rotation angle of the dimension
+ text away from its default orientation (the direction of the dimension line) (optional).
+51 All dimension types have an optional 51 group code, which indicates the
+ horizontal direction for the dimension entity. The dimension entity determines
+ the orientation of dimension text and lines for horizontal, vertical, and
+ rotated linear dimensions.
+ This group value is the negative of the angle between the OCS X axis
+ and the UCS X axis. It is always in the XY plane of the OCS.
+210 Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector
+220, 230 DXF: Y and Z values of extrusion direction (optional)
+3 Dimension style name
+
+Aligned Dimension Group Codes
+
+100 Subclass marker (AcDbAlignedDimension)
+12 Insertion point for clones of a dimension-Baseline and Continue (in OCS) DXF: X value; APP: 3D point
+22, 32 DXF: Y and Z values of insertion point for clones of a dimension-Baseline and Continue (in OCS)
+13 Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point
+23, 33 DXF: Y and Z values of definition point for linear and angular dimensions (in WCS)
+14 Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point
+24, 34 DXF: Y and Z values of definition point for linear and angular dimensions (in WCS)
+
+ |--text--|->10,20
+ | |
+ | |
+ X->14,24 X->13,23
+}
+procedure TvDXFVectorialReader.ReadENTITIES_DIMENSION(ATokens: TDXFTokens;
+ AData: TvVectorialDocument);
+var
+ CurToken: TDXFToken;
+ i: Integer;
+ // DIMENSION
+ BaseLeft, BaseRight, DimensionRight, DimensionLeft, TmpPoint: T3DPoint;
+ IsAlignedDimension: Boolean = False;
+begin
+ // Initial values
+ BaseLeft.X := 0;
+ BaseLeft.Y := 0;
+ BaseRight.X := 0;
+ BaseRight.X := 0;
+ DimensionRight.X := 0;
+ DimensionRight.Y := 0;
+ DimensionLeft.X := 0;
+ DimensionLeft.Y := 0;
+
+ for i := 0 to ATokens.Count - 1 do
+ begin
+ // Now read and process the item name
+ CurToken := TDXFToken(ATokens.Items[i]);
+
+ // Avoid an exception by previously checking if the conversion can be made
+ if CurToken.GroupCode in [10, 20, 30, 11, 21, 31, 13, 23, 33, 14, 24, 34] then
+ begin
+ CurToken.FloatValue := StrToFloat(Trim(CurToken.StrValue), FPointSeparator);
+ end;
+
+ case CurToken.GroupCode of
+ 10: DimensionRight.X := CurToken.FloatValue;
+ 20: DimensionRight.Y := CurToken.FloatValue;
+ 30: DimensionRight.Z := CurToken.FloatValue;
+ 13: BaseRight.X := CurToken.FloatValue;
+ 23: BaseRight.Y := CurToken.FloatValue;
+ 33: BaseRight.Z := CurToken.FloatValue;
+ 14: BaseLeft.X := CurToken.FloatValue;
+ 24: BaseLeft.Y := CurToken.FloatValue;
+ 34: BaseLeft.Z := CurToken.FloatValue;
+ 100:
+ begin
+ if CurToken.StrValue = 'AcDbAlignedDimension' then IsAlignedDimension := True;
+ end;
+ end;
+ end;
+
+ // And now write it
+ {$ifdef FPVECTORIALDEBUG}
+// WriteLn(Format('Adding Line from %f,%f to %f,%f', [LineStartX, LineStartY, LineEndX, LineEndY]));
+ {$endif}
+ if IsAlignedDimension then
+ begin
+ // Now make sure that we actually that BaseLeft is to the left of BaseRight
+ if BaseRight.X < BaseLeft.X then
+ begin
+ TmpPoint := BaseRight;
+ BaseRight := BaseLeft;
+ BaseLeft := TmpPoint;
+ end;
+
+ // Now check if we are a horizontal or vertical dimension
+
+ // horizontal
+ //
+ //DL____ DR
+ // | |
+ // | |
+ // BL BR
+ if DimensionRight.X = BaseRight.X then
+ begin
+ DimensionLeft.X := BaseLeft.X;
+ DimensionLeft.Y := DimensionRight.Y;
+ end
+ // vertical
+ //
+ // BL ----|DR
+ // BR --|DL
+ //
+ // In this case we invert then DR and DL
+ else if DimensionRight.Y = BaseLeft.Y then
+ begin
+ DimensionLeft := DimensionRight;
+ DimensionRight.Y := BaseRight.Y;
+ end
+ // vertical
+ //
+ // BL ----|DL
+ // BR --|DR
+ //
+ else if DimensionRight.Y = BaseRight.Y then
+ begin
+ DimensionLeft.X := DimensionRight.X;
+ DimensionLeft.Y := BaseLeft.Y;
+ end;
+
+ AData.AddAlignedDimension(BaseLeft, BaseRight, DimensionLeft, DimensionRight);
+ end;
+end;
+
+{
100 Subclass marker (AcDbEllipse)
10 Center point (in WCS) DXF: X value; APP: 3D point
20, 30 DXF: Y and Z values of center point (in WCS)
@@ -547,6 +799,10 @@ begin
end;
end;
+ // Position fixing for documents with negative coordinates
+ CenterX := CenterX - DOC_OFFSET.X;
+ CenterY := CenterY - DOC_OFFSET.Y;
+
//
AData.AddEllipse(CenterX, CenterY, CenterZ, MajorHalfAxis, MinorHalfAxis, Angle);
end;
@@ -614,6 +870,10 @@ begin
end;
end;
+ // Position fixing for documents with negative coordinates
+ PosX := PosX - DOC_OFFSET.X;
+ PosY := PosY - DOC_OFFSET.Y;
+
//
AData.AddText(PosX, PosY, PosZ, '', Round(FontSize), Str);
end;
diff --git a/packages/fpvectorial/src/fpvectorial.pas b/packages/fpvectorial/src/fpvectorial.pas
index af0feaa868..928b001d11 100644
--- a/packages/fpvectorial/src/fpvectorial.pas
+++ b/packages/fpvectorial/src/fpvectorial.pas
@@ -39,6 +39,12 @@ const
STR_WINMETAFILE_EXTENSION = '.wmf';
type
+ T3DPoint = record
+ X, Y, Z: Double;
+ end;
+
+ P3DPoint = ^T3DPoint;
+
TSegmentType = (
st2DLine, st2DBezier,
st3DLine, st3DBezier, stMoveTo);
@@ -159,6 +165,17 @@ type
procedure CalculateBoundingRectangle;
end;
+ {@@
+ }
+
+ { TvAlignedDimension }
+
+ TvAlignedDimension = class(TvEntity)
+ public
+ // Mandatory fields
+ BaseLeft, BaseRight, DimensionLeft, DimensionRight: T3DPoint;
+ end;
+
type
TvCustomVectorialWriter = class;
@@ -216,6 +233,8 @@ type
procedure AddCircle(ACenterX, ACenterY, ACenterZ, ARadius: Double);
procedure AddCircularArc(ACenterX, ACenterY, ACenterZ, ARadius, AStartAngle, AEndAngle: Double);
procedure AddEllipse(CenterX, CenterY, CenterZ, MajorHalfAxis, MinorHalfAxis, Angle: Double);
+ // Dimensions
+ procedure AddAlignedDimension(BaseLeft, BaseRight, DimLeft, DimRight: T3DPoint);
{ properties }
property PathCount: Integer read GetPathCount;
property Paths[Index: Cardinal]: TPath read GetPath;
@@ -642,6 +661,19 @@ begin
FEntities.Add(lEllipse);
end;
+procedure TvVectorialDocument.AddAlignedDimension(BaseLeft, BaseRight,
+ DimLeft, DimRight: T3DPoint);
+var
+ lDim: TvAlignedDimension;
+begin
+ lDim := TvAlignedDimension.Create;
+ lDim.BaseLeft := BaseLeft;
+ lDim.BaseRight := BaseRight;
+ lDim.DimensionLeft := DimLeft;
+ lDim.DimensionRight := DimRight;
+ FEntities.Add(lDim);
+end;
+
{@@
Convenience method which creates the correct
writer object for a given vector graphics document format.
diff --git a/packages/fpvectorial/src/fpvtocanvas.pas b/packages/fpvectorial/src/fpvtocanvas.pas
index 6893c3b115..456a656382 100644
--- a/packages/fpvectorial/src/fpvtocanvas.pas
+++ b/packages/fpvectorial/src/fpvtocanvas.pas
@@ -11,7 +11,7 @@ uses
{$ifdef USE_LCL_CANVAS}
Graphics, LCLIntf,
{$else}
- fpcanvas,
+ fpcanvas, fpimage,
{$endif}
fpvectorial;
@@ -25,6 +25,10 @@ procedure DrawFPVectorialToCanvas(ASource: TvVectorialDocument;
implementation
+{$ifndef Windows}
+{$define FPVECTORIALDEBUG}
+{$endif}
+
function Rotate2DPoint(P,Fix :TPoint; alpha:double): TPoint;
var
sinus, cosinus : Extended;
@@ -97,6 +101,17 @@ procedure DrawFPVectorialToCanvas(ASource: TvVectorialDocument;
ADest: TFPCustomCanvas;
{$endif}
ADestX: Integer = 0; ADestY: Integer = 0; AMulX: Double = 1.0; AMulY: Double = 1.0);
+
+ function CoordToCanvasX(ACoord: Double): Integer;
+ begin
+ Result := Round(ADestX + AmulX * ACoord);
+ end;
+
+ function CoordToCanvasY(ACoord: Double): Integer;
+ begin
+ Result := Round(ADestY + AmulY * ACoord);
+ end;
+
var
i, j, k: Integer;
PosX, PosY: Integer; // Not modified by ADestX, etc
@@ -113,7 +128,15 @@ var
CurEntity: TvEntity;
CurCircle: TvCircle;
CurEllipse: TvEllipse;
+ //
CurArc: TvCircularArc;
+ FinalStartAngle, FinalEndAngle, tmpAngle: double;
+ BoundsLeft, BoundsTop, BoundsRight, BoundsBottom,
+ IntStartAngle, IntAngleLength, IntTmp: Integer;
+ //
+ CurDim: TvAlignedDimension;
+ Points: array of TPoint;
+ UpperDim, LowerDim: T3DPoint;
begin
{$ifdef FPVECTORIALDEBUG}
WriteLn(':>DrawFPVectorialToCanvas');
@@ -121,6 +144,7 @@ begin
PosX := 0;
PosY := 0;
+ ADest.Brush.Style := bsClear;
ADest.MoveTo(ADestX, ADestY);
@@ -138,17 +162,11 @@ begin
case CurSegment.SegmentType of
stMoveTo:
begin
- ADest.MoveTo(
- Round(ADestX + AMulX * Cur2DSegment.X),
- Round(ADestY + AMulY * Cur2DSegment.Y)
- );
+ ADest.MoveTo(CoordToCanvasX(Cur2DSegment.X), CoordToCanvasY(Cur2DSegment.Y));
end;
st2DLine, st3DLine:
begin
- ADest.LineTo(
- Round(ADestX + AMulX * Cur2DSegment.X),
- Round(ADestY + AMulY * Cur2DSegment.Y)
- );
+ ADest.LineTo(CoordToCanvasX(Cur2DSegment.X), CoordToCanvasY(Cur2DSegment.Y));
end;
{ To draw a bezier we need to divide the interval in parts and make
lines between this parts }
@@ -164,9 +182,7 @@ begin
t := k / CurveLength;
CurX := Round(sqr(1 - t) * (1 - t) * PosX + 3 * t * sqr(1 - t) * Cur2DBSegment.X2 + 3 * t * t * (1 - t) * Cur2DBSegment.X3 + t * t * t * Cur2DBSegment.X);
CurY := Round(sqr(1 - t) * (1 - t) * PosY + 3 * t * sqr(1 - t) * Cur2DBSegment.Y2 + 3 * t * t * (1 - t) * Cur2DBSegment.Y3 + t * t * t * Cur2DBSegment.Y);
- ADest.LineTo(
- Round(ADestX + AMulX * CurX),
- Round(ADestY + AMulY * CurY));
+ ADest.LineTo(CoordToCanvasX(CurX), CoordToCanvasY(CurY));
end;
PosX := Round(Cur2DBSegment.X);
PosY := Round(Cur2DBSegment.Y);
@@ -183,10 +199,10 @@ begin
begin
CurCircle := CurEntity as TvCircle;
ADest.Ellipse(
- Round(ADestX + AmulX * (CurCircle.CenterX - CurCircle.Radius)),
- Round(ADestY + AMulY * (CurCircle.CenterY - CurCircle.Radius)),
- Round(ADestX + AmulX * (CurCircle.CenterX + CurCircle.Radius)),
- Round(ADestY + AMulY * (CurCircle.CenterY + CurCircle.Radius))
+ CoordToCanvasX(CurCircle.CenterX - CurCircle.Radius),
+ CoordToCanvasY(CurCircle.CenterY - CurCircle.Radius),
+ CoordToCanvasX(CurCircle.CenterX + CurCircle.Radius),
+ CoordToCanvasY(CurCircle.CenterY + CurCircle.Radius)
);
end
else if CurEntity is TvEllipse then
@@ -198,16 +214,155 @@ begin
begin
CurArc := CurEntity as TvCircularArc;
{$ifdef USE_LCL_CANVAS}
+ // ToDo: Consider a X axis inversion
+ // If the Y axis is inverted, then we need to mirror our angles as well
+ BoundsLeft := CoordToCanvasX(CurArc.CenterX - CurArc.Radius);
+ BoundsTop := CoordToCanvasY(CurArc.CenterY - CurArc.Radius);
+ BoundsRight := CoordToCanvasX(CurArc.CenterX + CurArc.Radius);
+ BoundsBottom := CoordToCanvasY(CurArc.CenterY + CurArc.Radius);
+ {if AMulY > 0 then
+ begin}
+ FinalStartAngle := CurArc.StartAngle;
+ FinalEndAngle := CurArc.EndAngle;
+ {end
+ else // AMulY is negative
+ begin
+ // Inverting the angles generates the correct result for Y axis inversion
+ if CurArc.EndAngle = 0 then FinalStartAngle := 0
+ else FinalStartAngle := 360 - 1* CurArc.EndAngle;
+ if CurArc.StartAngle = 0 then FinalEndAngle := 0
+ else FinalEndAngle := 360 - 1* CurArc.StartAngle;
+ end;}
+ IntStartAngle := Round(16*FinalStartAngle);
+ IntAngleLength := Round(16*(FinalEndAngle - FinalStartAngle));
+ // On Gtk2 and Carbon, the Left really needs to be to the Left of the Right position
+ // The same for the Top and Bottom
+ // On Windows it works fine either way
+ // On Gtk2 if the positions are inverted then the arcs are screwed up
+ // In Carbon if the positions are inverted, then the arc is inverted
+ if BoundsLeft > BoundsRight then
+ begin
+ IntTmp := BoundsLeft;
+ BoundsLeft := BoundsRight;
+ BoundsRight := IntTmp;
+ end;
+ if BoundsTop > BoundsBottom then
+ begin
+ IntTmp := BoundsTop;
+ BoundsTop := BoundsBottom;
+ BoundsBottom := IntTmp;
+ end;
// Arc(ALeft, ATop, ARight, ABottom, Angle16Deg, Angle16DegLength: Integer);
+ {$ifdef FPVECTORIALDEBUG}
+ WriteLn(Format('Drawing Arc Center=%f,%f Radius=%f StartAngle=%f AngleLength=%f',
+ [CurArc.CenterX, CurArc.CenterY, CurArc.Radius, IntStartAngle/16, IntAngleLength/16]));
+ {$endif}
ADest.Arc(
- Round(ADestX + AmulX * (CurArc.CenterX - CurArc.Radius)),
- Round(ADestY + AmulY * (CurArc.CenterY - CurArc.Radius)),
- Round(ADestX + AmulX * (CurArc.CenterX + CurArc.Radius)),
- Round(ADestY + AmulY * (CurArc.CenterY + CurArc.Radius)),
- Round(16*CurArc.StartAngle),
- Round(16*CurArc.EndAngle - CurArc.StartAngle)
+ BoundsLeft, BoundsTop, BoundsRight, BoundsBottom,
+ IntStartAngle, IntAngleLength
);
+ // Debug info
+// {$define FPVECTORIALDEBUG}
+// {$ifdef FPVECTORIALDEBUG}
+// WriteLn(Format('Drawing Arc x1y1=%d,%d x2y2=%d,%d start=%d end=%d',
+// [BoundsLeft, BoundsTop, BoundsRight, BoundsBottom, IntStartAngle, IntAngleLength]));
+// {$endif}
+{ ADest.TextOut(CoordToCanvasX(CurArc.CenterX), CoordToCanvasY(CurArc.CenterY),
+ Format('R=%d S=%d L=%d', [Round(CurArc.Radius*AMulX), Round(FinalStartAngle),
+ Abs(Round((FinalEndAngle - FinalStartAngle)))]));
+ ADest.Pen.Color := TColor($DDDDDD);
+ ADest.Rectangle(
+ BoundsLeft, BoundsTop, BoundsRight, BoundsBottom);
+ ADest.Pen.Color := clBlack;}
{$endif}
+ end
+ else if CurEntity is TvAlignedDimension then
+ begin
+ CurDim := CurEntity as TvAlignedDimension;
+ //
+ // Draws this shape:
+ // vertical horizontal
+ // ___
+ // | | or ---| X cm
+ // | --|
+ // Which marks the dimension
+ ADest.MoveTo(CoordToCanvasX(CurDim.BaseRight.X), CoordToCanvasY(CurDim.BaseRight.Y));
+ ADest.LineTo(CoordToCanvasX(CurDim.DimensionRight.X), CoordToCanvasY(CurDim.DimensionRight.Y));
+ ADest.LineTo(CoordToCanvasX(CurDim.DimensionLeft.X), CoordToCanvasY(CurDim.DimensionLeft.Y));
+ ADest.LineTo(CoordToCanvasX(CurDim.BaseLeft.X), CoordToCanvasY(CurDim.BaseLeft.Y));
+ // Now the arrows
+ // horizontal
+ SetLength(Points, 3);
+ if CurDim.DimensionRight.Y = CurDim.DimensionLeft.Y then
+ begin
+ {$ifdef USE_LCL_CANVAS}
+ ADest.Brush.Color := clBlack;
+ {$else}
+ ADest.Brush.FPColor := colBlack;
+ {$endif}
+ ADest.Brush.Style := bsSolid;
+ // Left arrow
+ Points[0] := Point(CoordToCanvasX(CurDim.DimensionLeft.X), CoordToCanvasY(CurDim.DimensionLeft.Y));
+ Points[1] := Point(Points[0].X + 7, Points[0].Y - 3);
+ Points[2] := Point(Points[0].X + 7, Points[0].Y + 3);
+ ADest.Polygon(Points);
+ // Right arrow
+ Points[0] := Point(CoordToCanvasX(CurDim.DimensionRight.X), CoordToCanvasY(CurDim.DimensionRight.Y));
+ Points[1] := Point(Points[0].X - 7, Points[0].Y - 3);
+ Points[2] := Point(Points[0].X - 7, Points[0].Y + 3);
+ ADest.Polygon(Points);
+ ADest.Brush.Style := bsClear;
+ // Dimension text
+ Points[0].X := CoordToCanvasX((CurDim.DimensionLeft.X+CurDim.DimensionRight.X)/2);
+ Points[0].Y := CoordToCanvasY(CurDim.DimensionLeft.Y);
+ LowerDim.X := CurDim.DimensionRight.X-CurDim.DimensionLeft.X;
+ ADest.Font.Size := 10;
+ ADest.TextOut(Points[0].X, Points[0].Y, Format('%.1f', [LowerDim.X]));
+ end
+ else
+ begin
+ {$ifdef USE_LCL_CANVAS}
+ ADest.Brush.Color := clBlack;
+ {$else}
+ ADest.Brush.FPColor := colBlack;
+ {$endif}
+ ADest.Brush.Style := bsSolid;
+ // There is no upper/lower preference for DimensionLeft/Right, so we need to check
+ if CurDim.DimensionLeft.Y > CurDim.DimensionRight.Y then
+ begin
+ UpperDim := CurDim.DimensionLeft;
+ LowerDim := CurDim.DimensionRight;
+ end
+ else
+ begin
+ UpperDim := CurDim.DimensionRight;
+ LowerDim := CurDim.DimensionLeft;
+ end;
+ // Upper arrow
+ Points[0] := Point(CoordToCanvasX(UpperDim.X), CoordToCanvasY(UpperDim.Y));
+ Points[1] := Point(Points[0].X + Round(AMulX), Points[0].Y - Round(AMulY*3));
+ Points[2] := Point(Points[0].X - Round(AMulX), Points[0].Y - Round(AMulY*3));
+ ADest.Polygon(Points);
+ // Lower arrow
+ Points[0] := Point(CoordToCanvasX(LowerDim.X), CoordToCanvasY(LowerDim.Y));
+ Points[1] := Point(Points[0].X + Round(AMulX), Points[0].Y + Round(AMulY*3));
+ Points[2] := Point(Points[0].X - Round(AMulX), Points[0].Y + Round(AMulY*3));
+ ADest.Polygon(Points);
+ ADest.Brush.Style := bsClear;
+ // Dimension text
+ Points[0].X := CoordToCanvasX(CurDim.DimensionLeft.X);
+ Points[0].Y := CoordToCanvasY((CurDim.DimensionLeft.Y+CurDim.DimensionRight.Y)/2);
+ LowerDim.Y := CurDim.DimensionRight.Y-CurDim.DimensionLeft.Y;
+ if LowerDim.Y < 0 then LowerDim.Y := -1 * LowerDim.Y;
+ ADest.Font.Size := 10;
+ ADest.TextOut(Points[0].X, Points[0].Y, Format('%.1f', [LowerDim.Y]));
+ end;
+ SetLength(Points, 0);
+{ // Debug info
+ ADest.TextOut(CoordToCanvasX(CurDim.BaseRight.X), CoordToCanvasY(CurDim.BaseRight.Y), 'BR');
+ ADest.TextOut(CoordToCanvasX(CurDim.DimensionRight.X), CoordToCanvasY(CurDim.DimensionRight.Y), 'DR');
+ ADest.TextOut(CoordToCanvasX(CurDim.DimensionLeft.X), CoordToCanvasY(CurDim.DimensionLeft.Y), 'DL');
+ ADest.TextOut(CoordToCanvasX(CurDim.BaseLeft.X), CoordToCanvasY(CurDim.BaseLeft.Y), 'BL');}
end;
end;
@@ -215,10 +370,16 @@ begin
for i := 0 to ASource.GetTextCount - 1 do
begin
CurText := ASource.GetText(i);
- ADest.Font.Height := Round(AmulY * CurText.FontSize);
+ ADest.Font.Size := Round(AmulX * CurText.FontSize);
ADest.Pen.Style := psSolid;
+ {$ifdef USE_LCL_CANVAS}
ADest.Pen.Color := clBlack;
- ADest.TextOut(Round(CurText.X), Round(CurText.Y), CurText.Value);
+ {$else}
+ ADest.Pen.FPColor := colBlack;
+ {$endif}
+ ADest.Brush.Style := bsClear;
+ LowerDim.Y := CurText.Y + CurText.FontSize;
+ ADest.TextOut(CoordToCanvasX(CurText.X), CoordToCanvasY(LowerDim.Y), CurText.Value);
end;
{$ifdef FPVECTORIALDEBUG}
diff --git a/packages/gdbint/src/gdbint.pp b/packages/gdbint/src/gdbint.pp
index 60d651e4b5..ab2bc6911d 100644
--- a/packages/gdbint/src/gdbint.pp
+++ b/packages/gdbint/src/gdbint.pp
@@ -120,16 +120,28 @@ interface
{$define GDB_HAS_BP_NONE}
{$endif def GDB_V608}
+{ 7.3.x }
+{$ifdef GDB_V703}
+ {$info using gdb 7.3.x}
+ {$define GDB_V7}
+ {$define GDB_BP_LOCATION_HAS_GDBARCH}
+ {$define GDB_HAS_PROGRAM_SPACE}
+{$endif def GDB_V702}
+
{ 7.2.x }
{$ifdef GDB_V702}
{$info using gdb 7.2.x}
{$define GDB_V7}
+ {$define GDB_BP_LOCATION_HAS_GDBARCH}
+ {$define GDB_HAS_PROGRAM_SPACE}
{$endif def GDB_V702}
{ 7.1.x }
{$ifdef GDB_V701}
{$info using gdb 7.1.x}
{$define GDB_V7}
+ {$define GDB_BP_LOCATION_HAS_GDBARCH}
+ {$define GDB_HAS_PROGRAM_SPACE}
{$endif def GDB_V701}
@@ -138,6 +150,10 @@ interface
{$ifdef GDB_V700}
{$info using gdb 7.0.x}
{$define GDB_V7}
+ {$ifdef GDB_CVS}
+ {$define GDB_BP_LOCATION_HAS_GDBARCH}
+ {$define GDB_HAS_PROGRAM_SPACE}
+ {$endif GDB_CVS}
{$endif def GDB_V700}
{$ifdef GDB_V7}
@@ -157,11 +173,6 @@ interface
{$define GDB_HAS_OBSERVER_NOTIFY_BREAKPOINT_CREATED}
{$define GDB_TARGET_CLOSE_HAS_PTARGET_ARG}
{$define GDB_HAS_BP_NONE}
-
- {$ifdef GDB_CVS}
- {$define GDB_BP_LOCATION_HAS_GDBARCH}
- {$define GDB_HAS_PROGRAM_SPACE}
- {$endif GDB_CVS}
{$endif def GDB_V7}
@@ -2762,7 +2773,11 @@ var
begin
for i:=0 to frame_size-1 do
dispose(frames[i],done);
- freemem(frames,sizeof(pointer)*Frame_size);
+ if assigned(frames) then
+ begin
+ freemem(frames,sizeof(pointer)*Frame_size);
+ frames:=nil;
+ end;
frame_count:=0;
frame_size:=0;
end;
diff --git a/packages/libogcfpc/Makefile.fpc b/packages/libogcfpc/Makefile.fpc
index 59572ce330..e22673f440 100644
--- a/packages/libogcfpc/Makefile.fpc
+++ b/packages/libogcfpc/Makefile.fpc
@@ -27,7 +27,7 @@ cpu=powerpc
target=wii
fpcdir=../..
-[require]
+[require]
nortl=y
[shared]
diff --git a/packages/libogcfpc/examples/devices/Makefile b/packages/libogcfpc/examples/devices/Makefile
index 3fbde4960e..a5def5a6d0 100644
--- a/packages/libogcfpc/examples/devices/Makefile
+++ b/packages/libogcfpc/examples/devices/Makefile
@@ -265,7 +265,7 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_DIRS+=network usbgecko usbkeyboard
+override TARGET_DIRS+=network usbkeyboard usbgecko
endif
override INSTALL_FPCPACKAGE=y
ifdef REQUIRE_UNITSDIR
@@ -1417,8 +1417,8 @@ fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2
fpc_makefiles: fpc_makefile fpc_makefile_dirs
ifeq ($(FULL_TARGET),powerpc-wii)
TARGET_DIRS_NETWORK=1
-TARGET_DIRS_USBGECKO=1
TARGET_DIRS_USBKEYBOARD=1
+TARGET_DIRS_USBGECKO=1
endif
ifdef TARGET_DIRS_NETWORK
network_all:
@@ -1465,51 +1465,6 @@ network:
$(MAKE) -C network all
.PHONY: network_all network_debug network_smart network_release network_units network_examples network_shared network_install network_sourceinstall network_exampleinstall network_distinstall network_zipinstall network_zipsourceinstall network_zipexampleinstall network_zipdistinstall network_clean network_distclean network_cleanall network_info network_makefiles network
endif
-ifdef TARGET_DIRS_USBGECKO
-usbgecko_all:
- $(MAKE) -C usbgecko all
-usbgecko_debug:
- $(MAKE) -C usbgecko debug
-usbgecko_smart:
- $(MAKE) -C usbgecko smart
-usbgecko_release:
- $(MAKE) -C usbgecko release
-usbgecko_units:
- $(MAKE) -C usbgecko units
-usbgecko_examples:
- $(MAKE) -C usbgecko examples
-usbgecko_shared:
- $(MAKE) -C usbgecko shared
-usbgecko_install:
- $(MAKE) -C usbgecko install
-usbgecko_sourceinstall:
- $(MAKE) -C usbgecko sourceinstall
-usbgecko_exampleinstall:
- $(MAKE) -C usbgecko exampleinstall
-usbgecko_distinstall:
- $(MAKE) -C usbgecko distinstall
-usbgecko_zipinstall:
- $(MAKE) -C usbgecko zipinstall
-usbgecko_zipsourceinstall:
- $(MAKE) -C usbgecko zipsourceinstall
-usbgecko_zipexampleinstall:
- $(MAKE) -C usbgecko zipexampleinstall
-usbgecko_zipdistinstall:
- $(MAKE) -C usbgecko zipdistinstall
-usbgecko_clean:
- $(MAKE) -C usbgecko clean
-usbgecko_distclean:
- $(MAKE) -C usbgecko distclean
-usbgecko_cleanall:
- $(MAKE) -C usbgecko cleanall
-usbgecko_info:
- $(MAKE) -C usbgecko info
-usbgecko_makefiles:
- $(MAKE) -C usbgecko makefiles
-usbgecko:
- $(MAKE) -C usbgecko all
-.PHONY: usbgecko_all usbgecko_debug usbgecko_smart usbgecko_release usbgecko_units usbgecko_examples usbgecko_shared usbgecko_install usbgecko_sourceinstall usbgecko_exampleinstall usbgecko_distinstall usbgecko_zipinstall usbgecko_zipsourceinstall usbgecko_zipexampleinstall usbgecko_zipdistinstall usbgecko_clean usbgecko_distclean usbgecko_cleanall usbgecko_info usbgecko_makefiles usbgecko
-endif
ifdef TARGET_DIRS_USBKEYBOARD
usbkeyboard_all:
$(MAKE) -C usbkeyboard all
@@ -1555,6 +1510,51 @@ usbkeyboard:
$(MAKE) -C usbkeyboard all
.PHONY: usbkeyboard_all usbkeyboard_debug usbkeyboard_smart usbkeyboard_release usbkeyboard_units usbkeyboard_examples usbkeyboard_shared usbkeyboard_install usbkeyboard_sourceinstall usbkeyboard_exampleinstall usbkeyboard_distinstall usbkeyboard_zipinstall usbkeyboard_zipsourceinstall usbkeyboard_zipexampleinstall usbkeyboard_zipdistinstall usbkeyboard_clean usbkeyboard_distclean usbkeyboard_cleanall usbkeyboard_info usbkeyboard_makefiles usbkeyboard
endif
+ifdef TARGET_DIRS_USBGECKO
+usbgecko_all:
+ $(MAKE) -C usbgecko all
+usbgecko_debug:
+ $(MAKE) -C usbgecko debug
+usbgecko_smart:
+ $(MAKE) -C usbgecko smart
+usbgecko_release:
+ $(MAKE) -C usbgecko release
+usbgecko_units:
+ $(MAKE) -C usbgecko units
+usbgecko_examples:
+ $(MAKE) -C usbgecko examples
+usbgecko_shared:
+ $(MAKE) -C usbgecko shared
+usbgecko_install:
+ $(MAKE) -C usbgecko install
+usbgecko_sourceinstall:
+ $(MAKE) -C usbgecko sourceinstall
+usbgecko_exampleinstall:
+ $(MAKE) -C usbgecko exampleinstall
+usbgecko_distinstall:
+ $(MAKE) -C usbgecko distinstall
+usbgecko_zipinstall:
+ $(MAKE) -C usbgecko zipinstall
+usbgecko_zipsourceinstall:
+ $(MAKE) -C usbgecko zipsourceinstall
+usbgecko_zipexampleinstall:
+ $(MAKE) -C usbgecko zipexampleinstall
+usbgecko_zipdistinstall:
+ $(MAKE) -C usbgecko zipdistinstall
+usbgecko_clean:
+ $(MAKE) -C usbgecko clean
+usbgecko_distclean:
+ $(MAKE) -C usbgecko distclean
+usbgecko_cleanall:
+ $(MAKE) -C usbgecko cleanall
+usbgecko_info:
+ $(MAKE) -C usbgecko info
+usbgecko_makefiles:
+ $(MAKE) -C usbgecko makefiles
+usbgecko:
+ $(MAKE) -C usbgecko all
+.PHONY: usbgecko_all usbgecko_debug usbgecko_smart usbgecko_release usbgecko_units usbgecko_examples usbgecko_shared usbgecko_install usbgecko_sourceinstall usbgecko_exampleinstall usbgecko_distinstall usbgecko_zipinstall usbgecko_zipsourceinstall usbgecko_zipexampleinstall usbgecko_zipdistinstall usbgecko_clean usbgecko_distclean usbgecko_cleanall usbgecko_info usbgecko_makefiles usbgecko
+endif
all: $(addsuffix _all,$(TARGET_DIRS))
debug: $(addsuffix _debug,$(TARGET_DIRS))
smart: $(addsuffix _smart,$(TARGET_DIRS))
diff --git a/packages/libogcfpc/examples/devices/Makefile.fpc b/packages/libogcfpc/examples/devices/Makefile.fpc
index 34b9e012ff..79c7e6ca90 100644
--- a/packages/libogcfpc/examples/devices/Makefile.fpc
+++ b/packages/libogcfpc/examples/devices/Makefile.fpc
@@ -3,7 +3,7 @@
#
[target]
-dirs=network usbgecko usbkeyboard
+dirs=network usbkeyboard usbgecko
[require]
packages=libogcfpc
diff --git a/packages/libogcfpc/examples/devices/network/Makefile b/packages/libogcfpc/examples/devices/network/Makefile
index ce39ce525b..49b8b2df9a 100644
--- a/packages/libogcfpc/examples/devices/network/Makefile
+++ b/packages/libogcfpc/examples/devices/network/Makefile
@@ -100,8 +100,6 @@ endif
endif
export ECHO
endif
-override OS_TARGET_DEFAULT=wii
-override CPU_TARGET_DEFAULT=powerpc
override DEFAULT_FPCDIR=../../../../..
ifndef FPC
ifdef PP
@@ -266,25 +264,10 @@ ifeq ($(UNITSDIR),)
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
-BUILD = build
-INC = inc
-DATA = data
-TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_PROGRAMS+=sockettest
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override CLEAN_UNITS+=*
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override CLEAN_FILES+=*.elf *.o *.s *.h *.bin *.map $(BUILD)/* $(INC)/*
+override TARGET_DIRS+=sockettest
endif
override INSTALL_FPCPACKAGE=y
-ifeq ($(FULL_TARGET),powerpc-wii)
-override COMPILER_OPTIONS+=-g -Xm
-endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@@ -1249,171 +1232,10 @@ 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))
@@ -1593,82 +1415,76 @@ 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
-ifndef BIN2S
-BIN2S:=$(strip $(wildcard $(addsuffix /bin2s$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(BIN2S),)
-BIN2S= __missing_command_BIN2S
-else
-BIN2S:=$(firstword $(BIN2S))
-endif
-endif
-export BIN2S
-ifndef RMDIR
-RMDIR:=$(strip $(wildcard $(addsuffix /rmdir$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(RMDIR),)
-RMDIR= __missing_command_RMDIR
-else
-RMDIR:=$(firstword $(RMDIR))
-endif
-endif
-export RMDIR
-ifndef GXTEXCONV
-GXTEXCONV:=$(strip $(wildcard $(addsuffix /gxtexconv$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(GXTEXCONV),)
-GXTEXCONV= __missing_command_GXTEXCONV
-else
-GXTEXCONV:=$(firstword $(GXTEXCONV))
-endif
-endif
-export GXTEXCONV
-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:
-distclean: fpc_distclean
-cleanall: fpc_cleanall
+ifeq ($(FULL_TARGET),powerpc-wii)
+TARGET_DIRS_SOCKETTEST=1
+endif
+ifdef TARGET_DIRS_SOCKETTEST
+sockettest_all:
+ $(MAKE) -C sockettest all
+sockettest_debug:
+ $(MAKE) -C sockettest debug
+sockettest_smart:
+ $(MAKE) -C sockettest smart
+sockettest_release:
+ $(MAKE) -C sockettest release
+sockettest_units:
+ $(MAKE) -C sockettest units
+sockettest_examples:
+ $(MAKE) -C sockettest examples
+sockettest_shared:
+ $(MAKE) -C sockettest shared
+sockettest_install:
+ $(MAKE) -C sockettest install
+sockettest_sourceinstall:
+ $(MAKE) -C sockettest sourceinstall
+sockettest_exampleinstall:
+ $(MAKE) -C sockettest exampleinstall
+sockettest_distinstall:
+ $(MAKE) -C sockettest distinstall
+sockettest_zipinstall:
+ $(MAKE) -C sockettest zipinstall
+sockettest_zipsourceinstall:
+ $(MAKE) -C sockettest zipsourceinstall
+sockettest_zipexampleinstall:
+ $(MAKE) -C sockettest zipexampleinstall
+sockettest_zipdistinstall:
+ $(MAKE) -C sockettest zipdistinstall
+sockettest_clean:
+ $(MAKE) -C sockettest clean
+sockettest_distclean:
+ $(MAKE) -C sockettest distclean
+sockettest_cleanall:
+ $(MAKE) -C sockettest cleanall
+sockettest_info:
+ $(MAKE) -C sockettest info
+sockettest_makefiles:
+ $(MAKE) -C sockettest makefiles
+sockettest:
+ $(MAKE) -C sockettest all
+.PHONY: sockettest_all sockettest_debug sockettest_smart sockettest_release sockettest_units sockettest_examples sockettest_shared sockettest_install sockettest_sourceinstall sockettest_exampleinstall sockettest_distinstall sockettest_zipinstall sockettest_zipsourceinstall sockettest_zipexampleinstall sockettest_zipdistinstall sockettest_clean sockettest_distclean sockettest_cleanall sockettest_info sockettest_makefiles sockettest
+endif
+all: $(addsuffix _all,$(TARGET_DIRS))
+debug: $(addsuffix _debug,$(TARGET_DIRS))
+smart: $(addsuffix _smart,$(TARGET_DIRS))
+release: $(addsuffix _release,$(TARGET_DIRS))
+units: $(addsuffix _units,$(TARGET_DIRS))
+examples: $(addsuffix _examples,$(TARGET_DIRS))
+shared: $(addsuffix _shared,$(TARGET_DIRS))
+install: $(addsuffix _install,$(TARGET_DIRS))
+sourceinstall: $(addsuffix _sourceinstall,$(TARGET_DIRS))
+exampleinstall: $(addsuffix _exampleinstall,$(TARGET_DIRS))
+distinstall: $(addsuffix _distinstall,$(TARGET_DIRS))
+zipinstall: $(addsuffix _zipinstall,$(TARGET_DIRS))
+zipsourceinstall: $(addsuffix _zipsourceinstall,$(TARGET_DIRS))
+zipexampleinstall: $(addsuffix _zipexampleinstall,$(TARGET_DIRS))
+zipdistinstall: $(addsuffix _zipdistinstall,$(TARGET_DIRS))
+clean: $(addsuffix _clean,$(TARGET_DIRS))
+distclean: $(addsuffix _distclean,$(TARGET_DIRS))
+cleanall: $(addsuffix _cleanall,$(TARGET_DIRS))
info: fpc_info
-makefiles: fpc_makefiles
-.PHONY: debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
+makefiles: fpc_makefiles $(addsuffix _makefiles,$(TARGET_DIRS))
+.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
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
-dir_delete:
- @$(DELTREE) $(CURDIR)/$(BUILD)
- @$(DELTREE) $(CURDIR)/$(INC)
-dir_make:
-ifneq ($(BUILD), $(CURDIR))
- @$(MKDIR) $(BUILD)
-endif
-ifneq ($(INC), $(CURDIR))
- @$(MKDIR) $(INC)
-endif
-ifneq ($(DATA), $(CURDIR))
- @$(MKDIR) $(DATA)
-endif
-$(TPL_FILES): $(wildcard %.scf)
- @echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
- @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
diff --git a/packages/libogcfpc/examples/devices/network/Makefile.fpc b/packages/libogcfpc/examples/devices/network/Makefile.fpc
index 4efa10a9ce..638eb95cc6 100644
--- a/packages/libogcfpc/examples/devices/network/Makefile.fpc
+++ b/packages/libogcfpc/examples/devices/network/Makefile.fpc
@@ -12,7 +12,7 @@ packages=libogcfpc
fpcpackage=y
[default]
-fpcdir=../../../..
+fpcdir=../../../../..
[rules]
.NOTPARALLEL:
diff --git a/packages/libogcfpc/examples/devices/usbgecko/Makefile b/packages/libogcfpc/examples/devices/usbgecko/Makefile
index 78568ff95a..00745f8599 100644
--- a/packages/libogcfpc/examples/devices/usbgecko/Makefile
+++ b/packages/libogcfpc/examples/devices/usbgecko/Makefile
@@ -100,8 +100,6 @@ endif
endif
export ECHO
endif
-override OS_TARGET_DEFAULT=wii
-override CPU_TARGET_DEFAULT=powerpc
override DEFAULT_FPCDIR=../../../../..
ifndef FPC
ifdef PP
@@ -266,25 +264,10 @@ ifeq ($(UNITSDIR),)
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
-BUILD = build
-INC = inc
-DATA = data
-TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_PROGRAMS+=gdbstub
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override CLEAN_UNITS+=*
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override CLEAN_FILES+=*.elf *.o *.s *.h *.bin *.map $(BUILD)/* $(INC)/*
+override TARGET_DIRS+=gdbstub
endif
override INSTALL_FPCPACKAGE=y
-ifeq ($(FULL_TARGET),powerpc-wii)
-override COMPILER_OPTIONS+=-g -Xm
-endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@@ -1249,171 +1232,10 @@ 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))
@@ -1593,82 +1415,76 @@ 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
-ifndef BIN2S
-BIN2S:=$(strip $(wildcard $(addsuffix /bin2s$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(BIN2S),)
-BIN2S= __missing_command_BIN2S
-else
-BIN2S:=$(firstword $(BIN2S))
-endif
-endif
-export BIN2S
-ifndef RMDIR
-RMDIR:=$(strip $(wildcard $(addsuffix /rmdir$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(RMDIR),)
-RMDIR= __missing_command_RMDIR
-else
-RMDIR:=$(firstword $(RMDIR))
-endif
-endif
-export RMDIR
-ifndef GXTEXCONV
-GXTEXCONV:=$(strip $(wildcard $(addsuffix /gxtexconv$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(GXTEXCONV),)
-GXTEXCONV= __missing_command_GXTEXCONV
-else
-GXTEXCONV:=$(firstword $(GXTEXCONV))
-endif
-endif
-export GXTEXCONV
-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:
-distclean: fpc_distclean
-cleanall: fpc_cleanall
+ifeq ($(FULL_TARGET),powerpc-wii)
+TARGET_DIRS_GDBSTUB=1
+endif
+ifdef TARGET_DIRS_GDBSTUB
+gdbstub_all:
+ $(MAKE) -C gdbstub all
+gdbstub_debug:
+ $(MAKE) -C gdbstub debug
+gdbstub_smart:
+ $(MAKE) -C gdbstub smart
+gdbstub_release:
+ $(MAKE) -C gdbstub release
+gdbstub_units:
+ $(MAKE) -C gdbstub units
+gdbstub_examples:
+ $(MAKE) -C gdbstub examples
+gdbstub_shared:
+ $(MAKE) -C gdbstub shared
+gdbstub_install:
+ $(MAKE) -C gdbstub install
+gdbstub_sourceinstall:
+ $(MAKE) -C gdbstub sourceinstall
+gdbstub_exampleinstall:
+ $(MAKE) -C gdbstub exampleinstall
+gdbstub_distinstall:
+ $(MAKE) -C gdbstub distinstall
+gdbstub_zipinstall:
+ $(MAKE) -C gdbstub zipinstall
+gdbstub_zipsourceinstall:
+ $(MAKE) -C gdbstub zipsourceinstall
+gdbstub_zipexampleinstall:
+ $(MAKE) -C gdbstub zipexampleinstall
+gdbstub_zipdistinstall:
+ $(MAKE) -C gdbstub zipdistinstall
+gdbstub_clean:
+ $(MAKE) -C gdbstub clean
+gdbstub_distclean:
+ $(MAKE) -C gdbstub distclean
+gdbstub_cleanall:
+ $(MAKE) -C gdbstub cleanall
+gdbstub_info:
+ $(MAKE) -C gdbstub info
+gdbstub_makefiles:
+ $(MAKE) -C gdbstub makefiles
+gdbstub:
+ $(MAKE) -C gdbstub all
+.PHONY: gdbstub_all gdbstub_debug gdbstub_smart gdbstub_release gdbstub_units gdbstub_examples gdbstub_shared gdbstub_install gdbstub_sourceinstall gdbstub_exampleinstall gdbstub_distinstall gdbstub_zipinstall gdbstub_zipsourceinstall gdbstub_zipexampleinstall gdbstub_zipdistinstall gdbstub_clean gdbstub_distclean gdbstub_cleanall gdbstub_info gdbstub_makefiles gdbstub
+endif
+all: $(addsuffix _all,$(TARGET_DIRS))
+debug: $(addsuffix _debug,$(TARGET_DIRS))
+smart: $(addsuffix _smart,$(TARGET_DIRS))
+release: $(addsuffix _release,$(TARGET_DIRS))
+units: $(addsuffix _units,$(TARGET_DIRS))
+examples: $(addsuffix _examples,$(TARGET_DIRS))
+shared: $(addsuffix _shared,$(TARGET_DIRS))
+install: $(addsuffix _install,$(TARGET_DIRS))
+sourceinstall: $(addsuffix _sourceinstall,$(TARGET_DIRS))
+exampleinstall: $(addsuffix _exampleinstall,$(TARGET_DIRS))
+distinstall: $(addsuffix _distinstall,$(TARGET_DIRS))
+zipinstall: $(addsuffix _zipinstall,$(TARGET_DIRS))
+zipsourceinstall: $(addsuffix _zipsourceinstall,$(TARGET_DIRS))
+zipexampleinstall: $(addsuffix _zipexampleinstall,$(TARGET_DIRS))
+zipdistinstall: $(addsuffix _zipdistinstall,$(TARGET_DIRS))
+clean: $(addsuffix _clean,$(TARGET_DIRS))
+distclean: $(addsuffix _distclean,$(TARGET_DIRS))
+cleanall: $(addsuffix _cleanall,$(TARGET_DIRS))
info: fpc_info
-makefiles: fpc_makefiles
-.PHONY: debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
+makefiles: fpc_makefiles $(addsuffix _makefiles,$(TARGET_DIRS))
+.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
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
-dir_delete:
- @$(DELTREE) $(CURDIR)/$(BUILD)
- @$(DELTREE) $(CURDIR)/$(INC)
-dir_make:
-ifneq ($(BUILD), $(CURDIR))
- @$(MKDIR) $(BUILD)
-endif
-ifneq ($(INC), $(CURDIR))
- @$(MKDIR) $(INC)
-endif
-ifneq ($(DATA), $(CURDIR))
- @$(MKDIR) $(DATA)
-endif
-$(TPL_FILES): $(wildcard %.scf)
- @echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
- @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
diff --git a/packages/libogcfpc/examples/devices/usbgecko/Makefile.fpc b/packages/libogcfpc/examples/devices/usbgecko/Makefile.fpc
index e2fab919b0..cb03ed235d 100644
--- a/packages/libogcfpc/examples/devices/usbgecko/Makefile.fpc
+++ b/packages/libogcfpc/examples/devices/usbgecko/Makefile.fpc
@@ -12,7 +12,7 @@ packages=libogcfpc
fpcpackage=y
[default]
-fpcdir=../../../..
+fpcdir=../../../../..
[rules]
.NOTPARALLEL:
diff --git a/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile b/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile
index 5dc815f6a8..f4c0130786 100644
--- a/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile
+++ b/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile
@@ -283,7 +283,7 @@ override CLEAN_FILES+=*.elf *.o *.s *.h *.bin *.map $(BUILD)/* $(INC)/*
endif
override INSTALL_FPCPACKAGE=y
ifeq ($(FULL_TARGET),powerpc-wii)
-override COMPILER_OPTIONS+=-g -Xm
+override COMPILER_OPTIONS+=-g -Xm -k--gc-sections
endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
diff --git a/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile.fpc b/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile.fpc
index 663e5ecc99..271ccac6fa 100644
--- a/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile.fpc
+++ b/packages/libogcfpc/examples/devices/usbgecko/gdbstub/Makefile.fpc
@@ -20,7 +20,7 @@ target=wii
fpcdir=../../../../../..
[compiler]
-options=-g -Xm
+options=-g -Xm -k--gc-sections
[clean]
files=*.elf *.o *.s *.h *.bin *.map \
diff --git a/packages/libogcfpc/examples/devices/usbkeyboard/Makefile b/packages/libogcfpc/examples/devices/usbkeyboard/Makefile
index 03533187c9..f65f03b190 100644
--- a/packages/libogcfpc/examples/devices/usbkeyboard/Makefile
+++ b/packages/libogcfpc/examples/devices/usbkeyboard/Makefile
@@ -100,8 +100,6 @@ endif
endif
export ECHO
endif
-override OS_TARGET_DEFAULT=wii
-override CPU_TARGET_DEFAULT=powerpc
override DEFAULT_FPCDIR=../../../../..
ifndef FPC
ifdef PP
@@ -266,25 +264,10 @@ ifeq ($(UNITSDIR),)
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
-BUILD = build
-INC = inc
-DATA = data
-TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_PROGRAMS+=basic_stdin
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override CLEAN_UNITS+=*
-endif
-ifeq ($(FULL_TARGET),powerpc-wii)
-override CLEAN_FILES+=*.elf *.o *.s *.h *.bin *.map $(BUILD)/* $(INC)/*
+override TARGET_DIRS+=basic_stdin
endif
override INSTALL_FPCPACKAGE=y
-ifeq ($(FULL_TARGET),powerpc-wii)
-override COMPILER_OPTIONS+=-g -Xm
-endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@@ -1249,171 +1232,10 @@ 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))
@@ -1593,82 +1415,76 @@ 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
-ifndef BIN2S
-BIN2S:=$(strip $(wildcard $(addsuffix /bin2s$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(BIN2S),)
-BIN2S= __missing_command_BIN2S
-else
-BIN2S:=$(firstword $(BIN2S))
-endif
-endif
-export BIN2S
-ifndef RMDIR
-RMDIR:=$(strip $(wildcard $(addsuffix /rmdir$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(RMDIR),)
-RMDIR= __missing_command_RMDIR
-else
-RMDIR:=$(firstword $(RMDIR))
-endif
-endif
-export RMDIR
-ifndef GXTEXCONV
-GXTEXCONV:=$(strip $(wildcard $(addsuffix /gxtexconv$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(GXTEXCONV),)
-GXTEXCONV= __missing_command_GXTEXCONV
-else
-GXTEXCONV:=$(firstword $(GXTEXCONV))
-endif
-endif
-export GXTEXCONV
-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:
-distclean: fpc_distclean
-cleanall: fpc_cleanall
+ifeq ($(FULL_TARGET),powerpc-wii)
+TARGET_DIRS_BASIC_STDIN=1
+endif
+ifdef TARGET_DIRS_BASIC_STDIN
+basic_stdin_all:
+ $(MAKE) -C basic_stdin all
+basic_stdin_debug:
+ $(MAKE) -C basic_stdin debug
+basic_stdin_smart:
+ $(MAKE) -C basic_stdin smart
+basic_stdin_release:
+ $(MAKE) -C basic_stdin release
+basic_stdin_units:
+ $(MAKE) -C basic_stdin units
+basic_stdin_examples:
+ $(MAKE) -C basic_stdin examples
+basic_stdin_shared:
+ $(MAKE) -C basic_stdin shared
+basic_stdin_install:
+ $(MAKE) -C basic_stdin install
+basic_stdin_sourceinstall:
+ $(MAKE) -C basic_stdin sourceinstall
+basic_stdin_exampleinstall:
+ $(MAKE) -C basic_stdin exampleinstall
+basic_stdin_distinstall:
+ $(MAKE) -C basic_stdin distinstall
+basic_stdin_zipinstall:
+ $(MAKE) -C basic_stdin zipinstall
+basic_stdin_zipsourceinstall:
+ $(MAKE) -C basic_stdin zipsourceinstall
+basic_stdin_zipexampleinstall:
+ $(MAKE) -C basic_stdin zipexampleinstall
+basic_stdin_zipdistinstall:
+ $(MAKE) -C basic_stdin zipdistinstall
+basic_stdin_clean:
+ $(MAKE) -C basic_stdin clean
+basic_stdin_distclean:
+ $(MAKE) -C basic_stdin distclean
+basic_stdin_cleanall:
+ $(MAKE) -C basic_stdin cleanall
+basic_stdin_info:
+ $(MAKE) -C basic_stdin info
+basic_stdin_makefiles:
+ $(MAKE) -C basic_stdin makefiles
+basic_stdin:
+ $(MAKE) -C basic_stdin all
+.PHONY: basic_stdin_all basic_stdin_debug basic_stdin_smart basic_stdin_release basic_stdin_units basic_stdin_examples basic_stdin_shared basic_stdin_install basic_stdin_sourceinstall basic_stdin_exampleinstall basic_stdin_distinstall basic_stdin_zipinstall basic_stdin_zipsourceinstall basic_stdin_zipexampleinstall basic_stdin_zipdistinstall basic_stdin_clean basic_stdin_distclean basic_stdin_cleanall basic_stdin_info basic_stdin_makefiles basic_stdin
+endif
+all: $(addsuffix _all,$(TARGET_DIRS))
+debug: $(addsuffix _debug,$(TARGET_DIRS))
+smart: $(addsuffix _smart,$(TARGET_DIRS))
+release: $(addsuffix _release,$(TARGET_DIRS))
+units: $(addsuffix _units,$(TARGET_DIRS))
+examples: $(addsuffix _examples,$(TARGET_DIRS))
+shared: $(addsuffix _shared,$(TARGET_DIRS))
+install: $(addsuffix _install,$(TARGET_DIRS))
+sourceinstall: $(addsuffix _sourceinstall,$(TARGET_DIRS))
+exampleinstall: $(addsuffix _exampleinstall,$(TARGET_DIRS))
+distinstall: $(addsuffix _distinstall,$(TARGET_DIRS))
+zipinstall: $(addsuffix _zipinstall,$(TARGET_DIRS))
+zipsourceinstall: $(addsuffix _zipsourceinstall,$(TARGET_DIRS))
+zipexampleinstall: $(addsuffix _zipexampleinstall,$(TARGET_DIRS))
+zipdistinstall: $(addsuffix _zipdistinstall,$(TARGET_DIRS))
+clean: $(addsuffix _clean,$(TARGET_DIRS))
+distclean: $(addsuffix _distclean,$(TARGET_DIRS))
+cleanall: $(addsuffix _cleanall,$(TARGET_DIRS))
info: fpc_info
-makefiles: fpc_makefiles
-.PHONY: debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
+makefiles: fpc_makefiles $(addsuffix _makefiles,$(TARGET_DIRS))
+.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
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
-dir_delete:
- @$(DELTREE) $(CURDIR)/$(BUILD)
- @$(DELTREE) $(CURDIR)/$(INC)
-dir_make:
-ifneq ($(BUILD), $(CURDIR))
- @$(MKDIR) $(BUILD)
-endif
-ifneq ($(INC), $(CURDIR))
- @$(MKDIR) $(INC)
-endif
-ifneq ($(DATA), $(CURDIR))
- @$(MKDIR) $(DATA)
-endif
-$(TPL_FILES): $(wildcard %.scf)
- @echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
- @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
diff --git a/packages/libogcfpc/examples/devices/usbkeyboard/Makefile.fpc b/packages/libogcfpc/examples/devices/usbkeyboard/Makefile.fpc
index 0790db9766..257dd468e4 100644
--- a/packages/libogcfpc/examples/devices/usbkeyboard/Makefile.fpc
+++ b/packages/libogcfpc/examples/devices/usbkeyboard/Makefile.fpc
@@ -12,7 +12,7 @@ packages=libogcfpc
fpcpackage=y
[default]
-fpcdir=../../../..
+fpcdir=../../../../..
[rules]
.NOTPARALLEL:
diff --git a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
index 4dbac1a020..fe85b79baf 100644
--- a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile
@@ -270,8 +270,8 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
ifeq ($(FULL_TARGET),powerpc-wii)
override TARGET_PROGRAMS+=gxsprites
endif
@@ -1643,10 +1643,12 @@ ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
dir_make:
ifneq ($(BUILD), $(CURDIR))
@@ -1658,17 +1660,16 @@ endif
ifneq ($(DATA), $(CURDIR))
@$(MKDIR) $(DATA)
endif
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef
diff --git a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile.fpc b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile.fpc
index 49e1be6c9c..011ae4086f 100644
--- a/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile.fpc
+++ b/packages/libogcfpc/examples/graphics/gx/gxSprites/Makefile.fpc
@@ -3,7 +3,7 @@
#
[target]
-loaders=
+loaders=
programs=gxsprites
[require]
@@ -33,19 +33,21 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
[rules]
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
#
# Delete temp directories
#
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
#
@@ -65,22 +67,21 @@ endif
#
# Textures processing rule
#
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+
-
#
# Binary files processing rule
#
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef \ No newline at end of file
diff --git a/packages/libogcfpc/examples/graphics/gx/gxSprites/gxsprites.pp b/packages/libogcfpc/examples/graphics/gx/gxSprites/gxsprites.pp
index 64c35c9095..013a3ae6d0 100644
--- a/packages/libogcfpc/examples/graphics/gx/gxSprites/gxsprites.pp
+++ b/packages/libogcfpc/examples/graphics/gx/gxSprites/gxsprites.pp
@@ -5,7 +5,7 @@ program gxsprites;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
{$include inc/textures.tpl.inc}
{$link build/textures.tpl.o}
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/lesson1.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/lesson1.pp
index f18cb4df9b..1169a3b22d 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/lesson1.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson1/lesson1.pp
@@ -4,7 +4,7 @@ program lesson1;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
const
DEFAULT_FIFO_SIZE = (256*1024);
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/lesson2.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/lesson2.pp
index fcc7bd712e..b171f550ff 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/lesson2.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson2/lesson2.pp
@@ -4,7 +4,7 @@ program lesson2;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
const
DEFAULT_FIFO_SIZE = (256*1024);
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/lesson3.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/lesson3.pp
index ece9cfa5c1..a369133316 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/lesson3.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson3/lesson3.pp
@@ -4,7 +4,7 @@ program lesson3;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
const
DEFAULT_FIFO_SIZE = (256*1024);
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/lesson4.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/lesson4.pp
index f3094bdc84..b66a00f197 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/lesson4.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson4/lesson4.pp
@@ -5,7 +5,7 @@ program lesson4;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
const
DEFAULT_FIFO_SIZE = (256 * 1024);
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/lesson5.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/lesson5.pp
index 5c1264becd..0affebedce 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/lesson5.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson5/lesson5.pp
@@ -5,7 +5,7 @@ program lesson5;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
const
DEFAULT_FIFO_SIZE = (256 * 1024);
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
index 2109732b40..a76476280b 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile
@@ -270,8 +270,8 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
ifeq ($(FULL_TARGET),powerpc-wii)
override TARGET_PROGRAMS+=lesson6
endif
@@ -1643,10 +1643,12 @@ ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
dir_make:
ifneq ($(BUILD), $(CURDIR))
@@ -1658,17 +1660,16 @@ endif
ifneq ($(DATA), $(CURDIR))
@$(MKDIR) $(DATA)
endif
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile.fpc b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile.fpc
index 69cd9ed05c..8ccdc2fdee 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile.fpc
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/Makefile.fpc
@@ -33,19 +33,21 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
[rules]
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
#
# Delete temp directories
#
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
#
@@ -65,22 +67,21 @@ endif
#
# Textures processing rule
#
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+
-
#
# Binary files processing rule
#
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef \ No newline at end of file
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/lesson6.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/lesson6.pp
index d173dd6523..6bbb38c43d 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/lesson6.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson6/lesson6.pp
@@ -5,7 +5,7 @@ program lesson6;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
{$include inc/NeHe.tpl.inc}
{$link build/NeHe.tpl.o}
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
index 4a96e70452..97a1d91878 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile
@@ -270,8 +270,8 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
ifeq ($(FULL_TARGET),powerpc-wii)
override TARGET_PROGRAMS+=lesson7
endif
@@ -1643,10 +1643,12 @@ ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
dir_make:
ifneq ($(BUILD), $(CURDIR))
@@ -1658,17 +1660,16 @@ endif
ifneq ($(DATA), $(CURDIR))
@$(MKDIR) $(DATA)
endif
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile.fpc b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile.fpc
index bd84d8ff82..020677d8dc 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile.fpc
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/Makefile.fpc
@@ -33,19 +33,21 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
[rules]
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
#
# Delete temp directories
#
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
#
@@ -65,22 +67,21 @@ endif
#
# Textures processing rule
#
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+
-
#
# Binary files processing rule
#
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef \ No newline at end of file
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/lesson7.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/lesson7.pp
index 91a467637b..c242d98a39 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/lesson7.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson7/lesson7.pp
@@ -5,7 +5,7 @@ program lesson7;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
{$include inc/crate.tpl.inc}
{$link build/crate.tpl.o}
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
index 29e5c3138d..db45651d12 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile
@@ -270,8 +270,8 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
ifeq ($(FULL_TARGET),powerpc-wii)
override TARGET_PROGRAMS+=lesson8
endif
@@ -1643,10 +1643,12 @@ ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
dir_make:
ifneq ($(BUILD), $(CURDIR))
@@ -1658,17 +1660,16 @@ endif
ifneq ($(DATA), $(CURDIR))
@$(MKDIR) $(DATA)
endif
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile.fpc b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile.fpc
index db4dd3d865..d79da2de96 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile.fpc
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/Makefile.fpc
@@ -33,19 +33,21 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
[rules]
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
#
# Delete temp directories
#
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
#
@@ -65,22 +67,21 @@ endif
#
# Textures processing rule
#
-$(TPL_FILES): $(wildcard %.scf)
+$(TPL_FILES):
@echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+
-
#
# Binary files processing rule
#
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
@$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef \ No newline at end of file
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/lesson8.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/lesson8.pp
index b593823b2e..54092eb946 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/lesson8.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson8/lesson8.pp
@@ -5,7 +5,7 @@ program lesson8;
{$mode objfpc}
uses
- cmem, ctypes, gccore, math;
+ cmem, ctypes, gctypes, gccore, math;
{$include inc/glass.tpl.inc}
{$link build/glass.tpl.o}
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
index a0a16c774c..3b3dcdb190 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile
@@ -270,8 +270,8 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
ifeq ($(FULL_TARGET),powerpc-wii)
override TARGET_PROGRAMS+=lesson9
endif
@@ -1643,10 +1643,12 @@ ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
dir_make:
ifneq ($(BUILD), $(CURDIR))
@@ -1658,17 +1660,16 @@ endif
ifneq ($(DATA), $(CURDIR))
@$(MKDIR) $(DATA)
endif
-$(TPL_FILES): $(wildcard %.scf)
- @echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
- @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+$(TPL_FILES):
+ @echo 'Creating tpl file...'
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
+ @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile.fpc b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile.fpc
index 01a9f2992b..99d0c55c90 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile.fpc
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/Makefile.fpc
@@ -33,19 +33,21 @@ BUILD = build
INC = inc
DATA = data
TEXTURES = textures
-TPL_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
-BIN_FILES = $(foreach dir,data,$(notdir $(wildcard $(dir)/*)))
+SCF_FILES = $(foreach dir,textures,$(notdir $(wildcard $(dir)/*.scf)))
+TPL_FILES = $(basename $(SCF_FILES)).tpl
[rules]
.NOTPARALLEL:
-clean: dir_delete fpc_clean fpc_cleanall
-all: dir_make $(TPL_FILES) $(BIN_FILES) fpc_all
+.PHONY: clean all
+clean: dir_delete fpc_clean fpc_cleanall
+all: dir_make $(TPL_FILES) fpc_all
#
# Delete temp directories
#
dir_delete:
@$(DELTREE) $(CURDIR)/$(BUILD)
+ @$(DELTREE) $(CURDIR)/$(DATA)
@$(DELTREE) $(CURDIR)/$(INC)
#
@@ -65,22 +67,21 @@ endif
#
# Textures processing rule
#
-$(TPL_FILES): $(wildcard %.scf)
- @echo 'Creating tpl file...'
- $(GXTEXCONV) -s textures/$(@) -o $(DATA)/$(basename $(@)).tpl
+$(TPL_FILES):
+ @echo 'Creating tpl file...'
+ $(GXTEXCONV) -s textures/$(SCF_FILES) -o $(DATA)/$(TPL_FILES)
+ @echo $(DATA)/$(TPL_FILES)
+ @$(bin2o)
+
-
#
# Binary files processing rule
#
-$(BIN_FILES): $(wildcard %.*)
- @echo 'Converting $(@) file to asm...'
- @$(BIN2S) -a 32 data/$(@) > $(BUILD)/$(@).s
- @echo 'Creating $(@).inc include file...'
- @echo "var" > `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo "inc/"$(@F) | tr . .)`.inc
- @echo 'Assembling $(@).s file...'
- @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
- @echo 'Done!'
+define bin2o
+ @$(BIN2S) -a 32 $(DATA)/$(@) > $(BUILD)/$(@).s
+ @$(AS) -o $(BUILD)/$(@).o $(BUILD)/$(@).s
+ @echo "var" > `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end: array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`": array [0..0] of cuint8; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+ @echo " " `(echo $(@F) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size": cuint32; cvar; external;" >> `(echo $(INC)"/"$(@F) | tr . .)`.inc
+endef \ No newline at end of file
diff --git a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/lesson9.pp b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/lesson9.pp
index 4f2dd62ab6..eb81a15e14 100644
--- a/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/lesson9.pp
+++ b/packages/libogcfpc/examples/graphics/gx/neheGX/lesson9/lesson9.pp
@@ -5,7 +5,7 @@ program lesson9;
{$mode objfpc}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
{$include inc/startex.tpl.inc}
{$link build/startex.tpl.o}
diff --git a/packages/libogcfpc/examples/graphics/gx/triangle/triangle.pp b/packages/libogcfpc/examples/graphics/gx/triangle/triangle.pp
index e833a1874e..8c7b004930 100644
--- a/packages/libogcfpc/examples/graphics/gx/triangle/triangle.pp
+++ b/packages/libogcfpc/examples/graphics/gx/triangle/triangle.pp
@@ -6,7 +6,7 @@ program triangle;
{$inline on}
uses
- cmem, ctypes, gccore;
+ cmem, ctypes, gctypes, gccore;
var
framebuffer: pcuint32;
diff --git a/packages/libogcfpc/fpmake.pp b/packages/libogcfpc/fpmake.pp
index ab3e55980c..d147c23d06 100644
--- a/packages/libogcfpc/fpmake.pp
+++ b/packages/libogcfpc/fpmake.pp
@@ -18,7 +18,7 @@ begin
{$endif ALLPACKAGES}
P.Version:='2.5.1';
P.SourcePath.Add('src');
-// P.Dependencies.Add('x11');
+ P.Dependencies.Add('mad');
// not linux compilable, skip
diff --git a/packages/libogcfpc/src/gccore.inc b/packages/libogcfpc/src/gccore.inc
index 551de3e633..82160a0776 100644
--- a/packages/libogcfpc/src/gccore.inc
+++ b/packages/libogcfpc/src/gccore.inc
@@ -25,23 +25,23 @@
{$include ogc/gx_struct.inc}
{$include ogc/lwp.inc}
-{$include ogc/lwp_config.inc}
-{$include ogc/lwp_heap.inc}
-
-{$include ogc/lwp_tqdata.inc}
-{$include ogc/lwp_objmgr.inc}
-{$include ogc/lwp_priority.inc}
-{$include ogc/lwp_watchdog.inc}
-{$include ogc/lwp_threads.inc}
-
-
-{$include ogc/lwp_messages.inc}
-{$include ogc/lwp_mutex.inc}
-{$include ogc/lwp_sema.inc}
-{$include ogc/lwp_stack.inc}
-{$include ogc/lwp_states.inc}
-{$include ogc/lwp_threadq.inc}
-{$include ogc/lwp_wkspace.inc}
+ {$include ogc/lwp_config.inc}
+ {$include ogc/lwp_heap.inc}
+
+ {$include ogc/lwp_tqdata.inc}
+ {$include ogc/lwp_objmgr.inc}
+ {$include ogc/lwp_priority.inc}
+ {$include ogc/lwp_watchdog.inc}
+ {$include ogc/lwp_threads.inc} // tradurre lwp_threads.inl
+
+
+ {$include ogc/lwp_messages.inc}
+ {$include ogc/lwp_mutex.inc}
+ {$include ogc/lwp_sema.inc}
+ {$include ogc/lwp_stack.inc}
+ {$include ogc/lwp_states.inc}
+ {$include ogc/lwp_threadq.inc}
+ {$include ogc/lwp_wkspace.inc}
{$include ogc/gu.inc}
diff --git a/packages/libogcfpc/src/ogc/lwp_heap.inc b/packages/libogcfpc/src/ogc/lwp_heap.inc
index 6b5c405c04..3fb2468771 100644
--- a/packages/libogcfpc/src/ogc/lwp_heap.inc
+++ b/packages/libogcfpc/src/ogc/lwp_heap.inc
@@ -44,16 +44,10 @@ type
pheap_cntrl = ^heap_cntrl;
-function __lwp_heap_init(theheap: Pheap_cntrl; start_addr: pointer;
- size, pg_size: cuint32): cuint32; cdecl; external;
-
+function __lwp_heap_init(theheap: Pheap_cntrl; start_addr: pointer; size, pg_size: cuint32): cuint32; cdecl; external;
function __lwp_heap_allocate(theheap: Pheap_cntrl; size: cuint32): pointer; cdecl; external;
-
function __lwp_heap_free(theheap: Pheap_cntrl; ptr: pointer): cbool; cdecl; external;
-
-function __lwp_heap_getinfo(theheap: Pheap_cntrl; theinfo: Pheap_iblock)
- : cuint32; cdecl; external;
-
+function __lwp_heap_getinfo(theheap: Pheap_cntrl; theinfo: Pheap_iblock): cuint32; cdecl; external;
//{$ifdef LIBOGC_INTERNAL}
//{$include libogc/lwp_heap.inl}
@@ -61,3 +55,78 @@ function __lwp_heap_getinfo(theheap: Pheap_cntrl; theinfo: Pheap_iblock)
{$ENDIF}
+{$IFDEF OGC_IMPLEMENTATION}
+function __lwp_heap_head(theheap: pheap_cntrl): pheap_block;
+begin
+ result := theheap^.start;
+end;
+
+function __lwp_heap_tail(heap: pheap_cntrl): pheap_block;
+begin
+ result := heap^.final;
+end;
+
+function __lwp_heap_prevblock(block: pheap_block): pheap_block;
+begin
+ result := pheap_block (pcchar(block)^ - (block^.back_flag and not HEAP_BLOCK_USED));
+end;
+
+function __lwp_heap_nextblock(block: pheap_block): pheap_block;
+begin
+ result := pheap_block(pcchar(block)^ + (block^.front_flag and not HEAP_BLOCK_USED));
+end;
+
+function __lwp_heap_blockat(block: pheap_block; offset: cuint32): pheap_block;
+begin
+ result := pheap_block(pcchar(block) + offset);
+end;
+
+function __lwp_heap_usrblockat(ptr: pointer): pheap_block;
+var
+ offset: cuint32;
+begin
+ offset := (pcuint32(ptr)^ - 1);
+ result := __lwp_heap_blockat(ptr, -offset + (-HEAP_BLOCK_USED_OVERHEAD));
+end;
+
+function __lwp_heap_prev_blockfree(block: pheap_block): boolean;
+begin
+ result := (block^.back_flag and HEAP_BLOCK_USED) = 0;
+end;
+
+function __lwp_heap_blockfree(block: pheap_block): boolean;
+begin
+ result := (block^.front_flag and HEAP_BLOCK_USED) = 0;
+end;
+
+function __lwp_heap_blockused(block: pheap_block): boolean;
+begin
+ result := (block^.front_flag and HEAP_BLOCK_USED) <> 0;
+end;
+
+function __lwp_heap_blocksize(block: pheap_block): cuint32;
+begin
+ result := (block^.front_flag and not HEAP_BLOCK_USED);
+end;
+
+function __lwp_heap_startuser(block: pheap_block): pointer;
+begin
+ result := pointer(block^.next);
+end;
+
+function __lwp_heap_blockin(heap: pheap_cntrl; block: pheap_block): boolean;
+begin
+ result := ((cuint32(block) >= cuint32(heap^.start)) and (cuint32(block) <= cuint32(heap^.final)));
+end;
+
+function __lwp_heap_pgsize_valid(pgsize: cuint32): boolean;
+begin
+ result := (pgsize <> 0) and ((pgsize mod PPC_ALIGNMENT) = 0);
+end;
+
+function __lwp_heap_buildflag(size, flag: cuint32): cuint32;
+begin
+ result := (size or flag);
+end;
+{$ENDIF}
+
diff --git a/packages/libogcfpc/src/ogc/lwp_mutex.inc b/packages/libogcfpc/src/ogc/lwp_mutex.inc
index be01108f58..00277c38e3 100644
--- a/packages/libogcfpc/src/ogc/lwp_mutex.inc
+++ b/packages/libogcfpc/src/ogc/lwp_mutex.inc
@@ -49,8 +49,7 @@ procedure __lwp_mutex_seize_irq_blocking(mutex: Plwp_mutex; timeout: cuint64); c
procedure __lwp_mutex_flush(mutex: Plwp_mutex; status: cuint32); cdecl; external;
-
-function __lwp_mutex_seize_irq_trylock(mutex: plwp_mutex; isr_level: pcuint32): cuint32; cdecl; external;
+function __lwp_mutex_seize_irq_trylock(mutex: plwp_mutex; isr_level: pcuint32): cuint32; inline;
procedure __lwp_mutex_seize(_mutex_t: plwp_mutex; _id: cuint32; _wait: cuint8; _timeout, _level: cuint32); inline;
@@ -58,6 +57,32 @@ procedure __lwp_mutex_seize(_mutex_t: plwp_mutex; _id: cuint32; _wait: cuint8; _
{$IFDEF OGC_IMPLEMENTATION}
+
+function __lwp_mutex_locked(mutex: plwp_mutex): boolean;
+begin
+ result := (mutex^.lock = LWP_MUTEX_LOCKED);
+end;
+
+function __lwp_mutex_isinheritprio(attrs: plwp_mutex_attr): boolean;
+begin
+ result := (attrs^.mode = LWP_MUTEX_INHERITPRIO);
+end;
+
+function __lwp_mutex_isprioceiling(attrs: plwp_mutex_attr): boolean;
+begin
+ result := (attrs^.mode = LWP_MUTEX_PRIORITYCEIL);
+end;
+
+function __lwp_mutex_ispriority(attrs: plwp_mutex_attr): boolean;
+begin
+ result := (attrs^.mode = LWP_MUTEX_PRIORITY);
+end;
+
+function __lwp_mutex_isfifo(attrs: plwp_mutex_attr): boolean;
+begin
+ result := (attrs^.mode = LWP_MUTEX_FIFO);
+end;
+
procedure __lwp_mutex_seize(_mutex_t: plwp_mutex; _id: cuint32; _wait: cuint8; _timeout, _level: cuint32); inline;
begin
repeat
@@ -79,6 +104,76 @@ begin
end;
until false;
end;
+
+function __lwp_mutex_seize_irq_trylock(mutex: plwp_mutex; isr_level: pcuint32): cuint32; inline;
+var
+ exec: plwp_cntrl;
+ level: cuint32;
+ prioceiling, priocurr: cuint32;
+begin
+ level := isr_level^;
+ exec := _thr_executing;
+ exec^.wait.ret_code := LWP_MUTEX_SUCCESSFUL;
+ if not __lwp_mutex_locked(mutex) then
+ begin
+ mutex^.lock := LWP_MUTEX_LOCKED;
+ mutex^.holder := exec;
+ mutex^.nest_cnt := 1;
+ if __lwp_mutex_isinheritprio(@(mutex^.atrrs)) or __lwp_mutex_isprioceiling(@(mutex^.atrrs)) then
+ inc(exec^.res_cnt);
+ if not __lwp_mutex_isprioceiling(@(mutex^.atrrs)) then
+ begin
+ _CPU_ISR_Restore(level);
+ result := 0;
+ end;
+ begin
+ prioceiling := mutex^.atrrs.prioceil;
+ priocurr := exec^.cur_prio;
+ if (priocurr = prioceiling) then
+ begin
+ _CPU_ISR_Restore(level);
+ result := 0;
+ end;
+ if (priocurr > prioceiling) then
+ begin
+ __lwp_thread_dispatchdisable();
+ _CPU_ISR_Restore(level);
+ __lwp_thread_changepriority(mutex^.holder, mutex^.atrrs.prioceil, 0);
+ __lwp_thread_dispatchenable();
+ result := 0;
+ end;
+ exec^.wait.ret_code := LWP_MUTEX_CEILINGVIOL;
+ mutex^.nest_cnt := 0;
+ dec(exec^.res_cnt);
+ _CPU_ISR_Restore(level);
+ result := 0;
+ end;
+ result := 0;
+ end;
+
+ if (__lwp_thread_isexec(mutex^.holder)) <> 0 then
+ begin
+ case mutex^.atrrs.nest_behavior of
+ LWP_MUTEX_NEST_ACQUIRE:
+ begin
+ inc(mutex^.nest_cnt);
+ _CPU_ISR_Restore(level);
+ result := 0;
+ end;
+ LWP_MUTEX_NEST_ERROR:
+ begin
+ exec^.wait.ret_code := LWP_MUTEX_NEST_NOTALLOWED;
+ _CPU_ISR_Restore(level);
+ result := 0;
+ end;
+ LWP_MUTEX_NEST_BLOCK:
+ begin
+ end;
+ end;
+ end;
+ result := 1;
+end;
+
//{$ifdef LIBOGC_INTERNAL}
//{$include libogc/lwp_mutex.inl}
//{$endif}
diff --git a/packages/libogcfpc/src/ogc/lwp_priority.inc b/packages/libogcfpc/src/ogc/lwp_priority.inc
index ef8fcab64f..ed6b776698 100644
--- a/packages/libogcfpc/src/ogc/lwp_priority.inc
+++ b/packages/libogcfpc/src/ogc/lwp_priority.inc
@@ -29,3 +29,52 @@ procedure __lwp_priority_init; cdecl; external;
//{$endif}
{$ENDIF}
+
+{$IFDEF OGC_IMPLEMENTATION}
+procedure __lwp_priomap_init(theprio: pprio_cntrl; prio: cuint32);
+var
+ major,minor,mask: cuint32;
+begin
+ major := prio div 16;
+ minor := prio mod 16;
+
+ theprio^.minor := @(_prio_bitmap[major]);
+
+ mask := $80000000 shr major;
+ theprio^.ready_major := mask;
+ theprio^.block_major := not mask;
+
+ mask := $80000000 shr minor;
+ theprio^.ready_minor := mask;
+ theprio^.block_minor := not mask;
+//#ifdef _LWPPRIO_DEBUG
+// printf("__lwp_priomap_init(%p,%d,%p,%d,%d,%d,%d)\n",theprio,prio,theprio->minor,theprio->ready_major,theprio->ready_minor,theprio->block_major,theprio->block_minor);
+//#endif
+end;
+
+procedure __lwp_priomap_addto(theprio: pprio_cntrl);
+begin
+ theprio^.minor^ := theprio^.minor^ or theprio^.ready_minor;
+ _prio_major_bitmap := _prio_major_bitmap or theprio^.ready_major;
+end;
+
+procedure __lwp_priomap_removefrom(theprio: pprio_cntrl);
+begin
+ theprio^.minor^ := theprio^.minor^ and theprio^.block_minor;
+ if theprio^.minor^ = 0 then
+ _prio_major_bitmap := _prio_major_bitmap and theprio^.block_major;
+end;
+
+function __lwp_priomap_highest(): cuint32;
+var
+ major, minor: cuint32;
+begin
+ major := cntlzw(_prio_major_bitmap);
+ minor := cntlzw(_prio_bitmap[major]);
+//#ifdef _LWPPRIO_DEBUG
+// printf("__lwp_priomap_highest(%d)\n",((major<<4)+minor));
+//#endif
+ result := ((major shl 4) + minor);
+end;
+{$ENDIF}
+
diff --git a/packages/libogcfpc/src/ogc/lwp_threads.inc b/packages/libogcfpc/src/ogc/lwp_threads.inc
index bbdb739b2b..485d7464a5 100644
--- a/packages/libogcfpc/src/ogc/lwp_threads.inc
+++ b/packages/libogcfpc/src/ogc/lwp_threads.inc
@@ -133,9 +133,102 @@ procedure __lwp_thread_dispatchdisable(); inline;
{$ENDIF}
{$IFDEF OGC_IMPLEMENTATION}
-procedure __lwp_thread_dispatchdisable(); inline;
+function __lwp_thread_isexec(thethread: plwp_cntrl): cuint32;
+begin
+ result := 0;
+ if (thethread = _thr_executing) then result := 1;
+end;
+
+function __lwp_thread_isheir(thethread: plwp_cntrl): cuint32;
+begin
+ result := 0;
+ if (thethread = _thr_heir) then result := 1;
+end;
+
+procedure __lwp_thread_calcheir();
+begin
+ _thr_heir := plwp_cntrl(_lwp_thr_ready[__lwp_priomap_highest()].first);
+//#ifdef _LWPTHREADS_DEBUG
+// printf("__lwp_thread_calcheir(%p)\n",_thr_heir);
+//#endif
+end;
+
+function __lwp_thread_isallocatedfp(thethread: plwp_cntrl): cuint32;
+begin
+ result := 0;
+ if (thethread = _thr_allocated_fp) then result := 1;
+end;
+
+procedure __lwp_thread_deallocatefp();
+begin
+ _thr_allocated_fp := nil;
+end;
+
+procedure __lwp_thread_dispatchinitialize();
+begin
+ _thread_dispatch_disable_level := 1;
+end;
+
+procedure __lwp_thread_dispatchenable();
+begin
+ dec(_thread_dispatch_disable_level);
+ if (_thread_dispatch_disable_level = 0) then
+ __thread_dispatch();
+end;
+
+procedure __lwp_thread_dispatchdisable();
+begin
+ inc(_thread_dispatch_disable_level);
+end;
+
+procedure __lwp_thread_dispatchunnest();
begin
- inc(_thread_dispatch_disable_level);
+ dec(_thread_dispatch_disable_level);
end;
+
+procedure __lwp_thread_unblock(thethread: plwp_cntrl);
+begin
+ __lwp_thread_clearstate(thethread, LWP_STATES_BLOCKED);
+end;
+
+function __lwp_thread_getlibcreent(): pointer;
+begin
+ result := __lwp_thr_libc_reent;
+end;
+
+procedure __lwp_thread_setlibcreent(libc_reent: pointer);
+begin
+ __lwp_thr_libc_reent := libc_reent;
+end;
+
+function __lwp_thread_isswitchwant(): cbool;
+begin
+ result := cbool(_context_switch_want);
+end;
+
+function __lwp_thread_isdispatchenabled(): cbool;
+begin
+ result := (_thread_dispatch_disable_level = 0);
+end;
+
+procedure __lwp_thread_inittimeslice();
+begin
+ __lwp_wd_initialize(@_lwp_wd_timeslice, @__lwp_thread_tickle_timeslice, LWP_TIMESLICE_TIMER_ID, nil);
+end;
+
+procedure __lwp_thread_starttimeslice();
+begin
+ __lwp_wd_insert_ticks(@_lwp_wd_timeslice, millisecs_to_ticks(1));
+end;
+
+procedure __lwp_thread_stoptimeslice();
+begin
+ __lwp_wd_remove_ticks(@_lwp_wd_timeslice);
+end;
+
+//procedure __lwp_thread_dispatchdisable(); inline;
+//begin
+// inc(_thread_dispatch_disable_level);
+//end;
{$ENDIF}
diff --git a/packages/libogcfpc/src/ogc/lwp_watchdog.inc b/packages/libogcfpc/src/ogc/lwp_watchdog.inc
index 3482ab39aa..354a7d0694 100644
--- a/packages/libogcfpc/src/ogc/lwp_watchdog.inc
+++ b/packages/libogcfpc/src/ogc/lwp_watchdog.inc
@@ -173,4 +173,87 @@ begin
result := -x;
end;
+
+procedure __lwp_wd_initialize(wd: pwd_cntrl; routine: wd_service_routine; id: cuint32; usr_data: pointer);
+begin
+ wd^.state := LWP_WD_INACTIVE;
+ wd^.id := id;
+ wd^.routine := routine;
+ wd^.usr_data := usr_data;
+end;
+
+function __lwp_wd_first(queue: plwp_queue): pwd_cntrl;
+begin
+ result := pwd_cntrl(@(queue^.first));
+end;
+
+function __lwp_wd_last(queue: plwp_queue): pwd_cntrl;
+begin
+ result := pwd_cntrl(@(queue^.last));
+end;
+
+function __lwp_wd_next(wd: pwd_cntrl): pwd_cntrl;
+begin
+ result := pwd_cntrl(@(wd^.node.next));
+end;
+
+function __lwp_wd_prev(wd: pwd_cntrl): pwd_cntrl;
+begin
+ result := pwd_cntrl(@(wd^.node.prev));
+end;
+
+procedure __lwp_wd_activate(wd: pwd_cntrl);
+begin
+ wd^.state := LWP_WD_ACTIVE;
+end;
+
+procedure __lwp_wd_deactivate(wd: pwd_cntrl);
+begin
+ wd^.state := LWP_WD_REMOVE;
+end;
+
+function __lwp_wd_isactive(wd: pwd_cntrl): cuint32;
+begin
+ result := 0;
+ if (wd^.state = LWP_WD_ACTIVE) then result := 1;
+end;
+
+function __lwp_wd_calc_ticks(const time: ptimespec): cuint64;
+var
+ ticks: cuint64;
+begin
+ ticks := secs_to_ticks(time^.tv_sec);
+ ticks := ticks + nanosecs_to_ticks(time^.tv_nsec);
+ result := ticks;
+end;
+
+procedure __lwp_wd_tickle_ticks();
+begin
+ __lwp_wd_tickle(@_wd_ticks_queue);
+end;
+
+procedure __lwp_wd_insert_ticks(wd: pwd_cntrl; interval: cint64);
+begin
+ wd^.start := gettime();
+ wd^.fire := (wd^.start + LWP_WD_ABS(interval));
+ __lwp_wd_insert(@_wd_ticks_queue, wd);
+end;
+
+procedure __lwp_wd_adjust_ticks(dir: cuint32; interval: cint64);
+begin
+ __lwp_wd_adjust(@_wd_ticks_queue,dir,interval);
+end;
+
+procedure __lwp_wd_remove_ticks(wd: pwd_cntrl);
+begin
+ __lwp_wd_remove(@_wd_ticks_queue,wd);
+end;
+
+procedure __lwp_wd_reset(wd: pwd_cntrl);
+begin
+ __lwp_wd_remove(@_wd_ticks_queue,wd);
+ __lwp_wd_insert(@_wd_ticks_queue,wd);
+end;
+
+
{$ENDIF}
diff --git a/packages/libogcfpc/src/ogc/machine/processor.inc b/packages/libogcfpc/src/ogc/machine/processor.inc
index f6ba329b56..48e32b368d 100644
--- a/packages/libogcfpc/src/ogc/machine/processor.inc
+++ b/packages/libogcfpc/src/ogc/machine/processor.inc
@@ -11,13 +11,13 @@ procedure ppchalt(); inline;
//procedure mfpvr(); inline;
function mfpvr(): cint32; inline;
-procedure mfdcr(_rn: cuint); inline;
+function mfdcr(_rn: cuint): cuint32; inline;
procedure mtdcr(rn, val: cuint); inline;
-procedure mfmsr(); inline;
+function mfmsr(): cuint32; inline;
procedure mtmsr(val: cuint); inline;
-procedure mfdec(); inline;
+function mfdec(): cuint32; inline;
procedure mtdec(_val: cuint); inline;
-procedure mfspr(_rn: cuint); inline;
+function mfspr(_rn: cuint): cuint32; inline;
procedure mtspr(_rn, _val: cuint); inline;
{$define mfwpar() := mfspr(WPAR)}
@@ -46,12 +46,12 @@ procedure mtspr(_rn, _val: cuint); inline;
{$define mfhid4() := mfspr(HID4)}
{$define mthid4(_val) := mtspr(HID4,_val)}
-procedure __lhbrx(base, index: cuint32); inline;
+function __lhbrx(base, index: cuint32): cuint16; inline;
//procedure __lwbrx(base,index: cuint32); inline;
function __lwbrx(base,index: cuint32): cuint32; inline;
procedure __sthbrx(base,index,value: cuint32); inline;
procedure __stwbrx(base,index,value: cuint32); inline;
-procedure cntlzw(_val: cuint32); inline;
+function cntlzw(_val: cuint32): cuint32; inline;
procedure _CPU_MSR_GET( _msr_value: cuint32 ); inline;
procedure _CPU_MSR_SET( _msr_value: cuint32 ); inline;
procedure _CPU_ISR_Enable(); inline;
@@ -118,13 +118,14 @@ begin
result := _rval;
end;
-procedure mfdcr(_rn: cuint); inline;
+function mfdcr(_rn: cuint): cuint32; inline;
var
_rval: cuint32;
begin
asm
// mfdcr r3,_rn // unrecognized opcode?
end;
+ result := _rval;
end;
procedure mtdcr(rn, val: cuint); inline;
@@ -134,13 +135,14 @@ begin
end;
end;
-procedure mfmsr(); inline;
+function mfmsr(): cuint32; inline;
var
_rval: cuint32;
begin
asm
mfmsr r3
end;
+ result := _rval;
end;
procedure mtmsr(val: cuint); inline;
@@ -150,7 +152,7 @@ begin
end;
end;
-procedure mfdec(); inline;
+function mfdec(): cuint32; inline;
var
_rval: cuint32;
begin
@@ -158,6 +160,7 @@ begin
// mfdec r3 // unrecognized opcode?
mfspr r3,22 // unrecognized opcode?
end;
+ result := _rval;
end;
procedure mtdec(_val: cuint); inline;
@@ -168,13 +171,14 @@ begin
end;
end;
-procedure mfspr(_rn: cuint); inline;
+function mfspr(_rn: cuint): cuint32; inline;
var
_rval: cuint32 = 0;
begin
asm
mfspr r3,r4
end;
+ result := _rval;
end;
procedure mtspr(_rn, _val: cuint); inline;
@@ -184,13 +188,14 @@ begin
end;
end;
-procedure __lhbrx(base, index: cuint32); inline;
+function __lhbrx(base, index: cuint32): cuint16; inline;
var
res: cuint16;
begin
asm
lhbrx r3,r4,r5
end;
+ result := res;
end;
//procedure __lwbrx(base,index: cuint32); inline;
@@ -218,13 +223,14 @@ begin
end;
end;
-procedure cntlzw(_val: cuint32); inline;
+function cntlzw(_val: cuint32): cuint32; inline;
var
_rval: cuint32;
begin
asm
cntlzw r3, r4
end;
+ result := _rval;
end;
procedure _CPU_MSR_GET( _msr_value: cuint32 ); inline;
@@ -327,7 +333,7 @@ var
tmp: cuint16;
begin
tmp := val;
- __lhbrx(tmp,0); //??
+ result := __lhbrx(tmp,0); //??
end;
function bswap32(val: cuint32): cuint32; inline;
diff --git a/packages/odbc/src/odbcsql.inc b/packages/odbc/src/odbcsql.inc
index 49a15b66b1..0d0ec1a0a2 100644
--- a/packages/odbc/src/odbcsql.inc
+++ b/packages/odbc/src/odbcsql.inc
@@ -20,7 +20,11 @@
{$endif fpc}
{$ifndef DYNLOADINGODBC}
+{$IFDEF WINDOWS}
+ {$linklib odbc32}
+{$ELSE}
{$linklib odbc}
+{$endif}
{$endif}
interface
diff --git a/packages/opencl/src/cl.pp b/packages/opencl/src/cl.pp
index 3bf88db6f6..d6a8eaa91d 100644
--- a/packages/opencl/src/cl.pp
+++ b/packages/opencl/src/cl.pp
@@ -385,6 +385,7 @@ const
CL_DEVICE_MEM_BASE_ADDR_ALIGN = $1019;
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = $101A;
CL_DEVICE_SINGLE_FP_CONFIG = $101B;
+ CL_DEVICE_DOUBLE_FP_CONFIG = $1032;
CL_DEVICE_GLOBAL_MEM_CACHE_TYPE = $101C;
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = $101D;
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = $101E;
@@ -440,9 +441,9 @@ const
// cl_context_info
CL_CONTEXT_REFERENCE_COUNT = $1080;
- CL_CONTEXT_NUM_DEVICES = $1081;
- CL_CONTEXT_DEVICES = $1082;
- CL_CONTEXT_PROPERTIES_INFO = $1083; // CL_CONTEXT_PROPERTIES
+ CL_CONTEXT_DEVICES = $1081;
+ CL_CONTEXT_PROPERTIES_INFO = $1082; // CL_CONTEXT_PROPERTIES
+ CL_CONTEXT_NUM_DEVICES = $1083;
CL_CONTEXT_PLATFORM_INFO = $1084; // CL_CONTEXT_PLATFORM
// cl_command_queue_info
diff --git a/packages/opencl/src/cl_gl.pp b/packages/opencl/src/cl_gl.pp
index b967f70f77..f1056fffe8 100644
--- a/packages/opencl/src/cl_gl.pp
+++ b/packages/opencl/src/cl_gl.pp
@@ -48,6 +48,13 @@ const
CL_GL_TEXTURE_TARGET = $2004;
CL_GL_MIPMAP_LEVEL = $2005;
+ CL_GL_CONTEXT_KHR = $2008;
+ CL_EGL_DISPLAY_KHR = $2009;
+ CL_GLX_DISPLAY_KHR = $200A;
+ CL_WGL_HDC_KHR = $200B;
+ CL_CGL_SHAREGROUP_KHR = $200C;
+
+
function clCreateFromGLBuffer(context: cl_context; falgs: cl_mem_flags;
bufobj: GLuint; var errcode_ret: cl_int
): cl_mem; cdecl; external name 'clCreateFromGLBuffer';
diff --git a/packages/winunits-base/src/activex.pp b/packages/winunits-base/src/activex.pp
index 49e623ac40..8795612592 100644
--- a/packages/winunits-base/src/activex.pp
+++ b/packages/winunits-base/src/activex.pp
@@ -31,6 +31,9 @@ type
TBStr = POleStr;
TBStrList = array[0..(high(integer) div sizeof(TBSTR))-1] of TBstr;
PBStrList = ^TBStrList;
+ POleStrList = ^TOleStrList;
+ TOleStrList = array[0..(high(integer) div sizeof(POleStr))-1] of POleStr;
+
PBStr = ^TBStr;
TOleEnum = type LongWord;
LargeInt = Types.LargeInt;
@@ -3393,7 +3396,7 @@ Type
ICatInformation = interface(IUnknown)
['{0002E013-0000-0000-C000-000000000046}']
- function EnumCategories(lcid:lcid;out ppenumCategoryInfo : ICatInformation):HResult; StdCall;
+ function EnumCategories(lcid:lcid;out ppenumCategoryInfo : IEnumCategoryInfo):HResult; StdCall;
function GetCategoryDesc(rcatid:PCATID;lcid:LCID;out pszdesc:lpwstr):HResult; StdCall;
function EnumClassesOfCategories(cImplemented : ULong; rgcatidImpl:PCATID;cRequired:ULong; rgcatidreq:PCATID; out ppenumclsid : IEnumClsID):HResult; StdCall;
function ISClassOfCategories(rclsid:pclsid;cImplemented:ULong;rgcatidimpl:PCATID;CRequired:ULONG;rgcatidreq : pcatid):HResult; StdCall;
diff --git a/packages/winunits-base/src/uxtheme.pp b/packages/winunits-base/src/uxtheme.pp
index 1e836d0928..c752b9db3c 100644
--- a/packages/winunits-base/src/uxtheme.pp
+++ b/packages/winunits-base/src/uxtheme.pp
@@ -782,7 +782,7 @@ var
var
GetThemeFont: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer;
- var pFont: LOGFONT): HRESULT; stdcall;
+ var pFont: LOGFONTW): HRESULT; stdcall;
{$EXTERNALSYM GetThemeFont}
//----------------------------------------------------------------------------------------------------------------------
@@ -1039,7 +1039,7 @@ var
//----------------------------------------------------------------------------------------------------------------------
var
- GetThemeSysFont: function(hTheme: HTHEME; iFontId: Integer; var plf: LOGFONT): HRESULT; stdcall;
+ GetThemeSysFont: function(hTheme: HTHEME; iFontId: Integer; var plf: LOGFONTW): HRESULT; stdcall;
{$EXTERNALSYM GetThemeSysFont}
//----------------------------------------------------------------------------------------------------------------------
@@ -1445,7 +1445,7 @@ type
{$EXTERNALSYM DTTOPTS}
PDTTOPTS = ^_DTTOPTS;
{$EXTERNALSYM PDTTOPTS}
- TDTOpts = DTTOPTS;
+ TDTTOpts = DTTOPTS;
// if (_WIN32_WINNT >= 0x0600)
@@ -1736,7 +1736,7 @@ var
implementation
{$ifdef USE_SYNCOBJS}
-// we can't do this due to a circular dependancy between winunits-base and fcl-base
+// we can't do this due to a circular dependency between winunits-base and fcl-base
uses
SyncObjs;
{$endif}
diff --git a/packages/zlib/src/zlib.pp b/packages/zlib/src/zlib.pp
index 15e5c2dae1..1846dbf008 100644
--- a/packages/zlib/src/zlib.pp
+++ b/packages/zlib/src/zlib.pp
@@ -1212,7 +1212,7 @@ function zError(err: cint): pchar; cdecl; external libz name 'zError';
function inflateSyncPoint(var z: z_stream): cint; cdecl; external libz name 'inflateSyncPoint';
function get_crc_table: pointer; cdecl; external libz name 'get_crc_table';
-function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
+function zlibAllocMem(AppData: Pointer; Items, Size: UInt): Pointer; cdecl;
procedure zlibFreeMem(AppData, Block: Pointer); cdecl;
implementation
@@ -1242,7 +1242,7 @@ begin
Result := inflateBackInit_(strm, windowBits, window, ZLIB_VERSION, sizeof(z_stream));
end;
-function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
+function zlibAllocMem(AppData: Pointer; Items, Size: UInt): Pointer; cdecl;
begin
Result := AllocMem(Items * Size);
diff --git a/rtl/arm/arm.inc b/rtl/arm/arm.inc
index d1148f6bca..63d003e914 100644
--- a/rtl/arm/arm.inc
+++ b/rtl/arm/arm.inc
@@ -202,7 +202,6 @@ end;
procedure Move_pld(const source;var dest;count:longint);assembler;nostackframe;
asm
pld [r0]
- pld [r1]
// count <=0 ?
cmp r2,#0
{$if defined(cpuarmv3) or defined(cpuarmv4) or defined(cpuarmv5)}
@@ -258,13 +257,11 @@ asm
bne .Ldwordloop
*)
pld [r0,#32]
- pld [r1,#32]
.Ldwordloop:
sub r2,r2,#4
ldr r3,[r0],#4
// preload
pld [r0,#64]
- pld [r1,#64]
cmp r2,#4
str r3,[r1],#4
bcs .Ldwordloop
diff --git a/rtl/arm/thumb2.inc b/rtl/arm/thumb2.inc
index c4948d9ca0..6271c6920d 100644
--- a/rtl/arm/thumb2.inc
+++ b/rtl/arm/thumb2.inc
@@ -77,12 +77,18 @@ asm
end;
{$ENDIF not INTERNAL_BACKTRACE}
+{
+ Stack frame on Thumb2:
+ LR <- FP
+ Old FP
+}
+
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
function get_caller_addr(framebp:pointer):pointer;assembler;
asm
movs r0,r0
beq .Lg_a_null
- ldr r0,[r0,#-4]
+ ldr r0,[r0]
.Lg_a_null:
end;
@@ -92,7 +98,7 @@ function get_caller_frame(framebp:pointer):pointer;assembler;
asm
movs r0,r0
beq .Lgnf_null
- ldr r0,[r0,#-12]
+ ldr r0,[r0,#-4]
.Lgnf_null:
end;
diff --git a/rtl/freebsd/freebsd.pas b/rtl/freebsd/freebsd.pas
index 5f9148391b..d477bf1764 100644
--- a/rtl/freebsd/freebsd.pas
+++ b/rtl/freebsd/freebsd.pas
@@ -185,6 +185,10 @@ Type
function kse_release(timeout: PTimeSpec): cInt; extdecl;
function kse_switchin(tmbx: PKseThrMailBox; flags: cInt): cInt; extdecl;
+{$ifndef FPC_USE_LIBC}
+function fpgetfsstat(buf:pstatfs;bufsize:clong;flags:cint):cint;
+{$endif}
+
Const
MAP_FILE = $0000; { map from file (default) }
MAP_ANON = $1000; { allocated from memory, swap space }
@@ -294,6 +298,10 @@ begin
kse_switchin:=do_SysCall(syscall_nr_kse_switchin, TSysParam(tmbx), TSysParam(flags));
end;
+function fpgetfsstat(buf:pstatfs;bufsize:clong;flags:cint):cint;
+begin
+ fpgetfsstat:=do_syscall(syscall_nr_getfsstat,TSysParam(buf),TSysParam(Bufsize),TSysParam(Flags));
+end;
{$ENDIF}
end.
diff --git a/rtl/freebsd/ptypes.inc b/rtl/freebsd/ptypes.inc
index aacf23c5f5..8bc19db1bf 100644
--- a/rtl/freebsd/ptypes.inc
+++ b/rtl/freebsd/ptypes.inc
@@ -163,16 +163,75 @@ type
_MUTEX_TYPE_MAX
);
-
-Const
- MNAMLEN = 88-2*sizeof(clong); // slightly machine specific.
- MFSNamLen = 16;
type
- fsid_t = array[0..1] of cint;
+ fsid_t = array[0..1] of cint32;
-// Kernel statfs
-
- TStatfs = packed record
+Const
+ MNAMELEN = 88;
+ MFSNamELen = 16;
+ STATFS_VERSION = $20030518;
+ OMNAMLEN = 88-2*sizeof(clong); // slightly machine specific.
+ OMFSNamLen = 16;
+
+// fieldnames start with f_ in headers. Probably 1.0.x simplification that somehow
+// managed to escape the unix rewrite. Make an union+ deprecate after newstatfs is stable.
+
+Type TStatFS = {?} Record
+ case boolean of
+ 0 : ( // current FreeBSD
+ version : cuint32; { structure version number }
+ ftype : cuint32; { type of filesystem }
+ fflags : cuint64; { copy of mount exported flags }
+ bsize : cuint64; { filesystem fragment size }
+ iosize : cuint64; { optimal transfer block size }
+ blocks : cuint64; { total data blocks in filesystem }
+ bfree : cuint64; { free blocks in filesystem }
+ bavail : cint64; { free blocks avail to non-superuser }
+ files : cuint64; { total file nodes in filesystem }
+ ffree : cint64; { free nodes avail to non-superuser }
+ fsyncwrites : cuint64; { count of sync writes since mount }
+ fasyncwrites : cuint64; { count of async writes since mount }
+ fsyncreads : cuint64; { count of sync reads since mount }
+ fasyncreads : cuint64; { count of async reads since mount }
+ spare : array[0..9] of cuint64; { unused spare }
+ namemax : cuint32; { maximum filename length }
+ owner : tuid; { user that mounted the filesystem }
+ fsid : fsid_t; { filesystem id }
+ charspare : array[0..80-1] of ansichar; { spare string space }
+ fstypename : array[0..MFSNAMELEN-1] of ansichar; { filesystem type name }
+ mnfromname : array[0..MNAMELEN-1] of ansichar; { mounted filesystem }
+ mountpoint : array[0..MNAMELEN-1] of ansichar; { directory on which mounted }
+ );
+ 1:( // union for old fieldname's sake.
+ f_version : cuint32; { structure version number }
+ f_type : cuint32; { type of filesystem }
+ f_flags : cuint64; { copy of mount exported flags }
+ f_bsize : cuint64; { filesystem fragment size }
+ f_iosize : cuint64; { optimal transfer block size }
+ f_blocks : cuint64; { total data blocks in filesystem }
+ f_bfree : cuint64; { free blocks in filesystem }
+ f_bavail : cint64; { free blocks avail to non-superuser }
+ f_files : cuint64; { total file nodes in filesystem }
+ f_ffree : cint64; { free nodes avail to non-superuser }
+ f_syncwrites : cuint64; { count of sync writes since mount }
+ f_asyncwrites : cuint64; { count of async writes since mount }
+ f_syncreads : cuint64; { count of sync reads since mount }
+ f_asyncreads : cuint64; { count of async reads since mount }
+ f_spare : array[0..9] of cuint64; { unused spare }
+ f_namemax : cuint32; { maximum filename length }
+ f_owner : tuid; { user that mounted the filesystem }
+ f_fsid : fsid_t; { filesystem id }
+ f_charspare : array[0..80-1] of ansichar; { spare string space }
+ f_fstypename : array[0..MFSNAMELEN-1] of ansichar; { filesystem type name }
+ f_mntfromname : array[0..MNAMELEN-1] of ansichar; { mounted filesystem }
+ f_mntonname : array[0..MNAMELEN-1] of ansichar; { directory on which mounted }
+ );
+ end;
+
+ PStatFS=^TStatFS;
+
+
+ TStatFS4 = packed record
spare2, { place holder}
bsize, { fundamental block size}
iosize, { optimal block size }
@@ -187,18 +246,19 @@ type
fflags : cint; {copy of mount flags}
fsyncwrites,
fasyncwrites : clong;
- fstypename : array[0..MFSNamLen-1] of char;
- mountpoint : array[0..MNAMLEN-1] of char;
+ fstypename : array[0..OMFSNamLen-1] of char;
+ mountpoint : array[0..OMNAMLEN-1] of char;
fsyncreads, { count of sync reads since mount }
fasyncreads : clong;
fspares1 : cshort;
- mnfromname : array[0..MNAMLEN-1] of char;
+ mnfromname : array[0..OMNAMLEN-1] of char;
fspares2 : cshort;
fspare3 : array[0..1] of clong;
end;
- PStatFS=^TStatFS;
+
+ PStatFS4=^TStatFs4;
- mbstate_t = record
+ mbstate_t = record
case byte of
0: (__mbstate8: array[0..127] of char);
1: (_mbstateL: cint64); { for alignment }
diff --git a/rtl/freebsd/sysnr.inc b/rtl/freebsd/sysnr.inc
index cba80e702b..720e8f67d0 100644
--- a/rtl/freebsd/sysnr.inc
+++ b/rtl/freebsd/sysnr.inc
@@ -13,223 +13,6 @@
**********************************************************************}
const
-{ Crude converted FreeBSD 6.1-release syscall.h. Copy and paste if you
- checked the function.
- syscall_nr_syscall = 0;
- syscall_nr_exit = 1;
- syscall_nr_fork = 2;
- syscall_nr_read = 3;
- syscall_nr_write = 4;
- syscall_nr_open = 5;
- syscall_nr_close = 6;
- syscall_nr_wait4 = 7;
- syscall_nr_link = 9;
- syscall_nr_unlink = 10;
- syscall_nr_chdir = 12;
- syscall_nr_fchdir = 13;
- syscall_nr_mknod = 14;
- syscall_nr_chmod = 15;
- syscall_nr_chown = 16;
- syscall_nr_break = 17;
- syscall_nr_getfsstat = 18;
- syscall_nr_getpid = 20;
- syscall_nr_mount = 21;
- syscall_nr_unmount = 22;
- syscall_nr_getuid = 24;
- syscall_nr_geteuid = 25;
- syscall_nr_ptrace = 26;
- syscall_nr_recvmsg = 27;
- syscall_nr_sendmsg = 28;
- syscall_nr_getpeername = 31;
- syscall_nr_getsockname = 32;
- syscall_nr_access = 33;
- syscall_nr_chflags = 34;
- syscall_nr_fchflags = 35;
- syscall_nr_sync = 36;
- syscall_nr_kill = 37;
- syscall_nr_getppid = 39;
- syscall_nr_dup = 41;
- syscall_nr_pipe = 42;
- syscall_nr_getegid = 43;
- syscall_nr_profil = 44;
- syscall_nr_ktrace = 45;
- syscall_nr_getgid = 47;
- syscall_nr_getlogin = 49;
- syscall_nr_setlogin = 50;
- syscall_nr_acct = 51;
- syscall_nr_sigaltstack = 53;
- syscall_nr_ioctl = 54;
- syscall_nr_reboot = 55;
- syscall_nr_revoke = 56;
- syscall_nr_symlink = 57;
- syscall_nr_readlink = 58;
- syscall_nr_execve = 59;
- syscall_nr_umask = 60;
- syscall_nr_chroot = 61;
- syscall_nr_msync = 65;
- syscall_nr_vfork = 66;
- syscall_nr_sbrk = 69;
- syscall_nr_sstk = 70;
- syscall_nr_vadvise = 72;
- syscall_nr_mprotect = 74;
- syscall_nr_madvise = 75;
- syscall_nr_mincore = 78;
- syscall_nr_setgroups = 80;
- syscall_nr_setpgid = 82;
- syscall_nr_swapon = 85;
-
- syscall_nr_getdtablesize = 89;
- syscall_nr_dup2 = 90;
- syscall_nr_fcntl = 92;
- syscall_nr_select = 93;
- syscall_nr_fsync = 95;
- syscall_nr_setpriority = 96;
- syscall_nr_connect = 98;
- syscall_nr_getpriority =100;
- syscall_nr_setsockopt =105;
- syscall_nr_gettimeofday =116;
-
- syscall_nr_fchown =123;
- syscall_nr_fchmod =124;
- syscall_nr_setreuid =126;
- syscall_nr_setregid =127;
- syscall_nr_rename =128;
- syscall_nr_flock =131;
- syscall_nr_mkdir =136;
- syscall_nr_rmdir =137;
- syscall_nr_utimes =138;
- syscall_nr_adjtime =140;
-
- syscall_nr_quotactl =148;
- syscall_nr_nfssvc =155;
- syscall_nr_statfs =157;
- syscall_nr_fstatfs =158;
- syscall_nr_getfh =161;
- syscall_nr_getdomainname =162;
- syscall_nr_setdomainname =163;
- syscall_nr_uname =164;
-
- syscall_nr_rtprio =166;
-
- syscall_nr_ntp_adjtime =176;
- syscall_nr_setegid =182;
- syscall_nr_seteuid =183;
- syscall_nr_stat =188;
- syscall_nr_fstat =189;
- syscall_nr_lstat =190;
- syscall_nr_pathconf =191;
- syscall_nr_fpathconf =192;
- syscall_nr_getrlimit =194;
- syscall_nr_setrlimit =195;
-syscall_nr_getdirentries =196;
- syscall_nr_mmap =197;
- syscall_nr_lseek =199;
- syscall_nr_truncate =200;
- syscall_nr_ftruncate =201;
- syscall_nr___sysctl =202;
- syscall_nr_mlock =203;
- syscall_nr_munlock =204;
- syscall_nr_undelete =205;
- syscall_nr_futimes =206;
- syscall_nr_getpgid =207;
- syscall_nr___semctl =220;
- syscall_nr_semget =221;
- syscall_nr_semop =222;
- syscall_nr_semconfig =223;
- syscall_nr_msgctl =224;
- syscall_nr_msgget =225;
- syscall_nr_msgsnd =226;
- syscall_nr_msgrcv =227;
- syscall_nr_shmat =228;
- syscall_nr_shmctl =229;
- syscall_nr_shmdt =230;
- syscall_nr_shmget =231;
- syscall_nr_clock_gettime =232;
- syscall_nr_clock_settime =233;
- syscall_nr_clock_getres =234;
- syscall_nr_nanosleep =240;
- syscall_nr_minherit =250;
- syscall_nr_openbsd_poll =252;
- syscall_nr_issetugid =253;
- syscall_nr_lchown =254;
- syscall_nr_getdents =272;
- syscall_nr_lchmod =274;
- syscall_nr_netbsd_lchown =275;
- syscall_nr_lutimes =276;
- syscall_nr_netbsd_msync =277;
- syscall_nr_nstat =278;
- syscall_nr_nfstat =279;
- syscall_nr_nlstat =280;
- syscall_nr_fhstatfs =297;
- syscall_nr_fhopen =298;
- syscall_nr_fhstat =299;
- syscall_nr_modnext =300;
- syscall_nr_modstat =301;
- syscall_nr_modfnext =302;
- syscall_nr_modfind =303;
- syscall_nr_kldload =304;
- syscall_nr_kldunload =305;
- syscall_nr_kldfind =306;
- syscall_nr_kldnext =307;
- syscall_nr_kldstat =308;
- syscall_nr_kldfirstmod =309;
- syscall_nr_getsid =310;
- syscall_nr_setresuid =311;
- syscall_nr_setresgid =312;
- syscall_nr_aio_return =314;
- syscall_nr_aio_suspend =315;
- syscall_nr_aio_cancel =316;
- syscall_nr_aio_error =317;
- syscall_nr_aio_read =318;
- syscall_nr_aio_write =319;
- syscall_nr_lio_listio =320;
- syscall_nr_yield =321;
- syscall_nr_thr_sleep =322;
- syscall_nr_thr_wakeup =323;
- syscall_nr_mlockall =324;
- syscall_nr_munlockall =325;
- syscall_nr_sched_setparam =327;
- syscall_nr_sched_getparam =328;
- syscall_nr_sched_setscheduler =329;
- syscall_nr_sched_getscheduler =330;
- syscall_nr_sched_yield =331;
- syscall_nr_sched_get_priority_max =332;
- syscall_nr_sched_get_priority_min =333;
- syscall_nr_sched_rr_get_interval =334;
- syscall_nr_utrace =335;
- syscall_nr_sendfile =336;
- syscall_nr_kldsym =337;
- syscall_nr_jail =338;
- syscall_nr_sigprocmask =340;
- syscall_nr_sigsuspend =341;
- syscall_nr_sigaction =342;
- syscall_nr_sigpending =343;
- syscall_nr_sigreturn =344;
- syscall_nr_sigtimedwait =345;
- syscall_nr___acl_get_file =347;
- syscall_nr___acl_set_file =348;
- syscall_nr___acl_get_fd =349;
- syscall_nr___acl_set_fd =350;
- syscall_nr___acl_delete_file =351;
- syscall_nr___acl_delete_fd =352;
- syscall_nr___acl_aclcheck_file =353;
- syscall_nr___acl_aclcheck_fd =354;
- syscall_nr_extattrctl =355;
- syscall_nr_extattr_set_file =356;
- syscall_nr_extattr_get_file =357;
- syscall_nr_extattr_delete_file =358;
- syscall_nr_aio_waitcomplete =359;
- syscall_nr_getresuid =360;
- syscall_nr_getresgid =361;
- syscall_nr_kse_exit = 379;
- syscall_nr_kse_wakeup = 380;
- syscall_nr_kse_create = 381;
- syscall_nr_kse_thr_interrupt = 382;
- syscall_nr_kse_release = 383;
- syscall_nr_kse_switchin = 440;
-
-}
-
{More or less checked/in use FreeBSD syscalls}
syscall_nr_readv = 120;
syscall_nr_writev = 121;
@@ -266,7 +49,11 @@ syscall_nr_getdirentries =196;
syscall_nr_flock = 131;
syscall_nr_fork = 2;
syscall_nr_fstat = 189;
- syscall_nr_fstatfs = 158; // COMPAT4x
+ syscall_nr_statfs4 = 157; // COMPAT4x
+ syscall_nr_fstatfs4 = 158; // COMPAT4x
+ syscall_nr_getfsstat = 395;
+ syscall_nr_statfs = 396;
+ syscall_nr_fstatfs = 397;
syscall_nr_fsync = 95;
syscall_nr_ftruncate = 201;
syscall_nr_getdents = 272;
@@ -310,7 +97,6 @@ syscall_nr_getdirentries =196;
syscall_nr_socket = 97;
syscall_nr_socketpair = 135;
syscall_nr_stat = 188;
- syscall_nr_statfs = 157; // COMPAT4x
syscall_nr_symlink = 57;
syscall_nr_umask = 60;
syscall_nr_unlink = 10;
diff --git a/rtl/inc/aliases.inc b/rtl/inc/aliases.inc
index e9431cc5b8..7a7e90794c 100644
--- a/rtl/inc/aliases.inc
+++ b/rtl/inc/aliases.inc
@@ -28,5 +28,5 @@ Procedure int_Finalize (Data,TypeInfo: Pointer); [external name 'FPC_FINALIZE'];
Procedure int_Addref (Data,TypeInfo : Pointer); [external name 'FPC_ADDREF'];
Procedure int_DecRef (Data, TypeInfo : Pointer); [external name 'FPC_DECREF'];
Procedure int_Initialize (Data,TypeInfo: Pointer); [external name 'FPC_INITIALIZE'];
-procedure int_FinalizeArray(data,typeinfo : pointer;count,size : longint); [external name 'FPC_FINALIZEARRAY'];
+procedure int_FinalizeArray(data,typeinfo : pointer;count : longint); [external name 'FPC_FINALIZE_ARRAY'];
diff --git a/rtl/inc/astrings.inc b/rtl/inc/astrings.inc
index 1d6d4253c1..bf509c1dab 100644
--- a/rtl/inc/astrings.inc
+++ b/rtl/inc/astrings.inc
@@ -539,16 +539,10 @@ begin
end;
-Procedure fpc_AnsiStr_CheckZero(p : pointer);[Public,Alias : 'FPC_ANSISTR_CHECKZERO']; compilerproc;
-begin
- if p=nil then
- HandleErrorFrame(201,get_frame);
-end;
-
-Procedure fpc_AnsiStr_CheckRange(len,index : SizeInt);[Public,Alias : 'FPC_ANSISTR_RANGECHECK']; compilerproc;
+Procedure fpc_AnsiStr_CheckRange(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_ANSISTR_RANGECHECK']; compilerproc;
begin
- if (index>len) or (Index<1) then
+ if (p=nil) or (index>PAnsiRec(p-FirstOff)^.Len) or (Index<1) then
HandleErrorFrame(201,get_frame);
end;
@@ -1060,6 +1054,13 @@ begin
Move (Buf^,Pointer(S)^,Len);
end;
+Procedure SetString (Out S : AnsiString; Buf : PWideChar; Len : SizeInt);
+begin
+ if (Buf<>nil) and (Len>0) then
+ widestringmanager.Wide2AnsiMoveProc(Buf,S,Len)
+ else
+ SetLength(S, Len);
+end;
function upcase(const s : ansistring) : ansistring;
var
diff --git a/rtl/inc/compproc.inc b/rtl/inc/compproc.inc
index 6b81ffa6d3..0f6126f25a 100644
--- a/rtl/inc/compproc.inc
+++ b/rtl/inc/compproc.inc
@@ -278,8 +278,7 @@ procedure fpc_ansistr_to_chararray(out res: array of char; const src: ansistring
{$endif ndef FPC_STRTOCHARARRAYPROC}
Function fpc_AnsiStr_Compare(const S1,S2 : AnsiString): SizeInt; compilerproc;
Function fpc_AnsiStr_Compare_equal(const S1,S2 : AnsiString): SizeInt; compilerproc;
-Procedure fpc_AnsiStr_CheckZero(p : pointer); compilerproc;
-Procedure fpc_AnsiStr_CheckRange(len,index : SizeInt); compilerproc;
+Procedure fpc_AnsiStr_CheckRange(p : Pointer; index : SizeInt); compilerproc;
Procedure fpc_AnsiStr_SetLength (Var S : AnsiString; l : SizeInt); compilerproc;
Function fpc_ansistr_Copy (Const S : AnsiString; Index,Size : SizeInt) : AnsiString;compilerproc;
{$ifdef EXTRAANSISHORT}
@@ -327,8 +326,7 @@ procedure fpc_widestr_to_widechararray(out res: array of widechar; const src: Wi
{$endif ndef FPC_STRTOCHARARRAYPROC}
Function fpc_WideStr_Compare(const S1,S2 : WideString): SizeInt; compilerproc;
Function fpc_WideStr_Compare_equal(const S1,S2 : WideString): SizeInt; compilerproc;
-Procedure fpc_WideStr_CheckZero(p : pointer); compilerproc;
-Procedure fpc_WideStr_CheckRange(len,index : SizeInt); compilerproc;
+Procedure fpc_WideStr_CheckRange(p: Pointer; index : SizeInt); compilerproc;
Procedure fpc_WideStr_SetLength (Var S : WideString; l : SizeInt); compilerproc;
Function fpc_widestr_Copy (Const S : WideString; Index,Size : SizeInt) : WideString;compilerproc;
{$ifndef FPC_WINLIKEWIDESTRING}
@@ -413,8 +411,7 @@ procedure fpc_unicodestr_to_widechararray(out res: array of widechar; const src:
{$endif VER2_2}
Function fpc_UnicodeStr_Compare(const S1,S2 : UnicodeString): SizeInt; compilerproc;
Function fpc_UnicodeStr_Compare_equal(const S1,S2 : UnicodeString): SizeInt; compilerproc;
-Procedure fpc_UnicodeStr_CheckZero(p : pointer); compilerproc;
-Procedure fpc_UnicodeStr_CheckRange(len,index : SizeInt); compilerproc;
+Procedure fpc_UnicodeStr_CheckRange(p: Pointer; index : SizeInt); compilerproc;
Procedure fpc_UnicodeStr_SetLength (Var S : UnicodeString; l : SizeInt); compilerproc;
Function fpc_unicodestr_Copy (Const S : UnicodeString; Index,Size : SizeInt) : UnicodeString;compilerproc;
function fpc_unicodestr_Unique(Var S : Pointer): Pointer; compilerproc;
@@ -678,8 +675,10 @@ Procedure fpc_Initialize (Data,TypeInfo : pointer); compilerproc;
Procedure fpc_finalize (Data,TypeInfo: Pointer); compilerproc;
Procedure fpc_Addref (Data,TypeInfo : Pointer); compilerproc;
Procedure fpc_DecRef (Data,TypeInfo : Pointer); compilerproc;
-procedure fpc_initialize_array(data,typeinfo : pointer;count,size : SizeInt); compilerproc;
-procedure fpc_finalize_array(data,typeinfo : pointer;count,size : SizeInt); compilerproc;
+procedure fpc_initialize_array(data,typeinfo : pointer;count : SizeInt); compilerproc;
+procedure fpc_finalize_array(data,typeinfo : pointer;count : SizeInt); compilerproc;
+procedure fpc_addref_array(data,typeinfo: pointer; count: SizeInt); compilerproc;
+procedure fpc_decref_array(data,typeinfo: pointer; count: sizeint); compilerproc;
Function fpc_Copy (Src, Dest, TypeInfo : Pointer) : SizeInt; compilerproc;
Procedure fpc_Copy_proc (Src, Dest, TypeInfo : Pointer); compilerproc; inline;
{$endif FPC_HAS_FEATURE_RTTI}
diff --git a/rtl/inc/dynarr.inc b/rtl/inc/dynarr.inc
index 33fca66d96..78eb834d70 100644
--- a/rtl/inc/dynarr.inc
+++ b/rtl/inc/dynarr.inc
@@ -53,7 +53,6 @@ function fpc_dynarray_high(p : pointer) : tdynarrayindex;[Public,Alias:'FPC_DYNA
{ releases and finalizes the data of a dyn. array and sets p to nil }
procedure fpc_dynarray_clear_internal(p : pointer;ti : pointer);
var
- elesize : sizeint;
eletype : pdynarraytypeinfo;
begin
if p=nil then
@@ -64,12 +63,10 @@ procedure fpc_dynarray_clear_internal(p : pointer;ti : pointer);
ti:=aligntoptr(ti);
- elesize:=psizeint(ti)^;
eletype:=pdynarraytypeinfo(pointer(pdynarraytypeinfo(pointer(ti)+sizeof(sizeint)))^);
{ finalize all data }
- int_finalizearray(p+sizeof(tdynarray),eletype,pdynarray(p)^.high+1,
- elesize);
+ int_finalizearray(p+sizeof(tdynarray),eletype,pdynarray(p)^.high+1);
{ release the data }
freemem(p);
@@ -243,7 +240,7 @@ procedure fpc_dynarray_setlength(var p : pointer;pti : pointer;
begin
int_finalizearray(pointer(realp)+sizeof(tdynarray)+
elesize*dims[dimcount-1],
- eletype,realp^.high-dims[dimcount-1]+1,elesize);
+ eletype,realp^.high-dims[dimcount-1]+1);
reallocmem(realp,size);
end
else if dims[dimcount-1]>realp^.high+1 then
diff --git a/rtl/inc/exeinfo.pp b/rtl/inc/exeinfo.pp
index 40b4105bfb..87b66de5ca 100644
--- a/rtl/inc/exeinfo.pp
+++ b/rtl/inc/exeinfo.pp
@@ -170,38 +170,54 @@ type
{$ifdef netware}
+function getByte(var f:file):byte;
+ begin
+ BlockRead (f,getByte,1);
+ end;
+
+ procedure Skip (var f:file; bytes : longint);
+ var i : longint;
+ begin
+ for i := 1 to bytes do getbyte(f);
+ end;
+
+ function get0String (var f:file) : string;
+ var c : char;
+ begin
+ get0String := '';
+ c := char (getbyte(f));
+ while (c <> #0) do
+ begin
+ get0String := get0String + c;
+ c := char (getbyte(f));
+ end;
+ end;
+
+ function getint32 (var f:file): longint;
+ begin
+ blockread (F, getint32, 4);
+ end;
+
+
const SIZE_OF_NLM_INTERNAL_FIXED_HEADER = 130;
SIZE_OF_NLM_INTERNAL_VERSION_HEADER = 32;
SIZE_OF_NLM_INTERNAL_EXTENDED_HEADER = 124;
-function loadNetwareNLM:boolean;
+function openNetwareNLM(var e:TExeFile):boolean;
var valid : boolean;
name : string;
- StabLength,
- StabStrLength,
- alignAmount,
hdrLength,
dataOffset,
dataLength : longint;
-
- function getByte:byte;
- begin
- BlockRead (f,getByte,1);
- end;
-
- procedure Skip (bytes : longint);
- var i : longint;
- begin
- for i := 1 to bytes do getbyte;
- end;
+
function getLString : String;
var Res:string;
begin
- blockread (F, res, 1);
+ blockread (e.F, res, 1);
if length (res) > 0 THEN
- blockread (F, res[1], length (res));
- getbyte;
+ blockread (e.F, res[1], length (res));
+ getbyte(e.f);
getLString := res;
end;
@@ -210,42 +226,27 @@ var valid : boolean;
begin
getFixString := '';
for I := 1 to Len do
- getFixString := getFixString + char (getbyte);
+ getFixString := getFixString + char (getbyte(e.f));
end;
- function get0String : string;
- var c : char;
- begin
- get0String := '';
- c := char (getbyte);
- while (c <> #0) do
- begin
- get0String := get0String + c;
- c := char (getbyte);
- end;
- end;
function getword : word;
begin
- blockread (F, getword, 2);
+ blockread (e.F, getword, 2);
end;
- function getint32 : longint;
- begin
- blockread (F, getint32, 4);
- end;
+
begin
- processaddress := 0;
- LoadNetwareNLM:=false;
- stabofs:=-1;
- stabstrofs:=-1;
- { read and check header }
- Skip (SIZE_OF_NLM_INTERNAL_FIXED_HEADER);
+ e.sechdrofs := 0;
+ openNetwareNLM:=false;
+
+ // read and check header
+ Skip (e.f,SIZE_OF_NLM_INTERNAL_FIXED_HEADER);
getLString; // NLM Description
- getInt32; // Stacksize
- getInt32; // Reserved
- skip(5); // old Thread Name
+ getInt32(e.f); // Stacksize
+ getInt32(e.f); // Reserved
+ skip(e.f,5); // old Thread Name
getLString; // Screen Name
getLString; // Thread Name
hdrLength := -1;
@@ -256,7 +257,7 @@ begin
name := getFixString (8);
if (name = 'VeRsIoN#') then
begin
- Skip (SIZE_OF_NLM_INTERNAL_VERSION_HEADER-8);
+ Skip (e.f,SIZE_OF_NLM_INTERNAL_VERSION_HEADER-8);
end else
if (name = 'CoPyRiGh') then
begin
@@ -265,50 +266,50 @@ begin
end else
if (name = 'MeSsAgEs') then
begin
- skip (SIZE_OF_NLM_INTERNAL_EXTENDED_HEADER - 8);
+ skip (e.f,SIZE_OF_NLM_INTERNAL_EXTENDED_HEADER - 8);
end else
if (name = 'CuStHeAd') then
begin
- hdrLength := getInt32;
- dataOffset := getInt32;
- dataLength := getInt32;
- Skip (8); // dataStamp
+ hdrLength := getInt32(e.f);
+ dataOffset := getInt32(e.f);
+ dataLength := getInt32(e.f);
+ Skip (e.f,8); // dateStamp
Valid := false;
end else
Valid := false;
until not valid;
if (hdrLength = -1) or (dataOffset = -1) or (dataLength = -1) then
exit;
- (* The format of the section information is:
+
+ Seek (e.F, dataOffset);
+ e.sechdrofs := dataOffset;
+ openNetwareNLM := (e.sechdrofs > 0);
+end;
+
+function FindSectionNetwareNLM(var e:TExeFile;const asecname:string;var secofs,seclen:longint):boolean;
+var name : string;
+ alignAmount : longint;
+begin
+ seek(e.f,e.sechdrofs);
+ (* The format of the section information is:
null terminated section name
zeroes to adjust to 4 byte boundary
4 byte section data file pointer
4 byte section size *)
- Seek (F, dataOffset);
- stabOfs := 0;
- stabStrOfs := 0;
Repeat
- Name := Get0String;
+ Name := Get0String(e.f);
alignAmount := 4 - ((length (Name) + 1) MOD 4);
- Skip (alignAmount);
- if (Name = '.stab') then
+ Skip (e.f,AlignAmount);
+ if (Name = asecname) then
begin
- stabOfs := getInt32;
- stabLength := getInt32;
- stabcnt:=stabLength div sizeof(tstab);
+ secOfs := getInt32(e.f);
+ secLen := getInt32(e.f);
end else
- if (Name = '.stabstr') then
- begin
- stabStrOfs := getInt32;
- stabStrLength := getInt32;
- end else
- Skip (8);
- until (Name = '') or ((StabOfs <> 0) and (stabStrOfs <> 0));
- Seek (F,stabOfs);
- //if (StabOfs = 0) then __ConsolePrintf ('StabOfs = 0');
- //if (StabStrOfs = 0) then __ConsolePrintf ('StabStrOfs = 0');
- LoadNetwareNLM := ((stabOfs > 0) and (stabStrOfs > 0));
+ Skip(e.f,8);
+ until (Name = '') or (Name = asecname);
+ FindSectionNetwareNLM := (Name=asecname);
end;
+
{$endif}
diff --git a/rtl/inc/rtti.inc b/rtl/inc/rtti.inc
index 904b1a965c..2ec8e37c1d 100644
--- a/rtl/inc/rtti.inc
+++ b/rtl/inc/rtti.inc
@@ -19,85 +19,85 @@
type
TRTTIProc=procedure(Data,TypeInfo:Pointer);
+ PRecordElement=^TRecordElement;
+ TRecordElement=packed record
+ TypeInfo: Pointer;
+ Offset: Longint;
+ end;
+
+ PRecordInfo=^TRecordInfo;
+ TRecordInfo=packed record
+ Size: Longint;
+ Count: Longint;
+ { Elements: array[count] of TRecordElement }
+ end;
+
+ PArrayInfo=^TArrayInfo;
+ TArrayInfo=packed record
+ ElSize: SizeInt;
+ ElCount: SizeInt;
+ ElInfo: Pointer;
+ end;
+
+
+function RTTIArraySize(typeInfo: Pointer): SizeInt;
+begin
+ typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
+ result:=PArrayInfo(typeInfo)^.ElSize * PArrayInfo(typeInfo)^.ElCount;
+end;
+
+function RTTIRecordSize(typeInfo: Pointer): SizeInt;
+begin
+ typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
+ result:=PRecordInfo(typeInfo)^.Size;
+end;
+
+function RTTISize(typeInfo: Pointer): SizeInt;
+begin
+ case PByte(typeinfo)^ of
+ tkAString,tkWString,tkUString,
+ tkInterface,tkDynarray:
+ result:=sizeof(Pointer);
+{$ifdef FPC_HAS_FEATURE_VARIANTS}
+ tkVariant:
+ result:=sizeof(TVarData);
+{$endif FPC_HAS_FEATURE_VARIANTS}
+ tkArray:
+ result:=RTTIArraySize(typeinfo);
+ tkObject,tkRecord:
+ result:=RTTIRecordSize(typeinfo);
+ else
+ result:=-1;
+ end;
+end;
+
{ if you modify this procedure, fpc_copy must be probably modified as well }
procedure RecordRTTI(Data,TypeInfo:Pointer;rttiproc:TRTTIProc);
-{
- A record is designed as follows :
- 1 : tkrecord
- 2 : Length of name string (n);
- 3 : name string;
- 3+n : record size;
- 7+n : number of elements (N)
- 11+n : N times : Pointer to type info
- Offset in record
-}
var
- Temp : pbyte;
- namelen : byte;
count,
- offset,
i : longint;
- info : pointer;
begin
- Temp:=PByte(TypeInfo);
- inc(Temp);
- { Skip Name }
- namelen:=Temp^;
- inc(temp,namelen+1);
- temp:=aligntoptr(temp);
- { Skip size }
- inc(Temp,4);
- { Element count }
- Count:=PLongint(Temp)^;
- inc(Temp,sizeof(Count));
+ typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
+ Count:=PRecordInfo(typeInfo)^.Count;
+ Inc(PRecordInfo(typeInfo));
{ Process elements }
for i:=1 to count Do
begin
- Info:=PPointer(Temp)^;
- inc(Temp,sizeof(Info));
- Offset:=PLongint(Temp)^;
- inc(Temp,sizeof(Offset));
- rttiproc (Data+Offset,Info);
+ rttiproc (Data+PRecordElement(typeInfo)^.Offset,PRecordElement(typeInfo)^.TypeInfo);
+ Inc(PRecordElement(typeInfo));
end;
end;
{ if you modify this procedure, fpc_copy must be probably modified as well }
procedure ArrayRTTI(Data,TypeInfo:Pointer;rttiproc:TRTTIProc);
-{
- An array is designed as follows :
- 1 : tkArray;
- 2 : length of name string (n);
- 3 : NAme string
- 3+n : Element Size
- 7+n : Number of elements
- 11+n : Pointer to type of elements
-}
var
- Temp : pbyte;
- namelen : byte;
- count,
- size,
i : SizeInt;
- info : pointer;
begin
- Temp:=PByte(TypeInfo);
- inc(Temp);
- { Skip Name }
- namelen:=Temp^;
- inc(temp,namelen+1);
- temp:=aligntoptr(temp);
- { Element size }
- size:=PSizeInt(Temp)^;
- inc(Temp,sizeof(Size));
- { Element count }
- Count:=PSizeInt(Temp)^;
- inc(Temp,sizeof(Count));
- Info:=PPointer(Temp)^;
- inc(Temp,sizeof(Info));
+ typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
{ Process elements }
- for I:=0 to Count-1 do
- rttiproc(Data+(I*size),Info);
+ for I:=0 to PArrayInfo(typeInfo)^.ElCount-1 do
+ rttiproc(Data+(I*PArrayInfo(typeInfo)^.ElSize),PArrayInfo(typeInfo)^.ElInfo);
end;
@@ -268,13 +268,12 @@ Function fpc_Copy_internal (Src, Dest, TypeInfo : Pointer) : SizeInt;[external n
Function fpc_Copy (Src, Dest, TypeInfo : Pointer) : SizeInt;[Public,alias : 'FPC_COPY']; compilerproc;
var
+ ArrayInfo: PArrayInfo;
Temp : pbyte;
- namelen : byte;
copiedsize,
expectedoffset,
count,
offset,
- size,
i : SizeInt;
info : pointer;
begin
@@ -300,57 +299,31 @@ begin
{$endif FPC_HAS_FEATURE_WIDESTRINGS}
tkArray:
begin
- Temp:=PByte(TypeInfo);
- inc(Temp);
- { Skip Name }
- namelen:=Temp^;
- inc(temp,namelen+1);
- temp:=aligntoptr(temp);
-
- { Element size }
- size:=PSizeInt(Temp)^;
- inc(Temp,sizeof(Size));
-
- { Element count }
- Count:=PSizeInt(Temp)^;
- inc(Temp,sizeof(Count));
- Info:=PPointer(Temp)^;
- inc(Temp,sizeof(Info));
+ ArrayInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
{ Process elements }
- for I:=0 to Count-1 do
- fpc_Copy_internal(Src+(I*size),Dest+(I*size),Info);
- Result:=size*count;
+ for I:=0 to ArrayInfo^.ElCount-1 do
+ fpc_Copy_internal(Src+(I*ArrayInfo^.ElSize),Dest+(I*ArrayInfo^.ElSize),ArrayInfo^.ElInfo);
+ Result:=ArrayInfo^.ElSize*ArrayInfo^.ElCount;
end;
{$ifdef FPC_HAS_FEATURE_OBJECTS}
tkobject,
{$endif FPC_HAS_FEATURE_OBJECTS}
tkrecord:
begin
- Temp:=PByte(TypeInfo);
- inc(Temp);
- { Skip Name }
- namelen:=Temp^;
- inc(temp,namelen+1);
- temp:=aligntoptr(temp);
-
- Result:=plongint(temp)^;
+ Temp:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
- { Skip size }
- inc(Temp,4);
-
- { Element count }
- Count:=PLongint(Temp)^;
- inc(Temp,sizeof(longint));
+ Result:=PRecordInfo(Temp)^.Size;
+ Count:=PRecordInfo(Temp)^.Count;
+ Inc(PRecordInfo(Temp));
expectedoffset:=0;
{ Process elements with rtti }
for i:=1 to count Do
begin
- Info:=PPointer(Temp)^;
- inc(Temp,sizeof(Info));
- Offset:=PLongint(Temp)^;
+ Info:=PRecordElement(Temp)^.TypeInfo;
+ Offset:=PRecordElement(Temp)^.Offset;
+ Inc(PRecordElement(Temp));
if Offset>expectedoffset then
move((Src+expectedoffset)^,(Dest+expectedoffset)^,Offset-expectedoffset);
- inc(Temp,sizeof(longint));
copiedsize:=fpc_Copy_internal(Src+Offset,Dest+Offset,Info);
expectedoffset:=Offset+copiedsize;
end;
@@ -392,24 +365,44 @@ begin
end;
-procedure fpc_initialize_array(data,typeinfo : pointer;count,size : SizeInt); compilerproc;
+procedure fpc_initialize_array(data,typeinfo : pointer;count : SizeInt); [public,alias:'FPC_INITIALIZE_ARRAY'] compilerproc;
var
- i : SizeInt;
+ i, size : SizeInt;
begin
- if not(PByte(typeinfo)^ in [tkInteger,tkChar,tkEnumeration,tkFloat,tkSet,
- tkMethod,tkSString,tkLString,tkWChar,tkBool,tkInt64,tkQWord]) then
+ size:=RTTISize(typeinfo);
+ if size>0 then
for i:=0 to count-1 do
int_initialize(data+size*i,typeinfo);
end;
-procedure fpc_finalize_array(data,typeinfo : pointer;count,size : SizeInt); [Public,Alias:'FPC_FINALIZEARRAY']; compilerproc;
+procedure fpc_finalize_array(data,typeinfo : pointer;count : SizeInt); [Public,Alias:'FPC_FINALIZE_ARRAY']; compilerproc;
var
- i : SizeInt;
+ i, size: SizeInt;
begin
- if not(PByte(typeinfo)^ in [tkInteger,tkChar,tkEnumeration,tkFloat,tkSet,
- tkMethod,tkSString,tkLString,tkWChar,tkBool,tkInt64,tkQWord]) then
+ size:=RTTISize(typeinfo);
+ if size>0 then
for i:=0 to count-1 do
int_finalize(data+size*i,typeinfo);
end;
+procedure fpc_addref_array(data,typeinfo: pointer; count: SizeInt); [public,alias:'FPC_ADDREF_ARRAY']; compilerproc;
+ var
+ i, size: SizeInt;
+ begin
+ size:=RTTISize(typeinfo);
+ if size>0 then
+ for i:=0 to count-1 do
+ int_addref(data+size*i,typeinfo);
+ end;
+
+procedure fpc_decref_array(data,typeinfo: pointer; count: SizeInt); [public,alias:'FPC_DECREF_ARRAY']; compilerproc;
+ var
+ i, size: SizeInt;
+ begin
+ size:=RTTISize(typeinfo);
+ if size>0 then
+ for i:=0 to count-1 do
+ int_decref(data+size*i,typeinfo);
+ end;
+
diff --git a/rtl/inc/sstrings.inc b/rtl/inc/sstrings.inc
index c8ada78043..ae9cc4cd7e 100644
--- a/rtl/inc/sstrings.inc
+++ b/rtl/inc/sstrings.inc
@@ -455,8 +455,6 @@ type
end;
var
- p:Pstring;
-
enum_o2s : Penum_ord_to_string;
header:Penum_typeinfo;
body:Penum_typedata;
@@ -1340,8 +1338,6 @@ var l,h,m:cardinal;
spaces:byte;
t:shortstring;
-label error;
-
begin
{Val for numbers accepts spaces at the start, so lets do the same
for enums. Skip spaces at the start of the string.}
diff --git a/rtl/inc/system.fpd b/rtl/inc/system.fpd
index 5f2eea9736..f373414f42 100644
--- a/rtl/inc/system.fpd
+++ b/rtl/inc/system.fpd
@@ -62,3 +62,9 @@ Procedure ReadStr(Const S : String; Args : Arguments);
Procedure Pack(Const A : UnpackedArrayType; StartIndex : TIndexType; Out Z : PackedArrayType);
Procedure UnPack(Const Z : PackedArrayType; Out A : UnpackedArrayType; StartIndex : TIndexType);
+{$IFNDEF GO32V2}
+Var
+ mem : array[0..$7fffffff-1] of byte;
+ memw : array[0..($7fffffff div sizeof(word))-1] of word;
+ meml : array[0..($7fffffff div sizeof(longint))-1] of longint;
+{$ENDIF}
diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc
index 72163f415a..b911c5115d 100644
--- a/rtl/inc/system.inc
+++ b/rtl/inc/system.inc
@@ -786,9 +786,11 @@ var
begin
{ call cpu/fpu initialisation routine }
fpc_cpuinit;
- with {$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PInitFinalTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- InitFinalTable
- {$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION} do
+{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with PInitFinalTable(EntryInformation.InitFinalTable)^ do
+{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with InitFinalTable do
+{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
begin
for i:=1 to TableCount do
begin
@@ -815,9 +817,11 @@ end;
procedure FinalizeUnits;[public,alias:'FPC_FINALIZEUNITS'];
begin
- with {$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PInitFinalTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- InitFinalTable
- {$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION} do
+{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with PInitFinalTable(EntryInformation.InitFinalTable)^ do
+{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with InitFinalTable do
+{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
begin
while (InitCount>0) do
begin
diff --git a/rtl/inc/systemh.inc b/rtl/inc/systemh.inc
index 1b3cfe6bb1..b1fe1e4a5a 100644
--- a/rtl/inc/systemh.inc
+++ b/rtl/inc/systemh.inc
@@ -820,6 +820,7 @@ Function Pos(C:Char;const s:shortstring):SizeInt;
{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
Function Pos (const Substr : ShortString; const Source : AnsiString) : SizeInt;
Procedure SetString (out S : AnsiString; Buf : PChar; Len : SizeInt);
+Procedure SetString (out S : AnsiString; Buf : PWideChar; Len : SizeInt);
{$endif FPC_HAS_FEATURE_ANSISTRINGS}
Procedure SetString (out S : Shortstring; Buf : PChar; Len : SizeInt);
function ShortCompareText(const S1, S2: shortstring): SizeInt;
diff --git a/rtl/inc/threadvr.inc b/rtl/inc/threadvr.inc
index 538b99eac2..02af72e96d 100644
--- a/rtl/inc/threadvr.inc
+++ b/rtl/inc/threadvr.inc
@@ -52,15 +52,18 @@ procedure init_all_unit_threadvars;
var
i : integer;
begin
+{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with PltvInitTablesTable(EntryInformation.ThreadvarTablesTable)^ do
+{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with ThreadvarTablesTable do
+{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ begin
{$ifdef DEBUG_MT}
- WriteLn ('init_all_unit_threadvars (',
- {$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PltvInitTablesTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- ThreadvarTablesTable{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}.count,') units');
+ WriteLn ('init_all_unit_threadvars (',count,') units');
{$endif}
- for i := 1 to {$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PltvInitTablesTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- ThreadvarTablesTable{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}.count do
- init_unit_threadvars ({$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PltvInitTablesTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- ThreadvarTablesTable{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}.tables[i]);
+ for i := 1 to count do
+ init_unit_threadvars (tables[i]);
+ end;
end;
@@ -83,14 +86,18 @@ procedure copy_all_unit_threadvars;
var
i : integer;
begin
+{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with PltvInitTablesTable(EntryInformation.ThreadvarTablesTable)^ do
+{$else FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ with ThreadvarTablesTable do
+{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
+ begin
{$ifdef DEBUG_MT}
- WriteLn ('copy_all_unit_threadvars (',{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PltvInitTablesTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- ThreadvarTablesTable{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}.count,') units');
+ WriteLn ('copy_all_unit_threadvars (',count,') units');
{$endif}
- for i := 1 to {$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PltvInitTablesTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- ThreadvarTablesTable{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}.count do
- copy_unit_threadvars ({$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION}PltvInitTablesTable(EntryInformation.{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}
- ThreadvarTablesTable{$ifdef FPC_HAS_INDIRECT_MAIN_INFORMATION})^{$endif FPC_HAS_INDIRECT_MAIN_INFORMATION}.tables[i]);
+ for i := 1 to count do
+ copy_unit_threadvars (tables[i]);
+ end;
end;
procedure InitThreadVars(RelocProc : Pointer);
diff --git a/rtl/inc/ucomplex.pp b/rtl/inc/ucomplex.pp
index c9b304c0d0..0a4613cd75 100644
--- a/rtl/inc/ucomplex.pp
+++ b/rtl/inc/ucomplex.pp
@@ -344,7 +344,7 @@ Unit UComplex;
z.re := (znum.im + znum.re * tmp) / denom;
z.im := (-znum.re + znum.im * tmp) / denom;
end;
- end;
+ end;
operator / (znum : complex; r : real) z : complex;
{ division : z := znum / r }
@@ -572,7 +572,7 @@ Unit UComplex;
{ _________ }
{ argch(z) = -/+ ln(z + i.V 1 - z.z) }
begin
- carg_ch:=-cln(z+i*csqrt(z*z-1.0));
+ carg_ch:=-cln(z+i*csqrt(1.0-z*z));
end;
function carg_sh (z : complex) : complex;
@@ -587,7 +587,7 @@ Unit UComplex;
{ hyperbolic arc tangent }
{ argth(z) = 1/2 ln((z + 1) / (1 - z)) }
begin
- carg_th:=cln((z+1.0)/(z-1.0))/2.0;
+ carg_th:=cln((z+1.0)/(1.0-z))/2.0;
end;
{ functions to write out a complex value }
diff --git a/rtl/inc/ustrings.inc b/rtl/inc/ustrings.inc
index f805d376f1..ed7e3583a9 100644
--- a/rtl/inc/ustrings.inc
+++ b/rtl/inc/ustrings.inc
@@ -1304,16 +1304,10 @@ begin
exit(CompareWord(S1[1],S2[1],MaxI));
end;
-Procedure fpc_UnicodeStr_CheckZero(p : pointer);[Public,Alias : 'FPC_UNICODESTR_CHECKZERO']; compilerproc;
-begin
- if p=nil then
- HandleErrorFrame(201,get_frame);
-end;
-
-Procedure fpc_UnicodeStr_CheckRange(len,index : SizeInt);[Public,Alias : 'FPC_UNICODESTR_RANGECHECK']; compilerproc;
+Procedure fpc_UnicodeStr_CheckRange(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_UNICODESTR_RANGECHECK']; compilerproc;
begin
- if (index>len div 2) or (Index<1) then
+ if (p=nil) or (index>PUnicodeRec(p-UnicodeFirstOff)^.len div 2) or (Index<1) then
HandleErrorFrame(201,get_frame);
end;
diff --git a/rtl/inc/variants.pp b/rtl/inc/variants.pp
index fdd34ece40..75d89a042b 100644
--- a/rtl/inc/variants.pp
+++ b/rtl/inc/variants.pp
@@ -670,6 +670,7 @@ begin
VarCastError(varNull, varDouble)
else
Result := 0
+ { TODO: performance: custom variants must be handled after standard ones }
else if FindCustomVariantType(TVarData(v).vType, Handler) then
begin
VariantInit(dest);
@@ -693,6 +694,21 @@ begin
Result := VariantToCurrency(TVarData(V));
end;
+function CustomVarToLStr(const v: TVarData; out s: AnsiString): Boolean;
+var
+ handler: TCustomVariantType;
+ temp: TVarData;
+begin
+ result := FindCustomVariantType(v.vType, handler);
+ if result then
+ begin
+ VariantInit(temp);
+ handler.CastTo(temp, v, varString);
+ { out-semantic ensures that s is finalized,
+ so just copy the pointer and don't finalize the temp }
+ Pointer(s) := temp.vString;
+ end;
+end;
procedure sysvartolstr (var s : AnsiString; const v : Variant);
begin
@@ -701,7 +717,8 @@ begin
VarCastError(varNull, varString)
else
s := NullAsStringValue
- else
+ { TODO: performance: custom variants must be handled after standard ones }
+ else if not CustomVarToLStr(TVarData(v), s) then
S := VariantToAnsiString(TVarData(V));
end;
@@ -2643,7 +2660,6 @@ var
valuevtype,
arrayelementtype : TVarType;
tempvar : Variant;
- variantmanager : tvariantmanager;
begin
Dest:=TVarData(a);
{ get final Variant }
@@ -2686,8 +2702,7 @@ begin
end
else
begin
- GetVariantManager(variantmanager);
- variantmanager.varcast(tempvar,value,arrayelementtype);
+ VarCast(tempvar,value,arrayelementtype);
if arrayelementtype in [varOleStr,varDispatch,varUnknown] then
VarResultCheck(SafeArrayPutElement(p,PVarArrayCoorArray(indices),TVarData(tempvar).vPointer))
else
@@ -3328,17 +3343,13 @@ function VarTypeIsValidElementType(const aVarType: TVarType): Boolean;
var
customvarianttype : TCustomVariantType;
begin
- if FindCustomVariantType(aVarType,customvarianttype) then
- Result:=true
- else
- begin
- Result:=(aVarType and not(varByRef) and not(varArray)) in [varEmpty,varNull,varSmallInt,varInteger,
+ Result:=((aVarType and not(varByRef) and not(varArray)) in [varEmpty,varNull,varSmallInt,varInteger,
{$ifndef FPUNONE}
- varSingle,varDouble,varDate,
+ varSingle,varDouble,varDate,
{$endif}
- varCurrency,varOleStr,varDispatch,varError,varBoolean,
- varVariant,varUnknown,varShortInt,varByte,varWord,varLongWord,varInt64];
- end;
+ varCurrency,varOleStr,varDispatch,varError,varBoolean,
+ varVariant,varUnknown,varShortInt,varByte,varWord,varLongWord,varInt64]) or
+ FindCustomVariantType(aVarType,customvarianttype);
end;
@@ -3383,7 +3394,6 @@ procedure DynArrayToVariant(var V: Variant; const DynArray: Pointer; TypeInfo: P
dynarriter : tdynarrayiter;
p : Pointer;
temp : Variant;
- variantmanager : tvariantmanager;
dynarraybounds : tdynarraybounds;
type
TDynArray = array of Pointer;
@@ -3398,8 +3408,6 @@ procedure DynArrayToVariant(var V: Variant; const DynArray: Pointer; TypeInfo: P
if (Dims>1) and not(DynamicArrayIsRectangular(DynArray,TypeInfo)) then
exit;
- GetVariantManager(variantmanager);
-
{ retrieve Bounds array }
Setlength(dynarraybounds,Dims);
GetMem(vararraybounds,Dims*SizeOf(TVarArrayBound));
@@ -3466,7 +3474,7 @@ procedure DynArrayToVariant(var V: Variant; const DynArray: Pointer; TypeInfo: P
VarClear(temp);
end;
dynarriter.next;
- variantmanager.VarArrayPut(V,temp,Dims,PLongint(iter.Coords));
+ VarArrayPut(V,temp,Slice(iter.Coords^,Dims));
until not(iter.next);
finally
iter.done;
@@ -3487,7 +3495,6 @@ procedure DynArrayFromVariant(var DynArray: Pointer; const V: Variant; TypeInfo:
dynarriter : tdynarrayiter;
temp : Variant;
dynarrvartype : LongInt;
- variantmanager : tvariantmanager;
vararraybounds : PVarArrayBoundArray;
dynarraybounds : tdynarraybounds;
i : SizeInt;
@@ -3513,14 +3520,13 @@ procedure DynArrayFromVariant(var DynArray: Pointer; const V: Variant; TypeInfo:
dynarraybounds[i]:=vararraybounds^[i].ElementCount;
end;
DynArraySetLength(DynArray,TypeInfo,VarArrayDims,PSizeInt(dynarraybounds));
- GetVariantManager(variantmanager);
VarArrayLock(V);
try
iter.init(VarArrayDims,PVarArrayBoundArray(vararraybounds));
dynarriter.init(DynArray,TypeInfo,VarArrayDims,dynarraybounds);
if not iter.AtEnd then
repeat
- temp:=variantmanager.VarArrayGet(V,VarArrayDims,PLongint(iter.Coords));
+ temp:=VarArrayGet(V,Slice(iter.Coords^,VarArrayDims));
case dynarrvartype of
varSmallInt:
PSmallInt(dynarriter.data)^:=temp;
diff --git a/rtl/inc/wstrings.inc b/rtl/inc/wstrings.inc
index fe573bf12c..f0fa4572a4 100644
--- a/rtl/inc/wstrings.inc
+++ b/rtl/inc/wstrings.inc
@@ -729,16 +729,10 @@ begin
exit(CompareWord(S1[1],S2[1],MaxI));
end;
-Procedure fpc_WideStr_CheckZero(p : pointer);[Public,Alias : 'FPC_WIDESTR_CHECKZERO']; compilerproc;
-begin
- if p=nil then
- HandleErrorFrame(201,get_frame);
-end;
-
-Procedure fpc_WideStr_CheckRange(len,index : SizeInt);[Public,Alias : 'FPC_WIDESTR_RANGECHECK']; compilerproc;
+Procedure fpc_WideStr_CheckRange(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_WIDESTR_RANGECHECK']; compilerproc;
begin
- if (index>len div 2) or (Index<1) then
+ if (p=nil) or (index>PWideRec(p-WideFirstOff)^.len div 2) or (Index<1) then
HandleErrorFrame(201,get_frame);
end;
diff --git a/rtl/linux/arm/dllprt0.as b/rtl/linux/arm/dllprt0.as
index 269d691c04..a054991d31 100644
--- a/rtl/linux/arm/dllprt0.as
+++ b/rtl/linux/arm/dllprt0.as
@@ -7,34 +7,27 @@ _startlib:
.type FPC_SHARED_LIB_START,#function
FPC_SHARED_LIB_START:
mov ip, sp
- push {fp, ip, lr, pc}
+ stmfd sp!,{fp, ip, lr, pc}
sub fp, ip, #4
- sub sp, sp, #40
- /* load argc */
- mov a1, ip
-
- /* load and save a copy of argc */
- ldr a2, [a1]
+ /* a1 contains argc, a2 contains argv and a3 contains envp */
ldr ip, =operatingsystem_parameter_argc
- str a2, [ip]
-
- /* calc argv and store */
- add a1, a1, #4
- ldr ip, =operatingsystem_parameter_argv
str a1, [ip]
- /* calc envp and store */
- add a2, a2, #1
- add a2, a1, a2, lsl #2
+ ldr ip, =operatingsystem_parameter_argv
+ str a2, [ip]
ldr ip, =operatingsystem_parameter_envp
- str a2, [ip]
+ str a3, [ip]
/* save initial stackpointer */
ldr ip, =__stklen
str sp, [ip]
+ ldr ip, =TC_SYSTEM_ISLIBRARY
+ mov a1, #1
+ str a1, [ip]
+
/* call main and exit normally */
bl PASCALMAIN
ldmdb fp, {fp, sp, pc}
diff --git a/rtl/linux/system.pp b/rtl/linux/system.pp
index 6508aa42ad..9aae64619e 100644
--- a/rtl/linux/system.pp
+++ b/rtl/linux/system.pp
@@ -33,7 +33,7 @@ Unit System;
{$I sysunixh.inc}
-function get_cmdline:Pchar;
+function get_cmdline:Pchar;
property cmdline:Pchar read get_cmdline;
{$if defined(CPUARM) or defined(CPUM68K)}
@@ -179,6 +179,7 @@ begin
found:=true;
break;
end;
+ found:=found or (len=0); // also quote if len=0, bug 19114
if bufsize+len>=ARG_MAX-2 then
AddBuf;
if found then
@@ -186,8 +187,11 @@ begin
buf[bufsize]:='"';
inc(bufsize);
end;
- move(argv[i]^,buf[bufsize],len);
- inc(bufsize,len);
+ if len>0 then
+ begin
+ move(argv[i]^,buf[bufsize],len);
+ inc(bufsize,len);
+ end;
if found then
begin
buf[bufsize]:='"';
diff --git a/rtl/morphos/Makefile b/rtl/morphos/Makefile
index b944d667e0..5472b0a1c7 100644
--- a/rtl/morphos/Makefile
+++ b/rtl/morphos/Makefile
@@ -1,5 +1,5 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/10/21]
#
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
@@ -280,190 +280,190 @@ endif
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph
ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video keyboard mouse sockets clipboard datatypes asl ahi tinygl get9 muihelper
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils classes fgl strutils math typinfo varutils charset ucomplex getopts matrix fmtbcd variants types rtlconsts sysconst dateutil objects exec timer doslib utility hardware inputevent keymap graphics layers intuition aboxlib mui kvm video mouse keyboard sockets clipboard datatypes asl ahi tinygl get9 muihelper
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_LOADERS+=prt0
@@ -2542,7 +2542,7 @@ sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
- sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
+ sysutils$(PPUEXT) rtlconsts$(PPUEXT) typinfo$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/fgl.pp
diff --git a/rtl/morphos/Makefile.fpc b/rtl/morphos/Makefile.fpc
index 6222cb0f37..9bb52a90f7 100644
--- a/rtl/morphos/Makefile.fpc
+++ b/rtl/morphos/Makefile.fpc
@@ -15,7 +15,7 @@ units=$(SYSTEMUNIT) objpas macpas iso7185 strings \
exec timer doslib utility hardware inputevent keymap graphics layers \
intuition aboxlib mui \
# these units are here, because they depend on system interface units above
- kvm video keyboard mouse sockets \
+ kvm video mouse keyboard sockets \
# these can be moved to packages later
clipboard datatypes asl ahi tinygl get9 muihelper
#implicitunits=exeinfo
@@ -127,7 +127,7 @@ sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
- sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
+ sysutils$(PPUEXT) rtlconsts$(PPUEXT) typinfo$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
$(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
diff --git a/rtl/netware/Makefile b/rtl/netware/Makefile
index eb19dcbde8..5009c2a214 100644
--- a/rtl/netware/Makefile
+++ b/rtl/netware/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/05/05]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/02/11]
#
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 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
@@ -247,7 +247,7 @@ endif
ifndef CROSSBINDIR
CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
endif
-ifeq ($(OS_TARGET),darwin)
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
ifeq ($(OS_SOURCE),darwin)
DARWIN2DARWIN=1
endif
@@ -285,180 +285,193 @@ dsapi.imp dsevent.imp lib0.imp \
locnlm32.imp ndpsrpc.imp netnlm32.imp nit.imp \
nlmlib.imp nwpsrv3x.imp nwpsrv.imp nwsnut.imp \
requestr.imp socklib.imp streams.imp threads.imp \
-tli.imp vollib.imp ws2_32.imp ws2nlm.imp unicode.imp
+tli.imp vollib.imp ws2_32.imp ws2nlm.imp unicode.imp \
+nwpre.imp
ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
+endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings lineinfo lnfodwrf winsock heaptrc matrix dos crt objects sysconst initc sysutils types typinfo fgl classes fmtbcd cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconsts math varutils freebidi utf8bidi mouse video keyboard cmem dynlibs sockets aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_IMPLICITUNITS+=exeinfo
@@ -520,6 +533,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_IMPLICITUNITS+=exeinfo
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_IMPLICITUNITS+=exeinfo
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_IMPLICITUNITS+=exeinfo
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_IMPLICITUNITS+=exeinfo
endif
@@ -583,6 +602,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_IMPLICITUNITS+=exeinfo
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_IMPLICITUNITS+=exeinfo
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_IMPLICITUNITS+=exeinfo
endif
@@ -634,6 +656,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_IMPLICITUNITS+=exeinfo
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_IMPLICITUNITS+=exeinfo
+endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_LOADERS+=nwpre prelude
endif
@@ -694,6 +719,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_LOADERS+=nwpre prelude
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_LOADERS+=nwpre prelude
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_LOADERS+=nwpre prelude
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_LOADERS+=nwpre prelude
endif
@@ -757,6 +788,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_LOADERS+=nwpre prelude
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_LOADERS+=nwpre prelude
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_LOADERS+=nwpre prelude
endif
@@ -808,6 +842,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_LOADERS+=nwpre prelude
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_LOADERS+=nwpre prelude
+endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
endif
@@ -868,6 +905,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
endif
@@ -931,6 +974,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
endif
@@ -982,6 +1028,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_RSTS+=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
+endif
override INSTALL_FPCPACKAGE=y
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
@@ -1043,6 +1092,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
endif
@@ -1106,6 +1161,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
endif
@@ -1157,6 +1215,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC)
+endif
ifeq ($(FULL_TARGET),i386-linux)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
endif
@@ -1217,6 +1278,12 @@ endif
ifeq ($(FULL_TARGET),i386-symbian)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
endif
+ifeq ($(FULL_TARGET),i386-nativent)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
+endif
+ifeq ($(FULL_TARGET),i386-iphonesim)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
+endif
ifeq ($(FULL_TARGET),m68k-linux)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
endif
@@ -1280,6 +1347,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
+endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
endif
@@ -1331,6 +1401,9 @@ endif
ifeq ($(FULL_TARGET),armeb-embedded)
override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(COMMON)
+endif
ifdef REQUIRE_UNITSDIR
override UNITSDIR+=$(REQUIRE_UNITSDIR)
endif
@@ -1658,7 +1731,7 @@ DEBUGSYMEXT=.xcoff
SHORTSUFFIX=mac
IMPORTLIBPREFIX=imp
endif
-ifeq ($(OS_TARGET),darwin)
+ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)
BATCHEXT=.sh
EXEEXT=
HASSHAREDLIB=1
@@ -1673,6 +1746,10 @@ 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
@@ -2438,6 +2515,9 @@ endif
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
@@ -2485,6 +2565,9 @@ 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)
@@ -2640,10 +2723,6 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
copyimpfiles:
$(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
-nwpre$(OEXT) : nwpre.as
- $(AS) -o $(UNITTARGETDIRPREFIX)nwpre$(OEXT) nwpre.as
-prelude$(OEXT) : prelude.as
- $(AS) -o $(UNITTARGETDIRPREFIX)prelude$(OEXT) prelude.as
$(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp nwsys.inc $(SYSDEPS)
$(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
@@ -2652,6 +2731,7 @@ objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
$(SYSTEMUNIT)$(PPUEXT)
+nwpre$(PPUEXT) : nwpre.pp $(SYSTEMUNIT)$(PPUEXT)
netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
winsock$(PPUEXT) : winsock.pp $(SYSTEMUNIT)$(PPUEXT)
sockets$(PPUEXT) : sockets.pp netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
diff --git a/rtl/netware/Makefile.fpc b/rtl/netware/Makefile.fpc
index 97f585b46f..a70ff619e1 100644
--- a/rtl/netware/Makefile.fpc
+++ b/rtl/netware/Makefile.fpc
@@ -16,7 +16,7 @@ units=$(SYSTEMUNIT) objpas macpas iso7185 strings \
charset ucomplex variants \
rtlconsts math varutils freebidi utf8bidi \
mouse video keyboard cmem dynlibs sockets \
- aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes
+ aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
rsts=math varutils variants typinfo classes dateutils sysconst convutils rtlconsts
implicitunits=exeinfo
@@ -74,7 +74,8 @@ dsapi.imp dsevent.imp lib0.imp \
locnlm32.imp ndpsrpc.imp netnlm32.imp nit.imp \
nlmlib.imp nwpsrv3x.imp nwpsrv.imp nwsnut.imp \
requestr.imp socklib.imp streams.imp threads.imp \
-tli.imp vollib.imp ws2_32.imp ws2nlm.imp unicode.imp
+tli.imp vollib.imp ws2_32.imp ws2nlm.imp unicode.imp \
+nwpre.imp
[rules]
@@ -103,11 +104,11 @@ copyimpfiles:
# Loaders
#
-nwpre$(OEXT) : nwpre.as
- $(AS) -o $(UNITTARGETDIRPREFIX)nwpre$(OEXT) nwpre.as
+#nwpre$(OEXT) : nwpre.as
+# $(AS) -o $(UNITTARGETDIRPREFIX)nwpre$(OEXT) nwpre.as
-prelude$(OEXT) : prelude.as
- $(AS) -o $(UNITTARGETDIRPREFIX)prelude$(OEXT) prelude.as
+#prelude$(OEXT) : prelude.as
+# $(AS) -o $(UNITTARGETDIRPREFIX)prelude$(OEXT) prelude.as
#
# System Units (System, Objpas, Strings)
@@ -131,6 +132,8 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
# System Dependent Units
#
+nwpre$(PPUEXT) : nwpre.pp $(SYSTEMUNIT)$(PPUEXT)
+
netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
winsock$(PPUEXT) : winsock.pp $(SYSTEMUNIT)$(PPUEXT)
diff --git a/rtl/netware/nwpre.imp b/rtl/netware/nwpre.imp
new file mode 100644
index 0000000000..8a3bc8b6d7
--- /dev/null
+++ b/rtl/netware/nwpre.imp
@@ -0,0 +1,6 @@
+#imports needed by nwpre, will be used by the
+#internal linker, ad 7 apr 2011
+ _SetupArgV_411
+ _TerminateNLM
+ _StartNLM
+ CSetB
diff --git a/rtl/netware/nwpre.pp b/rtl/netware/nwpre.pp
index 370e50560c..967f46e21c 100644
--- a/rtl/netware/nwpre.pp
+++ b/rtl/netware/nwpre.pp
@@ -1,151 +1,192 @@
-{
- This file is part of the Free Pascal run time library.
- Copyright (c) 1999-2000 by the Free Pascal development team
- Copyright (c) 2001 Armin Diehl
-
- This unit implements the startup code for a netware nlm. It must be the first object file
- linked. Currently the 'old-style', similar to novell's prelude.obj is used. With the newer
- way (novells nwpre.obj) i only got abends. Dont know what's different in novells nwpre.
-
- 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.
-
-**********************************************************************}
+(*
+# $Id: nwpre.as,v 1.3 2003/03/25 18:17:54 armin Exp $
+# This file is part of the Free Pascal run time library.
+# Copyright (c) 1999-2011 by the Free Pascal development team
+# Copyright (c) 2002-2011 Armin Diehl
+#
+# This is the (nwpre-like) startup code for netware (clib)
+#
+# 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.
+#
+#**********************************************************************
+# This version initializes BSS
+#
+# Imported functions will not be known by the linker because only the
+# generated object file will be included into the link process. The
+# ppu will not be read. Therefore the file nwpre.imp containing the
+# names of all imported functions needs to be created. This file
+# will be used by the internal linker to import the needed functions.
+#**********************************************************************
+*)
unit nwpre;
interface
-{ 2000/08/29 armin: first version, untested
- 2000/09/02 armin: Dont know why its not working with kNLMInfo...
- It always abends in TerminateNLM, so i am using the old style
- 2001/04/15 armin: Added comments, S-
- Removed dead code }
-
-{$DEFINE OldPrelude}
-
-FUNCTION _Prelude (NLMHandle : LONGINT;
- initErrorScreenID : LONGINT;
- cmdLineP : PCHAR;
- loadDirectoryPath : PCHAR;
- uninitializedDataLength : LONGINT;
- NLMFileHandle : LONGINT;
- readRoutineP : POINTER;
- customDataOffset : LONGINT;
- customDataSize : LONGINT) : LONGINT; CDECL;
-
-
implementation
-{$S-}
-
-FUNCTION _TerminateNLM (NLMInformation : POINTER;
- threadID, status : LONGINT) : LONGINT; CDECL; EXTERNAL;
-
-FUNCTION _SetupArgV_411 (MainProc : POINTER) : LONGINT; CDECL; EXTERNAL;
-
-FUNCTION _StartNLM (NLMHandle : LONGINT;
- initErrorScreenID : LONGINT;
- cmdLineP : PCHAR;
- loadDirectoryPath : PCHAR;
- uninitializedDataLength : LONGINT;
- NLMFileHandle : LONGINT;
- readRoutineP : POINTER;
- customDataOffset : LONGINT;
- customDataSize : LONGINT;
- NLMInformation : POINTER;
- userStartFunc : POINTER) : LONGINT; CDECL; EXTERNAL;
-
-
-{**************************************************************************************************}
-
-CONST TRADINIONAL_NLM_INFO_SIGNATURE = 0;
- TRADINIONAL_FLAVOR = 0;
- TRADINIONAL_VERSION = 0;
- LIBERTY_VERSION = 1;
- TERMINATE_BY_EXTERNAL_THREAD = 0;
- TERMINATE_BY_UNLOAD = 5;
-
-
-{$IFDEF OldPrelude}
-CONST NLMID : LONGINT = 0;
-{$ELSE}
-TYPE
- kNLMInfoT =
- PACKED RECORD
- Signature : ARRAY [0..3] OF CHAR; // LONG
- Flavor : LONGINT;
- Version : LONGINT;
- LongDoubleSize : LONGINT;
- wchar_tSize : LONGINT;
- END;
-
-CONST NLM_INFO_SIGNATURE = 'NLMI'; // 0x494d3c3e;
-
- kNLMInfo : kNLMInfoT =
- (Signature : NLM_INFO_SIGNATURE;
- Flavor : TRADINIONAL_FLAVOR; // 0
- Version : LIBERTY_VERSION; // 1
- LongDoubleSize : 8;
- wchar_tSize : 2);
-{$ENDIF}
-
-{**************************************************************************************************}
-
-{ _nlm_main is defined in system.pp. It sets command line parameters and calls PASCALMAIN }
-FUNCTION _nlm_main (Argc : LONGINT; ArgV : ARRAY OF PCHAR) : LONGINT; CDECL;
-EXTERNAL;
-
-
-FUNCTION _Stop : LONGINT; CDECL;
-BEGIN
- {$IFDEF OldPrelude}
- _Stop := _TerminateNLM (POINTER(NLMID),0,TERMINATE_BY_UNLOAD);
- {$ELSE}
- _Stop := _TerminateNLM (@kNLMInfo,0,TERMINATE_BY_UNLOAD);
- {$ENDIF}
-END;
-
-
-FUNCTION _cstart_ : LONGINT; CDECL;
-BEGIN
- _cstart_ := _SetupArgV_411 (@_nlm_main);
-END;
-
-
-FUNCTION _Prelude (NLMHandle : LONGINT;
- initErrorScreenID : LONGINT;
- cmdLineP : PCHAR;
- loadDirectoryPath : PCHAR;
- uninitializedDataLength : LONGINT;
- NLMFileHandle : LONGINT;
- readRoutineP : POINTER;
- customDataOffset : LONGINT;
- customDataSize : LONGINT) : LONGINT; CDECL;
-BEGIN
- _Prelude := _StartNLM
- (NLMHandle,
- initErrorScreenID,
- cmdLineP,
- loadDirectoryPath,
- uninitializedDataLength,
- NLMFileHandle,
- readRoutineP,
- customDataOffset,
- customDataSize,
- {$IFDEF OldPrelude}
- @NLMID,
- {$ELSE}
- @kNLMInfo,
- {$ENDIF}
- @_cstart_);
-END;
-
-
+procedure _SetupArgV_411 (startProc:pointer); cdecl; external 'clib' name '_SetupArgV_411';
+procedure _nlm_main; external name '_nlm_main';
+procedure FPC_NW_CHECKFUNCTION; external name 'FPC_NW_CHECKFUNCTION';
+function _StartNLM (NLMHandle : longint;
+ initErrorScreenID : longint;
+ cmdLineP : pchar;
+ loadDirectoryPath : pchar;
+ uninitializedDataLength : longint;
+ NLMFileHandle : longint;
+ readRoutineP : pointer;
+ customDataOffset : longint;
+ customDataSize : longint;
+ NLMInformation : pointer;
+ userStartFunc : pointer) : longint; cdecl; external '!clib' name '_StartNLM';
+
+
+function _TerminateNLM (NLMInformation : pointer;
+ threadID, status : longint) : longint; cdecl; external '!clib' name '_TerminateNLM';
+
+
+procedure _Stop; cdecl; forward;
+
+// This is the main program (not loader) Entry-Point that will be called by netware
+// it sets up the argc and argv and calls _nlm_main (in system.pp)
+
+procedure _pasStart; assembler; export; [alias:'_pasStart_'];
+asm
+ pushl $_nlm_main
+ call _SetupArgV_411
+ addl $4,%esp
+ ret
+// this is a hack to avoid that FPC_NW_CHECKFUNCTION will be
+// eleminated by the linker (with smartlinking)
+// TODO: change the internal linker to allow check and stop
+ call FPC_NW_CHECKFUNCTION
+ call _Stop
+end;
+
+
+// structure needed by clib
+type kNLMInfoT =
+ packed record
+ Signature : array [0..3] of char; // LONG 'NLMI'
+ Flavor : longint; // TRADINIONAL_FLAVOR = 0
+ Version : longint; // TRADINIONAL_VERSION = 0, LIBERTY_VERSION = 1
+ LongDoubleSize : longint; // gcc nwpre defines 12, watcom 8
+ wchar_tSize : longint;
+ end;
+
+var
+ _kNLMInfo:kNLMInfoT = (Signature:'NLMI';Flavor:0;Version:1;LongDoubleSize:8;wChar_tSize:2);
+
+
+// symbol is generated by the internal linker, when using ld in the future again,
+// the link script for ld needs to be modified to include this symbol
+ bss : ptruint; external name '__bss_start__';
+
+
+// fillchar
+// netware kernel function
+procedure CSetB(value:byte; var addr; count:longint); cdecl; external '!' name 'CSetB';
+
+
+// this will be called by the loader, we pass the address of _pasStart_ and
+// _kNLMInfo (needed by clib) and clib will call _pasStart within a newly
+// created thread
+function _Prelude (NLMHandle : longint;
+ initErrorScreenID : longint;
+ cmdLineP : pchar;
+ loadDirectoryPath : pchar;
+ uninitializedDataLength : longint;
+ NLMFileHandle : longint;
+ readRoutineP : pointer;
+ customDataOffset : longint;
+ customDataSize : longint) : longint; cdecl; export; [alias:'_Prelude'];
+begin
+ // initialize BSS
+ CSetB(0,bss,uninitializedDataLength);
+
+ // let clib setup a thread and call pasStart in this new thread
+ _Prelude := _StartNLM (NLMHandle,
+ initErrorScreenID,
+ cmdLineP,
+ loadDirectoryPath,
+ uninitializedDataLength,
+ NLMFileHandle,
+ readRoutineP,
+ customDataOffset,
+ customDataSize,
+ @_kNLMInfo,
+ @_pasStart);
+end;
+
+(*
+procedure _Prelude; assembler; export; [alias:'_Prelude'];
+asm
+ pushl %ebp
+ movl %esp,%ebp
+ pushl %edi
+ pushl %esi
+ pushl %ebx
+ movl 0x14(%ebp),%edi
+ movl 0x18(%ebp),%esi
+ movl %esi, __uninitializedDataSize
+ movl 0x1c(%ebp),%ebx
+ movl 0x20(%ebp),%ecx
+ movl 0x28(%ebp),%eax
+ pushl $_pasStart
+ pushl $_kNLMInfo
+ pushl %eax
+ movl 0x24(%ebp),%edx // 1b7f6
+ pushl %edx
+ pushl %ecx
+ pushl %ebx
+ pushl %esi // uninitialized data size
+ pushl %edi
+ movl 0x10(%ebp),%edx
+ pushl %edx
+ movl 0xc(%ebp),%edx
+ pushl %edx
+ movl 0x8(%ebp),%edx
+ pushl %edx
+ call _StartNLM
+ test %eax,%eax
+ jne .Lx1
+ xorl %eax,%eax // dont know why this is needed ?
+.Lx1:
+ lea 0xfffffff4(%ebp),%esp
+ popl %ebx
+ popl %esi
+ popl %edi
+ movl %ebp,%esp
+ popl %ebp
+ ret
+end;
+*)
+
+//# the global stop-function
+
+// fpc will generate an (unneeded) stack frame here, gcc does not
+(*
+procedure _Stop; cdecl; export; [alias:'_Stop'];
+begin
+ _TerminateNLM (@_kNLMInfo,0,5);
+end;
+*)
+
+procedure _Stop; cdecl; assembler; [alias:'_Stop'];
+asm
+ pushl $0x5
+ pushl $0x0
+ movl _kNLMInfo,%edx
+ pushl %edx
+ call _TerminateNLM
+ addl $0x0c,%esp
+ ret
+end;
end.
diff --git a/rtl/netware/system.pp b/rtl/netware/system.pp
index 0be2463215..2a45147f68 100644
--- a/rtl/netware/system.pp
+++ b/rtl/netware/system.pp
@@ -1,6 +1,7 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2000 by the Free Pascal development team.
+ Copyright (c) 2001-2011 by Armin Diehl.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
@@ -69,7 +70,6 @@ VAR
ArgV : ppchar;
NetwareCheckFunction : TNWCheckFunction;
NetwareMainThreadGroupID: longint;
- NetwareCodeStartAddress : dword;
NetwareUnloadProc : pointer = nil; {like exitProc but for nlm unload only}
CONST
@@ -97,6 +97,7 @@ procedure NWSysSetThreadFunctions (crs:TSysCloseAllRemainingSemaphores;
function NWGetCodeStart : pointer; // needed for lineinfo
+
implementation
{ Indicate that stack checking is taken care by OS}
{$DEFINE NO_GENERIC_STACK_CHECK}
@@ -115,26 +116,21 @@ procedure fpc_do_exit;external name 'FPC_DO_EXIT';
Startup
*****************************************************************************}
- function __GetBssStart : pointer; external name '__getBssStart';
- function __getUninitializedDataSize : longint; external name '__getUninitializedDataSize';
- //function __getDataStart : longint; external name '__getDataStart';
- function __GetTextStart : longint; external name '__getTextStart';
PROCEDURE nlm_main (_ArgC : LONGINT; _ArgV : ppchar); CDECL; [public,alias: '_nlm_main'];
BEGIN
- // Initialize BSS
- if __getUninitializedDataSize > 0 then
- fillchar (__getBssStart^,__getUninitializedDataSize,0);
- NetwareCodeStartAddress := __GetTextStart;
+ // Initialize of BSS now done in nwpre
ArgC := _ArgC;
ArgV := _ArgV;
fpc_threadvar_relocate_proc := nil;
PASCALMAIN;
END;
+var dottext : ptruint; external name '__text_start__';
+
function NWGetCodeStart : pointer; // needed for lineinfo
begin
- NWGetCodeStart := pointer(NetwareCodeStartAddress);
+ NWGetCodeStart := @dottext;
end;
diff --git a/rtl/objpas/classes/classesh.inc b/rtl/objpas/classes/classesh.inc
index 584f6796b5..a33117ebd0 100644
--- a/rtl/objpas/classes/classesh.inc
+++ b/rtl/objpas/classes/classesh.inc
@@ -816,7 +816,7 @@ type
constructor Create(const Stream: IStream);
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
+ function Seek(const Offset: int64; Origin: TSeekOrigin): int64; override;
procedure Check(err:longint); virtual;
end;
@@ -926,7 +926,7 @@ type
private
Res: TFPResourceHandle;
Handle: THandle;
- procedure Initialize(Instance: THandle; Name, ResType: PWideChar);
+ procedure Initialize(Instance: THandle; Name, ResType: PWideChar; NameIsID: Boolean);
public
constructor Create(Instance: THandle; const ResName: WideString; ResType: PWideChar);
constructor CreateFromID(Instance: THandle; ResID: Integer; ResType: PWideChar);
@@ -937,7 +937,7 @@ type
private
Res: TFPResourceHandle;
Handle: THandle;
- procedure Initialize(Instance: THandle; Name, ResType: PChar);
+ procedure Initialize(Instance: THandle; Name, ResType: PChar; NameIsID: Boolean);
public
constructor Create(Instance: THandle; const ResName: string; ResType: PChar);
constructor CreateFromID(Instance: THandle; ResID: Integer; ResType: PChar);
diff --git a/rtl/objpas/classes/streams.inc b/rtl/objpas/classes/streams.inc
index b5d3d69470..c3c139b7da 100644
--- a/rtl/objpas/classes/streams.inc
+++ b/rtl/objpas/classes/streams.inc
@@ -772,49 +772,61 @@ end;
{****************************************************************************}
{$ifdef UNICODE}
-procedure TResourceStream.Initialize(Instance: THandle; Name, ResType: PWideChar);
+procedure TResourceStream.Initialize(Instance: THandle; Name, ResType: PWideChar; NameIsID: Boolean);
begin
Res:=FindResource(Instance, Name, ResType);
if Res=0 then
- raise EResNotFound.CreateFmt(SResNotFound,[Name]);
+ if NameIsID then
+ raise EResNotFound.CreateFmt(SResNotFound,[IntToStr(PtrInt(Name))])
+ else
+ raise EResNotFound.CreateFmt(SResNotFound,[Name]);
Handle:=LoadResource(Instance,Res);
if Handle=0 then
- raise EResNotFound.CreateFmt(SResNotFound,[Name]);
+ if NameIsID then
+ raise EResNotFound.CreateFmt(SResNotFound,[IntToStr(PtrInt(Name))])
+ else
+ raise EResNotFound.CreateFmt(SResNotFound,[Name]);
SetPointer(LockResource(Handle),SizeOfResource(Instance,Res));
end;
constructor TResourceStream.Create(Instance: THandle; const ResName: WideString; ResType: PWideChar);
begin
inherited create;
- Initialize(Instance,PWideChar(ResName),ResType);
+ Initialize(Instance,PWideChar(ResName),ResType,False);
end;
constructor TResourceStream.CreateFromID(Instance: THandle; ResID: Integer; ResType: PWideChar);
begin
inherited create;
- Initialize(Instance,PWideChar(ResID),ResType);
+ Initialize(Instance,PWideChar(ResID),ResType,True);
end;
{$else UNICODE}
-procedure TResourceStream.Initialize(Instance: THandle; Name, ResType: PChar);
+procedure TResourceStream.Initialize(Instance: THandle; Name, ResType: PChar; NameIsID: Boolean);
begin
Res:=FindResource(Instance, Name, ResType);
if Res=0 then
- raise EResNotFound.CreateFmt(SResNotFound,[Name]);
+ if NameIsID then
+ raise EResNotFound.CreateFmt(SResNotFound,[IntToStr(PtrInt(Name))])
+ else
+ raise EResNotFound.CreateFmt(SResNotFound,[Name]);
Handle:=LoadResource(Instance,Res);
if Handle=0 then
- raise EResNotFound.CreateFmt(SResNotFound,[Name]);
+ if NameIsID then
+ raise EResNotFound.CreateFmt(SResNotFound,[IntToStr(PtrInt(Name))])
+ else
+ raise EResNotFound.CreateFmt(SResNotFound,[Name]);
SetPointer(LockResource(Handle),SizeOfResource(Instance,Res));
end;
constructor TResourceStream.Create(Instance: THandle; const ResName: string; ResType: PChar);
begin
inherited create;
- Initialize(Instance,pchar(ResName),ResType);
+ Initialize(Instance,pchar(ResName),ResType,False);
end;
constructor TResourceStream.CreateFromID(Instance: THandle; ResID: Integer; ResType: PChar);
begin
inherited create;
- Initialize(Instance,pchar(PtrInt(ResID)),ResType);
+ Initialize(Instance,pchar(PtrInt(ResID)),ResType,True);
end;
{$endif UNICODE}
@@ -1060,12 +1072,9 @@ begin
Check(FStream.Read(@Buffer, Count, @Result));
end;
-function TProxyStream.Seek(Offset: Longint; Origin: Word): Longint;
-var
- Pos: Int64;
+function TProxyStream. Seek(const Offset: int64; Origin: TSeekOrigin): int64;
begin
- Check(FStream.Seek(Offset, Origin, Pos));
- Result := Pos;
+ Check(FStream.Seek(Offset, ord(Origin), result));
end;
function TProxyStream.Write(const Buffer; Count: Longint): Longint;
diff --git a/rtl/objpas/cvarutil.inc b/rtl/objpas/cvarutil.inc
index acb4df178c..65c3a67f2c 100644
--- a/rtl/objpas/cvarutil.inc
+++ b/rtl/objpas/cvarutil.inc
@@ -833,25 +833,19 @@ var
begin
s := WideString(p);
- if not (TryStrToDateTime(s, Result) or
- TryStrToDate(s, Result) or
- TryStrToTime(s, Result)) then
+ if not TryStrToDateTime(s, Result) then
VariantTypeMismatch(varOleStr, varDate);
end;
Function LStrToDate(p: Pointer) : TDateTime;
begin
- if not (TryStrToDateTime(AnsiString(p), Result) or
- TryStrToDate(AnsiString(p), Result) or
- TryStrToTime(AnsiString(p), Result)) then
+ if not TryStrToDateTime(AnsiString(p), Result) then
VariantTypeMismatch(varString, varDate);
end;
Function UStrToDate(p: Pointer) : TDateTime;
begin
- if not (TryStrToDateTime(UnicodeString(p), Result) or
- TryStrToDate(UnicodeString(p), Result) or
- TryStrToTime(UnicodeString(p), Result)) then
+ if not TryStrToDateTime(UnicodeString(p), Result) then
VariantTypeMismatch(varUString, varDate);
end;
@@ -1287,6 +1281,14 @@ begin
end; {$ENDIF}
end;
+function VarDateToString(DT: TDateTime): AnsiString;
+begin
+ if Trunc(DT) = 0 then
+ Result := TimeToStr(DT)
+ else
+ Result := DateTimeToStr(DT);
+end;
+
{--- WideString ---}
Function VariantToWideString(const VargSrc : TVarData) : WideString;
@@ -1306,7 +1308,7 @@ begin
varSingle : Result := FloatToStr(vSingle);
varDouble : Result := FloatToStr(vDouble);
varCurrency : Result := FloatToStr(vCurrency);
- varDate : Result := FloatToStr(vDate);
+ varDate : Result := VarDateToString(vDate);
{$endif}
varBoolean : Result := BoolToStr(vBoolean, True);
varVariant : Result := VariantToWideString(PVarData(vPointer)^);
@@ -1329,7 +1331,7 @@ begin
varSingle : Result := FloatToStr(PSingle(vPointer)^);
varDouble : Result := FloatToStr(PDouble(vPointer)^);
varCurrency : Result := FloatToStr(PCurrency(vPointer)^);
- varDate : Result := FloatToStr(PDate(vPointer)^);
+ varDate : Result := VarDateToString(PDate(vPointer)^);
{$endif}
varBoolean : Result := BoolToStr(PWordBool(vPointer)^, True);
varVariant : Result := VariantToWideString(PVarData(vPointer)^);
@@ -1373,7 +1375,7 @@ begin
varSingle : Result := FloatToStr(vSingle);
varDouble : Result := FloatToStr(vDouble);
varCurrency : Result := FloatToStr(vCurrency);
- varDate : Result := DateToStr(vDate);
+ varDate : Result := VarDateToString(vDate);
{$endif}
varBoolean : Result := BoolToStr(vBoolean, True);
varVariant : Result := VariantToAnsiString(PVarData(vPointer)^);
@@ -1396,7 +1398,7 @@ begin
varSingle : Result := FloatToStr(PSingle(vPointer)^);
varDouble : Result := FloatToStr(PDouble(vPointer)^);
varCurrency : Result := FloatToStr(PCurrency(vPointer)^);
- varDate : Result := DateToStr(PDate(vPointer)^);
+ varDate : Result := VarDateToString(PDate(vPointer)^);
{$endif}
varBoolean : Result := BoolToStr(PWordBool(vPointer)^, True);
varVariant : Result := VariantToAnsiString(PVarData(vPointer)^);
@@ -1498,7 +1500,7 @@ Var
i: Integer;
begin
- Writeln(F,'---> ', aName, ' at $', IntToHex(Cardinal(@VargSrc), 8), ' <----------------');
+ Writeln(F,'---> ', aName, ' at $', HexStr(@VargSrc), ' <----------------');
with VargSrc do begin
if vType and varByRef = varByRef then
@@ -1526,7 +1528,7 @@ begin
WriteLn;
if vType and varArray = varArray then begin
- Writeln(F,'---< ', aName, ' at $', IntToHex(Cardinal(@VargSrc), 8), ' >----------------');
+ Writeln(F,'---< ', aName, ' at $', HexStr(@VargSrc), ' >----------------');
Writeln(F);
Exit;
end;
@@ -1537,7 +1539,7 @@ begin
if (vType and varByRef = varByRef) or (vType and varTypeMask = varVariant) then
if not Assigned(vPointer) then begin
WriteLn(F, 'nil]');
- Writeln(F,'---< ', aName, ' at $', IntToHex(Cardinal(@VargSrc), 8), ' >----------------');
+ Writeln(F,'---< ', aName, ' at $', HexStr(@VargSrc), ' >----------------');
Writeln(F);
Exit;
end;
@@ -1593,7 +1595,7 @@ begin
end;
end;
- Writeln(F,'---< ', aName, ' at $', IntToHex(Cardinal(@VargSrc), 8), ' >----------------');
+ Writeln(F,'---< ', aName, ' at $', HexStr(@VargSrc), ' >----------------');
Writeln(F);
end;
diff --git a/rtl/objpas/dateutil.inc b/rtl/objpas/dateutil.inc
index 22a3003f2e..436c221d88 100644
--- a/rtl/objpas/dateutil.inc
+++ b/rtl/objpas/dateutil.inc
@@ -21,7 +21,7 @@ interface
{$ifndef FPUNONE}
uses
- SysUtils, Math, Types;
+ SysUtils, Math;
{ ---------------------------------------------------------------------
Various constants
@@ -440,13 +440,13 @@ end;
Simple trimming functions.
---------------------------------------------------------------------}
-Function DateOf(const AValue: TDateTime): TDateTime;
+Function DateOf(const AValue: TDateTime): TDateTime; inline;
begin
Result:=Trunc(AValue);
end;
-Function TimeOf(const AValue: TDateTime): TDateTime;
+Function TimeOf(const AValue: TDateTime): TDateTime; inline;
begin
Result:=Frac(Avalue);
end;
@@ -458,24 +458,14 @@ end;
Function IsInLeapYear(const AValue: TDateTime): Boolean;
-
-Var
- D,Y,M : Word;
-
begin
- DecodeDate(AValue,Y,M,D);
- Result:=IsLeapYear(Y);
+ Result:=IsLeapYear(YearOf(AValue));
end;
-Function IsPM(const AValue: TDateTime): Boolean;
-
-Var
- H,M,S,MS : Word;
-
+Function IsPM(const AValue: TDateTime): Boolean; inline;
begin
- DecodeTime(AValue,H,M,S,MS);
- Result:=(H>=12);
+ Result:=(HourOf(AValue)>=12);
end;
@@ -535,13 +525,8 @@ end;
---------------------------------------------------------------------}
Function WeeksInYear(const AValue: TDateTime): Word;
-
-Var
- Y,M,D : Word;
-
begin
- DecodeDate(AValue,Y,M,D);
- Result:=WeeksInAYear(Y);
+ Result:=WeeksInAYear(YearOf(AValue));
end;
@@ -559,13 +544,8 @@ end;
Function DaysInYear(const AValue: TDateTime): Word;
-
-Var
- Y,M,D : Word;
-
begin
- DecodeDate(AValue,Y,M,D);
- Result:=DaysPerYear[IsLeapYear(Y)];
+ Result:=DaysPerYear[IsLeapYear(YearOf(AValue))];
end;
@@ -597,27 +577,27 @@ end;
---------------------------------------------------------------------}
-Function Today: TDateTime;
+Function Today: TDateTime; inline;
begin
- Result:=Date;
+ Result:=Date();
end;
Function Yesterday: TDateTime;
begin
- Result:=Date-1;
+ Result:=Date()-1;
end;
-Function Tomorrow: TDateTime;
+Function Tomorrow: TDateTime;
begin
- Result:=Date+1;
+ Result:=Date()+1;
end;
Function IsToday(const AValue: TDateTime): Boolean;
begin
- Result:=IsSameDay(AValue,Date);
+ Result:=IsSameDay(AValue,Date());
end;
@@ -669,7 +649,7 @@ begin
end;
-Function WeekOf(const AValue: TDateTime): Word;
+Function WeekOf(const AValue: TDateTime): Word; inline;
begin
Result:=WeekOfTheYear(AValue);
end;
@@ -711,7 +691,7 @@ Var
H,N,MS : Word;
begin
- DecodeTime(AVAlue,H,N,Result,MS);
+ DecodeTime(AValue,H,N,Result,MS);
end;
@@ -731,24 +711,14 @@ end;
Function StartOfTheYear(const AValue: TDateTime): TDateTime;
-
-Var
- Y,M,D : Word;
-
begin
- DecodeDate(AValue,Y,M,D);
- Result:=EncodeDate(Y,1,1);
+ Result:=EncodeDate(YearOf(AValue),1,1);
end;
Function EndOfTheYear(const AValue: TDateTime): TDateTime;
-
-Var
- Y,M,D : Word;
-
begin
- DecodeDate(AValue,Y,M,D);
- Result:=EncodeDateTime(Y,12,31,23,59,59,999);
+ Result:=EncodeDateTime(YearOf(AValue),12,31,23,59,59,999);
end;
@@ -791,7 +761,7 @@ begin
end;
-Function StartOfAMonth(const AYear, AMonth: Word): TDateTime;
+Function StartOfAMonth(const AYear, AMonth: Word): TDateTime; inline;
begin
Result:=EncodeDate(AYear,AMonth,1);
end;
@@ -827,13 +797,13 @@ begin
end;
-Function StartOfAWeek(const AYear, AWeekOfYear: Word): TDateTime; // ADayOFWeek 1
+Function StartOfAWeek(const AYear, AWeekOfYear: Word): TDateTime; inline; // ADayOFWeek 1
begin
Result:=StartOfAWeek(AYear,AWeekOfYear,1)
end;
-Function EndOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime;
+Function EndOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word): TDateTime; inline;
begin
Result := EndOfTheDay(EncodeDateWeek(AYear, AWeekOfYear, ADayOfWeek));
end;
@@ -850,7 +820,7 @@ end;
Start/End of day functions.
---------------------------------------------------------------------}
-Function StartOfTheDay(const AValue: TDateTime): TDateTime;
+Function StartOfTheDay(const AValue: TDateTime): TDateTime; inline;
begin
StartOfTheDay:=Trunc(Avalue);
end;
@@ -867,7 +837,7 @@ begin
end;
-Function StartOfADay(const AYear, AMonth, ADay: Word): TDateTime;
+Function StartOfADay(const AYear, AMonth, ADay: Word): TDateTime; inline;
begin
Result:=EncodeDate(AYear,AMonth,ADay);
end;
@@ -879,7 +849,7 @@ begin
end;
-Function EndOfADay(const AYear, AMonth, ADay: Word): TDateTime;
+Function EndOfADay(const AYear, AMonth, ADay: Word): TDateTime; inline;
begin
Result:=EndOfTheDay(EncodeDate(AYear,AMonth,ADay));
end;
@@ -897,13 +867,9 @@ end;
---------------------------------------------------------------------}
-Function MonthOfTheYear(const AValue: TDateTime): Word;
-
-Var
- Y,D : Word;
-
+Function MonthOfTheYear(const AValue: TDateTime): Word; inline;
begin
- DecodeDate(AValue,Y,Result,D);
+ Result:=MonthOf(AValue);
end;
@@ -1116,13 +1082,9 @@ end;
---------------------------------------------------------------------}
-Function HourOfTheDay(const AValue: TDateTime): Word;
-
-Var
- M,S,MS : Word;
-
+Function HourOfTheDay(const AValue: TDateTime): Word; inline;
begin
- DecodeTime(AValue,Result,M,S,MS);
+ Result:=HourOf(AValue);
end;
@@ -1163,13 +1125,9 @@ end;
---------------------------------------------------------------------}
-Function MinuteOfTheHour(const AValue: TDateTime): Word;
-
-Var
- H,S,MS : Word;
-
+Function MinuteOfTheHour(const AValue: TDateTime): Word; inline;
begin
- DecodeTime(AValue,H,Result,S,MS);
+ Result:=MinuteOf(AValue);
end;
@@ -1199,13 +1157,9 @@ end;
---------------------------------------------------------------------}
-Function SecondOfTheMinute(const AValue: TDateTime): Word;
-
-Var
- H,M,MS : Word;
-
+Function SecondOfTheMinute(const AValue: TDateTime): Word; inline;
begin
- DecodeTime(AValue,H,M,Result,MS);
+ Result:=SecondOf(AValue);
end;
@@ -1223,62 +1177,58 @@ end;
Part of second functions.
---------------------------------------------------------------------}
-Function MilliSecondOfTheSecond(const AValue: TDateTime): Word;
-
-Var
- H,M,S : Word;
-
+Function MilliSecondOfTheSecond(const AValue: TDateTime): Word; inline;
begin
- DecodeTime(AValue,H,M,S,Result);
+ Result:=MilliSecondOf(AValue);
end;
{ ---------------------------------------------------------------------
Range checking functions.
---------------------------------------------------------------------}
-Function WithinPastYears(const ANow, AThen: TDateTime; const AYears: Integer): Boolean;
+Function WithinPastYears(const ANow, AThen: TDateTime; const AYears: Integer): Boolean; inline;
begin
Result:=YearsBetween(ANow,AThen)<=AYears;
end;
-Function WithinPastMonths(const ANow, AThen: TDateTime; const AMonths: Integer): Boolean;
+Function WithinPastMonths(const ANow, AThen: TDateTime; const AMonths: Integer): Boolean; inline;
begin
Result:=MonthsBetween(ANow,AThen)<=AMonths;
end;
-Function WithinPastWeeks(const ANow, AThen: TDateTime; const AWeeks: Integer): Boolean;
+Function WithinPastWeeks(const ANow, AThen: TDateTime; const AWeeks: Integer): Boolean; inline;
begin
Result:=WeeksBetween(ANow,AThen)<=AWeeks;
end;
-Function WithinPastDays(const ANow, AThen: TDateTime; const ADays: Integer): Boolean;
+Function WithinPastDays(const ANow, AThen: TDateTime; const ADays: Integer): Boolean; inline;
begin
Result:=DaysBetween(ANow,AThen)<=ADays;
end;
-Function WithinPastHours(const ANow, AThen: TDateTime; const AHours: Int64): Boolean;
+Function WithinPastHours(const ANow, AThen: TDateTime; const AHours: Int64): Boolean; inline;
begin
Result:=HoursBetween(ANow,AThen)<=AHours;
end;
-Function WithinPastMinutes(const ANow, AThen: TDateTime; const AMinutes: Int64): Boolean;
+Function WithinPastMinutes(const ANow, AThen: TDateTime; const AMinutes: Int64): Boolean; inline;
begin
Result:=MinutesBetween(ANow,AThen)<=AMinutes;
end;
-Function WithinPastSeconds(const ANow, AThen: TDateTime; const ASeconds: Int64): Boolean;
+Function WithinPastSeconds(const ANow, AThen: TDateTime; const ASeconds: Int64): Boolean; inline;
begin
Result:=SecondsBetween(ANow,Athen)<=ASeconds;
end;
-Function WithinPastMilliSeconds(const ANow, AThen: TDateTime; const AMilliSeconds: Int64): Boolean;
+Function WithinPastMilliSeconds(const ANow, AThen: TDateTime; const AMilliSeconds: Int64): Boolean; inline;
begin
Result:=MilliSecondsBetween(ANow,AThen)<=AMilliSeconds;
end;
@@ -1888,7 +1838,7 @@ begin
end;
-Function SameDate(const A, B: TDateTime): Boolean;
+Function SameDate(const A, B: TDateTime): Boolean; inline;
begin
Result:=Trunc(A)=Trunc(B);
end;
diff --git a/rtl/objpas/fmtbcd.pp b/rtl/objpas/fmtbcd.pp
index 2cec6943a5..e6a9208494 100644
--- a/rtl/objpas/fmtbcd.pp
+++ b/rtl/objpas/fmtbcd.pp
@@ -142,7 +142,6 @@ INTERFACE
USES
SysUtils,
-{ dateutils,}
Variants;
const
@@ -2426,26 +2425,23 @@ writeln ( '> ', i4, ' ', bh.Singles[i4], ' ', Add );
{ TBCD variant creation utils }
procedure VarFmtBCDCreate ( var aDest : Variant;
const aBCD : tBCD );
-
begin
VarClear(aDest);
TVarData(aDest).Vtype:=FMTBcdFactory.Vartype;
TVarData(aDest).VPointer:=TFMTBcdVarData.create(aBCD);
- end;
+ end;
function VarFmtBCDCreate : Variant;
-
begin
VarFmtBCDCreate ( result, NullBCD );
- end;
+ end;
function VarFmtBCDCreate ( const aValue : FmtBCDStringtype;
Precision,
Scale : Word ) : Variant;
-
begin
VarFmtBCDCreate ( result, StrToBCD ( aValue ) );
- end;
+ end;
{$ifndef FPUNONE}
function VarFmtBCDCreate ( const aValue : myRealtype;
@@ -2471,7 +2467,6 @@ writeln ( '> ', i4, ' ', bh.Singles[i4], ' ', Add );
function VarFmtBCD : TVartype;
-
begin
Result:=FMTBcdFactory.VarType;
end;
@@ -2482,9 +2477,149 @@ writeln ( '> ', i4, ' ', bh.Singles[i4], ' ', Add );
Format : TFloatFormat;
const Precision,
Digits : Integer ) : FmtBCDStringtype;
+ var P, E: integer;
+ Negative: boolean;
+ DS, TS: char;
+
+ procedure RoundDecimalDigits(const D: integer);
+ var i,j: integer;
begin
- not_implemented;
- result:='';
+ j:=P+D;
+ if (Length(Result) > j) and (Result[j+1] >= '5') then
+ for i:=j downto 1+ord(Negative) do
+ begin
+ if Result[i] = '9' then
+ begin
+ Result[i] := '0';
+ if i = 1+ord(Negative) then
+ begin
+ Insert('1', Result, i);
+ inc(P);
+ inc(j);
+ end;
+ end
+ else if Result[i] <> DS then
+ begin
+ inc(Result[i]);
+ break;
+ end;
+ end;
+ Result := copy(Result, 1, j);
+ end;
+
+ procedure AddDecimalDigits;
+ var n,d: integer;
+ begin
+ if Digits < 0 then d := 2 else d := Digits;
+
+ n := d + P - Length(Result);
+
+ if n > 0 then
+ Result := Result + StringOfChar('0', n)
+ else if n < 0 then
+ RoundDecimalDigits(d);
+ end;
+
+ procedure AddThousandSeparators;
+ begin
+ Dec(P, 3);
+ While (P > 1) Do
+ Begin
+ If (Result[P - 1] <> '-') And (TS <> #0) Then
+ Insert(TS, Result, P);
+ Dec(P, 3);
+ End;
+ end;
+
+ begin
+ Result := BCDToStr(BCD);
+ if Format = ffGeneral then Exit;
+
+ SetDecimals(DS, TS);
+
+ Negative := Result[1] = '-';
+ P := Pos(DS, Result);
+ if P = 0 then
+ begin
+ P := Length(Result) + 1;
+ if Digits <> 0 then
+ Result := Result + DS;
+ end;
+
+ Case Format Of
+ ffExponent:
+ Begin
+ E := P - 2 - ord(Negative);
+
+ if (E = 0) and (Result[P-1] = '0') then
+ repeat
+ dec(E);
+ until (Length(Result) <= P-E) or (Result[P-E] <> '0');
+
+ if E <> 0 then
+ begin
+ System.Delete(Result, P, 1);
+ dec(P, E);
+ Insert(DS, Result, P);
+ end;
+
+ RoundDecimalDigits(Precision-1);
+
+ if E < 0 then
+ begin
+ System.Delete(Result, P+E-1, -E);
+ Result := Result + SysUtils.Format('E%.*d' , [Digits,E])
+ end
+ else
+ Result := Result + SysUtils.Format('E+%.*d', [Digits,E]);
+ End;
+
+ ffFixed:
+ Begin
+ AddDecimalDigits;
+ End;
+
+ ffNumber:
+ Begin
+ AddDecimalDigits;
+ AddThousandSeparators;
+ End;
+
+ ffCurrency:
+ Begin
+ //implementation based on FloatToStrFIntl()
+ if Negative then System.Delete(Result, 1, 1);
+
+ AddDecimalDigits;
+ AddThousandSeparators;
+
+ If Not Negative Then
+ Begin
+ Case CurrencyFormat Of
+ 0: Result := CurrencyString + Result;
+ 1: Result := Result + CurrencyString;
+ 2: Result := CurrencyString + ' ' + Result;
+ 3: Result := Result + ' ' + CurrencyString;
+ End
+ End
+ Else
+ Begin
+ Case NegCurrFormat Of
+ 0: Result := '(' + CurrencyString + Result + ')';
+ 1: Result := '-' + CurrencyString + Result;
+ 2: Result := CurrencyString + '-' + Result;
+ 3: Result := CurrencyString + Result + '-';
+ 4: Result := '(' + Result + CurrencyString + ')';
+ 5: Result := '-' + Result + CurrencyString;
+ 6: Result := Result + '-' + CurrencyString;
+ 7: Result := Result + CurrencyString + '-';
+ 8: Result := '-' + Result + ' ' + CurrencyString;
+ 9: Result := '-' + CurrencyString + ' ' + Result;
+ 10: Result := CurrencyString + ' ' + Result + '-';
+ End;
+ End;
+ End;
+ End;
end;
@@ -3871,9 +4006,14 @@ begin
begin
VarDataInit(v);
try
- v.vType:=varDouble;
- v.vDouble:=TFMTBcdVarData(Source.vPointer).BCD;
- VarDataCastTo(Dest, v, aVarType); //now cast Double to any requested type
+ if aVarType = varString then
+ VarDataFromStr(Dest, BCDToStr(TFMTBcdVarData(Source.vPointer).BCD))
+ else
+ begin
+ v.vType:=varDouble;
+ v.vDouble:=BCDToDouble(TFMTBcdVarData(Source.vPointer).BCD);
+ VarDataCastTo(Dest, v, aVarType); //now cast Double to any requested type
+ end;
finally
VarDataClear(v);
end;
diff --git a/rtl/objpas/sysutils/dati.inc b/rtl/objpas/sysutils/dati.inc
index 3723fc5fa2..db580cf03d 100644
--- a/rtl/objpas/sysutils/dati.inc
+++ b/rtl/objpas/sysutils/dati.inc
@@ -358,7 +358,7 @@ var
c:word;
dp,mp,yp,which : Byte;
s1:string[4];
- values:array[1..3] of longint;
+ values:array[0..3] of longint;
LocalTime:tsystemtime;
YearMoreThenTwoDigits : boolean;
begin
@@ -402,12 +402,6 @@ begin
end;
end;
end;
- if Which<>3 then
- begin
- FixErrorMsg(SErrIllegalDateFormatString,useformat);
- Exit;
- end;
-{ Get actual values }
for i := 1 to 3 do
values[i] := 0;
s1 := '';
@@ -448,6 +442,11 @@ begin
Exit;
end;
end ;
+ if (Which<3) and (N>Which) then
+ begin
+ FixErrorMsg(SInvalidDateFormat,s);
+ Exit;
+ end;
// Fill in values.
getLocalTime(LocalTime);
ly := LocalTime.Year;
diff --git a/rtl/objpas/sysutils/sysformt.inc b/rtl/objpas/sysutils/sysformt.inc
index ae953acc15..defd2d5314 100644
--- a/rtl/objpas/sysutils/sysformt.inc
+++ b/rtl/objpas/sysutils/sysformt.inc
@@ -28,7 +28,7 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
While (ChPos<=Len) and
(Fmt[ChPos]<='9') and (Fmt[ChPos]>='0') do inc(ChPos);
If ChPos>len then
- DoFormatError(feInvalidFormat);
+ DoFormatError(feInvalidFormat,Fmt);
If Fmt[ChPos]='*' then
begin
@@ -41,7 +41,7 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
end;
If (ChPos>OldPos) or (ArgN>High(Args)) then
- DoFormatError(feInvalidFormat);
+ DoFormatError(feInvalidFormat,Fmt);
ArgPos:=ArgN+1;
@@ -50,7 +50,7 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
vtInt64: Value := Args[ArgN].VInt64^;
vtQWord: Value := Args[ArgN].VQWord^;
else
- DoFormatError(feInvalidFormat);
+ DoFormatError(feInvalidFormat,Fmt);
end;
Inc(ChPos);
end
@@ -60,7 +60,7 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
begin
Val (Copy(Fmt,OldPos,ChPos-OldPos),value,code);
// This should never happen !!
- If Code>0 then DoFormatError (feInvalidFormat);
+ If Code>0 then DoFormatError (feInvalidFormat,Fmt);
end
else
Value:=-1;
@@ -76,7 +76,7 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt;
value:=0; // Delphi undocumented behaviour, assume 0, #11099
If Fmt[ChPos]=':' then
begin
- If Value=-1 then DoFormatError(feMissingArgument);
+ If Value=-1 then DoFormatError(feMissingArgument,fmt);
Index:=Value;
Value:=-1;
Inc(ChPos);
@@ -202,7 +202,7 @@ begin
If (Doarg>High(Args)) or (Args[Doarg].Vtype<>AT) then
begin
if err then
- DoFormatError(feInvalidArgindex);
+ DoFormatError(feInvalidArgindex,Fmt);
dec(ArgPos);
exit;
end;
diff --git a/rtl/objpas/sysutils/sysstr.inc b/rtl/objpas/sysutils/sysstr.inc
index 9fbd76ebc2..0cccd3add4 100644
--- a/rtl/objpas/sysutils/sysstr.inc
+++ b/rtl/objpas/sysutils/sysstr.inc
@@ -896,12 +896,12 @@ end;
{$endif}
-Procedure DoFormatError (ErrCode : Longint);
+Procedure DoFormatError (ErrCode : Longint;const fmt:ansistring);
Var
S : String;
begin
//!! must be changed to contain format string...
- S:='';
+ S:=fmt;
Case ErrCode of
feInvalidFormat : raise EConvertError.Createfmt(SInvalidFormat,[s]);
feMissingArgument : raise EConvertError.Createfmt(SArgumentMissing,[s]);
@@ -909,7 +909,6 @@ begin
end;
end;
-
{ we've no templates, but with includes we can simulate this :) }
{$macro on}
diff --git a/rtl/objpas/sysutils/sysutilh.inc b/rtl/objpas/sysutils/sysutilh.inc
index 6ad58f2204..a3ccbf6078 100644
--- a/rtl/objpas/sysutils/sysutilh.inc
+++ b/rtl/objpas/sysutils/sysutilh.inc
@@ -197,7 +197,7 @@ type
ESafecallException = class(Exception);
ENoThreadSupport = Class(Exception);
ENoWideStringSupport = Class(Exception);
-
+ ENotImplemented = class(Exception);
{ Exception handling routines }
function ExceptObject: TObject;
diff --git a/rtl/os2/sysutils.pp b/rtl/os2/sysutils.pp
index b5e6248ed7..181ccf25ae 100644
--- a/rtl/os2/sysutils.pp
+++ b/rtl/os2/sysutils.pp
@@ -777,7 +777,7 @@ end;
function SetCurrentDir (const NewDir: string): boolean;
begin
{$I-}
-{$WARNING Should be rewritten to avoid unit dos dependancy!}
+{$WARNING Should be rewritten to avoid unit dos dependency!}
ChDir (NewDir);
Result := (IOResult = 0);
{$I+}
@@ -787,7 +787,7 @@ end;
function CreateDir (const NewDir: string): boolean;
begin
{$I-}
-{$WARNING Should be rewritten to avoid unit dos dependancy!}
+{$WARNING Should be rewritten to avoid unit dos dependency!}
MkDir (NewDir);
Result := (IOResult = 0);
{$I+}
@@ -797,7 +797,7 @@ end;
function RemoveDir (const Dir: string): boolean;
begin
{$I-}
-{$WARNING Should be rewritten to avoid unit dos dependancy!}
+{$WARNING Should be rewritten to avoid unit dos dependency!}
RmDir (Dir);
Result := (IOResult = 0);
{$I+}
diff --git a/rtl/unix/aliasptp.inc b/rtl/unix/aliasptp.inc
index 72c04a1794..4760f77e59 100644
--- a/rtl/unix/aliasptp.inc
+++ b/rtl/unix/aliasptp.inc
@@ -74,6 +74,7 @@ type
pthread_t = UnixType.pthread_t;
tstatfs = UnixType.TStatFs;
+ pstatfs = UnixType.PStatFs;
CONST
ARG_MAX = UnixType.ARG_MAX;
diff --git a/rtl/unix/clocale.pp b/rtl/unix/clocale.pp
index 3d04e7f611..c616a7b2d0 100644
--- a/rtl/unix/clocale.pp
+++ b/rtl/unix/clocale.pp
@@ -92,7 +92,7 @@ Const
function setlocale(category: cint; locale: pchar): pchar; cdecl; external clib name 'setlocale';
function nl_langinfo(__item: cint):Pchar;cdecl;external clib name 'nl_langinfo';
-procedure GetFormatSettings;
+procedure GetFormatSettings(out fmts: TFormatSettings);
function GetLocaleStr(item: cint): string;
begin
@@ -231,56 +231,56 @@ begin
setlocale(__LC_ALL,'');
for i := 1 to 12 do
begin
- ShortMonthNames[i]:=GetLocaleStr(ABMON_1+i-1);
- LongMonthNames[i]:=GetLocaleStr(MON_1+i-1);
+ fmts.ShortMonthNames[i]:=GetLocaleStr(ABMON_1+i-1);
+ fmts.LongMonthNames[i]:=GetLocaleStr(MON_1+i-1);
end;
for i := 1 to 7 do
begin
- ShortDayNames[i]:=GetLocaleStr(ABDAY_1+i-1);
- LongDayNames[i]:=GetLocaleStr(DAY_1+i-1);
+ fmts.ShortDayNames[i]:=GetLocaleStr(ABDAY_1+i-1);
+ fmts.LongDayNames[i]:=GetLocaleStr(DAY_1+i-1);
end;
//Date stuff
- ShortDateFormat := GetLocaleStr(D_FMT);
+ fmts.ShortDateFormat := GetLocaleStr(D_FMT);
{$ifdef localedebug}
- OrgFormatSettings.ShortDateFormat:=shortdateformat;
+ OrgFormatSettings.ShortDateFormat:=fmts.shortdateformat;
{$endif}
- DateSeparator := FindSeparator(ShortDateFormat, DateSeparator);
- ShortDateFormat := TransformFormatStr(ShortDateFormat);
- LongDateFormat := GetLocaleStr(D_T_FMT);
+ fmts.DateSeparator := FindSeparator(fmts.ShortDateFormat, fmts.DateSeparator);
+ fmts.ShortDateFormat := TransformFormatStr(fmts.ShortDateFormat);
+ fmts.LongDateFormat := GetLocaleStr(D_T_FMT);
{$ifdef localedebug}
- OrgFormatSettings.LongDateFormat:=longdateformat;
+ OrgFormatSettings.LongDateFormat:=fmts.longdateformat;
{$endif}
- LongDateFormat := TransformFormatStr(LongDateFormat);
+ fmts.LongDateFormat := TransformFormatStr(fmts.LongDateFormat);
//Time stuff
- TimeAMString := GetLocaleStr(AM_STR);
- TimePMString := GetLocaleStr(PM_STR);
- ShortTimeFormat := GetLocaleStr(T_FMT);
+ fmts.TimeAMString := GetLocaleStr(AM_STR);
+ fmts.TimePMString := GetLocaleStr(PM_STR);
+ fmts.ShortTimeFormat := GetLocaleStr(T_FMT);
{$ifdef localedebug}
- OrgFormatSettings.ShortTimeFormat:=shorttimeformat;
+ OrgFormatSettings.ShortTimeFormat:=fmts.shorttimeformat;
{$endif}
- TimeSeparator := FindSeparator(ShortTimeFormat, TimeSeparator);
- ShortTimeFormat := TransformFormatStr(ShortTimeFormat);
- LongTimeFormat := GetLocaleStr(T_FMT_AMPM);
+ fmts.TimeSeparator := FindSeparator(fmts.ShortTimeFormat, fmts.TimeSeparator);
+ fmts.ShortTimeFormat := TransformFormatStr(fmts.ShortTimeFormat);
+ fmts.LongTimeFormat := GetLocaleStr(T_FMT_AMPM);
{$ifdef localedebug}
- OrgFormatSettings.LongTimeFormat:=longtimeformat;
+ OrgFormatSettings.LongTimeFormat:=fmts.longtimeformat;
{$endif}
- if (LongTimeFormat='') then
- LongTimeFormat:=ShortTimeFormat
+ if (fmts.LongTimeFormat='') then
+ fmts.LongTimeFormat:=fmts.ShortTimeFormat
else
- LongTimeFormat := TransformFormatStr(LongTimeFormat);
+ fmts.LongTimeFormat := TransformFormatStr(fmts.LongTimeFormat);
{$if defined(BSD) or defined(SUNOS)}
plocale:=localeconv;
// for these fields there is a separate BSD derived POSIX function.
if not assigned(plocale) then exit; // for now.
- CurrencyString:=plocale^.currency_symbol; // int_CURR_SYMBOL (in latin chars)
- if CurrencyString='' then
- CurrencyString:=plocale^.int_curr_symbol;
- CurrencyDecimals:=ord(plocale^.FRAC_DIGITS);
+ fmts.CurrencyString:=plocale^.currency_symbol; // int_CURR_SYMBOL (in latin chars)
+ if fmts.CurrencyString='' then
+ fmts.CurrencyString:=plocale^.int_curr_symbol;
+ fmts.CurrencyDecimals:=ord(plocale^.FRAC_DIGITS);
{$ifdef localedebug}
OrgFormatSettings.CurrencyString1:=plocale^.currency_symbol;
OrgFormatSettings.CurrencyString2:=plocale^.int_curr_symbol;
@@ -288,42 +288,42 @@ begin
prec:=ord(plocale^.P_CS_PRECEDES);
sep:=ord(plocale^.P_SEP_BY_SPACE);
if (prec<=1) and (sep<=1) then
- CurrencyFormat := byte(not boolean(prec)) + sep shl 1;
+ fmts.CurrencyFormat := byte(not boolean(prec)) + sep shl 1;
prec := ord(plocale^.N_CS_PRECEDES);
sep := ord(plocale^.N_SEP_BY_SPACE);
signp := ord(plocale^.N_SIGN_POSN);
if (signp in [0..4]) and (prec in [0, 1]) and (sep in [0, 1]) then
- NegCurrFormat := NegFormatsTable[signp, prec, sep];
+ fmts.NegCurrFormat := NegFormatsTable[signp, prec, sep];
//Number stuff
- ThousandSeparator:=plocale^.THOUSANDS_SEP[0];
+ fmts.ThousandSeparator:=plocale^.THOUSANDS_SEP[0];
{$else}
//Currency stuff
- CurrencyString := GetLocaleStr(_NL_MONETARY_CRNCYSTR);
+ fmts.CurrencyString := GetLocaleStr(_NL_MONETARY_CRNCYSTR);
{$ifdef localedebug}
- OrgFormatSettings.CurrencyString1:=currencystring;
+ OrgFormatSettings.CurrencyString1:=fmts.currencystring;
OrgFormatSettings.CurrencyString2:='';
{$endif}
- CurrencyString := Copy(CurrencyString, 2, Length(CurrencyString));
- CurrencyDecimals := StrToIntDef(GetLocaleStr(__FRAC_DIGITS), CurrencyDecimals);
+ fmts.CurrencyString := Copy(fmts.CurrencyString, 2, Length(fmts.CurrencyString));
+ fmts.CurrencyDecimals := StrToIntDef(GetLocaleStr(__FRAC_DIGITS), fmts.CurrencyDecimals);
prec := byte(GetLocaleChar(__P_CS_PRECEDES));
sep := byte(GetLocaleChar(__P_SEP_BY_SPACE));
if (prec<=1) and (sep<=1) then
- CurrencyFormat := byte(not boolean(prec)) + sep shl 1;
+ fmts.CurrencyFormat := byte(not boolean(prec)) + sep shl 1;
prec := byte(GetLocaleChar(__N_CS_PRECEDES));
sep := byte(GetLocaleChar(__N_SEP_BY_SPACE));
signp := byte(GetLocaleChar(__N_SIGN_POSN));
if (signp in [0..4]) and (prec in [0, 1]) and (sep in [0, 1]) then
- NegCurrFormat := NegFormatsTable[signp, prec, sep];
+ fmts.NegCurrFormat := NegFormatsTable[signp, prec, sep];
//Number stuff
- ThousandSeparator:=GetLocaleChar(__THOUSANDS_SEP);
+ fmts.ThousandSeparator:=GetLocaleChar(__THOUSANDS_SEP);
Sep := ord(GetLocaleChar(__MON_THOUSANDS_SEP));
- if ThousandSeparator=#0 then
- ThousandSeparator := char(Sep);
+ if fmts.ThousandSeparator=#0 then
+ fmts.ThousandSeparator := char(Sep);
{$endif}
- DecimalSeparator:=GetLocaleChar(RADIXCHAR);
+ fmts.DecimalSeparator:=GetLocaleChar(RADIXCHAR);
end;
initialization
- GetFormatSettings;
+ GetFormatSettings(DefaultFormatSettings);
end.
diff --git a/rtl/unix/sysutils.pp b/rtl/unix/sysutils.pp
index a719feeddc..34d9d99b2d 100644
--- a/rtl/unix/sysutils.pp
+++ b/rtl/unix/sysutils.pp
@@ -524,9 +524,9 @@ Function FileAge (Const FileName : String): Longint;
Var Info : Stat;
begin
- If fpstat (pointer(FileName),Info)<0 then
+ If (fpstat (pointer(FileName),Info)<0) or fpS_ISDIR(info.st_mode) then
exit(-1)
- else
+ else
Result:=UnixToWinAge(info.st_mtime);
end;
{$endif}
diff --git a/rtl/win/sysutils.pp b/rtl/win/sysutils.pp
index 0f24ea99b4..3352bbf4ac 100644
--- a/rtl/win/sysutils.pp
+++ b/rtl/win/sysutils.pp
@@ -72,7 +72,8 @@ procedure GetLocaleFormatSettings(LCID: Integer; var FormatSettings: TFormatSett
implementation
uses
- sysconst;
+ sysconst,
+ windirs;
function WinCheck(res:boolean):boolean;
begin
@@ -1060,109 +1061,12 @@ begin
GetDiskFreeSpaceEx:=TGetDiskFreeSpaceEx(GetProcAddress(kernel32dll,'GetDiskFreeSpaceExA'));
end;
-Const
- CSIDL_PROGRAMS = $0002; { %SYSTEMDRIVE%\Program Files }
- CSIDL_PERSONAL = $0005; { %USERPROFILE%\My Documents }
- CSIDL_FAVORITES = $0006; { %USERPROFILE%\Favorites }
- CSIDL_STARTUP = $0007; { %USERPROFILE%\Start menu\Programs\Startup }
- CSIDL_RECENT = $0008; { %USERPROFILE%\Recent }
- CSIDL_SENDTO = $0009; { %USERPROFILE%\Sendto }
- CSIDL_STARTMENU = $000B; { %USERPROFILE%\Start menu }
- CSIDL_MYMUSIC = $000D; { %USERPROFILE%\Documents\My Music }
- CSIDL_MYVIDEO = $000E; { %USERPROFILE%\Documents\My Videos }
- CSIDL_DESKTOPDIRECTORY = $0010; { %USERPROFILE%\Desktop }
- CSIDL_NETHOOD = $0013; { %USERPROFILE%\NetHood }
- CSIDL_TEMPLATES = $0015; { %USERPROFILE%\Templates }
- CSIDL_COMMON_STARTMENU = $0016; { %PROFILEPATH%\All users\Start menu }
- CSIDL_COMMON_PROGRAMS = $0017; { %PROFILEPATH%\All users\Start menu\Programs }
- CSIDL_COMMON_STARTUP = $0018; { %PROFILEPATH%\All users\Start menu\Programs\Startup }
- CSIDL_COMMON_DESKTOPDIRECTORY = $0019; { %PROFILEPATH%\All users\Desktop }
- CSIDL_APPDATA = $001A; { %USERPROFILE%\Application Data (roaming) }
- CSIDL_PRINTHOOD = $001B; { %USERPROFILE%\Printhood }
- CSIDL_LOCAL_APPDATA = $001C; { %USERPROFILE%\Local Settings\Application Data (non roaming) }
- CSIDL_COMMON_FAVORITES = $001F; { %PROFILEPATH%\All users\Favorites }
- CSIDL_INTERNET_CACHE = $0020; { %USERPROFILE%\Local Settings\Temporary Internet Files }
- CSIDL_COOKIES = $0021; { %USERPROFILE%\Cookies }
- CSIDL_HISTORY = $0022; { %USERPROFILE%\Local settings\History }
- CSIDL_COMMON_APPDATA = $0023; { %PROFILESPATH%\All Users\Application Data }
- CSIDL_WINDOWS = $0024; { %SYSTEMROOT% }
- CSIDL_SYSTEM = $0025; { %SYSTEMROOT%\SYSTEM32 (may be system on 95/98/ME) }
- CSIDL_PROGRAM_FILES = $0026; { %SYSTEMDRIVE%\Program Files }
- CSIDL_MYPICTURES = $0027; { %USERPROFILE%\My Documents\My Pictures }
- CSIDL_PROFILE = $0028; { %USERPROFILE% }
- CSIDL_PROGRAM_FILES_COMMON = $002B; { %SYSTEMDRIVE%\Program Files\Common }
- CSIDL_COMMON_TEMPLATES = $002D; { %PROFILEPATH%\All Users\Templates }
- CSIDL_COMMON_DOCUMENTS = $002E; { %PROFILEPATH%\All Users\Documents }
- CSIDL_COMMON_ADMINTOOLS = $002F; { %PROFILEPATH%\All Users\Start Menu\Programs\Administrative Tools }
- CSIDL_ADMINTOOLS = $0030; { %USERPROFILE%\Start Menu\Programs\Administrative Tools }
- CSIDL_COMMON_MUSIC = $0035; { %PROFILEPATH%\All Users\Documents\my music }
- CSIDL_COMMON_PICTURES = $0036; { %PROFILEPATH%\All Users\Documents\my pictures }
- CSIDL_COMMON_VIDEO = $0037; { %PROFILEPATH%\All Users\Documents\my videos }
- CSIDL_CDBURN_AREA = $003B; { %USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning }
- CSIDL_PROFILES = $003E; { %PROFILEPATH% }
-
- CSIDL_FLAG_CREATE = $8000; { (force creation of requested folder if it doesn't exist yet) }
-
-
-Type
- PFNSHGetFolderPath = Function(Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall;
-
-
-var
- SHGetFolderPath : PFNSHGetFolderPath = Nil;
- CFGDLLHandle : THandle = 0;
-
-Procedure InitDLL;
-
-Var
- pathBuf: array[0..MAX_PATH-1] of char;
- pathLength: Integer;
-begin
- { Load shfolder.dll using a full path, in order to prevent spoofing (Mantis #18185)
- Don't bother loading shell32.dll because shfolder.dll itself redirects SHGetFolderPath
- to shell32.dll whenever possible. }
- pathLength:=GetSystemDirectory(pathBuf, MAX_PATH);
- if (pathLength>0) and (pathLength<MAX_PATH-14) then { 14=length('\shfolder.dll'#0) }
- begin
- StrLCopy(@pathBuf[pathLength],'\shfolder.dll',MAX_PATH-pathLength-1);
- CFGDLLHandle:=LoadLibrary(pathBuf);
-
- if (CFGDLLHandle<>0) then
- begin
- Pointer(ShGetFolderPath):=GetProcAddress(CFGDLLHandle,'SHGetFolderPathA');
- If @ShGetFolderPath=nil then
- begin
- FreeLibrary(CFGDLLHandle);
- CFGDllHandle:=0;
- end;
- end;
- end;
- If (@ShGetFolderPath=Nil) then
- Raise Exception.Create('Could not determine SHGetFolderPath Function');
-end;
-
-Function GetSpecialDir(ID : Integer) : String;
-
-Var
- APath : Array[0..MAX_PATH] of char;
-
-begin
- Result:='';
- if (CFGDLLHandle=0) then
- InitDLL;
- If (SHGetFolderPath<>Nil) then
- begin
- if SHGetFolderPath(0,ID or CSIDL_FLAG_CREATE,0,0,@APATH[0])=S_OK then
- Result:=IncludeTrailingPathDelimiter(StrPas(@APath[0]));
- end;
-end;
-
Function GetAppConfigDir(Global : Boolean) : String;
begin
If Global then
- Result:=GetSpecialDir(CSIDL_COMMON_APPDATA)
+ Result:=GetWindowsSpecialDir(CSIDL_COMMON_APPDATA)
else
- Result:=GetSpecialDir(CSIDL_LOCAL_APPDATA);
+ Result:=GetWindowsSpecialDir(CSIDL_LOCAL_APPDATA);
If (Result<>'') then
begin
if VendorName<>'' then
@@ -1182,7 +1086,7 @@ end;
Function GetUserDir : String;
begin
- Result:=GetSpecialDir(CSIDL_PROFILE);
+ Result:=GetWindowsSpecialDir(CSIDL_PROFILE);
end;
Procedure InitSysConfigDir;
@@ -1364,6 +1268,4 @@ Initialization
OnBeep:=@SysBeep;
Finalization
DoneExceptions;
- if CFGDLLHandle<>0 then
- FreeLibrary(CFGDllHandle);
end.
diff --git a/rtl/win/syswin.inc b/rtl/win/syswin.inc
index 9a1c839f5b..1ea914b43b 100644
--- a/rtl/win/syswin.inc
+++ b/rtl/win/syswin.inc
@@ -290,8 +290,11 @@ procedure InitWin32Widestrings;
end;
{$endif}
+ { Note: since WideChar=UnicodeChar and PWideChar=PUnicodeChar,
+ Wide2AnsiMoveProc is identical to Unicode2AnsiStrMoveProc. }
+
{ Widestring }
- widestringmanager.Wide2AnsiMoveProc:=@Win32Wide2AnsiMove;
+ widestringmanager.Wide2AnsiMoveProc:=@Win32Unicode2AnsiMove;
widestringmanager.Ansi2WideMoveProc:=@Win32Ansi2WideMove;
widestringmanager.UpperWideStringProc:=@Win32WideUpper;
widestringmanager.LowerWideStringProc:=@Win32WideLower;
diff --git a/rtl/win/tthread.inc b/rtl/win/tthread.inc
index aa6203d1e5..8bb90c4ebb 100644
--- a/rtl/win/tthread.inc
+++ b/rtl/win/tthread.inc
@@ -1,14 +1,5 @@
{ Thread management routines }
-type
- PRaiseFrame = ^TRaiseFrame;
- TRaiseFrame = record
- NextRaise: PRaiseFrame;
- ExceptAddr: Pointer;
- ExceptObject: TObject;
- ExceptionRecord: pointer; {PExceptionRecord}
- end;
-
constructor TThread.Create(CreateSuspended: Boolean;
const StackSize: SizeUInt = DefaultStackSize);
begin
@@ -20,7 +11,7 @@ begin
FHandle := BeginThread(nil, StackSize, @ThreadProc, pointer(self), CREATE_SUSPENDED,
FThreadID);
if FHandle = TThreadID(0) then
- raise EThread.create('Failed to create new thread, code:'+inttostr(getlasterror));
+ raise EThread.CreateFmt(SThreadCreateError, [SysErrorMessage(getlasterror)]);
FFatalException := nil;
end;
diff --git a/rtl/win/windirs.pp b/rtl/win/windirs.pp
new file mode 100644
index 0000000000..c3cfd122a2
--- /dev/null
+++ b/rtl/win/windirs.pp
@@ -0,0 +1,120 @@
+unit windirs;
+
+{$mode objfpc}
+{$H+}
+
+interface
+
+uses
+ windows,
+ strings;
+
+Const
+ CSIDL_PROGRAMS = $0002; { %SYSTEMDRIVE%\Program Files }
+ CSIDL_PERSONAL = $0005; { %USERPROFILE%\My Documents }
+ CSIDL_FAVORITES = $0006; { %USERPROFILE%\Favorites }
+ CSIDL_STARTUP = $0007; { %USERPROFILE%\Start menu\Programs\Startup }
+ CSIDL_RECENT = $0008; { %USERPROFILE%\Recent }
+ CSIDL_SENDTO = $0009; { %USERPROFILE%\Sendto }
+ CSIDL_STARTMENU = $000B; { %USERPROFILE%\Start menu }
+ CSIDL_MYMUSIC = $000D; { %USERPROFILE%\Documents\My Music }
+ CSIDL_MYVIDEO = $000E; { %USERPROFILE%\Documents\My Videos }
+ CSIDL_DESKTOPDIRECTORY = $0010; { %USERPROFILE%\Desktop }
+ CSIDL_NETHOOD = $0013; { %USERPROFILE%\NetHood }
+ CSIDL_TEMPLATES = $0015; { %USERPROFILE%\Templates }
+ CSIDL_COMMON_STARTMENU = $0016; { %PROFILEPATH%\All users\Start menu }
+ CSIDL_COMMON_PROGRAMS = $0017; { %PROFILEPATH%\All users\Start menu\Programs }
+ CSIDL_COMMON_STARTUP = $0018; { %PROFILEPATH%\All users\Start menu\Programs\Startup }
+ CSIDL_COMMON_DESKTOPDIRECTORY = $0019; { %PROFILEPATH%\All users\Desktop }
+ CSIDL_APPDATA = $001A; { %USERPROFILE%\Application Data (roaming) }
+ CSIDL_PRINTHOOD = $001B; { %USERPROFILE%\Printhood }
+ CSIDL_LOCAL_APPDATA = $001C; { %USERPROFILE%\Local Settings\Application Data (non roaming) }
+ CSIDL_COMMON_FAVORITES = $001F; { %PROFILEPATH%\All users\Favorites }
+ CSIDL_INTERNET_CACHE = $0020; { %USERPROFILE%\Local Settings\Temporary Internet Files }
+ CSIDL_COOKIES = $0021; { %USERPROFILE%\Cookies }
+ CSIDL_HISTORY = $0022; { %USERPROFILE%\Local settings\History }
+ CSIDL_COMMON_APPDATA = $0023; { %PROFILESPATH%\All Users\Application Data }
+ CSIDL_WINDOWS = $0024; { %SYSTEMROOT% }
+ CSIDL_SYSTEM = $0025; { %SYSTEMROOT%\SYSTEM32 (may be system on 95/98/ME) }
+ CSIDL_PROGRAM_FILES = $0026; { %SYSTEMDRIVE%\Program Files }
+ CSIDL_MYPICTURES = $0027; { %USERPROFILE%\My Documents\My Pictures }
+ CSIDL_PROFILE = $0028; { %USERPROFILE% }
+ CSIDL_PROGRAM_FILES_COMMON = $002B; { %SYSTEMDRIVE%\Program Files\Common }
+ CSIDL_COMMON_TEMPLATES = $002D; { %PROFILEPATH%\All Users\Templates }
+ CSIDL_COMMON_DOCUMENTS = $002E; { %PROFILEPATH%\All Users\Documents }
+ CSIDL_COMMON_ADMINTOOLS = $002F; { %PROFILEPATH%\All Users\Start Menu\Programs\Administrative Tools }
+ CSIDL_ADMINTOOLS = $0030; { %USERPROFILE%\Start Menu\Programs\Administrative Tools }
+ CSIDL_COMMON_MUSIC = $0035; { %PROFILEPATH%\All Users\Documents\my music }
+ CSIDL_COMMON_PICTURES = $0036; { %PROFILEPATH%\All Users\Documents\my pictures }
+ CSIDL_COMMON_VIDEO = $0037; { %PROFILEPATH%\All Users\Documents\my videos }
+ CSIDL_CDBURN_AREA = $003B; { %USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning }
+ CSIDL_PROFILES = $003E; { %PROFILEPATH% }
+
+ CSIDL_FLAG_CREATE = $8000; { (force creation of requested folder if it doesn't exist yet) }
+
+Function GetWindowsSpecialDir(ID : Integer) : String;
+
+implementation
+
+uses
+ sysutils;
+
+Type
+ PFNSHGetFolderPath = Function(Ahwnd: HWND; Csidl: Integer; Token: THandle; Flags: DWord; Path: PChar): HRESULT; stdcall;
+
+
+var
+ SHGetFolderPath : PFNSHGetFolderPath = Nil;
+ CFGDLLHandle : THandle = 0;
+
+Procedure InitDLL;
+
+Var
+ pathBuf: array[0..MAX_PATH-1] of char;
+ pathLength: Integer;
+begin
+ { Load shfolder.dll using a full path, in order to prevent spoofing (Mantis #18185)
+ Don't bother loading shell32.dll because shfolder.dll itself redirects SHGetFolderPath
+ to shell32.dll whenever possible. }
+ pathLength:=GetSystemDirectory(pathBuf, MAX_PATH);
+ if (pathLength>0) and (pathLength<MAX_PATH-14) then { 14=length('\shfolder.dll'#0) }
+ begin
+ StrLCopy(@pathBuf[pathLength],'\shfolder.dll',MAX_PATH-pathLength-1);
+ CFGDLLHandle:=LoadLibrary(pathBuf);
+
+ if (CFGDLLHandle<>0) then
+ begin
+ Pointer(ShGetFolderPath):=GetProcAddress(CFGDLLHandle,'SHGetFolderPathA');
+ If @ShGetFolderPath=nil then
+ begin
+ FreeLibrary(CFGDLLHandle);
+ CFGDllHandle:=0;
+ end;
+ end;
+ end;
+ If (@ShGetFolderPath=Nil) then
+ Raise Exception.Create('Could not determine SHGetFolderPath Function');
+end;
+
+Function GetWindowsSpecialDir(ID : Integer) : String;
+
+Var
+ APath : Array[0..MAX_PATH] of char;
+
+begin
+ Result:='';
+ if (CFGDLLHandle=0) then
+ InitDLL;
+ If (SHGetFolderPath<>Nil) then
+ begin
+ if SHGetFolderPath(0,ID or CSIDL_FLAG_CREATE,0,0,@APATH[0])=S_OK then
+ Result:=IncludeTrailingPathDelimiter(StrPas(@APath[0]));
+ end;
+end;
+
+Initialization
+Finalization
+ if CFGDLLHandle<>0 then
+ FreeLibrary(CFGDllHandle);
+end.
+
diff --git a/rtl/win/wininc/func.inc b/rtl/win/wininc/func.inc
index 9e3c24fa80..b9f90a286f 100644
--- a/rtl/win/wininc/func.inc
+++ b/rtl/win/wininc/func.inc
@@ -134,7 +134,7 @@ function GetExitCodeThread(hThread:HANDLE; lpExitCode:LPDWORD):WINBOOL; external
function GetThreadSelectorEntry(hThread:HANDLE; dwSelector:DWORD; lpSelectorEntry:LPLDT_ENTRY):WINBOOL; external 'kernel32' name 'GetThreadSelectorEntry';
function GetLastError:DWORD; external 'kernel32' name 'GetLastError';
procedure SetLastError(dwErrCode:DWORD); external 'kernel32' name 'SetLastError';
-function CreateIoCompletionPort(FileHandle:HANDLE; ExistingCompletionPort:HANDLE; CompletionKey:DWORD; NumberOfConcurrentThreads:DWORD):HANDLE; external 'kernel32' name 'CreateIoCompletionPort';
+function CreateIoCompletionPort(FileHandle:HANDLE; ExistingCompletionPort:HANDLE; CompletionKey:ULONG_PTR; NumberOfConcurrentThreads:DWORD):HANDLE; external 'kernel32' name 'CreateIoCompletionPort';
function SetErrorMode(uMode:UINT):UINT; external 'kernel32' name 'SetErrorMode';
function ReadProcessMemory(hProcess:HANDLE; lpBaseAddress:LPCVOID; lpBuffer:LPVOID; nSize:DWORD; lpNumberOfBytesRead:LPDWORD):WINBOOL; external 'kernel32' name 'ReadProcessMemory';
function WriteProcessMemory(hProcess:HANDLE; lpBaseAddress:LPVOID; lpBuffer:LPVOID; nSize:DWORD; lpNumberOfBytesWritten:LPDWORD):WINBOOL; external 'kernel32' name 'WriteProcessMemory';
diff --git a/rtl/win/wininc/messages.inc b/rtl/win/wininc/messages.inc
index 42ee3c65b9..6f48a6ac43 100644
--- a/rtl/win/wininc/messages.inc
+++ b/rtl/win/wininc/messages.inc
@@ -1287,11 +1287,12 @@
TWMQueryDragIcon = Windows.TWMQueryDragIcon;
TWMTimeChange = Windows.TWMTimeChange;
TWMUndo = Windows.TWMUndo;
+ TWMWindowPosChanged = TWMWindowPosMsg;
+ TWMWindowPosChanging= TWMWindowPosMsg;
TWMPaste = Windows.TWMPaste;
- TWMCut = Windows.TWMCut;
- TWMCopy = Windows.TWMCopy;
-
+ TWMCut = Windows.TWMCut;
+ TWMCopy = Windows.TWMCopy;
{$else}
{$ifdef cpu64}
@@ -1426,7 +1427,7 @@
FocusedWnd : HWND;
UnUsed : WPARAM;
Result : LRESULT;
- End;
+ end;
TWMSetCursor = record
Msg : UINT;
diff --git a/rtl/win/wininc/redef.inc b/rtl/win/wininc/redef.inc
index 943669c0de..e7a6289143 100644
--- a/rtl/win/wininc/redef.inc
+++ b/rtl/win/wininc/redef.inc
@@ -586,7 +586,7 @@ function GetProcessPriorityBoost(hThread: THandle; var DisablePriorityBoost: Boo
function GetProcessShutdownParameters(var lpdwLevel, lpdwFlags: DWORD): BOOL; external 'kernel32' name 'GetProcessShutdownParameters';
function GetProcessTimes(hProcess: THandle; var lpCreationTime, lpExitTime, lpKernelTime, lpUserTime: TFileTime): BOOL; external 'kernel32' name 'GetProcessTimes';
function GetProcessWorkingSetSize(hProcess: THandle; var lpMinimumWorkingSetSize, lpMaximumWorkingSetSize: DWORD): BOOL; external 'kernel32' name 'GetProcessWorkingSetSize';
-function GetQueuedCompletionStatus(CompletionPort: THandle; var lpNumberOfBytesTransferred, lpCompletionKey: DWORD; var lpOverlapped: POverlapped; dwMilliseconds: DWORD): BOOL; external 'kernel32' name 'GetQueuedCompletionStatus';
+function GetQueuedCompletionStatus(CompletionPort: THandle; var lpNumberOfBytesTransferred: DWORD; var lpCompletionKey: ULONG_PTR; var lpOverlapped: POverlapped; dwMilliseconds: DWORD): BOOL; external 'kernel32' name 'GetQueuedCompletionStatus';
function PostQueuedCompletionStatus(CompletionPort: THandle; NumberOfBytesTransferred:dword; dwCompletionKey: ULONG_PTR; lpOverlapped: POverlapped): BOOL; external 'kernel32' name 'PostQueuedCompletionStatus';
function GetRasterizerCaps(var p1: TRasterizerStatus; p2: UINT): BOOL; external 'gdi32' name 'GetRasterizerCaps';
function GetRgnBox(RGN: HRGN; var p2: TRect): Integer; external 'gdi32' name 'GetRgnBox';
diff --git a/rtl/win/wininc/struct.inc b/rtl/win/wininc/struct.inc
index 9bb065be53..df8e183d37 100644
--- a/rtl/win/wininc/struct.inc
+++ b/rtl/win/wininc/struct.inc
@@ -5052,8 +5052,8 @@ Const
POSVERSIONINFOW = ^OSVERSIONINFOW;
-
-
+ {$push}
+ {$packrecords 4}
TEXTMETRIC = record
tmHeight : LONG;
@@ -5113,9 +5113,9 @@ Const
tagTEXTMETRICW = TEXTMETRICW;
TTEXTMETRICW = TEXTMETRICW;
PTEXTMETRICW = ^TEXTMETRICW;
+ {$PACKRECORDS C}
-
- OUTLINETEXTMETRIC = record
+ OUTLINETEXTMETRICA = record
otmSize : UINT;
otmTextMetrics : TEXTMETRIC;
otmFiller : BYTE;
@@ -5149,11 +5149,64 @@ Const
otmpStyleName : PSTR;
otmpFullName : PSTR;
end;
- LPOUTLINETEXTMETRIC = ^OUTLINETEXTMETRIC;
- _OUTLINETEXTMETRIC = OUTLINETEXTMETRIC;
- TOUTLINETEXTMETRIC = OUTLINETEXTMETRIC;
- POUTLINETEXTMETRIC = ^OUTLINETEXTMETRIC;
+ LPOUTLINETEXTMETRICA = ^OUTLINETEXTMETRICA;
+ _OUTLINETEXTMETRICA = OUTLINETEXTMETRICA;
+ TOUTLINETEXTMETRICA = OUTLINETEXTMETRICA;
+ POUTLINETEXTMETRICA = ^OUTLINETEXTMETRICA;
+ OUTLINETEXTMETRICW = record
+ otmSize : UINT;
+ otmTextMetrics : TEXTMETRICW;
+ otmFiller : BYTE;
+ otmPanoseNumber : PANOSE;
+ otmfsSelection : UINT;
+ otmfsType : UINT;
+ otmsCharSlopeRise : longint;
+ otmsCharSlopeRun : longint;
+ otmItalicAngle : longint;
+ otmEMSquare : UINT;
+ otmAscent : longint;
+ otmDescent : longint;
+ otmLineGap : UINT;
+ otmsCapEmHeight : UINT;
+ otmsXHeight : UINT;
+ otmrcFontBox : RECT;
+ otmMacAscent : longint;
+ otmMacDescent : longint;
+ otmMacLineGap : UINT;
+ otmusMinimumPPEM : UINT;
+ otmptSubscriptSize : POINT;
+ otmptSubscriptOffset : POINT;
+ otmptSuperscriptSize : POINT;
+ otmptSuperscriptOffset : POINT;
+ otmsStrikeoutSize : UINT;
+ otmsStrikeoutPosition : longint;
+ otmsUnderscoreSize : longint;
+ otmsUnderscorePosition : longint;
+ otmpFamilyName : PSTR;
+ otmpFaceName : PSTR;
+ otmpStyleName : PSTR;
+ otmpFullName : PSTR;
+ end;
+ LPOUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
+ _OUTLINETEXTMETRICW = OUTLINETEXTMETRICW;
+ TOUTLINETEXTMETRICW = OUTLINETEXTMETRICW;
+ POUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
+
+ {$ifdef Unicode}
+ LPOUTLINETEXTMETRIC = ^OUTLINETEXTMETRICW;
+ _OUTLINETEXTMETRIC = OUTLINETEXTMETRICW;
+ TOUTLINETEXTMETRIC = OUTLINETEXTMETRICW;
+ POUTLINETEXTMETRIC = ^OUTLINETEXTMETRICW;
+ OUTLINETEXTMETRIC = OUTLINETEXTMETRICW;
+ {$else}
+ LPOUTLINETEXTMETRIC = ^OUTLINETEXTMETRICA;
+ _OUTLINETEXTMETRIC = OUTLINETEXTMETRICA;
+ TOUTLINETEXTMETRIC = OUTLINETEXTMETRICA;
+ POUTLINETEXTMETRIC = ^OUTLINETEXTMETRICA;
+ OUTLINETEXTMETRIC = OUTLINETEXTMETRICA;
+ {$endif}
+ {$POP}
OVERLAPPED = record
Internal : ULONG_PTR;
InternalHigh : ULONG_PTR;
@@ -7570,15 +7623,15 @@ type
//#endif /* WINVER >= 0x0500 */
-// Menubar information
+// Menubar information
type
tagMENUBARINFO = packed record
cbSize:DWORD;
- rcBar:Windows.RECT; // rect of bar, popup, item
- _hmenu:HMENU; // real menu handle of bar, popup
- hwndMenu:HWND; // hwnd of item submenu if one
-// fBarFocused:1:BOOL; // bar, popup has the focus
-// fFocused:1:BOOL; // item has the focus
+ rcBar:Windows.RECT; // rect of bar, popup, item
+ _hmenu:HMENU; // real menu handle of bar, popup
+ hwndMenu:HWND; // hwnd of item submenu if one
+// fBarFocused:1:BOOL; // bar, popup has the focus
+// fFocused:1:BOOL; // item has the focus
FocusedBits:DWORD;
end;
MENUBARINFO = tagMENUBARINFO;
diff --git a/rtl/win32/Makefile b/rtl/win32/Makefile
index 88dc96b911..7317a4e954 100644
--- a/rtl/win32/Makefile
+++ b/rtl/win32/Makefile
@@ -1,5 +1,5 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/02/17]
#
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
@@ -470,190 +470,190 @@ ifeq ($(FULL_TARGET),mipsel-linux)
override TARGET_UNITS+=system objpas macpas iso7185 buildrtl lineinfo lnfodwrf
endif
ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres
+override TARGET_IMPLICITUNITS+=sysinitpas sysinitcyg sysinitgprof ctypes strings heaptrc matrix windows winsock winsock2 initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils dateutils varutils variants typinfo fgl classes convutils stdconvs cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard fmtbcd winsysut sharemem exeinfo fpintres windirs
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_LOADERS+=$(LOADERS)
diff --git a/rtl/win32/Makefile.fpc b/rtl/win32/Makefile.fpc
index c97237cbae..6d4555de37 100644
--- a/rtl/win32/Makefile.fpc
+++ b/rtl/win32/Makefile.fpc
@@ -18,7 +18,7 @@ implicitunits=sysinitpas sysinitcyg sysinitgprof \
convutils stdconvs cpu mmx charset ucomplex getopts \
winevent sockets printer \
video mouse keyboard fmtbcd \
- winsysut sharemem exeinfo fpintres
+ winsysut sharemem exeinfo fpintres windirs
# shared=$(DLLS)
diff --git a/rtl/win32/buildrtl.pp b/rtl/win32/buildrtl.pp
index f9f4353284..4022af297c 100644
--- a/rtl/win32/buildrtl.pp
+++ b/rtl/win32/buildrtl.pp
@@ -13,7 +13,7 @@ unit buildrtl;
convutils, stdconvs, cpu, mmx, charset, ucomplex, getopts,
winevent, sockets, printer,
video, mouse, keyboard, fmtbcd,
- winsysut, sharemem, fpintres;
+ winsysut, sharemem, fpintres, windirs;
implementation
diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp
index 8233cb8bdd..bb81f661c8 100644
--- a/rtl/win32/system.pp
+++ b/rtl/win32/system.pp
@@ -846,18 +846,6 @@ function CharLowerBuff(lpsz:LPWSTR; cchLength:DWORD):DWORD;
Widestring
******************************************************************************}
-procedure Win32Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
- var
- destlen: SizeInt;
- begin
- // retrieve length including trailing #0
- // not anymore, because this must also be usable for single characters
- destlen:=WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, source, len, nil, 0, nil, nil);
- // this will null-terminate
- setlength(dest, destlen);
- WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, source, len, @dest[1], destlen, nil, nil);
- end;
-
procedure Win32Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
var
destlen: SizeInt;
diff --git a/rtl/win64/Makefile b/rtl/win64/Makefile
index f34c3a5bbd..cca689055d 100644
--- a/rtl/win64/Makefile
+++ b/rtl/win64/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 [2011/02/17]
#
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
@@ -466,190 +466,190 @@ ifeq ($(FULL_TARGET),mipsel-linux)
override TARGET_UNITS+=system objpas macpas iso7185 buildrtl lineinfo lnfodwrf
endif
ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres cpu signals
+override TARGET_IMPLICITUNITS+=ctypes strings heaptrc matrix dos crt objects messages windows winsock winsock2 cmem dynlibs rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo fgl classes getopts stdconvs sockets printer charset ucomplex fmtbcd winevent video mouse keyboard sharemem exeinfo fpintres windirs cpu signals
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_LOADERS+=$(LOADERS)
diff --git a/rtl/win64/Makefile.fpc b/rtl/win64/Makefile.fpc
index 03d8ad9c75..bcc4978e63 100644
--- a/rtl/win64/Makefile.fpc
+++ b/rtl/win64/Makefile.fpc
@@ -17,7 +17,7 @@ implicitunits=ctypes strings \
varutils variants typinfo fgl classes getopts \
stdconvs sockets printer charset ucomplex fmtbcd \
winevent video mouse keyboard \
- sharemem exeinfo fpintres \
+ sharemem exeinfo fpintres windirs \
cpu signals
# mmx
# fpcmemdll
diff --git a/rtl/win64/buildrtl.pp b/rtl/win64/buildrtl.pp
index e765431fcd..ca09e0f1cd 100644
--- a/rtl/win64/buildrtl.pp
+++ b/rtl/win64/buildrtl.pp
@@ -12,7 +12,7 @@ unit buildrtl;
convutils, stdconvs, charset, ucomplex, getopts,
winevent, sockets, printer,
video, mouse, keyboard, fmtbcd,
- sharemem, fpintres,
+ sharemem, fpintres, windirs,
cpu, signals;
implementation
diff --git a/rtl/win64/system.pp b/rtl/win64/system.pp
index 5cbbac549b..f2ebcad149 100644
--- a/rtl/win64/system.pp
+++ b/rtl/win64/system.pp
@@ -903,18 +903,6 @@ function CharLowerBuff(lpsz:LPWSTR; cchLength:DWORD):DWORD;
stdcall; external 'user32' name 'CharLowerBuffW';
-procedure Win32Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
- var
- destlen: SizeInt;
- begin
- // retrieve length including trailing #0
- // not anymore, because this must also be usable for single characters
- destlen:=WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, source, len, nil, 0, nil, nil);
- // this will null-terminate
- setlength(dest, destlen);
- WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, source, len, @dest[1], destlen, nil, nil);
- end;
-
procedure Win32Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
var
destlen: SizeInt;
diff --git a/rtl/x86_64/cpu.pp b/rtl/x86_64/cpu.pp
index 1b38cc4e3b..e6f6c5f1fe 100644
--- a/rtl/x86_64/cpu.pp
+++ b/rtl/x86_64/cpu.pp
@@ -18,15 +18,25 @@ unit cpu;
interface
+ {$ifdef freebsd} // FreeBSD 7/8 have binutils version that don't support cmpxchg16b
+ // Unless overridebinutils is defined (for ports usage), use db instead of the instruction
+ {$ifndef overridebinutils}
+ {$define oldbinutils}
+ {$endif}
+ {$endif}
+
uses
sysutils;
function InterlockedCompareExchange128Support : boolean;inline;
+ function AESSupport : boolean;inline;
+
function InterlockedCompareExchange128(var Target: Int128Rec; NewValue: Int128Rec; Comperand: Int128Rec): Int128Rec;
implementation
var
+ _AESSupport,
_InterlockedCompareExchange128Support : boolean;
function InterlockedCompareExchange128Support : boolean;inline;
@@ -34,6 +44,11 @@ unit cpu;
result:=_InterlockedCompareExchange128Support;
end;
+ function AESSupport : boolean;inline;
+ begin
+ result:=_AESSupport;
+ end;
+
function InterlockedCompareExchange128(var Target: Int128Rec; NewValue: Int128Rec; Comperand: Int128Rec): Int128Rec; assembler;
{
@@ -43,6 +58,7 @@ unit cpu;
r8 ... NewValue
r9 ... Comperand
}
+ {$ifdef win64}
asm
pushq %rbx
@@ -60,8 +76,11 @@ unit cpu;
movq (%r9),%rax
movq 8(%r9),%rdx
+ {$ifdef oldbinutils}
+ .byte 0xF0,0x49,0x0F,0xC7,0x08
+ {$else}
lock cmpxchg16b (%r8)
-
+ {$endif}
{ restore result pointer }
popq %rcx
@@ -71,7 +90,30 @@ unit cpu;
popq %rbx
end;
+ {$else win64}
+ {
+ linux:
+ rdi ... target
+ [rsi:rdx] ... NewValue
+ [rcx:r8] ... Comperand
+ [rdx:rax] ... result
+ }
+ asm
+ pushq %rbx
+
+ movq %rsi,%rbx // new value low
+ movq %rcx,%rax // comperand low
+ movq %rdx,%rcx // new value high
+ movq %r8,%rdx // comperand high
+ {$ifdef oldbinutils}
+ .byte 0xF0,0x48,0x0F,0xC7,0x0F
+ {$else}
+ lock cmpxchg16b (%rdi)
+ {$endif}
+ popq %rbx
+ end;
+ {$endif win64}
procedure SetupSupport;
var
@@ -85,6 +127,7 @@ unit cpu;
popq %rbx
end;
_InterlockedCompareExchange128Support:=(_ecx and $2000)<>0;
+ _AESSupport:=(_ecx and $2000000)<>0;
end;
diff --git a/rtl/x86_64/x86_64.inc b/rtl/x86_64/x86_64.inc
index 58c86ee6a3..5de65d2d23 100644
--- a/rtl/x86_64/x86_64.inc
+++ b/rtl/x86_64/x86_64.inc
@@ -72,183 +72,542 @@ asm
.Lg_a_null:
end ['RAX'];
-(*
+{$ifndef FPC_SYSTEM_HAS_MOVE}
{$define FPC_SYSTEM_HAS_MOVE}
-procedure Move(const source;var dest;count:longint);[public, alias: 'FPC_MOVE'];assembler;
- asm
- { rdi destination
- rsi source
- rdx count
- }
- pushq %rbx
- prefetcht0 (%rsi) // for more hopefully the hw prefetch will kick in
- movq %rdi,%rax
-
- movl %edi,%ecx
- andl $7,%ecx
- jnz .Lbad_alignment
-.Lafter_bad_alignment:
- movq %rdx,%rcx
- movl $64,%ebx
- shrq $6,%rcx
- jz .Lhandle_tail
-
-.Lloop_64:
- { no prefetch because we assume the hw prefetcher does it already
- and we have no specific temporal hint to give. XXX or give a nta
- hint for the source? }
- movq (%rsi),%r11
- movq 8(%rsi),%r8
- movq 2*8(%rsi),%r9
- movq 3*8(%rsi),%r10
- movnti %r11,(%rdi)
- movnti %r8,1*8(%rdi)
- movnti %r9,2*8(%rdi)
- movnti %r10,3*8(%rdi)
-
- movq 4*8(%rsi),%r11
- movq 5*8(%rsi),%r8
- movq 6*8(%rsi),%r9
- movq 7*8(%rsi),%r10
- movnti %r11,4*8(%rdi)
- movnti %r8,5*8(%rdi)
- movnti %r9,6*8(%rdi)
- movnti %r10,7*8(%rdi)
-
- addq %rbx,%rsi
- addq %rbx,%rdi
- loop .Lloop_64
-
-.Lhandle_tail:
- movl %edx,%ecx
- andl $63,%ecx
- shrl $3,%ecx
- jz .Lhandle_7
- movl $8,%ebx
-.Lloop_8:
- movq (%rsi),%r8
- movnti %r8,(%rdi)
- addq %rbx,%rdi
- addq %rbx,%rsi
- loop .Lloop_8
-
-.Lhandle_7:
- movl %edx,%ecx
- andl $7,%ecx
- jz .Lende
-.Lloop_1:
- movb (%rsi),%r8b
- movb %r8b,(%rdi)
- incq %rdi
- incq %rsi
- loop .Lloop_1
-
- jmp .Lende
-
- { align destination }
- { This is simpleminded. For bigger blocks it may make sense to align
- src and dst to their aligned subset and handle the rest separately }
-.Lbad_alignment:
- movl $8,%r9d
- subl %ecx,%r9d
- movl %r9d,%ecx
- subq %r9,%rdx
- js .Lsmall_alignment
- jz .Lsmall_alignment
-.Lalign_1:
- movb (%rsi),%r8b
- movb %r8b,(%rdi)
- incq %rdi
- incq %rsi
- loop .Lalign_1
- jmp .Lafter_bad_alignment
-.Lsmall_alignment:
- addq %r9,%rdx
- jmp .Lhandle_7
-
-.Lende:
- sfence
- popq %rbx
- end;
-*)
+procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];assembler;nostackframe;
+{ Linux: rdi source, rsi dest, rdx count
+ win64: rcx source, rdx dest, r8 count }
+asm
+{$ifndef win64}
+ mov %rdx, %r8
+ mov %rsi, %rdx
+ mov %rdi, %rcx
+{$endif win64}
-(*
+ mov %r8, %rax
+ sub %rdx, %rcx { rcx = src - dest }
+ jz .Lquit { exit if src=dest }
+ jnb .L1 { src>dest => forward move }
+
+ add %rcx, %rax { rcx is negative => r8+rcx > 0 if regions overlap }
+ jb .Lback { if no overlap, still do forward move }
+
+.L1:
+ cmp $8, %r8
+ jl .Lless8f { signed compare, negative count not allowed }
+ test $7, %dl
+ je .Ldestaligned
+
+ test $1, %dl { align dest by moving first 1+2+4 bytes }
+ je .L2f
+ mov (%rcx,%rdx,1),%al
+ dec %r8
+ mov %al, (%rdx)
+ add $1, %rdx
+.L2f:
+ test $2, %dl
+ je .L4f
+ mov (%rcx,%rdx,1),%ax
+ sub $2, %r8
+ mov %ax, (%rdx)
+ add $2, %rdx
+.L4f:
+ test $4, %dl
+ je .Ldestaligned
+ mov (%rcx,%rdx,1),%eax
+ sub $4, %r8
+ mov %eax, (%rdx)
+ add $4, %rdx
+
+.Ldestaligned:
+ mov %r8, %r9
+ shr $5, %r9
+ jne .Lmore32
+
+.Ltail:
+ mov %r8, %r9
+ shr $3, %r9
+ je .Lless8f
+
+ .balign 16
+.Lloop8f: { max. 8 iterations }
+ mov (%rcx,%rdx,1),%rax
+ mov %rax, (%rdx)
+ add $8, %rdx
+ dec %r9
+ jne .Lloop8f
+ and $7, %r8
+
+.Lless8f:
+ test %r8, %r8
+ jle .Lquit
+
+ .balign 16
+.Lloop1f:
+ mov (%rcx,%rdx,1),%al
+ mov %al,(%rdx)
+ inc %rdx
+ dec %r8
+ jne .Lloop1f
+.Lquit:
+ retq
+
+
+.Lmore32:
+ cmp $0x2000, %r9 { this limit must be processor-specific (1/2 L2 cache size) }
+ jnae .Lloop32
+ cmp $0x1000, %rcx { but don't bother bypassing cache if src and dest }
+ jnb .Lntloopf { are close to each other}
+
+ .balign 16
+.Lloop32:
+ add $32,%rdx
+ mov -32(%rcx,%rdx,1),%rax
+ mov -24(%rcx,%rdx,1),%r10
+ mov %rax,-32(%rdx)
+ mov %r10,-24(%rdx)
+ dec %r9
+ mov -16(%rcx,%rdx,1),%rax
+ mov -8(%rcx,%rdx,1),%r10
+ mov %rax,-16(%rdx)
+ mov %r10,-8(%rdx)
+ jne .Lloop32
+
+ and $0x1f, %r8
+ jmpq .Ltail
+
+.Lntloopf:
+ mov $32, %eax
+
+ .balign 16
+.Lpref:
+ prefetchnta (%rcx,%rdx,1)
+ prefetchnta 0x40(%rcx,%rdx,1)
+ add $0x80, %rdx
+ dec %eax
+ jne .Lpref
+
+ sub $0x1000, %rdx
+ mov $64, %eax
+
+ .balign 16
+.Loop64:
+ add $64, %rdx
+ mov -64(%rcx,%rdx,1), %r9
+ mov -56(%rcx,%rdx,1), %r10
+ movnti %r9, -64(%rdx)
+ movnti %r10, -56(%rdx)
+
+ mov -48(%rcx,%rdx,1), %r9
+ mov -40(%rcx,%rdx,1), %r10
+ movnti %r9, -48(%rdx)
+ movnti %r10, -40(%rdx)
+ dec %eax
+ mov -32(%rcx,%rdx,1), %r9
+ mov -24(%rcx,%rdx,1), %r10
+ movnti %r9, -32(%rdx)
+ movnti %r10, -24(%rdx)
+
+ mov -16(%rcx,%rdx,1), %r9
+ mov -8(%rcx,%rdx,1), %r10
+ movnti %r9, -16(%rdx)
+ movnti %r10, -8(%rdx)
+ jne .Loop64
+
+ sub $0x1000, %r8
+ cmp $0x1000, %r8
+ jae .Lntloopf
+
+ mfence
+ jmpq .Ldestaligned { go handle remaining bytes }
+
+{ backwards move }
+.Lback:
+ add %r8, %rdx { points to the end of dest }
+ cmp $8, %r8
+ jl .Lless8b { signed compare, negative count not allowed }
+ test $7, %dl
+ je .Ldestalignedb
+ test $1, %dl
+ je .L2b
+ dec %rdx
+ mov (%rcx,%rdx,1), %al
+ dec %r8
+ mov %al, (%rdx)
+.L2b:
+ test $2, %dl
+ je .L4b
+ sub $2, %rdx
+ mov (%rcx,%rdx,1), %ax
+ sub $2, %r8
+ mov %ax, (%rdx)
+.L4b:
+ test $4, %dl
+ je .Ldestalignedb
+ sub $4, %rdx
+ mov (%rcx,%rdx,1), %eax
+ sub $4, %r8
+ mov %eax, (%rdx)
+
+.Ldestalignedb:
+ mov %r8, %r9
+ shr $5, %r9
+ jne .Lmore32b
+
+.Ltailb:
+ mov %r8, %r9
+ shr $3, %r9
+ je .Lless8b
+
+.Lloop8b:
+ sub $8, %rdx
+ mov (%rcx,%rdx,1), %rax
+ dec %r9
+ mov %rax, (%rdx)
+ jne .Lloop8b
+ and $7, %r8
+
+.Lless8b:
+ test %r8, %r8
+ jle .Lquit2
+
+ .balign 16
+.Lsmallb:
+ dec %rdx
+ mov (%rcx,%rdx,1), %al
+ dec %r8
+ mov %al,(%rdx)
+ jnz .Lsmallb
+.Lquit2:
+ retq
+
+.Lmore32b:
+ cmp $0x2000, %r9
+ jnae .Lloop32b
+ cmp $0xfffffffffffff000,%rcx
+ jb .Lntloopb
+
+ .balign 16
+.Lloop32b:
+ sub $32, %rdx
+ mov 24(%rcx,%rdx,1), %rax
+ mov 16(%rcx,%rdx,1), %r10
+ mov %rax, 24(%rdx)
+ mov %r10, 16(%rdx)
+ dec %r9
+ mov 8(%rcx,%rdx,1),%rax
+ mov (%rcx,%rdx,1), %r10
+ mov %rax, 8(%rdx)
+ mov %r10, (%rdx)
+ jne .Lloop32b
+ and $0x1f, %r8
+ jmpq .Ltailb
+
+
+.Lntloopb:
+ mov $32, %eax
+
+ .balign 16
+.Lprefb:
+ sub $0x80, %rdx
+ prefetchnta (%rcx,%rdx,1)
+ prefetchnta 0x40(%rcx,%rdx,1)
+ dec %eax
+ jnz .Lprefb
+
+ add $0x1000, %rdx
+ mov $0x40, %eax
+
+ .balign 16
+.Lloop64b:
+ sub $64, %rdx
+ mov 56(%rcx,%rdx,1), %r9
+ mov 48(%rcx,%rdx,1), %r10
+ movnti %r9, 56(%rdx)
+ movnti %r10, 48(%rdx)
+
+ mov 40(%rcx,%rdx,1), %r9
+ mov 32(%rcx,%rdx,1), %r10
+ movnti %r9, 40(%rdx)
+ movnti %r10, 32(%rdx)
+ dec %eax
+ mov 24(%rcx,%rdx,1), %r9
+ mov 16(%rcx,%rdx,1), %r10
+ movnti %r9, 24(%rdx)
+ movnti %r10, 16(%rdx)
+
+ mov 8(%rcx,%rdx,1), %r9
+ mov (%rcx,%rdx,1), %r10
+ movnti %r9, 8(%rdx)
+ movnti %r10, (%rdx)
+ jne .Lloop64b
+
+ sub $0x1000, %r8
+ cmp $0x1000, %r8
+ jae .Lntloopb
+ mfence
+ jmpq .Ldestalignedb
+end;
+{$endif FPC_SYSTEM_HAS_MOVE}
+
+{$ifndef FPC_SYSTEM_HAS_FILLCHAR}
{$define FPC_SYSTEM_HAS_FILLCHAR}
-Procedure FillChar(var x;count:longint;value:byte);assembler;
+Procedure FillChar(var x;count:SizeInt;value:byte);assembler;nostackframe;
asm
- { rdi destination
- rsi value (char)
- rdx count (bytes)
- }
- movq %rdi,%r10
- movq %rdx,%r11
+{ win64: rcx dest, rdx count, r8b value
+ linux: rdi dest, rsi count, rdx value }
+{$ifndef win64}
+ mov %rdx, %r8
+ mov %rsi, %rdx
+ mov %rdi, %rcx
+{$endif win64}
+
+ cmp $8, %rdx
+ jl .Ltiny
{ expand byte value }
- movzbl %sil,%ecx
- movabs $0x0101010101010101,%rax
- mul %rcx { with rax, clobbers rdx }
-
- { align dst }
- movl %edi,%r9d
- andl $7,%r9d
- jnz .Lbad_alignment
-.Lafter_bad_alignment:
-
- movq %r11,%rcx
- movl $64,%r8d
- shrq $6,%rcx
- jz .Lhandle_tail
-
-.Lloop_64:
- movnti %rax,(%rdi)
- movnti %rax,8(%rdi)
- movnti %rax,16(%rdi)
- movnti %rax,24(%rdi)
- movnti %rax,32(%rdi)
- movnti %rax,40(%rdi)
- movnti %rax,48(%rdi)
- movnti %rax,56(%rdi)
- addq %r8,%rdi
- loop .Lloop_64
-
- { Handle tail in loops. The loops should be faster than hard
- to predict jump tables. }
-.Lhandle_tail:
- movl %r11d,%ecx
- andl $56,%ecx
- jz .Lhandle_7
- shrl $3,%ecx
-.Lloop_8:
- movnti %rax,(%rdi)
- addq $8,%rdi
- loop .Lloop_8
-.Lhandle_7:
- movl %r11d,%ecx
- andl $7,%ecx
- jz .Lende
-.Lloop_1:
- movb %al,(%rdi)
- addq $1,%rdi
- loop .Lloop_1
-
- jmp .Lende
-
-.Lbad_alignment:
- cmpq $7,%r11
- jbe .Lhandle_7
- movnti %rax,(%rdi) (* unaligned store *)
- movq $8,%r8
- subq %r9,%r8
- addq %r8,%rdi
- subq %r8,%r11
- jmp .Lafter_bad_alignment
-
-.Lende:
- movq %r10,%rax
+ movzbl %r8b, %r8
+ mov $0x0101010101010101,%r9
+ imul %r9, %r8
+
+ test $7, %cl
+ je .Laligned
+
+ { align dest to 8 bytes }
+ test $1, %cl
+ je .L2
+ movb %r8b, (%rcx)
+ add $1, %rcx
+ sub $1, %rdx
+.L2:
+ test $2, %cl
+ je .L4
+ movw %r8w, (%rcx)
+ add $2, %rcx
+ sub $2, %rdx
+.L4:
+ test $4, %cl
+ je .Laligned
+ movl %r8d, (%rcx)
+ add $4, %rcx
+ sub $4, %rdx
+
+.Laligned:
+ mov %rdx, %rax
+ and $0x3f, %rdx
+ shr $6, %rax
+ jne .Lmore64
+
+.Lless64:
+ mov %rdx, %rax
+ and $7, %rdx
+ shr $3, %rax
+ je .Ltiny
+
+ .balign 16
+.Lloop8: { max. 8 iterations }
+ mov %r8, (%rcx)
+ add $8, %rcx
+ dec %rax
+ jne .Lloop8
+.Ltiny:
+ test %rdx, %rdx
+ jle .Lquit
+.Lloop1:
+ movb %r8b, (%rcx)
+ inc %rcx
+ dec %rdx
+ jnz .Lloop1
+.Lquit:
+ retq
+
+.Lmore64:
+ cmp $0x2000,%rax
+ jae .Lloop64nti
+
+ .balign 16
+.Lloop64:
+ add $64, %rcx
+ mov %r8, -64(%rcx)
+ mov %r8, -56(%rcx)
+ mov %r8, -48(%rcx)
+ mov %r8, -40(%rcx)
+ dec %rax
+ mov %r8, -32(%rcx)
+ mov %r8, -24(%rcx)
+ mov %r8, -16(%rcx)
+ mov %r8, -8(%rcx)
+ jne .Lloop64
+ jmp .Lless64
+
+ .balign 16
+.Lloop64nti:
+ add $64, %rcx
+ movnti %r8, -64(%rcx)
+ movnti %r8, -56(%rcx)
+ movnti %r8, -48(%rcx)
+ movnti %r8, -40(%rcx)
+ dec %rax
+ movnti %r8, -32(%rcx)
+ movnti %r8, -24(%rcx)
+ movnti %r8, -16(%rcx)
+ movnti %r8, -8(%rcx)
+ jnz .Lloop64nti
+ mfence
+ jmp .Lless64
end;
-*)
+{$endif FPC_SYSTEM_HAS_FILLCHAR}
+
+{$ifndef FPC_SYSTEM_HAS_INDEXBYTE}
+{ based on libc/sysdeps/x86_64/memchr.S }
+{$define FPC_SYSTEM_HAS_INDEXBYTE}
+function IndexByte(Const buf;len:SizeInt;b:byte):SizeInt; assembler; nostackframe;
+{ win64: rcx buf, rdx len, r8b word
+ linux: rdi buf, rsi len, rdx word }
+asm
+{$ifdef win64}
+ movd %r8d, %xmm1
+{$else}
+ movd %edx, %xmm1
+ movq %rdi, %rcx
+ movq %rsi, %rdx
+{$endif}
+ mov %rcx, %rax { duplicate buf }
+ punpcklbw %xmm1, %xmm1
+ and $0xfffffffffffffff0, %rax
+ test %rdx, %rdx
+ punpcklbw %xmm1, %xmm1
+ jz .L3 { exit if len=0 }
+ orl $0xffffffff, %r8d
+ movdqa (%rax), %xmm0 { Fetch first 16 bytes (up to 15 bytes before target) }
+ pshufd $0, %xmm1, %xmm1
+ sub %rax, %rcx { rcx=misalignment }
+ pcmpeqb %xmm1, %xmm0
+ add %rcx, %rdx { add misalignment to length }
+ cmovb %r8, %rdx { if it overflows (happens when length=-1), set back to -1, }
+ { otherwise loop will terminate too early }
+ mov %rcx, %r9 { and save it, will subtract back in the end }
+ shl %cl, %r8d
+ pmovmskb %xmm0, %ecx
+ andl %r8d, %ecx { mask away matches before buffer start }
+ movl $16, %r8d
+ jnz .L1 { got a match within buffer -> we're done (almost) }
+ cmpq %r8, %rdx
+ jbe .L3
+
+ .balign 16
+.L2:
+ movdqa (%rax,%r8), %xmm0
+ lea 16(%r8), %r8
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %ecx
+ test %ecx, %ecx
+ jnz .L1
+ cmp %r8, %rdx
+ ja .L2
+
+.L3:
+ or $-1, %rax
+ jmp .Ldone
+
+.L1:
+ bsfl %ecx, %ecx { compute position of the first match }
+ lea -16(%rcx,%r8), %rax
+ cmp %rax, %rdx
+ jbe .L3 { if it is after the specified length, ignore it }
+ sub %r9, %rax
+.Ldone:
+end;
+{$endif FPC_SYSTEM_HAS_INDEXBYTE}
+{$ifndef FPC_SYSTEM_HAS_INDEXWORD}
+{$define FPC_SYSTEM_HAS_INDEXWORD}
+function IndexWord(Const buf;len:SizeInt;b:word):SizeInt; assembler; nostackframe;
+{ win64: rcx buf, rdx len, r8b word
+ linux: rdi buf, rsi len, rdx word }
+asm
+{$ifdef win64}
+ movd %r8d, %xmm1
+{$else}
+ movd %edx, %xmm1
+ movq %rdi, %rcx
+ movq %rsi, %rdx
+{$endif}
+ mov %rcx, %rax { duplicate buf }
+ punpcklwd %xmm1, %xmm1
+ and $0xfffffffffffffff0, %rax
+ test %rdx, %rdx
+ pshufd $0, %xmm1, %xmm1
+ jz .L3 { exit if len=0 }
+ orl $0xffffffff, %r8d
+ test $1, %cl { if buffer isn't aligned to word boundary, }
+ jnz .Lunaligned { fallback to slower unaligned loop }
+
+ movdqa (%rax), %xmm0 { Fetch first 16 bytes (up to 14 bytes before target) }
+ sub %rax, %rcx { rcx=misalignment }
+ pcmpeqw %xmm1, %xmm0
+
+ mov %rcx, %r9
+ shr $1, %r9 { save misalignment in words }
+
+ add %r9, %rdx { add misalignment to length }
+ cmovb %r8, %rdx { if it overflows (happens when length=-1), set back to -1, }
+ { otherwise loop will terminate too early }
+ shl %cl, %r8d
+ pmovmskb %xmm0, %ecx
+ andl %r8d, %ecx { mask away matches before buffer start }
+ movl $8, %r8d
+ jnz .L1 { got a match within buffer -> we're done (almost) }
+ cmpq %r8, %rdx
+ jbe .L3
+
+ .balign 16
+.L2:
+ movdqa (%rax,%r8,2), %xmm0
+ lea 8(%r8), %r8
+ pcmpeqw %xmm1, %xmm0
+ pmovmskb %xmm0, %ecx
+ test %ecx, %ecx
+ jnz .L1
+ cmp %r8, %rdx
+ ja .L2
+
+.L3:
+ or $-1, %rax
+ jmp .Ldone
+
+.L1:
+ bsfl %ecx, %ecx { compute position of the first match }
+ shr $1, %ecx { in words }
+ lea -8(%rcx,%r8), %rax
+ cmp %rax, %rdx
+ jbe .L3 { if it is after the specified length, ignore it }
+ sub %r9, %rax
+.Ldone:
+ retq
+
+{ TODO: aligned processing is still possible, but for now
+ use the simplest form }
+.Lunaligned:
+ xor %r9, %r9
+ xor %r8, %r8
+ mov %rcx, %rax
+
+ .balign 16
+.L2u:
+ movdqu (%rax,%r8,2), %xmm0
+ lea 8(%r8), %r8
+ pcmpeqw %xmm1, %xmm0
+ pmovmskb %xmm0, %ecx
+ test %ecx, %ecx
+ jnz .L1
+ cmp %r8, %rdx
+ ja .L2u
+ or $-1, %rax
+end;
+{$endif FPC_SYSTEM_HAS_INDEXWORD}
+{$asmmode att}
{$define FPC_SYSTEM_HAS_DECLOCKED_LONGINT}
{ does a thread save inc/dec }
function declocked(var l : longint) : boolean;assembler;
diff --git a/tests/Makefile b/tests/Makefile
index a1bfda3256..9e871692cd 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/03/23]
#
default: allexectests
-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
+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 powerpc-wii 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
@@ -611,6 +611,11 @@ ifeq ($(OS_TARGET),NativeNT)
SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
else
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
@@ -1503,24 +1508,43 @@ PREPUP=utils/prepup
endif
units:
$(MAKE) -C units FPC_VERSION= FPC=$(TEST_FPC) CPU_TARGET=$(TEST_CPU_TARGET) OS_TARGET=$(TEST_OS_TARGET) OPT="$(TEST_OPT)" CCOMPILER=$(TEST_CCOMPILER) BINUTILSPREFIX=$(TEST_BINUTILSPREFIX)
-copyfiles: $(TEST_OUTPUTDIR)
+.PHONY: create_c_objects delete_c_objects copyfiles
+C_SOURCE_DIR=test/cg/obj
+C_SOURCES=ctest.c tcext3.c tcext4.c tcext5.c tcext6.c
+CPP_SOURCES=cpptcl1.cpp cpptcl2.cpp
ifneq ($(TEST_ABI),)
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/ctest.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext3.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext4.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext5.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext6.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/cpptcl1.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/cpptcl2.o test/cg
-else
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/ctest.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext3.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext4.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext5.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext6.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/cpptcl1.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/cpptcl2.o test/cg
+C_OBJECTS_DIR=$(C_SOURCE_DIR)/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)
+else
+C_OBJECTS_DIR=$(C_SOURCE_DIR)/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)
endif
+C_OBJECTS=$(addprefix $(C_OBJECTS_DIR)/, $(subst .c,.o, $(C_SOURCES)))
+CPP_OBJECTS=$(addprefix $(C_OBJECTS_DIR)/, $(subst .cpp,.o, $(CPP_SOURCES)))
+create_c_objects:
+ifneq ($(TEST_CCOMPILER),)
+ -$(COPY) $(addprefix $(C_SOURCE_DIR)/, $(C_SOURCES)) $(C_OBJECTS_DIR)
+ $(MAKE) $(C_OBJECTS)
+ -$(COPY) $(addprefix $(C_SOURCE_DIR)/, $(CPP_SOURCES)) $(C_OBJECTS_DIR)
+ $(MAKE) $(CPP_OBJECTS)
+ -$(DEL) $(addprefix $(C_OBJECTS_DIR)/, $(C_SOURCES) $(CPP_SOURCES))
+else
+ $(ECHO) create_c_objects rule needs a valid C compiler in TEST_CCOMPILER variable
+ $(ECHO) TEST_CFLAGS variable is passed as options is used to compile the objects
+endif
+delete_c_objects:
+ifneq ($(TEST_CCOMPILER),)
+ -$(DEL) $(C_OBJECTS) $(CPP_OBJECTS)
+else
+ $(ECHO) delete_c_objects rule needs a valid C compiler in TEST_CCOMPILER variable
+ $(ECHO) to be able to recompile the objects using create_objects rule.
+endif
+$(C_OBJECTS) : %.o: %.c
+ $(TEST_CCOMPILER) -c $(TEST_CFLAGS) $< -o $@
+$(CPP_OBJECTS) : %.o: %.cpp
+ $(TEST_CCOMPILER) -c $(TEST_CFLAGS) $< -o $@
+copyfiles: $(TEST_OUTPUTDIR)
+ -$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/cg
+ -$(COPY) $(C_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
+ -$(COPY) $(CPP_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/units/system
$(COPY) test/units/system/test*.txt $(TEST_OUTPUTDIR)/test/units/system
testprep: testprep-stamp.$(TEST_FULL_TARGET)
@@ -1563,7 +1587,6 @@ endif
ifdef TEST_VERBOSE
override DOTESTOPT+=-V
endif
-# Also display benchmarks
ifdef TEST_BENCH
override DOTESTOPT+=-D
endif
diff --git a/tests/Makefile.fpc b/tests/Makefile.fpc
index 19d2264e57..c4b3541df5 100644
--- a/tests/Makefile.fpc
+++ b/tests/Makefile.fpc
@@ -178,24 +178,50 @@ units:
# Copy test environment dependent files ctest.o, cext3.o, cext4.o to test/cg etc
#
-copyfiles: $(TEST_OUTPUTDIR)
+.PHONY: create_c_objects delete_c_objects copyfiles
+
+C_SOURCE_DIR=test/cg/obj
+C_SOURCES=ctest.c tcext3.c tcext4.c tcext5.c tcext6.c
+CPP_SOURCES=cpptcl1.cpp cpptcl2.cpp
ifneq ($(TEST_ABI),)
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/ctest.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext3.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext4.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext5.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/tcext6.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/cpptcl1.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)/cpptcl2.o test/cg
+C_OBJECTS_DIR=$(C_SOURCE_DIR)/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)-$(TEST_ABI)
+else
+C_OBJECTS_DIR=$(C_SOURCE_DIR)/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)
+endif
+C_OBJECTS=$(addprefix $(C_OBJECTS_DIR)/, $(subst .c,.o, $(C_SOURCES)))
+CPP_OBJECTS=$(addprefix $(C_OBJECTS_DIR)/, $(subst .cpp,.o, $(CPP_SOURCES)))
+
+
+create_c_objects:
+ifneq ($(TEST_CCOMPILER),)
+ -$(COPY) $(addprefix $(C_SOURCE_DIR)/, $(C_SOURCES)) $(C_OBJECTS_DIR)
+ $(MAKE) $(C_OBJECTS)
+ -$(COPY) $(addprefix $(C_SOURCE_DIR)/, $(CPP_SOURCES)) $(C_OBJECTS_DIR)
+ $(MAKE) $(CPP_OBJECTS)
+ -$(DEL) $(addprefix $(C_OBJECTS_DIR)/, $(C_SOURCES) $(CPP_SOURCES))
else
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/ctest.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext3.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext4.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext5.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/tcext6.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/cpptcl1.o test/cg
- -$(COPY) test/cg/obj/$(TEST_OS_TARGET)/$(TEST_CPU_TARGET)/cpptcl2.o test/cg
+ $(ECHO) create_c_objects rule needs a valid C compiler in TEST_CCOMPILER variable
+ $(ECHO) TEST_CFLAGS variable is passed as options is used to compile the objects
endif
+
+delete_c_objects:
+ifneq ($(TEST_CCOMPILER),)
+ -$(DEL) $(C_OBJECTS) $(CPP_OBJECTS)
+else
+ $(ECHO) delete_c_objects rule needs a valid C compiler in TEST_CCOMPILER variable
+ $(ECHO) to be able to recompile the objects using create_objects rule.
+endif
+
+$(C_OBJECTS) : %.o: %.c
+ $(TEST_CCOMPILER) -c $(TEST_CFLAGS) $< -o $@
+
+$(CPP_OBJECTS) : %.o: %.cpp
+ $(TEST_CCOMPILER) -c $(TEST_CFLAGS) $< -o $@
+
+copyfiles: $(TEST_OUTPUTDIR)
+ -$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/cg
+ -$(COPY) $(C_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
+ -$(COPY) $(CPP_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/units/system
$(COPY) test/units/system/test*.txt $(TEST_OUTPUTDIR)/test/units/system
diff --git a/tests/tbf/tb0220.pp b/tests/tbf/tb0220.pp
new file mode 100644
index 0000000000..72b9a22c91
--- /dev/null
+++ b/tests/tbf/tb0220.pp
@@ -0,0 +1,8 @@
+{ %fail }
+
+type
+ tset = set of byte;
+begin
+ if 2 in tset then
+ writeln('should not compile')
+end.
diff --git a/tests/test/cg/obj/win32/i386/cpptcl2.o b/tests/test/cg/obj/win32/i386/cpptcl2.o
new file mode 100644
index 0000000000..267eae5ca0
--- /dev/null
+++ b/tests/test/cg/obj/win32/i386/cpptcl2.o
Binary files differ
diff --git a/tests/test/cg/obj/win32/i386/tcext6.o b/tests/test/cg/obj/win32/i386/tcext6.o
new file mode 100644
index 0000000000..b4b4e77cd6
--- /dev/null
+++ b/tests/test/cg/obj/win32/i386/tcext6.o
Binary files differ
diff --git a/tests/test/taes1.pp b/tests/test/taes1.pp
new file mode 100644
index 0000000000..6f8a346a48
--- /dev/null
+++ b/tests/test/taes1.pp
@@ -0,0 +1,190 @@
+{ %CPU=x86_64 }
+Program AESTest;
+{$INLINE ON}
+{$ASMMODE INTEL}
+{$MODE DELPHI}
+
+Uses Cpu,SysUtils;
+
+Type
+ Word32 = LongWord;
+ Word64 = QWord;
+ WordPR = Word64;
+
+ PAESKey256 = ^TAESKey256; TAESKey256 = Array [0..3] of Word64;
+
+ PAESOpenedKey = ^TAESOpenedKey; TAESOpenedKey = Packed Record
+ EnCryptRoundKeys : Array [0..14, 0..3] Of Word32;
+ Padding0 : Array [0..3] of Word32;
+ DeCryptRoundKeys : Array [0..14, 0..3] Of Word32;
+ Padding1 : Array [0..3] of Word32;
+ End;
+
+Const
+ Test_Key : Array[0..3] of Word64 = ($0706050403020100, $0f0e0d0c0b0a0908, $1716151413121110, $1f1e1d1c1b1a1918);
+ Test_Data : Array[0..1] of Word64 = (Word64($7766554433221100), Word64($ffeeddccbbaa9988));
+ Test_Crypt : Array[0..1] of Word64 = (Word64($bf456751cab7a28e), Word64($8960494b9049fcea));
+
+Var
+ OpenedKey : TAESOpenedKey;
+ Data : Array [0..1] of Word64;
+ Passed : Boolean;
+
+Procedure OpenKey_AES(Key: PAESKey256; OpenedKey: PAESOpenedKey); Assembler; NoStackFrame;
+ Procedure key_expansion; Assembler; NoStackFrame;
+ Asm
+ MOV RDX, RCX
+ PSHUFD XMM2, XMM2, 011111111b; PXOR XMM2, XMM1; MOVD EAX, XMM2; MOV [RCX], EAX; ADD RCX, 4
+ PSHUFD XMM1, XMM1, 011100101b; MOVD EBX, XMM1; XOR EAX, EBX; MOV [RCX], EAX; ADD RCX, 4
+ PSHUFD XMM1, XMM1, 011100110b; MOVD EBX, XMM1; XOR EAX, EBX; MOV [RCX], EAX; ADD RCX, 4
+ PSHUFD XMM1, XMM1, 011100111b; MOVD EBX, XMM1; XOR EAX, EBX; MOV [RCX], EAX; ADD RCX, 4
+ MOVDQU XMM4, [RDX]; AESKEYGEN XMM4, XMM4, 0
+ PSHUFD XMM4, XMM4, 011100110b; MOVD EAX, XMM4; MOVD EBX, XMM3; XOR EAX, EBX; MOV [RCX], EAX; ADD RCX, 4
+ PSHUFD XMM3, XMM3, 011100101b; MOVD EBX, XMM3; XOR EAX, EBX; MOV [RCX], EAX; ADD RCX, 4
+ PSHUFD XMM3, XMM3, 011100110b; MOVD EBX, XMM3; XOR EAX, EBX; MOV [RCX], EAX; ADD RCX, 4
+ PSHUFD XMM3, XMM3, 011100111b; MOVD EBX, XMM3; XOR EAX, EBX; MOV [RCX], EAX; ADD RCX, 4
+ MOVDQU XMM1, [RDX]; ADD RDX, $10; MOVDQU XMM3, [RDX]
+ End;
+Asm
+ PUSH RBX
+{$ifndef win64}
+ // fix parameter locations
+ MOV RDX,RSI
+ MOV RCX,RDI
+{$endif win64}
+ MOV R8, RDX
+ MOVDQU XMM1, [RCX]; MOVDQU XMM3, [RCX+16]
+ MOVDQU [RDX], XMM1; MOVDQU [RDX + $10], XMM3
+ LEA RCX, [RDX+$20]
+ AESKEYGEN XMM2, XMM3, $1; CALL key_expansion
+ AESKEYGEN XMM2, XMM3, $2; CALL key_expansion
+ AESKEYGEN XMM2, XMM3, $4; CALL key_expansion
+ AESKEYGEN XMM2, XMM3, $8; CALL key_expansion
+ AESKEYGEN XMM2, XMM3, $10; CALL key_expansion
+ AESKEYGEN XMM2, XMM3, $20; CALL key_expansion
+ AESKEYGEN XMM2, XMM3, $40; CALL key_expansion
+ MOVDQU XMM0, [R8+$00]; MOVDQU XMM1, [R8+$10]; MOVDQU XMM2, [R8+$20]; MOVDQU XMM3, [R8+$30]
+ MOVDQU XMM4, [R8+$40]; MOVDQU XMM5, [R8+$50]; MOVDQU XMM6, [R8+$60]; MOVDQU XMM7, [R8+$70]
+ MOVDQU XMM8, [R8+$80]; MOVDQU XMM9, [R8+$90]; MOVDQU XMM10, [R8+$A0]; MOVDQU XMM11, [R8+$B0]
+ MOVDQU XMM12, [R8+$C0]; MOVDQU XMM13, [R8+$D0]; MOVDQU XMM14, [R8+$E0]
+ AESIMC XMM1, XMM1; AESIMC XMM2, XMM2; AESIMC XMM3, XMM3; AESIMC XMM4, XMM4
+ AESIMC XMM5, XMM5; AESIMC XMM6, XMM6; AESIMC XMM7, XMM7; AESIMC XMM8, XMM8
+ AESIMC XMM9, XMM9; AESIMC XMM10, XMM10; AESIMC XMM11, XMM11; AESIMC XMM12, XMM12
+ AESIMC XMM13, XMM13
+ MOVDQU [R8+$100], XMM0; MOVDQU [R8+$110], XMM1; MOVDQU [R8+$120], XMM2; MOVDQU [R8+$130], XMM3
+ MOVDQU [R8+$140], XMM4; MOVDQU [R8+$150], XMM5; MOVDQU [R8+$160], XMM6; MOVDQU [R8+$170], XMM7
+ MOVDQU [R8+$180], XMM8; MOVDQU [R8+$190], XMM9; MOVDQU [R8+$1A0], XMM10; MOVDQU [R8+$1B0], XMM11
+ MOVDQU [R8+$1C0], XMM12; MOVDQU [R8+$1D0], XMM13; MOVDQU [R8+$1E0], XMM14
+ POP RBX
+End;
+
+Procedure EnCrypt_AES(InData, OutData: Pointer; DataSize: WordPR; EnCryptRoundKeys: Pointer); Assembler; NoStackFrame;
+Asm
+{$ifndef win64}
+ // fix parameter locations
+ MOV R9,RCX
+ MOV R8,RDX
+ MOV RDX,RSI
+ MOV RCX,RDI
+{$endif win64}
+ // Loading encryption keys
+ MOVDQU XMM0, [R9+16*0]
+ MOVDQU XMM1, [R9+16*1]
+ MOVDQU XMM2, [R9+16*2]
+ MOVDQU XMM3, [R9+16*3]
+ MOVDQU XMM4, [R9+16*4]
+ MOVDQU XMM5, [R9+16*5]
+ MOVDQU XMM6, [R9+16*6]
+ MOVDQU XMM7, [R9+16*7]
+ MOVDQU XMM8, [R9+16*8]
+ MOVDQU XMM9, [R9+16*9]
+ MOVDQU XMM10, [R9+16*10]
+ MOVDQU XMM11, [R9+16*11]
+ MOVDQU XMM12, [R9+16*12]
+ MOVDQU XMM13, [R9+16*13]
+ MOVDQU XMM14, [R9+16*14]
+ // Setting the main loop
+ XCHG RCX, R8
+ SHR RCX, 4
+@Loop: MOVDQU XMM15, [R8]; ADD R8, 16
+ PXOR XMM15, XMM0
+ AESENC XMM15, XMM1
+ AESENC XMM15, XMM2
+ AESENC XMM15, XMM3
+ AESENC XMM15, XMM4
+ AESENC XMM15, XMM5
+ AESENC XMM15, XMM6
+ AESENC XMM15, XMM7
+ AESENC XMM15, XMM8
+ AESENC XMM15, XMM9
+ AESENC XMM15, XMM10
+ AESENC XMM15, XMM11
+ AESENC XMM15, XMM12
+ AESENC XMM15, XMM13
+ AESENCLAST XMM15, XMM14
+ MOVDQU [RDX], XMM15; ADD RDX, 16
+ LOOP @Loop
+End;
+
+Procedure DeCrypt_AES(InData, OutData: Pointer; DataSize: WordPR; DeCryptRoundKeys: Pointer); Assembler; NoStackFrame;
+Asm
+{$ifndef win64}
+ // fix parameter locations
+ MOV R9,RCX
+ MOV R8,RDX
+ MOV RDX,RSI
+ MOV RCX,RDI
+{$endif win64}
+ // Loading decryption keys
+ MOVDQU XMM0, [R9+16*0]
+ MOVDQU XMM1, [R9+16*1]
+ MOVDQU XMM2, [R9+16*2]
+ MOVDQU XMM3, [R9+16*3]
+ MOVDQU XMM4, [R9+16*4]
+ MOVDQU XMM5, [R9+16*5]
+ MOVDQU XMM6, [R9+16*6]
+ MOVDQU XMM7, [R9+16*7]
+ MOVDQU XMM8, [R9+16*8]
+ MOVDQU XMM9, [R9+16*9]
+ MOVDQU XMM10, [R9+16*10]
+ MOVDQU XMM11, [R9+16*11]
+ MOVDQU XMM12, [R9+16*12]
+ MOVDQU XMM13, [R9+16*13]
+ MOVDQU XMM14, [R9+16*14]
+ // Setting the main loop
+ XCHG RCX, R8
+ SHR RCX, 4
+@Loop: MOVDQU XMM15, [R8]; ADD R8, 16
+ PXOR XMM15, XMM14
+ AESDEC XMM15, XMM13
+ AESDEC XMM15, XMM12
+ AESDEC XMM15, XMM11
+ AESDEC XMM15, XMM10
+ AESDEC XMM15, XMM9
+ AESDEC XMM15, XMM8
+ AESDEC XMM15, XMM7
+ AESDEC XMM15, XMM6
+ AESDEC XMM15, XMM5
+ AESDEC XMM15, XMM4
+ AESDEC XMM15, XMM3
+ AESDEC XMM15, XMM2
+ AESDEC XMM15, XMM1
+ AESDECLAST XMM15, XMM0
+ MOVDQU [RDX], XMM15; ADD RDX, 16
+ LOOP @Loop
+End;
+
+BEGIN
+ if AESSupport then
+ begin
+ OpenKey_AES(@Test_Key, @OpenedKey);
+ EnCrypt_AES(@Test_Data, @Data, 16, @OpenedKey.EnCryptRoundKeys);
+ Passed := SysUtils.CompareMem(@Data, @Test_Crypt, 16);
+ DeCrypt_AES(@Data, @Data, 16, @OpenedKey.DeCryptRoundKeys);
+ Passed := Passed and SysUtils.CompareMem(@Data, @Test_Data, 16);
+ If Not Passed Then Halt(1);
+ writeln('ok');
+ end
+ else
+ writeln('CPU has no AES instruction support');
+END.
diff --git a/tests/test/tarray8.pp b/tests/test/tarray8.pp
new file mode 100644
index 0000000000..3ce505c0f1
--- /dev/null
+++ b/tests/test/tarray8.pp
@@ -0,0 +1,27 @@
+{ Test correct RTTI handling of open arrays with managed elements.
+ See also webtbs/tw18859.pp }
+
+{$mode objfpc}{$h+}
+
+procedure test3(out arr: array of string);
+begin
+ { implicit initialize happens here }
+ arr[0] := ''; // if initialization does not happen correctly, teststring will be destroyed
+end;
+
+var
+ teststring: string;
+ arrs: array[0..3] of string;
+
+begin
+ teststring := 'test';
+ uniquestring(teststring);
+ // Must be a string with refcount>1, otherwise decref before call will release it and
+ // zero the pointer, thus masking the issue.
+ arrs[0] := teststring;
+ { implicit decref happens here }
+ test3(arrs);
+ if teststring <> 'test' then
+ Halt(1);
+ Halt(0);
+end.
diff --git a/tests/test/tarray9.pp b/tests/test/tarray9.pp
new file mode 100644
index 0000000000..2b3cab0ef9
--- /dev/null
+++ b/tests/test/tarray9.pp
@@ -0,0 +1,122 @@
+{ %OPT=-gh }
+
+{ Test correct RTTI handling of open arrays with managed elements.
+ When a part (slice or range) of array is passed as an out-parameter open array
+ to a procedure, the entire array should NOT be finalized, only part that is actually passed should. }
+
+{$mode objfpc}{$h+}
+uses SysUtils;
+
+
+procedure test3(out arr: array of string);
+var
+ i: Integer;
+begin
+ { implicit initialization happens here }
+ for i := 0 to High(arr) do
+ begin
+ Pointer(arr[i]):=nil; // if array initialization was correct, this will be a no-op
+ // otherwise, it will trigger a memory leak
+ arr[i] := 'tested'+IntToStr(i);
+ end;
+end;
+
+procedure test_entire_openarray(var arr: array of string);
+begin
+ test3(arr);
+end;
+
+procedure test_openarray_subrange(var arr: array of string);
+begin
+ test3(arr[1..2]);
+end;
+
+procedure test_openarray_slice(var arr: array of string);
+begin
+ test3(slice(arr,2));
+end;
+
+
+var
+ sarr: array[0..3] of string;
+ darr: array of string;
+
+procedure prepare;
+var
+ i: Integer;
+begin
+ for i := 0 to 3 do
+ begin
+ sarr[i] := 'static'+IntToStr(i);
+ darr[i] := 'dynamic'+IntToStr(i);
+ end;
+end;
+
+begin
+ HaltOnNotReleased := True;
+ SetLength(darr,4);
+
+ prepare;
+ test_entire_openarray(sarr);
+ if sarr[0] <> 'tested0' then Halt(1);
+ if sarr[1] <> 'tested1' then Halt(2);
+ if sarr[2] <> 'tested2' then Halt(3);
+ if sarr[3] <> 'tested3' then Halt(4);
+
+ prepare;
+ test_openarray_subrange(sarr); // must leave elements 0 and 3 intact
+ if sarr[0] <> 'static0' then Halt(11);
+ if sarr[1] <> 'tested0' then Halt(12);
+ if sarr[2] <> 'tested1' then Halt(13);
+ if sarr[3] <> 'static3' then Halt(14);
+
+ prepare;
+ test_openarray_slice(sarr); // must leave elements 2 and 3 intact
+ if sarr[0] <> 'tested0' then Halt(21);
+ if sarr[1] <> 'tested1' then Halt(22);
+ if sarr[2] <> 'static2' then Halt(23);
+ if sarr[3] <> 'static3' then Halt(24);
+
+ prepare;
+ test3(sarr); // entire static array
+ if sarr[0] <> 'tested0' then Halt(31);
+ if sarr[1] <> 'tested1' then Halt(32);
+ if sarr[2] <> 'tested2' then Halt(33);
+ if sarr[3] <> 'tested3' then Halt(34);
+
+ prepare;
+ test3(sarr[1..2]); // static array subrange
+ if sarr[0] <> 'static0' then Halt(41);
+ if sarr[1] <> 'tested0' then Halt(42);
+ if sarr[2] <> 'tested1' then Halt(43);
+ if sarr[3] <> 'static3' then Halt(44);
+
+ prepare;
+ test3(slice(sarr,2)); // static array slice
+ if sarr[0] <> 'tested0' then Halt(51);
+ if sarr[1] <> 'tested1' then Halt(52);
+ if sarr[2] <> 'static2' then Halt(53);
+ if sarr[3] <> 'static3' then Halt(54);
+
+ prepare;
+ test3(darr); // entire dynamic array
+ if darr[0] <> 'tested0' then Halt(61);
+ if darr[1] <> 'tested1' then Halt(62);
+ if darr[2] <> 'tested2' then Halt(63);
+ if darr[3] <> 'tested3' then Halt(64);
+
+ prepare;
+ test3(darr[1..2]); // dynamic array subrange
+ if darr[0] <> 'dynamic0' then Halt(71);
+ if darr[1] <> 'tested0' then Halt(72);
+ if darr[2] <> 'tested1' then Halt(73);
+ if darr[3] <> 'dynamic3' then Halt(74);
+
+ prepare;
+ test3(slice(darr,2)); // dynamic array slice
+ if darr[0] <> 'tested0' then Halt(81);
+ if darr[1] <> 'tested1' then Halt(82);
+ if darr[2] <> 'dynamic2' then Halt(83);
+ if darr[3] <> 'dynamic3' then Halt(84);
+
+end.
diff --git a/tests/test/tclass13.pp b/tests/test/tclass13.pp
index 6346dc8757..a1fdb8bbe3 100644
--- a/tests/test/tclass13.pp
+++ b/tests/test/tclass13.pp
@@ -15,8 +15,19 @@ type
FTest: Integer;
type
TNode = class
+ FNode: TRootClass.TNode.TNode;
end;
en = (e1,e2);
+ TOtherNode = class
+ public
+ type
+ TNestedInOtherNode = class
+ ffield: longint;
+ end;
+ end;
+ TFinalNode = class
+ fx: TRootClass.TOtherNode.TNestedInOtherNode;
+ end;
published
property Test: Integer read FTest write FTest;
end;
@@ -36,6 +47,7 @@ begin
Test1 := TNode.TNode.Create;
if Test1.ClassName <> 'TRootClass.TNode.TNode' then
halt(2);
+ Test1.FNode:=Test1;
Test1.Free;
end;
diff --git a/tests/test/tclass13a.pp b/tests/test/tclass13a.pp
new file mode 100644
index 0000000000..1a7a587e40
--- /dev/null
+++ b/tests/test/tclass13a.pp
@@ -0,0 +1,17 @@
+{ %norun }
+{$mode delphi}
+
+type
+ tc = class
+ type
+ tnest = class
+ end;
+ end;
+ td = class(tc)
+ type
+ tnest = class(tc.tnest)
+ end;
+ end;
+
+begin
+end.
diff --git a/tests/test/tclass13b.pp b/tests/test/tclass13b.pp
new file mode 100644
index 0000000000..6210bdb63a
--- /dev/null
+++ b/tests/test/tclass13b.pp
@@ -0,0 +1,23 @@
+{ %norun }
+
+{$mode delphi}
+
+type
+ tc = class
+ type
+ tforward = class;
+
+ tnested = class
+ type
+ tforward = class;
+
+ tforward = class
+ end;
+ end;
+
+ tforward = class
+ end;
+ end;
+
+begin
+end.
diff --git a/tests/test/tindex.pp b/tests/test/tindex.pp
index ae5bb66214..c128b53ee3 100644
--- a/tests/test/tindex.pp
+++ b/tests/test/tindex.pp
@@ -46,12 +46,29 @@ begin
writeln('indexbyte error 2 for (',i,',',j,',',k,')');
halt(2);
end;
+ {same for length=-1}
+ if indexbyte(b[k+4],-1,0)<>index then
+ begin
+ writeln(indexbyte(b[k+4],-1,0),' <> ',index);
+ writeln('indexbyte error 2a for (',i,',',j,',',k,')');
+ halt(22);
+ end;
+
if indexbyte(b[k+4],i,b[k+4+i-1])<>i-1 then
begin
writeln('indexbyte error 3 for (',i,',',j,',',k,')');
halt(3);
end;
+ {same for length=-1}
+ if i<>0 then // previous test will be no-op when i=0
+ if indexbyte(b[k+4],-1,b[k+4+i-1])<>i-1 then
+ begin
+ writeln('indexbyte error 3a for (',i,',',j,',',k,')');
+ halt(23);
+ end;
+
+
if (i<1) then
index:=-1
else
@@ -62,6 +79,16 @@ begin
writeln('indexbyte error 4 for (',i,',',j,',',k,')');
halt(4);
end;
+ {same for length=-1}
+ if i<>0 then // previous test will be no-op when i=0
+ if indexbyte(b[k+4],-1,b[k+4+i shr 1])<>index then
+ begin
+ writeln(indexbyte(b[k+4],-1,b[k+4+i shr 1]),' <> ',index);
+ writeln('indexbyte error 4a for (',i,',',j,',',k,')');
+ halt(24);
+ end;
+
+
if (i=0) then
index:=-1
else
@@ -69,8 +96,15 @@ begin
if indexbyte(b[k+4],i,b[k+4])<>index then
begin
writeln('indexbyte error 5 for (',i,',',j,',',k,')');
- halt(3);
+ halt(5);
end;
+ {same for length=-1}
+ if i<>0 then
+ if indexbyte(b[k+4],-1,b[k+4])<>index then
+ begin
+ writeln('indexbyte error 5a for (',i,',',j,',',k,')');
+ halt(25);
+ end;
if indexword(b[k+4],i shr 1,0)<>-1 then
diff --git a/tests/test/tsec1.pp b/tests/test/tsec1.pp
new file mode 100644
index 0000000000..3c43b8319b
--- /dev/null
+++ b/tests/test/tsec1.pp
@@ -0,0 +1,6 @@
+{ %target=embedded }
+var
+ d : longint;section '.bss';
+
+begin
+end.
diff --git a/tests/test/units/system/tmem.pp b/tests/test/units/system/tmem.pp
index 3ef647419c..7abb55226d 100644
--- a/tests/test/units/system/tmem.pp
+++ b/tests/test/units/system/tmem.pp
@@ -16,9 +16,7 @@ var
dst_arraybyte : array[1..MAX_TABLE] of byte;
src_arraybyte : array[1..MAX_TABLE] of byte;
dst_arrayword : array[1..MAX_TABLE] of word;
- src_arrayword : array[1..MAX_TABLE] of word;
dst_arraylongword : array[1..MAX_TABLE] of longword;
- src_arratlongword : array[1..MAX_TABLE] of longword;
i: integer;
@@ -70,6 +68,8 @@ procedure test_fillchar;
for i := 1 to MAX_TABLE do
dst_arraybyte[i] := DEFAULT_VALUE;
fillchar(dst_arraybyte, -1, FILL_VALUE);
+ for i := 1 to MAX_TABLE do
+ test(dst_arraybyte[i], DEFAULT_VALUE);
writeln('Passed!');
end;
@@ -103,7 +103,7 @@ begin
test(dst_arraybyte[i], FILL_VALUE);
writeln('Passed!');
{ zero move count }
- write('test move (zero count)...');
+ write('testing move (zero count)...');
for i := 1 to MAX_TABLE do
begin
dst_arraybyte[i] := DEFAULT_VALUE;
@@ -114,11 +114,75 @@ begin
test(dst_arraybyte[i], DEFAULT_VALUE);
writeln('Passed!');
{ negative move count }
- write('test move (negative count)...');
+ write('testing move (negative count)...');
move(src_arraybyte,dst_arraybyte,-12);
writeln('Passed!');
end;
+
+procedure test_move_large(size: longint);
+var
+ src, dst: PLongInt;
+ i: LongInt;
+begin
+ GetMem(src, size*sizeof(LongInt));
+ GetMem(dst, size*sizeof(LongInt));
+ write('testing move of ',size,' dwords ...');
+ for i := 0 to size-1 do
+ begin
+ src[i] := i;
+ dst[i] := -1;
+ end;
+ move(src[0], dst[2], (size-4)*sizeof(LongInt));
+ test(dst[0], -1);
+ test(dst[1], -1);
+ test(dst[size-1], -1);
+ test(dst[size-2], -1);
+ for i := 2 to size-3 do
+ test(dst[i], i-2);
+ writeln('Passed!');
+
+ // repeat with source and dest swapped (maybe move in opposite direction)
+ // current implementations detect that regions don't overlap and move forward,
+ // so this test is mostly useless. But it won't harm anyway.
+ write('testing move of ',size,' dwords, opposite direction...');
+ for i := 0 to size-1 do
+ begin
+ dst[i] := i;
+ src[i] := -1;
+ end;
+ move(dst[0], src[2], (size-4)*sizeof(LongInt));
+ test(src[0], -1);
+ test(src[1], -1);
+ test(src[size-1], -1);
+ test(src[size-2], -1);
+ for i := 2 to size-3 do
+ test(src[i], i-2);
+ writeln('Passed!');
+
+ write('testing move of ',size,' dwords, overlapping forward...');
+ for i := 0 to size-1 do
+ src[i] := i;
+ move(src[0], src[100], (size-100)*sizeof(LongInt));
+ for i := 0 to 99 do
+ test(src[i], i);
+ for i := 100 to size-101 do
+ test(src[i], i-100);
+ writeln('Passed!');
+
+ write('testing move of ',size,' dwords, overlapping backward...');
+ for i := 0 to size-1 do
+ src[i] := i;
+ move(src[100], src[0], (size-100)*sizeof(LongInt));
+ for i := 0 to size-101 do
+ test(src[i], i+100);
+ for i := size-100 to size-1 do
+ test(src[i], i);
+ writeln('Passed!');
+ FreeMem(dst);
+ FreeMem(src);
+end;
+
{$ifdef fpc}
procedure test_fillword;
var
@@ -271,6 +335,8 @@ end;
begin
test_fillchar;
test_move;
+ test_move_large(500); // 512 longints=2048 bytes
+ test_move_large(500000);
{$ifdef fpc}
test_fillword;
test_filldword;
diff --git a/tests/webtbs/tw16040.pp b/tests/webtbs/tw16040.pp
index 3026b69ff5..de5a36f2cc 100644
--- a/tests/webtbs/tw16040.pp
+++ b/tests/webtbs/tw16040.pp
@@ -1,5 +1,5 @@
uses
- dateutils;
+ sysutils,dateutils;
var
date1,
date2: tdatetime;
@@ -26,8 +26,6 @@ begin
writeln(date1:0:12);
halt(3);
end;
-
-
date1:=EncodeDateTime(2010,03,23,0,0,0,0);
date2:=JulianDateToDateTime(2455278.50000);
if date1<>date2 then
@@ -50,4 +48,66 @@ begin
halt(6);
end;
+ date1:=EncodeDateTime(2011,03,26,19,15,30,555);
+ if IsInLeapYear(date1) then
+ begin
+ writeln('IsInLeapYear test fail');
+ halt(7);
+ end;
+ if not IsPM(date1) then
+ begin
+ writeln('IsPM test fail');
+ halt(8);
+ end;
+ if YearOf(date1) <> 2011 then
+ begin
+ writeln('YearOf test fail');
+ halt(9);
+ end;
+ if MonthOf(date1) <> 3 then
+ begin
+ writeln('MonthOf test fail');
+ halt(10);
+ end;
+ if DayOf(date1) <> 26 then
+ begin
+ writeln('DayOf test fail');
+ halt(11);
+ end;
+ if (HourOf(date1) <> 19) or (HourOfTheDay(date1) <> 19) then
+ begin
+ writeln('HourOf test fail');
+ halt(11);
+ end;
+ if (MinuteOf(date1) <> 15) or (MinuteOfTheHour(date1) <> 15) then
+ begin
+ writeln('MinuteOf test fail');
+ halt(12);
+ end;
+ if (SecondOf(date1) <> 30) or (SecondOfTheMinute(date1) <> 30) then
+ begin
+ writeln('SecondOf test fail');
+ halt(13);
+ end;
+ if (MilliSecondOf(date1) <> 555) or (MilliSecondOfTheSecond(date1) <> 555) then
+ begin
+ writeln('MilliSecondOf test fail');
+ halt(14);
+ end;
+ if StartOfTheYear(date1) <> EncodeDate(2011, 1, 1) then
+ begin
+ writeln('StartOfTheYear test fail');
+ halt(15);
+ end;
+ if EndOfTheYear(date1) <> EncodeDateTime(2011,12,31,23,59,59,999) then
+ begin
+ writeln('EndOfTheYear test fail');
+ halt(16);
+ end;
+ if scandatetime('YYYY.MM.DD HH:NN:SS:ZZZ', '2011.03.29 16:46:56:777') <>
+ EncodeDateTime(2011,03,29,16,46,56,777) then
+ begin
+ writeln('scandatetime test fail');
+ halt(17);
+ end;
end.
diff --git a/tests/webtbs/tw18567 b/tests/webtbs/tw18567.pp
index b2018a88b8..b2018a88b8 100644
--- a/tests/webtbs/tw18567
+++ b/tests/webtbs/tw18567.pp
diff --git a/tests/webtbs/tw18702.pp b/tests/webtbs/tw18702.pp
new file mode 100644
index 0000000000..69a54be3bc
--- /dev/null
+++ b/tests/webtbs/tw18702.pp
@@ -0,0 +1,38 @@
+program project1;
+
+{$mode objfpc}{$H+}
+{$modeswitch nestedprocvars}
+
+type
+ TGetSQLTextProc = function() : string is nested;
+
+procedure TestSQLFieldType(AGetSQLTextProc: TGetSQLTextProc);
+var
+ i : byte;
+ s: string;
+begin
+ for i := 0 to 9 do
+ begin
+ s := AGetSQLTextProc();
+ if s<>'hello' then
+ begin
+ writeln('Failed');
+ halt(i+1);
+ end;
+ end;
+end;
+
+procedure TestSQLClob;
+
+ function GetSQLText() : string;
+ begin
+ result := 'hello';
+ end;
+
+begin
+ TestSQLFieldType(@GetSQLText);
+end;
+
+begin
+ TestSQLClob;
+end.
diff --git a/tests/webtbs/tw18859.pp b/tests/webtbs/tw18859.pp
new file mode 100644
index 0000000000..f5d229d586
--- /dev/null
+++ b/tests/webtbs/tw18859.pp
@@ -0,0 +1,38 @@
+{ %OPT=-gh }
+Program project1;
+
+{$mode objfpc}
+{$h+}
+
+type
+ trec = record
+ s: string;
+ end;
+
+procedure test1(values: array of string);
+begin
+ if paramcount = 0 then
+ values[0] := values[0] + '1'
+ else
+ values[0] := '1';
+end;
+
+
+procedure test2(values: array of trec);
+begin
+ if paramcount = 0 then
+ values[0].s := values[0].s + '1'
+ else
+ values[0].s := '1';
+end;
+
+var
+ tr: trec;
+
+begin
+ HaltOnNotReleased := True;
+ tr.s := 'test';
+ uniquestring(tr.s);
+ test1([tr.s]);
+ test2([tr]);
+end.
diff --git a/utils/fpcm/fpcmake.inc b/utils/fpcm/fpcmake.inc
index 63bc50eed0..a5ac18c138 100644
--- a/utils/fpcm/fpcmake.inc
+++ b/utils/fpcm/fpcmake.inc
@@ -1,2397 +1,2466 @@
{$ifdef Delphi}
-const fpcmakeini : array[0..219] of string[240]=(
+const fpcmakeini : array[0..229] of string[240]=(
{$else Delphi}
-const fpcmakeini : array[0..219,1..240] of char=(
+const fpcmakeini : array[0..229,1..240] of char=(
{$endif Delphi}
- ';'#010+
- '; Templates used by fpcmake to create a Makefile from Makefile.fpc'#010+
- ';'#010+
+ ';'#013#010+
+ '; Templates used by fpcmake to create a Makefile from Makefile.fpc'#013+
#010+
- '[defines]'#010+
- '#####################################################################'#010+
- '# Misc defines to be used by anyone'#010+
- '####################################################','################'+
- '#'#010+
- #010+
- '# OS categories'#010+
- 'BSDs = freebsd netbsd openbsd darwin'#010+
- 'UNIXs = linux $(BSDs) solaris qnx haiku'#010+
- 'LIMIT83fs = go32v2 os2 emx watcom'#010+
- 'OSNeedsComspecToRunBatch = go32v2 watcom'#010+
- #010+
- '#Empty target for rules that always should run. Need','ed if'#010+
- '#the target is non-phoney, and there is non-phony prereqisites.'#010+
- '#Then add FORCE as an prerequisite'#010+
- '#See gnu make manual: 4.7 Rules without Commands or Prerequisites'#010+
- 'FORCE:'#010+
- '.PHONY: FORCE'#010+
- #010+
- '[osdetect]'#010+
- '####################################','################################'+
- '#'#010+
- '# Autodetect source OS (Linux or Dos or Windows NT or OS/2 or other)'#010+
- '# define inUnix when running under Unix like environment'#010+
- '# (Linux,FreeBSD,NetBSD,OpenBSD,Darwin,Cygwin)'#010+
- '# define inWinNT wh','en running under WinNT'#010+
- '# define inOS2 when running under OS/2'#010+
- '# define inCygwin when running under Cygwin32'#010+
- '#####################################################################'#010+
- #010+
- '# We need only / in the path also remove the current dir,'#010+
- '# a','lso remove trailing /'#039's'#010+
- 'override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))'#010+
- #010+
- '# Detect unix'#010+
- '# Darwin is handled specially'#010+
- 'ifneq ($(findstring darwin,$(OSTYPE)),)'#010+
- 'inUnix=1 #darwin'#010+
- 'SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))'#010+
- 'else'#010+
- '# Deter','mine if we'#039've a unix searchpath by looking for a ;'#010+
- '# that normally doesn'#039't exists in the unix PATH var.'#010+
- 'ifeq ($(findstring ;,$(PATH)),)'#010+
- 'inUnix=1'#010+
- 'SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))'#010+
- 'else'#010+
- 'SEARCHPATH:=$(subst ;, ,$(PATH))'#010+
- 'endif'#010+
- 'en','dif'#010+
- #010+
- '# Add path were make is located'#010+
- 'SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))'#010+
- #010+
- '# Search for PWD'#010+
- 'PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))'#010+
- 'ifeq ($(PWD),)'#010+
- 'PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPA','TH))))'#010+
- 'ifeq ($(PWD),)'#010+
- '$(error You need the GNU utils package to use this Makefile)'#010+
- 'else'#010+
- 'PWD:=$(firstword $(PWD))'#010+
- 'SRCEXEEXT='#010+
- 'endif'#010+
- 'else'#010+
- 'PWD:=$(firstword $(PWD))'#010+
- 'SRCEXEEXT=.exe'#010+
- 'endif'#010+
- #010+
- '# Detect NT - NT sets OS to Windows_NT'#010+
- '# Detect OS/2 - OS/','2 has OS2_SHELL defined'#010+
- 'ifndef inUnix'#010+
- 'ifeq ($(OS),Windows_NT)'#010+
- 'inWinNT=1'#010+
- 'else'#010+
- 'ifdef OS2_SHELL'#010+
- 'inOS2=1'#010+
- 'endif'#010+
- 'endif'#010+
- 'else'#010+
- 'ifneq ($(findstring cygdrive,$(PATH)),)'#010+
- 'inCygWin=1'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# The extension of batch files / scripts'#010+
- 'ifdef inUnix'#010+
- 'SRCB','ATCHEXT=.sh'#010+
- 'else'#010+
- 'ifdef inOS2'#010+
- 'SRCBATCHEXT=.cmd'#010+
- 'else'#010+
- 'SRCBATCHEXT=.bat'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'ifdef COMSPEC'#010+
- 'ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComspecToRunBatch)),)'#010+
- 'ifndef RUNBATCH'#010+
- 'RUNBATCH=$(COMSPEC) /C'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
+ ';'#013#010+
+ #013#010+
+ '[defines]'#013#010+
+ '#####################################################################'#013+
#010+
- '# Path Separator, the s','ubst trick is necessary for the \ that can'#039+
- 't exists'#010+
- '# at the end of a line'#010+
- 'ifdef inUnix'#010+
- 'PATHSEP=/'#010+
- 'else'#010+
- 'PATHSEP:=$(subst /,\,/)'#010+
- '# cygwin bash or sh can not handle backslashs'#010+
- 'ifdef inCygWin'#010+
- 'PATHSEP=/'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Base dir'#010+
- 'ifdef PWD'#010+
- 'BASEDIR:','=$(subst \,/,$(shell $(PWD)))'#010+
- '# For Cygwin we need to replace /cygdrive/c/ with c:/'#010+
- 'ifdef inCygWin'#010+
- 'ifneq ($(findstring /cygdrive/,$(BASEDIR)),)'#010+
- 'BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))'#010+
- 'BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))',#010+
- 'BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))'#010+
- 'endif'#010+
- 'endif'#010+
- 'else'#010+
- 'BASEDIR=.'#010+
- 'endif'#010+
- #010+
- '# Echo is an internal command under OS/2 (and others), so it'#039's alw'+
- 'ays found'#010+
- 'ifdef inOS2'#010+
- 'ifndef ECHO'#010+
- 'ECHO:=$(strip $(wildcard $(addsuffix ','/gecho$(SRCEXEEXT),$(SEARCHPATH'+
- '))))'#010+
- 'ifeq ($(ECHO),)'#010+
- 'ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH)))'+
- ')'#010+
- 'ifeq ($(ECHO),)'#010+
- 'ECHO=echo'#010+
- 'else'#010+
- 'ECHO:=$(firstword $(ECHO))'#010+
- 'endif'#010+
- 'else'#010+
- 'ECHO:=$(firstword $(ECHO))'#010+
- 'endif'#010+
- 'endif'#010+
- 'export E','CHO'#010+
- 'endif'#010+
- #010+
- '[fpcdetect]'#010+
- '#####################################################################'#010+
- '# FPC Binary and Version Detection'#010+
- '#####################################################################'#010+
- #010+
- '# Compatibility with old makefiles'#010+
- 'ifndef',' FPC'#010+
- 'ifdef PP'#010+
- 'FPC=$(PP)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Try to detect the ppcXXX file to use by using "fpc -PB" option'#010+
- '# to query for the default ppcXXX the fpc executable tries. When'#010+
- '# fpc is not found use ppc386 by default. Also when fpc -PB gives'#010+
- '# an er','ror ppc386 will be used.'#010+
- 'ifndef FPC'#010+
- '# check if fpc exists'#010+
- 'FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH)'+
- ')))'#010+
- 'ifneq ($(FPCPROG),)'#010+
- 'FPCPROG:=$(firstword $(FPCPROG))'#010+
- 'ifneq ($(CPU_TARGET),)'#010+
- 'FPC:=$(shell $(FPCPROG) -P$(CPU_','TARGET) -PB)'#010+
- 'else'#010+
- 'FPC:=$(shell $(FPCPROG) -PB)'#010+
- 'endif'#010+
- '# Older fpc executables didn'#039't support it and return'#010+
- '# Error: Illegal processor... If found then fallback to ppc386'#010+
- 'ifneq ($(findstring Error,$(FPC)),)'#010+
- 'override FPC=$(firstword $(strip $(','wildcard $(addsuffix /ppc386$(SRC'+
- 'EXEEXT),$(SEARCHPATH)))))'#010+
- 'else'#010+
- '# if the cross compiler is not found, fall back to fpc'#010+
- 'ifeq ($(strip $(wildcard $(FPC))),)'#010+
- 'FPC:=$(firstword $(FPCPROG))'#010+
- 'endif'#010+
- 'endif'#010+
- 'else'#010+
- '# fpc binary not found, fallback to ppc','386'#010+
+ '# Misc defines to be used by anyone'#013#010+
+ '#############################################','#######################'+
+ '#'#013#010+
+ #013#010+
+ '# OS categories'#013#010+
+ 'BSDs = freebsd netbsd openbsd darwin'#013#010+
+ 'UNIXs = linux $(BSDs) solaris qnx haiku'#013#010+
+ 'LIMIT83fs = go32v2 os2 emx watcom'#013#010+
+ 'OSNeedsComspecToRunBatch = go32v2 watcom'#013#010+
+ #013#010+
+ '#Empty target for rules that always s','hould run. Needed if'#013#010+
+ '#the target is non-phoney, and there is non-phony prereqisites.'#013#010+
+ '#Then add FORCE as an prerequisite'#013#010+
+ '#See gnu make manual: 4.7 Rules without Commands or Prerequisites'#013#010+
+ 'FORCE:'#013#010+
+ '.PHONY: FORCE'#013#010+
+ #013#010+
+ '[osdetect]'#013#010+
+ '#############','#######################################################'+
+ '#'#013#010+
+ '# Autodetect source OS (Linux or Dos or Windows NT or OS/2 or other)'#013+
+ #010+
+ '# define inUnix when running under Unix like environment'#013#010+
+ '# (Linux,FreeBSD,NetBSD,OpenBSD,Darwin,C','ygwin)'#013#010+
+ '# define inWinNT when running under WinNT'#013#010+
+ '# define inOS2 when running under OS/2'#013#010+
+ '# define inCygwin when running under Cygwin32'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# We need only / in the path ','also remove the current dir,'#013#010+
+ '# also remove trailing /'#039's'#013#010+
+ 'override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))'#013#010+
+ #013#010+
+ '# Detect unix'#013#010+
+ '# Darwin is handled specially'#013#010+
+ 'ifneq ($(findstring darwin,$(OSTYPE)),)'#013#010+
+ 'inUnix=1 #darwin'#013#010+
+ 'SEARCHPATH:=$(filter-','out .,$(subst :, ,$(PATH)))'#013#010+
+ 'else'#013#010+
+ '# Determine if we'#039've a unix searchpath by looking for a ;'#013#010+
+ '# that normally doesn'#039't exists in the unix PATH var.'#013#010+
+ 'ifeq ($(findstring ;,$(PATH)),)'#013#010+
+ 'inUnix=1'#013#010+
+ 'SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))'#013,#010+
+ 'else'#013#010+
+ 'SEARCHPATH:=$(subst ;, ,$(PATH))'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Add path were make is located'#013#010+
+ 'SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))'#013#010+
+ #013#010+
+ '# Search for PWD'#013#010+
+ 'PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))'#013#010+
+ 'ifeq ($(P','WD),)'#013#010+
+ 'PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))'#013#010+
+ 'ifeq ($(PWD),)'#013#010+
+ '$(error You need the GNU utils package to use this Makefile)'#013#010+
+ 'else'#013#010+
+ 'PWD:=$(firstword $(PWD))'#013#010+
+ 'SRCEXEEXT='#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'PWD:=$(firstword $(PWD))'#013#010+
+ 'SRCEXEEXT=.ex','e'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Detect NT - NT sets OS to Windows_NT'#013#010+
+ '# Detect OS/2 - OS/2 has OS2_SHELL defined'#013#010+
+ 'ifndef inUnix'#013#010+
+ 'ifeq ($(OS),Windows_NT)'#013#010+
+ 'inWinNT=1'#013#010+
+ 'else'#013#010+
+ 'ifdef OS2_SHELL'#013#010+
+ 'inOS2=1'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'ifneq ($(findstring cygdrive,$(PATH)),)'#013#010,
+ 'inCygWin=1'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# The extension of batch files / scripts'#013#010+
+ 'ifdef inUnix'#013#010+
+ 'SRCBATCHEXT=.sh'#013#010+
+ 'else'#013#010+
+ 'ifdef inOS2'#013#010+
+ 'SRCBATCHEXT=.cmd'#013#010+
+ 'else'#013#010+
+ 'SRCBATCHEXT=.bat'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef COMSPEC'#013#010+
+ 'ifneq ($(findstring $(OS_SOURCE),$(OSNeedsComsp','ecToRunBatch)),)'#013#010+
+ 'ifndef RUNBATCH'#013#010+
+ 'RUNBATCH=$(COMSPEC) /C'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Path Separator, the subst trick is necessary for the \ that can'#039't'+
+ ' exists'#013#010+
+ '# at the end of a line'#013#010+
+ 'ifdef inUnix'#013#010+
+ 'PATHSEP=/'#013#010+
+ 'else'#013#010+
+ 'PATHSEP:=$(subst /,\,/)'#013#010+
+ '# ','cygwin bash or sh can not handle backslashs'#013#010+
+ 'ifdef inCygWin'#013#010+
+ 'PATHSEP=/'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Base dir'#013#010+
+ 'ifdef PWD'#013#010+
+ 'BASEDIR:=$(subst \,/,$(shell $(PWD)))'#013#010+
+ '# For Cygwin we need to replace /cygdrive/c/ with c:/'#013#010+
+ 'ifdef inCygWin'#013#010+
+ 'ifneq ($(findstring',' /cygdrive/,$(BASEDIR)),)'#013#010+
+ 'BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))'#013#010+
+ 'BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))'#013#010+
+ 'BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))'#013+
+ #010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'BASEDIR=.'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Ech','o is an internal command under OS/2 (and others), so it'#039's a'+
+ 'lways found'#013#010+
+ 'ifdef inOS2'#013#010+
+ 'ifndef ECHO'#013#010+
+ 'ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))'+
+ '))'#013#010+
+ 'ifeq ($(ECHO),)'#013#010+
+ 'ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEE','XT),$(SEARCHPATH)'+
+ ')))'#013#010+
+ 'ifeq ($(ECHO),)'#013#010+
+ 'ECHO=echo'#013#010+
+ 'else'#013#010+
+ 'ECHO:=$(firstword $(ECHO))'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'ECHO:=$(firstword $(ECHO))'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'export ECHO'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '[fpcdetect]'#013#010+
+ '##################################################################','##'+
+ '#'#013#010+
+ '# FPC Binary and Version Detection'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# Compatibility with old makefiles'#013#010+
+ 'ifndef FPC'#013#010+
+ 'ifdef PP'#013#010+
+ 'FPC=$(PP)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Try to detect the ppcXXX file to use by',' using "fpc -PB" option'#013+
+ #010+
+ '# to query for the default ppcXXX the fpc executable tries. When'#013#010+
+ '# fpc is not found use ppc386 by default. Also when fpc -PB gives'#013#010+
+ '# an error ppc386 will be used.'#013#010+
+ 'ifndef FPC'#013#010+
+ '# check if fpc exists'#013#010+
+ 'FPCPROG:=$(str','ip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPAT'+
+ 'H))))'#013#010+
+ 'ifneq ($(FPCPROG),)'#013#010+
+ 'FPCPROG:=$(firstword $(FPCPROG))'#013#010+
+ 'ifneq ($(CPU_TARGET),)'#013#010+
+ 'FPC:=$(shell $(FPCPROG) -P$(CPU_TARGET) -PB)'#013#010+
+ 'else'#013#010+
+ 'FPC:=$(shell $(FPCPROG) -PB)'#013#010+
+ 'endif'#013#010+
+ '# Older fpc',' executables didn'#039't support it and return'#013#010+
+ '# Error: Illegal processor... If found then fallback to ppc386'#013#010+
+ 'ifneq ($(findstring Error,$(FPC)),)'#013#010+
'override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEX'+
- 'EEXT),$(SEARCHPATH)))))'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Get a clean executable name'#010+
- 'override FPC:=$(subst $(SRCEXEEXT),,$(FPC))'#010+
- 'override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)'#010+
- #010+
- '# Try to',' find the binary direct first, otherwise in the path,'#010+
- '# if not found give an error'#010+
- 'FOUNDFPC:=$(strip $(wildcard $(FPC)))'#010+
- 'ifeq ($(FOUNDFPC),)'#010+
- 'FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))'#010+
- 'ifeq ($(FOUNDFPC),)'#010+
- '$(error Compil','er $(FPC) not found)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# For 1.1 and up we can use a single compiler call to retrieve'#010+
- '# all needed information'#010+
- 'ifndef FPC_COMPILERINFO'#010+
- 'FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)'#010+
- 'endif'#010+
- #010+
- '# FPC version'#010+
- 'ifndef FPC_VERSION'#010+
- 'FPC_VERS','ION:=$(word 1,$(FPC_COMPILERINFO))'#010+
- 'endif'#010+
- #010+
- 'export FPC FPC_VERSION FPC_COMPILERINFO'#010+
- '# CHECKDEPEND should not be exported'#010+
- '# This should limit multiple checks'#010+
- 'unexport CHECKDEPEND ALLDEPENDENCIES'#010+
- #010+
- '###############################################','#####################'+
- '#'#010+
- '# FPC Target Detection'#010+
- '#####################################################################'#010+
- #010+
- '# Fall back to default values if needed'#010+
- 'ifndef CPU_TARGET'#010+
- 'ifdef CPU_TARGET_DEFAULT'#010+
- 'CPU_TARGET=$(CPU_TARGET_DEFAULT)'#010+
- 'endif'#010+
- 'e','ndif'#010+
- 'ifndef OS_TARGET'#010+
- 'ifdef OS_TARGET_DEFAULT'#010+
- 'OS_TARGET=$(OS_TARGET_DEFAULT)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# For 1.0.x we need to use extra calls to retrieve all info'#010+
- 'ifneq ($(words $(FPC_COMPILERINFO)),5)'#010+
- 'FPC_COMPILERINFO+=$(shell $(FPC) -iSP)'#010+
- 'FPC_COMPILER','INFO+=$(shell $(FPC) -iTP)'#010+
- 'FPC_COMPILERINFO+=$(shell $(FPC) -iSO)'#010+
- 'FPC_COMPILERINFO+=$(shell $(FPC) -iTO)'#010+
- 'endif'#010+
- #010+
- '# Retrieve Target/Source CPU and Target/Source OS'#010+
- 'ifndef CPU_SOURCE'#010+
- 'CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))'#010+
- 'endif'#010+
- 'ifndef CPU_T','ARGET'#010+
- 'CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))'#010+
- 'endif'#010+
- 'ifndef OS_SOURCE'#010+
- 'OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))'#010+
- 'endif'#010+
- 'ifndef OS_TARGET'#010+
- 'OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))'#010+
- 'endif'#010+
- 'FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)'#010+
- 'FULL_SOURCE=$(CPU_S','OURCE)-$(OS_SOURCE)'#010+
- #010+
- 'ifeq ($(CPU_TARGET),armeb)'#010+
- 'ARCH=arm'#010+
- 'override FPCOPT+=-Cb'#010+
- 'else'#010+
- 'ifeq ($(CPU_TARGET),armel)'#010+
- 'ARCH=arm'#010+
- 'override FPCOPT+=-CaEABI'#010+
- 'else'#010+
- 'ARCH=$(CPU_TARGET)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Full name of the target, including CPU and OS. For OSs li','mited'#010+
- '# to 8.3 we only use the target OS'#010+
- 'ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)'#010+
- 'TARGETSUFFIX=$(OS_TARGET)'#010+
- 'SOURCESUFFIX=$(OS_SOURCE)'#010+
- 'else'#010+
- 'TARGETSUFFIX=$(FULL_TARGET)'#010+
- 'SOURCESUFFIX=$(FULL_SOURCE)'#010+
- 'endif'#010+
- #010+
- '# Cross compile flag'#010+
- 'ifneq ($(','FULL_TARGET),$(FULL_SOURCE))'#010+
- 'CROSSCOMPILE=1'#010+
- 'endif'#010+
- #010+
- '# Check if the Makefile supports this target, but not'#010+
- '# when the make target is to rebuild the makefile'#010+
- 'ifeq ($(findstring makefile,$(MAKECMDGOALS)),)'#010+
- 'ifeq ($(findstring $(FULL_TARGET),$(MA','KEFILETARGETS)),)'#010+
+ 'EEXT),$(SEARCHPATH)))))'#013#010+
+ 'e','lse'#013#010+
+ '# if the cross compiler is not found, fall back to fpc'#013#010+
+ 'ifeq ($(strip $(wildcard $(FPC))),)'#013#010+
+ 'FPC:=$(firstword $(FPCPROG))'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ '# fpc binary not found, fallback to ppc386'#013#010+
+ 'override FPC=$(firstword $(strip $(wildcard $(ad','dsuffix /ppc386$(SRC'+
+ 'EXEEXT),$(SEARCHPATH)))))'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Get a clean executable name'#013#010+
+ 'override FPC:=$(subst $(SRCEXEEXT),,$(FPC))'#013#010+
+ 'override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)'#013#010+
+ #013#010+
+ '# Try to find the binary direct first, otherwise in ','the path,'#013#010+
+ '# if not found give an error'#013#010+
+ 'FOUNDFPC:=$(strip $(wildcard $(FPC)))'#013#010+
+ 'ifeq ($(FOUNDFPC),)'#013#010+
+ 'FOUNDFPC=$(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))'#013#010+
+ 'ifeq ($(FOUNDFPC),)'#013#010+
+ '$(error Compiler $(FPC) not found)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010,
+ '# For 1.1 and up we can use a single compiler call to retrieve'#013#010+
+ '# all needed information'#013#010+
+ 'ifndef FPC_COMPILERINFO'#013#010+
+ 'FPC_COMPILERINFO:=$(shell $(FPC) -iVSPTPSOTO)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# FPC version'#013#010+
+ 'ifndef FPC_VERSION'#013#010+
+ 'FPC_VERSION:=$(word 1,$(FPC_COMPIL','ERINFO))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'export FPC FPC_VERSION FPC_COMPILERINFO'#013#010+
+ '# CHECKDEPEND should not be exported'#013#010+
+ '# This should limit multiple checks'#013#010+
+ 'unexport CHECKDEPEND ALLDEPENDENCIES'#013#010+
+ #013#010+
+ '#################################################################','###'+
+ '#'#013#010+
+ '# FPC Target Detection'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# Fall back to default values if needed'#013#010+
+ 'ifndef CPU_TARGET'#013#010+
+ 'ifdef CPU_TARGET_DEFAULT'#013#010+
+ 'CPU_TARGET=$(CPU_TARGET_DEFAULT)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifn','def OS_TARGET'#013#010+
+ 'ifdef OS_TARGET_DEFAULT'#013#010+
+ 'OS_TARGET=$(OS_TARGET_DEFAULT)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# For 1.0.x we need to use extra calls to retrieve all info'#013#010+
+ 'ifneq ($(words $(FPC_COMPILERINFO)),5)'#013#010+
+ 'FPC_COMPILERINFO+=$(shell $(FPC) -iSP)'#013#010+
+ 'FPC_COMPILE','RINFO+=$(shell $(FPC) -iTP)'#013#010+
+ 'FPC_COMPILERINFO+=$(shell $(FPC) -iSO)'#013#010+
+ 'FPC_COMPILERINFO+=$(shell $(FPC) -iTO)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Retrieve Target/Source CPU and Target/Source OS'#013#010+
+ 'ifndef CPU_SOURCE'#013#010+
+ 'CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))'#013#010+
+ 'endif'#013#010+
+ 'if','ndef CPU_TARGET'#013#010+
+ 'CPU_TARGET:=$(word 3,$(FPC_COMPILERINFO))'#013#010+
+ 'endif'#013#010+
+ 'ifndef OS_SOURCE'#013#010+
+ 'OS_SOURCE:=$(word 4,$(FPC_COMPILERINFO))'#013#010+
+ 'endif'#013#010+
+ 'ifndef OS_TARGET'#013#010+
+ 'OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))'#013#010+
+ 'endif'#013#010+
+ 'FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)'#013,#010+
+ 'FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)'#013#010+
+ #013#010+
+ 'ifeq ($(CPU_TARGET),armeb)'#013#010+
+ 'ARCH=arm'#013#010+
+ 'override FPCOPT+=-Cb'#013#010+
+ 'else'#013#010+
+ 'ifeq ($(CPU_TARGET),armel)'#013#010+
+ 'ARCH=arm'#013#010+
+ 'override FPCOPT+=-CaEABI'#013#010+
+ 'else'#013#010+
+ 'ARCH=$(CPU_TARGET)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Full name of the target',', including CPU and OS. For OSs limited'#013+
+ #010+
+ '# to 8.3 we only use the target OS'#013#010+
+ 'ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)'#013#010+
+ 'TARGETSUFFIX=$(OS_TARGET)'#013#010+
+ 'SOURCESUFFIX=$(OS_SOURCE)'#013#010+
+ 'else'#013#010+
+ 'TARGETSUFFIX=$(FULL_TARGET)'#013#010+
+ 'SOURCESUFFIX=$(FULL_SOUR','CE)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Cross compile flag'#013#010+
+ 'ifneq ($(FULL_TARGET),$(FULL_SOURCE))'#013#010+
+ 'CROSSCOMPILE=1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Check if the Makefile supports this target, but not'#013#010+
+ '# when the make target is to rebuild the makefile'#013#010+
+ 'ifeq ($(findstring makefile,$(MAKE','CMDGOALS)),)'#013#010+
+ 'ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)'#013#010+
'$(error The Makefile doesn'#039't support target $(FULL_TARGET), please'+
- ' run fpcmake first)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- #010+
- '# Detect BSD, since BSD uses a slightly different directory hierarchy.'+
- #010+
- 'ifneq ($(findstring $(OS_TARGET),$(BSDs)),)'#010+
- 'BSDhier','=1'#010+
- 'endif'#010+
- #010+
- '# Detect Linux, will also use its own directory hierarchy.'#010+
- 'ifeq ($(OS_TARGET),linux)'#010+
- 'linuxHier=1'#010+
- 'endif'#010+
- #010+
- 'export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL'+
- '_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE'#010+
- #010+
- #010+
- '[fpcdir','checkenv]'#010+
- '#####################################################################'#010+
- '# FPCDIR Setting'#010+
- '#####################################################################'#010+
- #010+
- '# Test FPCDIR to look if the RTL dir exists'#010+
- 'ifdef FPCDIR'#010+
- 'override FPCDIR',':=$(subst \,/,$(FPCDIR))'#010+
- 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#010+
- 'override FPCDIR=wrong'#010+
- 'endif'#010+
- 'else'#010+
- 'override FPCDIR=wrong'#010+
- 'endif'#010+
- #010+
- '# Default FPCDIR from Makefile.fpc'#010+
- 'ifdef DEFAULT_FPCDIR'#010+
- 'ifeq ($(FPCDIR),wrong)'#010+
- 'override FPCDIR:=$(s','ubst \,/,$(DEFAULT_FPCDIR))'#010+
- 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#010+
- 'override FPCDIR=wrong'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '[fpcdirdetect]'#010+
- '# Detect FPCDIR'#010+
- 'ifeq ($(FPCDIR),wrong)'#010+
- 'ifdef inUnix'#010+
- 'override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)'#010,
- 'ifeq ($(wildcard $(FPCDIR)/units),)'#010+
- 'override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)'#010+
- 'endif'#010+
- 'else'#010+
- 'override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(add'+
- 'suffix /$(FPC),$(SEARCHPATH))))))'#010+
- 'override FPCDIR:=$(FPCDIR)/..'#010+
- 'ifeq ($(wildcar','d $(addprefix $(FPCDIR)/,rtl units)),)'#010+
- 'override FPCDIR:=$(FPCDIR)/..'#010+
- 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#010+
- 'override FPCDIR:=$(BASEDIR)'#010+
- 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#010+
- 'override FPCDIR=c:/pp'#010+
- 'endif'#010+
- 'endif'#010+
- 'e','ndif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Cross binaries dir'#010+
- 'ifndef CROSSBINDIR'#010+
- 'CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))'#010+
- 'endif'#010+
- #010+
- '# Default binutils prefix for cross compile when the'#010+
- '# crossbindir is not set (except for Darwin)'#010+
- 'ifneq ($(findstring $(','OS_TARGET),darwin iphonesim),)'#010+
- 'ifeq ($(OS_SOURCE),darwin)'#010+
- 'DARWIN2DARWIN=1'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'ifndef BINUTILSPREFIX'#010+
- 'ifndef CROSSBINDIR'#010+
- 'ifdef CROSSCOMPILE'#010+
- 'ifndef DARWIN2DARWIN'#010+
- 'BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Tr','y first the full target name, otherwise try only'#010+
- '# the OS for backwards compatibility'#010+
- 'UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))'#010+
- 'ifeq ($(UNITSDIR),)'#010+
- 'UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))'#010+
- 'endif'#010+
- #010+
- '# Packages dir'#010+
- 'PACKAGE','SDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packa'+
- 'ges/base $(FPCDIR)/packages/extra)'#010+
- #010+
- #010+
- '[shelltools]'#010+
- '#####################################################################'#010+
- '# Shell tools'#010+
- '#############################################','#######################'+
- '#'#010+
- #010+
- '# Echo that can redir (must be able run in the default OS shell)'#010+
- 'ifndef ECHOREDIR'#010+
- 'ifndef inUnix'#010+
- 'ECHOREDIR=echo'#010+
- 'else'#010+
- 'ECHOREDIR=$(ECHO)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# To copy pograms'#010+
- 'ifndef COPY'#010+
- 'COPY:=$(CPPROG) -fp'#010+
- 'endif'#010+
- #010+
- '# Copy a w','hole tree'#010+
- 'ifndef COPYTREE'#010+
- 'COPYTREE:=$(CPPROG) -Rfp'#010+
- 'endif'#010+
- #010+
- '# Copy a whole tree'#010+
- 'ifndef MKDIRTREE'#010+
- 'MKDIRTREE:=$(MKDIRPROG) -p'#010+
- 'endif'#010+
- #010+
- '# To move pograms'#010+
- 'ifndef MOVE'#010+
- 'MOVE:=$(MVPROG) -f'#010+
- 'endif'#010+
- #010+
- '# Check delete program'#010+
- 'ifndef DEL'#010+
- 'DEL:=$(RMPROG) -f'#010+
- 'end','if'#010+
- #010+
- '# Check deltree program'#010+
- 'ifndef DELTREE'#010+
- 'DELTREE:=$(RMPROG) -rf'#010+
- 'endif'#010+
- #010+
- '# To install files'#010+
- 'ifndef INSTALL'#010+
- 'ifdef inUnix'#010+
- 'INSTALL:=$(GINSTALL) -c -m 644'#010+
- 'else'#010+
- 'INSTALL:=$(COPY)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# To install programs'#010+
- 'ifndef INSTALLEXE'#010+
- 'ifdef inUnix'#010+
- 'I','NSTALLEXE:=$(GINSTALL) -c -m 755'#010+
- 'else'#010+
- 'INSTALLEXE:=$(COPY)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# To make a directory.'#010+
- 'ifndef MKDIR'#010+
- 'MKDIR:=$(GINSTALL) -m 755 -d'#010+
- 'endif'#010+
- #010+
+ ' run fpcmake first)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '# Detect BSD, since BSD uses a slightly different directory hier','arch'+
+ 'y.'#013#010+
+ 'ifneq ($(findstring $(OS_TARGET),$(BSDs)),)'#013#010+
+ 'BSDhier=1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Detect Linux, will also use its own directory hierarchy.'#013#010+
+ 'ifeq ($(OS_TARGET),linux)'#013#010+
+ 'linuxHier=1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL','_TARGET FU'+
+ 'LL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE'#013#010+
+ #013#010+
+ #013#010+
+ '[fpcdircheckenv]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# FPCDIR Setting'#013#010+
+ '#####################################################################',
+ #013#010+
+ #013#010+
+ '# Test FPCDIR to look if the RTL dir exists'#013#010+
+ 'ifdef FPCDIR'#013#010+
+ 'override FPCDIR:=$(subst \,/,$(FPCDIR))'#013#010+
+ 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
+ 'override FPCDIR=wrong'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'override FPCDIR=wrong'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Default FPC','DIR from Makefile.fpc'#013#010+
+ 'ifdef DEFAULT_FPCDIR'#013#010+
+ 'ifeq ($(FPCDIR),wrong)'#013#010+
+ 'override FPCDIR:=$(subst \,/,$(DEFAULT_FPCDIR))'#013#010+
+ 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
+ 'override FPCDIR=wrong'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '[fpcdirdetect]'#013#010+
+ '# Det','ect FPCDIR'#013#010+
+ 'ifeq ($(FPCDIR),wrong)'#013#010+
+ 'ifdef inUnix'#013#010+
+ 'override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)'#013#010+
+ 'ifeq ($(wildcard $(FPCDIR)/units),)'#013#010+
+ 'override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'override FPCDIR:=$(subst /$(FPC),,$(firstwor','d $(strip $(wildcard $(a'+
+ 'ddsuffix /$(FPC),$(SEARCHPATH))))))'#013#010+
+ 'override FPCDIR:=$(FPCDIR)/..'#013#010+
+ 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
+ 'override FPCDIR:=$(FPCDIR)/..'#013#010+
+ 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
+ 'overrid','e FPCDIR:=$(BASEDIR)'#013#010+
+ 'ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)'#013#010+
+ 'override FPCDIR=c:/pp'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Cross binaries dir'#013#010+
+ 'ifndef CROSSBINDIR'#013#010+
+ 'CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))'#013#010+
+ 'endif',#013#010+
+ #013#010+
+ '# Default binutils prefix for cross compile when the'#013#010+
+ '# crossbindir is not set (except for Darwin)'#013#010+
+ 'ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)'#013#010+
+ 'ifeq ($(OS_SOURCE),darwin)'#013#010+
+ 'DARWIN2DARWIN=1'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifndef BINUTILSPREFIX',#013#010+
+ 'ifndef CROSSBINDIR'#013#010+
+ 'ifdef CROSSCOMPILE'#013#010+
+ 'ifndef DARWIN2DARWIN'#013#010+
+ 'BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Try first the full target name, otherwise try only'#013#010+
+ '# the OS for backwards compatibility'#013#010+
+ 'UNITSDIR:=','$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))'#013#010+
+ 'ifeq ($(UNITSDIR),)'#013#010+
+ 'UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Packages dir'#013#010+
+ 'PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/package'+
+ 's/base $(FPCDIR)/packages/e','xtra)'#013#010+
+ #013#010+
+ #013#010+
+ '[shelltools]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Shell tools'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# Echo that can redir (must be able run in the default O','S shell)'#013+
+ #010+
+ 'ifndef ECHOREDIR'#013#010+
+ 'ifndef inUnix'#013#010+
+ 'ECHOREDIR=echo'#013#010+
+ 'else'#013#010+
+ 'ECHOREDIR=$(ECHO)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# To copy pograms'#013#010+
+ 'ifndef COPY'#013#010+
+ 'COPY:=$(CPPROG) -fp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Copy a whole tree'#013#010+
+ 'ifndef COPYTREE'#013#010+
+ 'COPYTREE:=$(CPPROG) -Rfp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Cop','y a whole tree'#013#010+
+ 'ifndef MKDIRTREE'#013#010+
+ 'MKDIRTREE:=$(MKDIRPROG) -p'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# To move pograms'#013#010+
+ 'ifndef MOVE'#013#010+
+ 'MOVE:=$(MVPROG) -f'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Check delete program'#013#010+
+ 'ifndef DEL'#013#010+
+ 'DEL:=$(RMPROG) -f'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Check deltree program'#013#010+
+ 'ifndef DELTREE'#013#010+
+ 'DEL','TREE:=$(RMPROG) -rf'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# To install files'#013#010+
+ 'ifndef INSTALL'#013#010+
+ 'ifdef inUnix'#013#010+
+ 'INSTALL:=$(GINSTALL) -c -m 644'#013#010+
+ 'else'#013#010+
+ 'INSTALL:=$(COPY)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# To install programs'#013#010+
+ 'ifndef INSTALLEXE'#013#010+
+ 'ifdef inUnix'#013#010+
+ 'INSTALLEXE:=$(GINSTALL) -c -m 75','5'#013#010+
+ 'else'#013#010+
+ 'INSTALLEXE:=$(COPY)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# To make a directory.'#013#010+
+ 'ifndef MKDIR'#013#010+
+ 'MKDIR:=$(GINSTALL) -m 755 -d'#013#010+
+ 'endif'#013#010+
+ #013#010+
'export ECHOREDIR COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKD'+
- 'IR'#010+
- #010+
- #010+
- '[defaultdirs]'#010+
- '########','############################################################'+
- '#'#010+
- '# Default Directories'#010+
- '#####################################################################'#010+
- #010+
- '# Units dir'#010+
- 'ifdef REQUIRE_UNITSDIR'#010+
- 'override UNITSDIR+=$(REQUIRE_UNITSDIR)'#010+
- 'endif'#010+
- #010+
- '# Un','its dir'#010+
- 'ifdef REQUIRE_PACKAGESDIR'#010+
- 'override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)'#010+
- 'endif'#010+
- #010+
- #010+
- '# Unixes use unix dirs with /usr/bin, /usr/lib'#010+
- '# When zipping use the target os default, when normal install then'#010+
- '# use the source os as default'#010+
- 'ifdef ZI','PINSTALL'#010+
- '# Zipinstall'#010+
- 'ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)'#010+
- 'UNIXHier=1'#010+
- 'endif'#010+
- 'else'#010+
- '# Normal install'#010+
- 'ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)'#010+
- 'UNIXHier=1'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# When install prefix is not set try to use prefix'#010+
- 'ifndef INSTALL','_PREFIX'#010+
- 'ifdef PREFIX'#010+
- 'INSTALL_PREFIX=$(PREFIX)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# set the prefix directory where to install everything'#010+
- 'ifndef INSTALL_PREFIX'#010+
- 'ifdef UNIXHier'#010+
- 'INSTALL_PREFIX=/usr/local'#010+
- 'else'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
- 'INSTALL_BASEDIR:=/pp'#010+
- 'else'#010+
- 'INSTALL','_BASEDIR:=/$(PACKAGE_NAME)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- 'export INSTALL_PREFIX'#010+
- #010+
- '# Export also INSTALL_SOURCESUBDIR set so it will be'#010+
- '# used recursively for all subdirs'#010+
- 'ifdef INSTALL_FPCSUBDIR'#010+
- 'export INSTALL_FPCSUBDIR'#010+
- 'endif'#010+
- #010+
- '# Where to place the resulti','ng zip files'#010+
- 'ifndef DIST_DESTDIR'#010+
- 'DIST_DESTDIR:=$(BASEDIR)'#010+
- 'endif'#010+
- 'export DIST_DESTDIR'#010+
- #010+
- '# EXE/PPU Target directories'#010+
- 'ifndef COMPILER_UNITTARGETDIR'#010+
- 'ifdef PACKAGEDIR_MAIN'#010+
- 'COMPILER_UNITTARGETDIR=$(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)'#010+
- 'else'#010+
- 'COMPI','LER_UNITTARGETDIR=units/$(TARGETSUFFIX)'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifndef COMPILER_TARGETDIR'#010+
- 'COMPILER_TARGETDIR=.'#010+
- 'endif'#010+
- #010+
- #010+
- '#####################################################################'#010+
- '# Install Directories'#010+
- '#########################################','###########################'+
- '#'#010+
- #010+
- '# set the base directory where to install everything'#010+
- 'ifndef INSTALL_BASEDIR'#010+
- 'ifdef UNIXHier'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
- 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/fpc/$(FPC_VERSION)'#010+
- 'else'#010+
- 'INSTALL_BASEDIR:=$(INSTALL_PREF','IX)/lib/$(PACKAGE_NAME)'#010+
- 'endif'#010+
- 'else'#010+
- 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# set the directory where to install the binaries'#010+
- 'ifndef INSTALL_BINDIR'#010+
- 'ifdef UNIXHier'#010+
- 'INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin'#010+
- 'else'#010+
- 'INSTALL_BINDIR:=$(INSTALL_B','ASEDIR)/bin'#010+
- '# for FPC packages install the binaries under their target subdir'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
- 'ifdef CROSSCOMPILE'#010+
- 'ifdef CROSSINSTALL'#010+
- 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)'#010+
- 'else'#010+
- 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSU','FFIX)'#010+
- 'endif'#010+
- 'else'#010+
- 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# set the directory where to install the units.'#010+
- 'ifndef INSTALL_UNITDIR'#010+
- 'INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)'#010+
- 'ifdef INSTALL_FPCPA','CKAGE'#010+
- 'ifdef PACKAGE_NAME'#010+
- 'INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Where to install shared libraries'#010+
- 'ifndef INSTALL_LIBDIR'#010+
- 'ifdef UNIXHier'#010+
- 'INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib'#010+
- 'else'#010+
- 'INSTALL_LIBDIR:=$(INSTALL_UN','ITDIR)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Where the source files will be stored'#010+
- 'ifndef INSTALL_SOURCEDIR'#010+
- 'ifdef UNIXHier'#010+
- 'ifdef BSDhier'#010+
- 'SRCPREFIXDIR=share/src'#010+
- 'else'#010+
- 'ifdef linuxHier'#010+
- 'SRCPREFIXDIR=share/src'#010+
- 'else'#010+
- 'SRCPREFIXDIR=src'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010,
- 'ifdef INSTALL_FPCSUBDIR'#010+
+ 'IR'#013#010+
+ #013#010+
+ #013#010+
+ '[defaultdirs]'#013#010+
+ '########################','############################################'+
+ '#'#013#010+
+ '# Default Directories'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# Units dir'#013#010+
+ 'ifdef REQUIRE_UNITSDIR'#013#010+
+ 'override UNITSDIR+=$(REQUIRE_UNITSDIR)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Units dir',#013#010+
+ 'ifdef REQUIRE_PACKAGESDIR'#013#010+
+ 'override PACKAGESDIR+=$(REQUIRE_PACKAGESDIR)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '# Unixes use unix dirs with /usr/bin, /usr/lib'#013#010+
+ '# When zipping use the target os default, when normal install then'#013+
+ #010+
+ '# use the source os as default'#013#010+
+ 'ifdef ','ZIPINSTALL'#013#010+
+ '# Zipinstall'#013#010+
+ 'ifneq ($(findstring $(OS_TARGET),$(UNIXs)),)'#013#010+
+ 'UNIXHier=1'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ '# Normal install'#013#010+
+ 'ifneq ($(findstring $(OS_SOURCE),$(UNIXs)),)'#013#010+
+ 'UNIXHier=1'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# When install prefix is not set try to use prefix'#013,#010+
+ 'ifndef INSTALL_PREFIX'#013#010+
+ 'ifdef PREFIX'#013#010+
+ 'INSTALL_PREFIX=$(PREFIX)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# set the prefix directory where to install everything'#013#010+
+ 'ifndef INSTALL_PREFIX'#013#010+
+ 'ifdef UNIXHier'#013#010+
+ 'INSTALL_PREFIX=/usr/local'#013#010+
+ 'else'#013#010+
+ 'ifdef INSTALL_FPCPACKAGE'#013#010+
+ 'INSTAL','L_BASEDIR:=/pp'#013#010+
+ 'else'#013#010+
+ 'INSTALL_BASEDIR:=/$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'export INSTALL_PREFIX'#013#010+
+ #013#010+
+ '# Export also INSTALL_SOURCESUBDIR set so it will be'#013#010+
+ '# used recursively for all subdirs'#013#010+
+ 'ifdef INSTALL_FPCSUBDIR'#013#010+
+ 'export INSTALL_FPCSUBD','IR'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Where to place the resulting zip files'#013#010+
+ 'ifndef DIST_DESTDIR'#013#010+
+ 'DIST_DESTDIR:=$(BASEDIR)'#013#010+
+ 'endif'#013#010+
+ 'export DIST_DESTDIR'#013#010+
+ #013#010+
+ '# EXE/PPU Target directories'#013#010+
+ 'ifndef COMPILER_UNITTARGETDIR'#013#010+
+ 'ifdef PACKAGEDIR_MAIN'#013#010+
+ 'COMPILER_UNITTARGETDIR=$','(PACKAGEDIR_MAIN)/units/$(TARGETSUFFIX)'#013#010+
+ 'else'#013#010+
+ 'COMPILER_UNITTARGETDIR=units/$(TARGETSUFFIX)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifndef COMPILER_TARGETDIR'#013#010+
+ 'COMPILER_TARGETDIR=.'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '#####################################################################'#013+
+ #010+
+ '# ','Install Directories'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# set the base directory where to install everything'#013#010+
+ 'ifndef INSTALL_BASEDIR'#013#010+
+ 'ifdef UNIXHier'#013#010+
+ 'ifdef INSTALL_FPCPACKAGE'#013#010+
+ 'INSTALL_BASEDIR:=$(INSTALL','_PREFIX)/lib/fpc/$(FPC_VERSION)'#013#010+
+ 'else'#013#010+
+ 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)/lib/$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'INSTALL_BASEDIR:=$(INSTALL_PREFIX)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# set the directory where to install the binaries'#013#010+
+ 'ifndef INSTALL_BINDIR'#013#010+
+ 'ifdef ','UNIXHier'#013#010+
+ 'INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin'#013#010+
+ 'else'#013#010+
+ 'INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin'#013#010+
+ '# for FPC packages install the binaries under their target subdir'#013#010+
+ 'ifdef INSTALL_FPCPACKAGE'#013#010+
+ 'ifdef CROSSCOMPILE'#013#010+
+ 'ifdef CROSSINSTALL'#013#010+
+ 'INSTALL_BIND','IR:=$(INSTALL_BINDIR)/$(SOURCESUFFIX)'#013#010+
+ 'else'#013#010+
+ 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(TARGETSUFFIX)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# set the directory where to install the units.'#013#010+
+ 'i','fndef INSTALL_UNITDIR'#013#010+
+ 'INSTALL_UNITDIR:=$(INSTALL_BASEDIR)/units/$(TARGETSUFFIX)'#013#010+
+ 'ifdef INSTALL_FPCPACKAGE'#013#010+
+ 'ifdef PACKAGE_NAME'#013#010+
+ 'INSTALL_UNITDIR:=$(INSTALL_UNITDIR)/$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Where to install shared libraries'#013,#010+
+ 'ifndef INSTALL_LIBDIR'#013#010+
+ 'ifdef UNIXHier'#013#010+
+ 'INSTALL_LIBDIR:=$(INSTALL_PREFIX)/lib'#013#010+
+ 'else'#013#010+
+ 'INSTALL_LIBDIR:=$(INSTALL_UNITDIR)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Where the source files will be stored'#013#010+
+ 'ifndef INSTALL_SOURCEDIR'#013#010+
+ 'ifdef UNIXHier'#013#010+
+ 'ifdef BSDhier'#013#010+
+ 'SRCPR','EFIXDIR=share/src'#013#010+
+ 'else'#013#010+
+ 'ifdef linuxHier'#013#010+
+ 'SRCPREFIXDIR=share/src'#013#010+
+ 'else'#013#010+
+ 'SRCPREFIXDIR=src'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifdef INSTALL_FPCPACKAGE'#013#010+
+ 'ifdef INSTALL_FPCSUBDIR'#013#010+
'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION'+
- ')/$(INSTALL_FPCSUBDIR)/$(PACKAGE_NAME)'#010+
- 'else'#010+
+ ')/$(INSTALL_FPC','SUBDIR)/$(PACKAGE_NAME)'#013#010+
+ 'else'#013#010+
'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/fpc-$(FPC_VERSION'+
- ')/$(PACKAGE_NAME)'#010+
- 'endif'#010+
- 'else'#010+
- 'INS','TALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)'+
- '-$(PACKAGE_VERSION)'#010+
- 'endif'#010+
- 'else'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
- 'ifdef INSTALL_FPCSUBDIR'#010+
+ ')/$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'INSTALL_SOURCEDIR:=$(INSTALL_PREFIX)/$(SRCPREFIXDIR)/$(PACKAGE_NAME)-$'+
+ '(PACKAGE_VERSION)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'ifdef',' INSTALL_FPCPACKAGE'#013#010+
+ 'ifdef INSTALL_FPCSUBDIR'#013#010+
'INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(INSTALL_FPCSUBDIR)/$(PA'+
- 'CKAGE_NAME)'#010+
- 'else'#010+
- 'INSTALL_','SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)'#010+
- 'endif'#010+
- 'else'#010+
- 'INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Where the doc files will be stored'#010+
- 'ifndef INSTALL_DOCDIR'#010+
- 'ifdef UNIXHier'#010+
- 'ifdef BSDhier'#010+
- 'DOCPREFIXDIR=share/doc'#010+
- 'e','lse'#010+
- 'ifdef linuxHier'#010+
- 'DOCPREFIXDIR=share/doc'#010+
- 'else'#010+
- 'DOCPREFIXDIR=doc'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
+ 'CKAGE_NAME)'#013#010+
+ 'else'#013#010+
+ 'INSTALL_SOURCEDIR:=$(INSTALL_BASEDIR)/source/$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'INSTALL_SOURCEDIR:=$(INSTALL_B','ASEDIR)/source'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Where the doc files will be stored'#013#010+
+ 'ifndef INSTALL_DOCDIR'#013#010+
+ 'ifdef UNIXHier'#013#010+
+ 'ifdef BSDhier'#013#010+
+ 'DOCPREFIXDIR=share/doc'#013#010+
+ 'else'#013#010+
+ 'ifdef linuxHier'#013#010+
+ 'DOCPREFIXDIR=share/doc'#013#010+
+ 'else'#013#010+
+ 'DOCPREFIXDIR=doc'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010,
+ 'ifdef INSTALL_FPCPACKAGE'#013#010+
'INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/fpc-$(FPC_VERSION)/$'+
- '(PACKAGE_NAME)'#010+
- 'else'#010+
- 'INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR',')/$(PACKAGE_NAME)-$('+
- 'PACKAGE_VERSION)'#010+
- 'endif'#010+
- 'else'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
- 'INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)'#010+
- 'else'#010+
- 'INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Where to install the examples, under linux we u','se the doc dir'#010+
- '# because the copytree command will create a subdir itself'#010+
- 'ifndef INSTALL_EXAMPLEDIR'#010+
- 'ifdef UNIXHier'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
- #010+
- 'ifdef BSDhier'#010+
+ '(PACKAGE_NAME)'#013#010+
+ 'else'#013#010+
+ 'INSTALL_DOCDIR:=$(INSTALL_PREFIX)/$(DOCPREFIXDIR)/$(PACKAGE_NAME)-$(PA'+
+ 'CKAGE_VERSION)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'ifdef INSTALL_FPCPACKAG','E'#013#010+
+ 'INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc/$(PACKAGE_NAME)'#013#010+
+ 'else'#013#010+
+ 'INSTALL_DOCDIR:=$(INSTALL_BASEDIR)/doc'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Where to install the examples, under linux we use the doc dir'#013#010+
+ '# because the copytree command will create a su','bdir itself'#013#010+
+ 'ifndef INSTALL_EXAMPLEDIR'#013#010+
+ 'ifdef UNIXHier'#013#010+
+ 'ifdef INSTALL_FPCPACKAGE'#013#010+
+ #013#010+
+ 'ifdef BSDhier'#013#010+
'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/fpc-$(FPC_VERSION'+
- ')/$(PACKAGE_NAM','E)'#010+
- 'else'#010+
- 'ifdef linuxHier'#010+
- 'INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples'#010+
- 'else'#010+
+ ')/$(PACKAGE_NAME)'#013#010+
+ 'else'#013#010+
+ 'ifdef linuxHier'#013#010+
+ 'INSTALL_EXAMPLEDIR:=$(INSTALL','_DOCDIR)/examples'#013#010+
+ 'else'#013#010+
'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/fpc-$(FPC_VERSION)/examples/'+
- '$(PACKAGE_NAME)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'else'#010+
- #010+
- 'ifdef BSDhier'#010+
- 'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/e','xamples/$(PACKAGE_NAME)'+
- '-$(PACKAGE_VERSION)'#010+
- 'else'#010+
- 'ifdef linuxHier'#010+
+ '$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'else'#013#010+
+ #013#010+
+ 'ifdef BSDhier'#013#010+
+ 'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/share/examples/$(PACKAGE_NAME)-$'+
+ '(PACKAGE_VERSION)'#013#010,
+ 'else'#013#010+
+ 'ifdef linuxHier'#013#010+
'INSTALL_EXAMPLEDIR:=$(INSTALL_DOCDIR)/examples/$(PACKAGE_NAME)-$(PACKA'+
- 'GE_VERSION)'#010+
- 'else'#010+
+ 'GE_VERSION)'#013#010+
+ 'else'#013#010+
'INSTALL_EXAMPLEDIR:=$(INSTALL_PREFIX)/doc/$(PACKAGE_NAME)-$(PACKAGE_VE'+
- 'RSION)'#010+
- 'endif'#010+
- #010+
- 'endif',#010+
- 'endif'#010+
- 'else'#010+
- 'ifdef INSTALL_FPCPACKAGE'#010+
- 'INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)'#010+
- 'else'#010+
- 'INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Where the some extra (data)files will be stored'#010+
- 'ifndef INSTALL_DA','TADIR'#010+
- 'INSTALL_DATADIR=$(INSTALL_BASEDIR)'#010+
- 'endif'#010+
- #010+
- 'ifndef INSTALL_SHAREDDIR'#010+
- 'INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib'#010+
- 'endif'#010+
- #010+
- '#####################################################################'#010+
- '# Cross compile dirs'#010+
- '#############################','#######################################'+
- '#'#010+
- #010+
- 'ifdef CROSSCOMPILE'#010+
- '# Directory where the cross compile tools are stored.'#010+
- '# First check if they are available in FPCDIR. If no targets/ subdir'#010+
- '# is found use the targets/ subdir in INSTALL_BASEDIR.'#010+
- 'i','fndef CROSSBINDIR'#010+
- 'CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))'#010+
- 'ifeq ($(CROSSBINDIR),)'#010+
+ 'RSION)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'ifdef INSTALL_FPCPACK','AGE'#013#010+
+ 'INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples/$(PACKAGE_NAME)'#013#010+
+ 'else'#013#010+
+ 'INSTALL_EXAMPLEDIR:=$(INSTALL_BASEDIR)/examples'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Where the some extra (data)files will be stored'#013#010+
+ 'ifndef INSTALL_DATADIR'#013#010+
+ 'INSTALL_DATADIR=$','(INSTALL_BASEDIR)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifndef INSTALL_SHAREDDIR'#013#010+
+ 'INSTALL_SHAREDDIR=$(INSTALL_PREFIX)/lib'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Cross compile dirs'#013#010+
+ '###########################################','#########################'+
+ '#'#013#010+
+ #013#010+
+ 'ifdef CROSSCOMPILE'#013#010+
+ '# Directory where the cross compile tools are stored.'#013#010+
+ '# First check if they are available in FPCDIR. If no targets/ subdir'#013+
+ #010+
+ '# is found use the targets/ subdir in INSTALL_BASEDIR.'#013#010+
+ 'ifndef CR','OSSBINDIR'#013#010+
+ 'CROSSBINDIR:=$(wildcard $(CROSSTARGETDIR)/bin/$(SOURCESUFFIX))'#013#010+
+ 'ifeq ($(CROSSBINDIR),)'#013#010+
'CROSSBINDIR:=$(wildcard $(INSTALL_BASEDIR)/cross/$(TARGETSUFFIX)/bin/$'+
- '(FULL_SOURCE))'#010+
- 'endif'#010+
- 'endif'#010+
- 'else'#010+
- 'CROSSBINDIR='#010+
- 'endif'#010+
- #010+
- #010+
- '[dirlibc]'#010+
- '# O','n linux, try to find where libgcc.a is.'#010+
- 'ifeq ($(OS_SOURCE),linux)'#010+
- #010+
- '# Amd64 to i386?'#010+
- 'ifndef GCCLIBDIR'#010+
- 'ifeq ($(CPU_TARGET),i386)'#010+
- 'ifneq ($(findstring x86_64,$(shell uname -a)),)'#010+
- 'ifeq ($(BINUTILSPREFIX),)'#010+
- 'GCCLIBDIR:=$(shell dirname `gcc -m32 -p','rint-libgcc-file-name`)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifeq ($(CPU_TARGET),powerpc64)'#010+
- 'ifeq ($(BINUTILSPREFIX),)'#010+
- 'GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Try cross gcc'#010+
- 'ifndef GCCLIBDIR'#010+
- 'CROSSGCC=$(strip $(wildcar','d $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEX'+
- 'EEXT),$(SEARCHPATH))))'#010+
- 'ifneq ($(CROSSGCC),)'#010+
- 'GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Other libraries from ld.so.conf'#010+
- 'ifndef OTHERLIBDIR'#010+
- 'OTHERLIBDIR:=$(shell g','rep -v "^\#" /etc/ld.so.conf | awk '#039'{ ORS='+
- '" "; print $1 }'#039')'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'ifdef inUnix'#010+
- 'ifeq ($(OS_SOURCE),netbsd)'#010+
- 'OTHERLIBDIR+=/usr/pkg/lib'#010+
- 'endif'#010+
- 'export GCCLIBDIR OTHERLIB'#010+
- 'endif'#010+
- #010+
- #010+
- '[extensions]'#010+
- '################################################','####################'+
- '#'#010+
- '# Default extensions'#010+
- '#####################################################################'#010+
- #010+
- '# Default needed extensions (Go32v2,Linux)'#010+
- 'BATCHEXT=.bat'#010+
- 'LOADEREXT=.as'#010+
- 'EXEEXT=.exe'#010+
- 'PPLEXT=.ppl'#010+
- 'PPUEXT=.ppu'#010+
- 'OEXT=.o'#010+
- 'ASMEXT=.s'#010+
- 'S','MARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'SHAREDLIBEXT=.so'#010+
- 'SHAREDLIBPREFIX=libfp'#010+
- 'STATICLIBPREFIX=libp'#010+
- 'IMPORTLIBPREFIX=libimp'#010+
- 'RSTEXT=.rst'#010+
- '#DEBUGSYMEXT #for debugger symbol files, define only for targets which'+
- ' has this'#010+
- #010+
- '# 1.0.x has target specific extensio','ns for ppu files and objects'#010+
- 'ifeq ($(findstring 1.0.,$(FPC_VERSION)),)'#010+
- '# short version for 1.1 and above - no target specific extensions'#010+
- #010+
- '# Go32v1'#010+
- 'ifeq ($(OS_TARGET),go32v1)'#010+
- 'STATICLIBPREFIX='#010+
- 'SHORTSUFFIX=v1'#010+
- 'endif'#010+
- #010+
- '# Go32v2'#010+
- 'ifeq ($(OS_TARGET)',',go32v2)'#010+
- 'STATICLIBPREFIX='#010+
- 'SHORTSUFFIX=dos'#010+
- 'IMPORTLIBPREFIX='#010+
- 'endif'#010+
- #010+
- '# watcom'#010+
- 'ifeq ($(OS_TARGET),watcom)'#010+
- 'STATICLIBPREFIX='#010+
- 'OEXT=.obj'#010+
- 'ASMEXT=.asm'#010+
- 'SHAREDLIBEXT=.dll'#010+
- 'SHORTSUFFIX=wat'#010+
- 'IMPORTLIBPREFIX='#010+
- 'endif'#010+
- #010+
- '# Linux'#010+
- 'ifeq ($(OS_TARGET),linux)'#010+
- 'BATCHEX','T=.sh'#010+
- 'EXEEXT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=lnx'#010+
- 'endif'#010+
- #010+
- '# FreeBSD'#010+
- 'ifeq ($(OS_TARGET),freebsd)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=fbs'#010+
- 'endif'#010+
- #010+
- '# NetBSD'#010+
- 'ifeq ($(OS_TARGET),netbsd)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=nbs'#010+
- 'end','if'#010+
- #010+
- '# OpenBSD'#010+
- 'ifeq ($(OS_TARGET),openbsd)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=obs'#010+
- 'endif'#010+
- #010+
- '# Win32'#010+
- 'ifeq ($(OS_TARGET),win32)'#010+
- 'SHAREDLIBEXT=.dll'#010+
- 'SHORTSUFFIX=w32'#010+
- 'endif'#010+
- #010+
- '# OS/2'#010+
- 'ifeq ($(OS_TARGET),os2)'#010+
- 'BATCHEXT=.cmd'#010+
- 'AOUTEXT=.out'#010+
- 'STATIC','LIBPREFIX='#010+
- 'SHAREDLIBEXT=.dll'#010+
- 'SHORTSUFFIX=os2'#010+
- 'ECHO=echo'#010+
- 'IMPORTLIBPREFIX='#010+
- 'endif'#010+
- #010+
- '# EMX'#010+
- 'ifeq ($(OS_TARGET),emx)'#010+
- 'BATCHEXT=.cmd'#010+
- 'AOUTEXT=.out'#010+
- 'STATICLIBPREFIX='#010+
- 'SHAREDLIBEXT=.dll'#010+
- 'SHORTSUFFIX=emx'#010+
- 'ECHO=echo'#010+
- 'IMPORTLIBPREFIX='#010+
- 'endif'#010+
- #010+
- '# Amiga'#010+
- 'ifeq ($(OS_','TARGET),amiga)'#010+
- 'EXEEXT='#010+
- 'SHAREDLIBEXT=.library'#010+
- 'SHORTSUFFIX=amg'#010+
- 'endif'#010+
- #010+
- '# MorphOS'#010+
- 'ifeq ($(OS_TARGET),morphos)'#010+
- 'EXEEXT='#010+
- 'SHAREDLIBEXT=.library'#010+
- 'SHORTSUFFIX=mos'#010+
- 'endif'#010+
- #010+
- '# Atari'#010+
- 'ifeq ($(OS_TARGET),atari)'#010+
- 'EXEEXT=.ttp'#010+
- 'SHORTSUFFIX=ata'#010+
- 'endif'#010+
- #010+
- '# BeOS'#010+
- 'ifeq ','($(OS_TARGET),beos)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'SHORTSUFFIX=be'#010+
- 'endif'#010+
- #010+
- '# Haiku'#010+
- 'ifeq ($(OS_TARGET),haiku)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'SHORTSUFFIX=hai'#010+
- 'endif'#010+
- #010+
- '# Solaris'#010+
- 'ifeq ($(OS_TARGET),solaris)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'SHORTSUFFIX=sun'#010+
- 'endif'#010+
- #010+
- '# QNX'#010+
- 'ifeq ($(OS_','TARGET),qnx)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'SHORTSUFFIX=qnx'#010+
- 'endif'#010+
- #010+
- '# Netware clib'#010+
- 'ifeq ($(OS_TARGET),netware)'#010+
- 'EXEEXT=.nlm'#010+
- 'STATICLIBPREFIX='#010+
- 'SHORTSUFFIX=nw'#010+
- 'IMPORTLIBPREFIX=imp'#010+
- 'endif'#010+
- #010+
- '# Netware libc'#010+
- 'ifeq ($(OS_TARGET),netwlibc)'#010+
- 'EXEEXT=.nlm'#010+
- 'STATICLIBPREF','IX='#010+
- 'SHORTSUFFIX=nwl'#010+
- 'IMPORTLIBPREFIX=imp'#010+
- 'endif'#010+
- #010+
- '# MacOS'#010+
- 'ifeq ($(OS_TARGET),macos)'#010+
- 'BATCHEXT='#010+
- 'EXEEXT='#010+
- 'DEBUGSYMEXT=.xcoff'#010+
- 'SHORTSUFFIX=mac'#010+
- 'IMPORTLIBPREFIX=imp'#010+
- 'endif'#010+
- #010+
- '# Darwin'#010+
- 'ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEE','XT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=dwn'#010+
- 'endif'#010+
- #010+
- '# gba'#010+
- 'ifeq ($(OS_TARGET),gba)'#010+
- 'EXEEXT=.gba'#010+
- 'SHAREDLIBEXT=.so'#010+
- 'SHORTSUFFIX=gba'#010+
- 'endif'#010+
- #010+
- '# Symbian OS'#010+
- 'ifeq ($(OS_TARGET),symbian)'#010+
- 'SHAREDLIBEXT=.dll'#010+
- 'SHORTSUFFIX=symbian'#010+
- 'endif'#010+
- #010+
- '# NativeNT'#010+
- 'ifeq ($(OS_TARGET),','NativeNT)'#010+
- 'SHAREDLIBEXT=.dll'#010+
- 'SHORTSUFFIX=nativent'#010+
- 'endif'#010+
- #010+
- 'else'#010+
- '# long version for 1.0.x - target specific extensions'#010+
- #010+
- '# Go32v1'#010+
- 'ifeq ($(OS_TARGET),go32v1)'#010+
- 'PPUEXT=.pp1'#010+
- 'OEXT=.o1'#010+
- 'ASMEXT=.s1'#010+
- 'SMARTEXT=.sl1'#010+
- 'STATICLIBEXT=.a1'#010+
- 'SHAREDLIBEXT=.so1'#010+
- 'STATICL','IBPREFIX='#010+
- 'SHORTSUFFIX=v1'#010+
- 'IMPORTLIBPREFIX='#010+
- 'endif'#010+
- #010+
- '# Go32v2'#010+
- 'ifeq ($(OS_TARGET),go32v2)'#010+
- 'STATICLIBPREFIX='#010+
- 'SHORTSUFFIX=dos'#010+
- 'IMPORTLIBPREFIX='#010+
- 'endif'#010+
- #010+
- '# watcom'#010+
- 'ifeq ($(OS_TARGET),watcom)'#010+
- 'STATICLIBPREFIX='#010+
- 'SHORTSUFFIX=wat'#010+
- 'IMPORTLIBPREFIX='#010+
- 'endif'#010+
- #010+
- '# Lin','ux'#010+
- 'ifeq ($(OS_TARGET),linux)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=lnx'#010+
- 'endif'#010+
- #010+
- '# FreeBSD'#010+
- 'ifeq ($(OS_TARGET),freebsd)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=fbs'#010+
- 'endif'#010+
- #010+
- '# NetBSD'#010+
- 'ifeq ($(OS_TARGET),netbsd)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT','='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=nbs'#010+
- 'endif'#010+
- #010+
- '# OpenBSD'#010+
- 'ifeq ($(OS_TARGET),openbsd)'#010+
- 'BATCHEXT=.sh'#010+
- 'EXEEXT='#010+
- 'HASSHAREDLIB=1'#010+
- 'SHORTSUFFIX=obs'#010+
- 'endif'#010+
- #010+
- '# Win32'#010+
- 'ifeq ($(OS_TARGET),win32)'#010+
- 'PPUEXT=.ppw'#010+
- 'OEXT=.ow'#010+
- 'ASMEXT=.sw'#010+
- 'SMARTEXT=.slw'#010+
- 'STATICLIBEXT=.aw'#010+
- 'SHARED','LIBEXT=.dll'#010+
- 'SHORTSUFFIX=w32'#010+
- 'endif'#010+
- #010+
- '# OS/2'#010+
- 'ifeq ($(OS_TARGET),os2)'#010+
- 'BATCHEXT=.cmd'#010+
- 'PPUEXT=.ppo'#010+
- 'ASMEXT=.so2'#010+
- 'OEXT=.oo2'#010+
- 'AOUTEXT=.out'#010+
- 'SMARTEXT=.sl2'#010+
- 'STATICLIBPREFIX='#010+
- 'STATICLIBEXT=.ao2'#010+
- 'SHAREDLIBEXT=.dll'#010+
- 'SHORTSUFFIX=os2'#010+
- 'ECHO=echo'#010+
- 'IMPORTLIBPREFIX='#010+
- 'end','if'#010+
- #010+
- '# Amiga'#010+
- 'ifeq ($(OS_TARGET),amiga)'#010+
- 'EXEEXT='#010+
- 'PPUEXT=.ppu'#010+
- 'ASMEXT=.s'#010+
- 'OEXT=.o'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'SHAREDLIBEXT=.library'#010+
- 'SHORTSUFFIX=amg'#010+
- 'endif'#010+
- #010+
- '# Atari'#010+
- 'ifeq ($(OS_TARGET),atari)'#010+
- 'PPUEXT=.ppu'#010+
- 'ASMEXT=.s'#010+
- 'OEXT=.o'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=','.a'#010+
- 'EXEEXT=.ttp'#010+
- 'SHORTSUFFIX=ata'#010+
- 'endif'#010+
- #010+
- '# BeOS'#010+
- 'ifeq ($(OS_TARGET),beos)'#010+
- 'BATCHEXT=.sh'#010+
- 'PPUEXT=.ppu'#010+
- 'ASMEXT=.s'#010+
- 'OEXT=.o'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'EXEEXT='#010+
- 'SHORTSUFFIX=be'#010+
- 'endif'#010+
- #010+
- '# Solaris'#010+
- 'ifeq ($(OS_TARGET),solaris)'#010+
- 'BATCHEXT=.sh'#010+
- 'PPUEXT=.ppu'#010+
- 'ASMEX','T=.s'#010+
- 'OEXT=.o'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'EXEEXT='#010+
- 'SHORTSUFFIX=sun'#010+
- 'endif'#010+
- #010+
- '# QNX'#010+
- 'ifeq ($(OS_TARGET),qnx)'#010+
- 'BATCHEXT=.sh'#010+
- 'PPUEXT=.ppu'#010+
- 'ASMEXT=.s'#010+
- 'OEXT=.o'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'EXEEXT='#010+
- 'SHORTSUFFIX=qnx'#010+
- 'endif'#010+
- #010+
- '# Netware'#010+
- 'ifeq ($(OS_TARGET),netwa','re)'#010+
- 'STATICLIBPREFIX='#010+
- 'PPUEXT=.ppu'#010+
- 'OEXT=.o'#010+
- 'ASMEXT=.s'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'SHAREDLIBEXT=.nlm'#010+
- 'EXEEXT=.nlm'#010+
- 'SHORTSUFFIX=nw'#010+
- 'IMPORTLIBPREFIX=imp'#010+
- 'endif'#010+
- #010+
- '# Netware libc'#010+
- 'ifeq ($(OS_TARGET),netwlibc)'#010+
- 'STATICLIBPREFIX='#010+
- 'PPUEXT=.ppu'#010+
- 'OEXT=.o'#010+
- 'ASMEXT=','.s'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'SHAREDLIBEXT=.nlm'#010+
- 'EXEEXT=.nlm'#010+
- 'SHORTSUFFIX=nwl'#010+
- 'IMPORTLIBPREFIX=imp'#010+
- 'endif'#010+
- #010+
- '# MacOS'#010+
- 'ifeq ($(OS_TARGET),macos)'#010+
- 'BATCHEXT='#010+
- 'PPUEXT=.ppu'#010+
- 'ASMEXT=.s'#010+
- 'OEXT=.o'#010+
- 'SMARTEXT=.sl'#010+
- 'STATICLIBEXT=.a'#010+
- 'EXEEXT='#010+
- 'DEBUGSYMEXT=.xcoff'#010+
- 'SHORT','SUFFIX=mac'#010+
- 'IMPORTLIBPREFIX=imp'#010+
- 'endif'#010+
- #010+
- '#end of target specific settings'#010+
- 'endif'#010+
- #010+
- '# For 8.3 limited OS'#039's the short suffixes'#010+
- '# Otherwise use the full source/target names'#010+
- 'ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)'#010+
- 'FPCMADE=fpcmade.$(SHORTSUF','FIX)'#010+
- 'ZIPSUFFIX=$(SHORTSUFFIX)'#010+
- 'ZIPCROSSPREFIX='#010+
- 'ZIPSOURCESUFFIX=src'#010+
- 'ZIPEXAMPLESUFFIX=exm'#010+
- 'else'#010+
- 'FPCMADE=fpcmade.$(TARGETSUFFIX)'#010+
- 'ZIPSOURCESUFFIX=.source'#010+
- 'ZIPEXAMPLESUFFIX=.examples'#010+
- 'ifdef CROSSCOMPILE'#010+
- 'ZIPSUFFIX=.$(SOURCESUFFIX)'#010+
- 'ZIPCROSSPREFIX=$(TA','RGETSUFFIX)-'#010+
- 'else'#010+
- 'ZIPSUFFIX=.$(TARGETSUFFIX)'#010+
- 'ZIPCROSSPREFIX='#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '[defaulttools]'#010+
- '#####################################################################'#010+
- '# Default Tools'#010+
- '#################################################################','###'+
- '#'#010+
- #010+
- '# Names of the binutils tools'#010+
- 'ASNAME=$(BINUTILSPREFIX)as'#010+
- 'LDNAME=$(BINUTILSPREFIX)ld'#010+
- 'ARNAME=$(BINUTILSPREFIX)ar'#010+
- 'RCNAME=$(BINUTILSPREFIX)rc'#010+
- 'ifneq ($(findstring 1.0.,$(FPC_VERSION)),)'#010+
- 'ifeq ($(OS_TARGET),win32)'#010+
- 'ifeq ($(CROSSBINDIR),)'#010+
- 'ASNA','ME=asw'#010+
- 'LDNAME=ldw'#010+
- 'ARNAME=arw'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# assembler, redefine it if cross compiling'#010+
- 'ifndef ASPROG'#010+
- 'ifdef CROSSBINDIR'#010+
- 'ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)'#010+
- 'else'#010+
- 'ASPROG=$(ASNAME)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# linker, but probably not used'#010+
- 'ifnde','f LDPROG'#010+
- 'ifdef CROSSBINDIR'#010+
- 'LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)'#010+
- 'else'#010+
- 'LDPROG=$(LDNAME)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Resource compiler'#010+
- 'ifndef RCPROG'#010+
- 'ifdef CROSSBINDIR'#010+
- 'RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)'#010+
- 'else'#010+
- 'RCPROG=$(RCNAME)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# A','rchiver'#010+
- 'ifndef ARPROG'#010+
- 'ifdef CROSSBINDIR'#010+
- 'ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)'#010+
- 'else'#010+
- 'ARPROG=$(ARNAME)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Override defaults'#010+
- 'AS=$(ASPROG)'#010+
- 'LD=$(LDPROG)'#010+
- 'RC=$(RCPROG)'#010+
- 'AR=$(ARPROG)'#010+
- #010+
- '# ppas.bat / ppas.sh'#010+
- 'PPAS=ppas$(SRCBATCHEXT)'#010+
- #010+
- '# ','ldconfig to rebuild .so cache'#010+
- 'ifdef inUnix'#010+
- 'LDCONFIG=ldconfig'#010+
- 'else'#010+
- 'LDCONFIG='#010+
- 'endif'#010+
- #010+
- 'ifdef DATE'#010+
- 'DATESTR:=$(shell $(DATE) +%Y%m%d)'#010+
- 'else'#010+
- 'DATESTR='#010+
- 'endif'#010+
- #010+
+ '(FULL_SOURCE))'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'CROSSBINDIR='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[dirlibc]'#013,#010+
+ '# On linux, try to find where libgcc.a is.'#013#010+
+ 'ifeq ($(OS_SOURCE),linux)'#013#010+
+ #013#010+
+ '# Amd64 to i386?'#013#010+
+ 'ifndef GCCLIBDIR'#013#010+
+ 'ifeq ($(CPU_TARGET),i386)'#013#010+
+ 'ifneq ($(findstring x86_64,$(shell uname -a)),)'#013#010+
+ 'ifeq ($(BINUTILSPREFIX),)'#013#010+
+ 'GCCLIBDIR:=$(shell dirname ','`gcc -m32 -print-libgcc-file-name`)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifeq ($(CPU_TARGET),powerpc64)'#013#010+
+ 'ifeq ($(BINUTILSPREFIX),)'#013#010+
+ 'GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Try cross gcc'#013#010+
+ 'ifndef GCCLIBDIR'#013#010+
+ 'C','ROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEX'+
+ 'EEXT),$(SEARCHPATH))))'#013#010+
+ 'ifneq ($(CROSSGCC),)'#013#010+
+ 'GCCLIBDIR:=$(shell dirname `$(CROSSGCC) -print-libgcc-file-name`)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Other libraries from ld.so.conf'#013#010+
+ 'ifndef OT','HERLIBDIR'#013#010+
+ 'OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '#039'{ ORS=" '+
+ '"; print $1 }'#039')'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef inUnix'#013#010+
+ 'ifeq ($(OS_SOURCE),netbsd)'#013#010+
+ 'OTHERLIBDIR+=/usr/pkg/lib'#013#010+
+ 'endif'#013#010+
+ 'export GCCLIBDIR OTHERLIB'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[extensions]'#013#010+
+ '##','##################################################################'+
+ '#'#013#010+
+ '# Default extensions'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# Default needed extensions (Go32v2,Linux)'#013#010+
+ 'BATCHEXT=.bat'#013#010+
+ 'LOADEREXT=.as'#013#010+
+ 'EX','EEXT=.exe'#013#010+
+ 'PPLEXT=.ppl'#013#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'OEXT=.o'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'SHAREDLIBEXT=.so'#013#010+
+ 'SHAREDLIBPREFIX=libfp'#013#010+
+ 'STATICLIBPREFIX=libp'#013#010+
+ 'IMPORTLIBPREFIX=libimp'#013#010+
+ 'RSTEXT=.rst'#013#010+
+ '#DEBUGSYMEXT #for debugger symbol files, define only',' for targets whi'+
+ 'ch has this'#013#010+
+ #013#010+
+ '# 1.0.x has target specific extensions for ppu files and objects'#013#010+
+ 'ifeq ($(findstring 1.0.,$(FPC_VERSION)),)'#013#010+
+ '# short version for 1.1 and above - no target specific extensions'#013#010+
+ #013#010+
+ '# Go32v1'#013#010+
+ 'ifeq ($(OS_TARGET),go','32v1)'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHORTSUFFIX=v1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Go32v2'#013#010+
+ 'ifeq ($(OS_TARGET),go32v2)'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHORTSUFFIX=dos'#013#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# watcom'#013#010+
+ 'ifeq ($(OS_TARGET),watcom)'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'OEXT=.obj'#013#010+
+ 'ASMEXT=.asm'#013#010+
+ 'SHAREDLIBE','XT=.dll'#013#010+
+ 'SHORTSUFFIX=wat'#013#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Linux'#013#010+
+ 'ifeq ($(OS_TARGET),linux)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSUFFIX=lnx'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# FreeBSD'#013#010+
+ 'ifeq ($(OS_TARGET),freebsd)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSU','FFIX=fbs'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# NetBSD'#013#010+
+ 'ifeq ($(OS_TARGET),netbsd)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSUFFIX=nbs'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# OpenBSD'#013#010+
+ 'ifeq ($(OS_TARGET),openbsd)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSUFFIX=obs'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Win32'#013#010+
+ 'ifeq',' ($(OS_TARGET),win32)'#013#010+
+ 'SHAREDLIBEXT=.dll'#013#010+
+ 'SHORTSUFFIX=w32'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# OS/2'#013#010+
+ 'ifeq ($(OS_TARGET),os2)'#013#010+
+ 'BATCHEXT=.cmd'#013#010+
+ 'AOUTEXT=.out'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHAREDLIBEXT=.dll'#013#010+
+ 'SHORTSUFFIX=os2'#013#010+
+ 'ECHO=echo'#013#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# EMX'#013#010+
+ 'ifeq ($(OS_','TARGET),emx)'#013#010+
+ 'BATCHEXT=.cmd'#013#010+
+ 'AOUTEXT=.out'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHAREDLIBEXT=.dll'#013#010+
+ 'SHORTSUFFIX=emx'#013#010+
+ 'ECHO=echo'#013#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Amiga'#013#010+
+ 'ifeq ($(OS_TARGET),amiga)'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHAREDLIBEXT=.library'#013#010+
+ 'SHORTSUFFIX=amg'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# MorphOS'#013#010,
+ 'ifeq ($(OS_TARGET),morphos)'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHAREDLIBEXT=.library'#013#010+
+ 'SHORTSUFFIX=mos'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Atari'#013#010+
+ 'ifeq ($(OS_TARGET),atari)'#013#010+
+ 'EXEEXT=.ttp'#013#010+
+ 'SHORTSUFFIX=ata'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# BeOS'#013#010+
+ 'ifeq ($(OS_TARGET),beos)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHORTSUFFIX=be'#013#010+
+ 'endif',#013#010+
+ #013#010+
+ '# Haiku'#013#010+
+ 'ifeq ($(OS_TARGET),haiku)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHORTSUFFIX=hai'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Solaris'#013#010+
+ 'ifeq ($(OS_TARGET),solaris)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHORTSUFFIX=sun'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# QNX'#013#010+
+ 'ifeq ($(OS_TARGET),qnx)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHORTSU','FFIX=qnx'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Netware clib'#013#010+
+ 'ifeq ($(OS_TARGET),netware)'#013#010+
+ 'EXEEXT=.nlm'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHORTSUFFIX=nw'#013#010+
+ 'IMPORTLIBPREFIX=imp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Netware libc'#013#010+
+ 'ifeq ($(OS_TARGET),netwlibc)'#013#010+
+ 'EXEEXT=.nlm'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHORTSUFFIX=nwl'#013#010+
+ 'IMPOR','TLIBPREFIX=imp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# MacOS'#013#010+
+ 'ifeq ($(OS_TARGET),macos)'#013#010+
+ 'BATCHEXT='#013#010+
+ 'EXEEXT='#013#010+
+ 'DEBUGSYMEXT=.xcoff'#013#010+
+ 'SHORTSUFFIX=mac'#013#010+
+ 'IMPORTLIBPREFIX=imp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Darwin'#013#010+
+ 'ifneq ($(findstring $(OS_TARGET),darwin iphonesim),)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSH','AREDLIB=1'#013#010+
+ 'SHORTSUFFIX=dwn'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# gba'#013#010+
+ 'ifeq ($(OS_TARGET),gba)'#013#010+
+ 'EXEEXT=.gba'#013#010+
+ 'SHAREDLIBEXT=.so'#013#010+
+ 'SHORTSUFFIX=gba'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Symbian OS'#013#010+
+ 'ifeq ($(OS_TARGET),symbian)'#013#010+
+ 'SHAREDLIBEXT=.dll'#013#010+
+ 'SHORTSUFFIX=symbian'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# NativeNT'#013#010+
+ 'ifeq ($(OS','_TARGET),NativeNT)'#013#010+
+ 'SHAREDLIBEXT=.dll'#013#010+
+ 'SHORTSUFFIX=nativent'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# wii'#013#010+
+ 'ifeq ($(OS_TARGET),wii)'#013#010+
+ 'EXEEXT=.dol'#013#010+
+ 'SHAREDLIBEXT=.so'#013#010+
+ 'SHORTSUFFIX=wii'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'else'#013#010+
+ '# long version for 1.0.x - target specific extensions'#013#010+
+ #013#010+
+ '# Go32v1'#013#010+
+ 'ifeq ($(','OS_TARGET),go32v1)'#013#010+
+ 'PPUEXT=.pp1'#013#010+
+ 'OEXT=.o1'#013#010+
+ 'ASMEXT=.s1'#013#010+
+ 'SMARTEXT=.sl1'#013#010+
+ 'STATICLIBEXT=.a1'#013#010+
+ 'SHAREDLIBEXT=.so1'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHORTSUFFIX=v1'#013#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Go32v2'#013#010+
+ 'ifeq ($(OS_TARGET),go32v2)'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHORTSUFFIX=dos'#013,#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# watcom'#013#010+
+ 'ifeq ($(OS_TARGET),watcom)'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'SHORTSUFFIX=wat'#013#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Linux'#013#010+
+ 'ifeq ($(OS_TARGET),linux)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSUFFIX=lnx'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# FreeBSD'#013#010,
+ 'ifeq ($(OS_TARGET),freebsd)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSUFFIX=fbs'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# NetBSD'#013#010+
+ 'ifeq ($(OS_TARGET),netbsd)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSUFFIX=nbs'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# OpenBSD'#013#010+
+ 'ifeq ($(OS_TARGET),openbsd)'#013#010+
+ 'BAT','CHEXT=.sh'#013#010+
+ 'EXEEXT='#013#010+
+ 'HASSHAREDLIB=1'#013#010+
+ 'SHORTSUFFIX=obs'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Win32'#013#010+
+ 'ifeq ($(OS_TARGET),win32)'#013#010+
+ 'PPUEXT=.ppw'#013#010+
+ 'OEXT=.ow'#013#010+
+ 'ASMEXT=.sw'#013#010+
+ 'SMARTEXT=.slw'#013#010+
+ 'STATICLIBEXT=.aw'#013#010+
+ 'SHAREDLIBEXT=.dll'#013#010+
+ 'SHORTSUFFIX=w32'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# OS/2'#013#010+
+ 'ifeq ($(OS_TARGET),os','2)'#013#010+
+ 'BATCHEXT=.cmd'#013#010+
+ 'PPUEXT=.ppo'#013#010+
+ 'ASMEXT=.so2'#013#010+
+ 'OEXT=.oo2'#013#010+
+ 'AOUTEXT=.out'#013#010+
+ 'SMARTEXT=.sl2'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'STATICLIBEXT=.ao2'#013#010+
+ 'SHAREDLIBEXT=.dll'#013#010+
+ 'SHORTSUFFIX=os2'#013#010+
+ 'ECHO=echo'#013#010+
+ 'IMPORTLIBPREFIX='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Amiga'#013#010+
+ 'ifeq ($(OS_TARGET),amiga)'#013#010+
+ 'EXEEXT='#013,#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'OEXT=.o'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'SHAREDLIBEXT=.library'#013#010+
+ 'SHORTSUFFIX=amg'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Atari'#013#010+
+ 'ifeq ($(OS_TARGET),atari)'#013#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'OEXT=.o'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'EXEEXT=.ttp'#013#010+
+ 'SHORTSUFFIX=a','ta'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# BeOS'#013#010+
+ 'ifeq ($(OS_TARGET),beos)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'OEXT=.o'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHORTSUFFIX=be'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Solaris'#013#010+
+ 'ifeq ($(OS_TARGET),solaris)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'OEX','T=.o'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHORTSUFFIX=sun'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# QNX'#013#010+
+ 'ifeq ($(OS_TARGET),qnx)'#013#010+
+ 'BATCHEXT=.sh'#013#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'OEXT=.o'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'EXEEXT='#013#010+
+ 'SHORTSUFFIX=qnx'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Netware'#013#010+
+ 'ifeq ($(OS_T','ARGET),netware)'#013#010+
+ 'STATICLIBPREFIX='#013#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'OEXT=.o'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'SHAREDLIBEXT=.nlm'#013#010+
+ 'EXEEXT=.nlm'#013#010+
+ 'SHORTSUFFIX=nw'#013#010+
+ 'IMPORTLIBPREFIX=imp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Netware libc'#013#010+
+ 'ifeq ($(OS_TARGET),netwlibc)'#013#010+
+ 'STATICLIBPREFIX='#013,#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'OEXT=.o'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'STATICLIBEXT=.a'#013#010+
+ 'SHAREDLIBEXT=.nlm'#013#010+
+ 'EXEEXT=.nlm'#013#010+
+ 'SHORTSUFFIX=nwl'#013#010+
+ 'IMPORTLIBPREFIX=imp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# MacOS'#013#010+
+ 'ifeq ($(OS_TARGET),macos)'#013#010+
+ 'BATCHEXT='#013#010+
+ 'PPUEXT=.ppu'#013#010+
+ 'ASMEXT=.s'#013#010+
+ 'OEXT=.o'#013#010+
+ 'SMARTEXT=.sl'#013#010+
+ 'ST','ATICLIBEXT=.a'#013#010+
+ 'EXEEXT='#013#010+
+ 'DEBUGSYMEXT=.xcoff'#013#010+
+ 'SHORTSUFFIX=mac'#013#010+
+ 'IMPORTLIBPREFIX=imp'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '#end of target specific settings'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# For 8.3 limited OS'#039's the short suffixes'#013#010+
+ '# Otherwise use the full source/target names'#013#010+
+ 'ifneq ($(findstri','ng $(OS_SOURCE),$(LIMIT83fs)),)'#013#010+
+ 'FPCMADE=fpcmade.$(SHORTSUFFIX)'#013#010+
+ 'ZIPSUFFIX=$(SHORTSUFFIX)'#013#010+
+ 'ZIPCROSSPREFIX='#013#010+
+ 'ZIPSOURCESUFFIX=src'#013#010+
+ 'ZIPEXAMPLESUFFIX=exm'#013#010+
+ 'else'#013#010+
+ 'FPCMADE=fpcmade.$(TARGETSUFFIX)'#013#010+
+ 'ZIPSOURCESUFFIX=.source'#013#010+
+ 'ZIPEXAMPLESUFFIX=.example','s'#013#010+
+ 'ifdef CROSSCOMPILE'#013#010+
+ 'ZIPSUFFIX=.$(SOURCESUFFIX)'#013#010+
+ 'ZIPCROSSPREFIX=$(TARGETSUFFIX)-'#013#010+
+ 'else'#013#010+
+ 'ZIPSUFFIX=.$(TARGETSUFFIX)'#013#010+
+ 'ZIPCROSSPREFIX='#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '[defaulttools]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# ','Default Tools'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# Names of the binutils tools'#013#010+
+ 'ASNAME=$(BINUTILSPREFIX)as'#013#010+
+ 'LDNAME=$(BINUTILSPREFIX)ld'#013#010+
+ 'ARNAME=$(BINUTILSPREFIX)ar'#013#010+
+ 'RCNAME=$(BINUTILSPREFIX)rc'#013#010+
+ 'ifneq ($(','findstring 1.0.,$(FPC_VERSION)),)'#013#010+
+ 'ifeq ($(OS_TARGET),win32)'#013#010+
+ 'ifeq ($(CROSSBINDIR),)'#013#010+
+ 'ASNAME=asw'#013#010+
+ 'LDNAME=ldw'#013#010+
+ 'ARNAME=arw'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# assembler, redefine it if cross compiling'#013#010+
+ 'ifndef ASPROG'#013#010+
+ 'ifdef CROSSBINDIR'#013#010+
+ 'ASPROG=$(CROSSBI','NDIR)/$(ASNAME)$(SRCEXEEXT)'#013#010+
+ 'else'#013#010+
+ 'ASPROG=$(ASNAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# linker, but probably not used'#013#010+
+ 'ifndef LDPROG'#013#010+
+ 'ifdef CROSSBINDIR'#013#010+
+ 'LDPROG=$(CROSSBINDIR)/$(LDNAME)$(SRCEXEEXT)'#013#010+
+ 'else'#013#010+
+ 'LDPROG=$(LDNAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Resource compiler',#013#010+
+ 'ifndef RCPROG'#013#010+
+ 'ifdef CROSSBINDIR'#013#010+
+ 'RCPROG=$(CROSSBINDIR)/$(RCNAME)$(SRCEXEEXT)'#013#010+
+ 'else'#013#010+
+ 'RCPROG=$(RCNAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Archiver'#013#010+
+ 'ifndef ARPROG'#013#010+
+ 'ifdef CROSSBINDIR'#013#010+
+ 'ARPROG=$(CROSSBINDIR)/$(ARNAME)$(SRCEXEEXT)'#013#010+
+ 'else'#013#010+
+ 'ARPROG=$(ARNAME)'#013#010+
+ 'endi','f'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Override defaults'#013#010+
+ 'AS=$(ASPROG)'#013#010+
+ 'LD=$(LDPROG)'#013#010+
+ 'RC=$(RCPROG)'#013#010+
+ 'AR=$(ARPROG)'#013#010+
+ #013#010+
+ '# ppas.bat / ppas.sh'#013#010+
+ 'PPAS=ppas$(SRCBATCHEXT)'#013#010+
+ #013#010+
+ '# ldconfig to rebuild .so cache'#013#010+
+ 'ifdef inUnix'#013#010+
+ 'LDCONFIG=ldconfig'#013#010+
+ 'else'#013#010+
+ 'LDCONFIG='#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef DA','TE'#013#010+
+ 'DATESTR:=$(shell $(DATE) +%Y%m%d)'#013#010+
+ 'else'#013#010+
+ 'DATESTR='#013#010+
+ 'endif'#013#010+
+ #013#010+
'# Look if UPX is found for go32v2 and win32. We can'#039't use $UPX bec'+
- 'ause'#010+
- '# upx uses that one ','itself (PFV)'#010+
- 'ifndef UPXPROG'#010+
- 'ifeq ($(OS_TARGET),go32v2)'#010+
- 'UPXPROG:=1'#010+
- 'endif'#010+
- 'ifeq ($(OS_TARGET),win32)'#010+
- 'UPXPROG:=1'#010+
- 'endif'#010+
- 'ifdef UPXPROG'#010+
+ 'ause'#013#010+
+ '# upx uses that one itself (PFV)'#013#010+
+ 'ifndef UPXPROG'#013#010+
+ 'ifeq ($(OS_TARGET),go32v2)'#013#010+
+ 'UPXPROG:=1'#013#010+
+ 'endif'#013#010+
+ 'ifeq ($','(OS_TARGET),win32)'#013#010+
+ 'UPXPROG:=1'#013#010+
+ 'endif'#013#010+
+ 'ifdef UPXPROG'#013#010+
'UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH)'+
- ')))'#010+
- 'ifeq ($(UPXPROG),)'#010+
- 'UPXPROG='#010+
- 'else'#010+
- 'UPXP','ROG:=$(firstword $(UPXPROG))'#010+
- 'endif'#010+
- 'else'#010+
- 'UPXPROG='#010+
- 'endif'#010+
- 'endif'#010+
- 'export UPXPROG'#010+
- #010+
- '# Zip options'#010+
- 'ZIPOPT=-9'#010+
- 'ZIPEXT=.zip'#010+
- #010+
- '# Tar options'#010+
- 'ifeq ($(USETAR),bz2)'#010+
- 'TAROPT=vj'#010+
- 'TAREXT=.tar.bz2'#010+
- 'else'#010+
- 'TAROPT=vz'#010+
- 'TAREXT=.tar.gz'#010+
- 'endif'#010+
- #010+
- #010+
- '[command_begin]'#010+
+ ')))'#013#010+
+ 'ifeq ($(UPXPROG),)'#013#010+
+ 'UPXPROG='#013#010+
+ 'else'#013#010+
+ 'UPXPROG:=$(firstword $(UPXPROG))'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'UPXPROG='#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'expo','rt UPXPROG'#013#010+
+ #013#010+
+ '# Zip options'#013#010+
+ 'ZIPOPT=-9'#013#010+
+ 'ZIPEXT=.zip'#013#010+
+ #013#010+
+ '# Tar options'#013#010+
+ 'ifeq ($(USETAR),bz2)'#013#010+
+ 'TAROPT=vj'#013#010+
+ 'TAREXT=.tar.bz2'#013#010+
+ 'else'#013#010+
+ 'TAROPT=vz'#013#010+
+ 'TAREXT=.tar.gz'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[command_begin]'#013#010+
+ '###########################################################','#########'+
+ '#'#013#010+
+ '# Compiler Command Line'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# Load commandline OPTDEF and add FPC_CPU define, for compiling the'#013+
+ #010+
+ '# compiler this needs to be turned off'#013#010+
+ 'ifndef NOCPUDEF'#013#010+
+ 'over','ride FPCOPTDEF=$(ARCH)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '# Load commandline OPT and add target and unit dir to be sure'#013#010+
+ 'ifneq ($(OS_TARGET),$(OS_SOURCE))'#013#010+
+ 'override FPCOPT+=-T$(OS_TARGET)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifneq ($(CPU_TARGET),$(CPU_SOURCE))'#013#010+
+ 'override FPCOPT+=-P$(ARCH)'#013#010,
+ 'endif'#013#010+
+ #013#010+
+ 'ifeq ($(OS_SOURCE),openbsd)'#013#010+
+ 'override FPCOPT+=-FD$(NEW_BINUTILS_PATH)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifndef CROSSBOOTSTRAP'#013#010+
+ 'ifneq ($(BINUTILSPREFIX),)'#013#010+
+ 'override FPCOPT+=-XP$(BINUTILSPREFIX)'#013#010+
+ 'endif'#013#010+
+ 'ifneq ($(BINUTILSPREFIX),)'#013#010+
+ 'override FPCOPT+=-Xr$(RLIN','KPATH)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# User dirs should be first, so they are looked at first'#013#010+
+ 'ifdef UNITDIR'#013#010+
+ 'override FPCOPT+=$(addprefix -Fu,$(UNITDIR))'#013#010+
+ 'endif'#013#010+
+ 'ifdef LIBDIR'#013#010+
+ 'override FPCOPT+=$(addprefix -Fl,$(LIBDIR))'#013#010+
+ 'endif'#013#010+
+ 'ifdef OBJDIR'#013#010+
+ 'override F','PCOPT+=$(addprefix -Fo,$(OBJDIR))'#013#010+
+ 'endif'#013#010+
+ 'ifdef INCDIR'#013#010+
+ 'override FPCOPT+=$(addprefix -Fi,$(INCDIR))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Smartlinking'#013#010+
+ 'ifdef LINKSMART'#013#010+
+ 'override FPCOPT+=-XX'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Smartlinking creation'#013#010+
+ 'ifdef CREATESMART'#013#010+
+ 'override FPCOPT+=-CX'#013#010,
+ 'endif'#013#010+
+ #013#010+
+ '# Debug'#013#010+
+ 'ifdef DEBUG'#013#010+
+ 'override FPCOPT+=-gl'#013#010+
+ 'override FPCOPTDEF+=DEBUG'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Release mode'#013#010+
+ '# (strip, optimize and don'#039't load fpc.cfg)'#013#010+
+ '# fpc 2.1 has -O2 for all targets'#013#010+
+ 'ifdef RELEASE'#013#010+
+ 'ifneq ($(findstring 2.0.,$(FPC_VERSION)),',')'#013#010+
+ 'ifeq ($(CPU_TARGET),i386)'#013#010+
+ 'FPCCPUOPT:=-OG2p3'#013#010+
+ 'endif'#013#010+
+ 'ifeq ($(CPU_TARGET),powerpc)'#013#010+
+ 'FPCCPUOPT:=-O1r'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'FPCCPUOPT:=-O2'#013#010+
+ 'endif'#013#010+
+ 'override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n'#013#010+
+ 'override FPCOPTDEF+=RELEASE'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Strip'#013#010+
+ 'ifdef STRIP'#013,#010+
+ 'override FPCOPT+=-Xs'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Optimizer'#013#010+
+ 'ifdef OPTIMIZE'#013#010+
+ 'override FPCOPT+=-O2'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Verbose settings (warning,note,info)'#013#010+
+ 'ifdef VERBOSE'#013#010+
+ 'override FPCOPT+=-vwni'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Needed compiler options'#013#010+
+ 'ifdef COMPILER_OPTIONS'#013#010+
+ 'override ','FPCOPT+=$(COMPILER_OPTIONS)'#013#010+
+ 'endif'#013#010+
+ 'ifdef COMPILER_UNITDIR'#013#010+
+ 'override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))'#013#010+
+ 'endif'#013#010+
+ 'ifdef COMPILER_LIBRARYDIR'#013#010+
+ 'override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))'#013#010+
+ 'endif'#013#010+
+ 'ifdef COMPILER_OBJECTDIR'#013#010,
+ 'override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))'#013#010+
+ 'endif'#013#010+
+ 'ifdef COMPILER_INCLUDEDIR'#013#010+
+ 'override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Cross compiler utils'#013#010+
+ 'ifdef CROSSBINDIR'#013#010+
+ 'override FPCOPT+=-FD$(CROSSBINDIR)'#013#010+
+ 'end','if'#013#010+
+ #013#010+
+ '# Target dirs and the prefix to use for clean/install'#013#010+
+ 'ifdef COMPILER_TARGETDIR'#013#010+
+ 'override FPCOPT+=-FE$(COMPILER_TARGETDIR)'#013#010+
+ 'ifeq ($(COMPILER_TARGETDIR),.)'#013#010+
+ 'override TARGETDIRPREFIX='#013#010+
+ 'else'#013#010+
+ 'override TARGETDIRPREFIX=$(COMPILER_TARGETDIR',')/'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Unit target dir (default is units/<cpu>-<os>/'#013#010+
+ 'ifdef COMPILER_UNITTARGETDIR'#013#010+
+ 'override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)'#013#010+
+ 'ifeq ($(COMPILER_UNITTARGETDIR),.)'#013#010+
+ 'override UNITTARGETDIRPREFIX='#013#010+
+ 'else'#013#010+
+ 'override UNITTARGETDI','RPREFIX=$(COMPILER_UNITTARGETDIR)/'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'ifdef COMPILER_TARGETDIR'#013#010+
+ 'override COMPILER_UNITTARGETDIR=$(COMPILER_TARGETDIR)'#013#010+
+ 'override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef CREATESHARED'#013#010+
+ 'override FPCOPT+=-Cg'#013#010+
+ #013#010+
+ 'i','feq ($(CPU_TARGET),i386)'#013#010+
+ 'override FPCOPT+=-Aas'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# create always pic'#039'ed code on x86_64'#013#010+
+ 'ifeq ($(findstring 2.0.,$(FPC_VERSION)),)'#013#010+
+ 'ifeq ($(OS_TARGET),linux)'#013#010+
+ 'ifeq ($(CPU_TARGET),x86_64)'#013#010+
+ 'override FPCOPT+=-Cg'#013#010+
+ 'endif'#013#010+
+ 'endif'#013,#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef LINKSHARED'#013#010+
+ '#!!! deactived for testing override FPCOPT+=-XD'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[command_libc]'#013#010+
+ '# Add GCC lib path if asked'#013#010+
+ 'ifdef GCCLIBDIR'#013#010+
+ 'override FPCOPT+=-Fl$(GCCLIBDIR)'#013#010+
+ 'endif'#013#010+
+ 'ifdef OTHERLIBDIR'#013#010+
+ 'override FPCOPT+=$(addprefix -','Fl,$(OTHERLIBDIR))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[command_end]'#013#010+
+ '# Add commandline options last so they can override'#013#010+
+ 'ifdef OPT'#013#010+
+ 'override FPCOPT+=$(OPT)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Add defines from FPCOPTDEF to FPCOPT'#013#010+
+ 'ifdef FPCOPTDEF'#013#010+
+ 'override FPCOPT+=$(addprefix -d,$(FPCOP','TDEF))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Was a config file specified ?'#013#010+
+ 'ifdef CFGFILE'#013#010+
+ 'override FPCOPT+=@$(CFGFILE)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Use the environment to pass commandline options?'#013#010+
+ 'ifdef USEENV'#013#010+
+ 'override FPCEXTCMD:=$(FPCOPT)'#013#010+
+ 'override FPCOPT:=!FPCEXTCMD'#013#010+
+ 'export FPC','EXTCMD'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)'#013#010+
+ 'override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)'#013#010+
+ #013#010+
+ 'ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))'#013#010+
+ 'override ACROSSCOMPILE=1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef ACROSSCOMPILE'#013#010+
+ 'override FPCOPT+=$(CROSS','OPT)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Compiler commandline'#013#010+
+ 'override COMPILER:=$(FPC) $(FPCOPT)'#013#010+
+ #013#010+
+ '# also call ppas if with command option -s'#013#010+
+ '# but only if the FULL_SOURCE and FULL_TARGET are equal'#013#010+
+ 'ifeq (,$(findstring -s ,$(COMPILER)))'#013#010+
+ 'EXECPPAS='#013#010+
+ 'else'#013#010+
+ 'ifeq ','($(FULL_SOURCE),$(FULL_TARGET))'#013#010+
+ 'ifdef RUNBATCH'#013#010+
+ 'EXECPPAS:=@$(RUNBATCH) $(PPAS)'#013#010+
+ 'else'#013#010+
+ 'EXECPPAS:=@$(PPAS)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[loaderrules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Loaders'#013#010+
'###########','#########################################################'+
- '#'#010+
- '# Compiler Command Line'#010+
- '#####################################################################'#010+
- #010+
- '# Load commandline OPTDEF and add FPC_CPU define, for compiling the'#010+
- '# compiler this ne','eds to be turned off'#010+
- 'ifndef NOCPUDEF'#010+
- 'override FPCOPTDEF=$(ARCH)'#010+
- 'endif'#010+
- #010+
- #010+
- '# Load commandline OPT and add target and unit dir to be sure'#010+
- 'ifneq ($(OS_TARGET),$(OS_SOURCE))'#010+
- 'override FPCOPT+=-T$(OS_TARGET)'#010+
- 'endif'#010+
- #010+
- 'ifneq ($(CPU_TARGET),$(CPU_SOURCE','))'#010+
- 'override FPCOPT+=-P$(ARCH)'#010+
- 'endif'#010+
- #010+
- 'ifeq ($(OS_SOURCE),openbsd)'#010+
- 'override FPCOPT+=-FD$(NEW_BINUTILS_PATH)'#010+
- 'endif'#010+
- #010+
- 'ifndef CROSSBOOTSTRAP'#010+
- 'ifneq ($(BINUTILSPREFIX),)'#010+
- 'override FPCOPT+=-XP$(BINUTILSPREFIX)'#010+
- 'endif'#010+
- 'ifneq ($(BINUTILSPREFIX),)'#010+
- 'overrid','e FPCOPT+=-Xr$(RLINKPATH)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# User dirs should be first, so they are looked at first'#010+
- 'ifdef UNITDIR'#010+
- 'override FPCOPT+=$(addprefix -Fu,$(UNITDIR))'#010+
- 'endif'#010+
- 'ifdef LIBDIR'#010+
- 'override FPCOPT+=$(addprefix -Fl,$(LIBDIR))'#010+
- 'endif'#010+
- 'ifdef OBJDIR'#010+
- 'ove','rride FPCOPT+=$(addprefix -Fo,$(OBJDIR))'#010+
- 'endif'#010+
- 'ifdef INCDIR'#010+
- 'override FPCOPT+=$(addprefix -Fi,$(INCDIR))'#010+
- 'endif'#010+
- #010+
- '# Smartlinking'#010+
- 'ifdef LINKSMART'#010+
- 'override FPCOPT+=-XX'#010+
- 'endif'#010+
- #010+
- '# Smartlinking creation'#010+
- 'ifdef CREATESMART'#010+
- 'override FPCOPT+=-CX'#010+
- 'endif'#010+
- #010,
- '# Debug'#010+
- 'ifdef DEBUG'#010+
- 'override FPCOPT+=-gl'#010+
- 'override FPCOPTDEF+=DEBUG'#010+
- 'endif'#010+
- #010+
- '# Release mode'#010+
- '# (strip, optimize and don'#039't load fpc.cfg)'#010+
- '# fpc 2.1 has -O2 for all targets'#010+
- 'ifdef RELEASE'#010+
- 'ifneq ($(findstring 2.0.,$(FPC_VERSION)),)'#010+
- 'ifeq ($(CPU_TARGE','T),i386)'#010+
- 'FPCCPUOPT:=-OG2p3'#010+
- 'endif'#010+
- 'ifeq ($(CPU_TARGET),powerpc)'#010+
- 'FPCCPUOPT:=-O1r'#010+
- 'endif'#010+
- 'else'#010+
- 'FPCCPUOPT:=-O2'#010+
- 'endif'#010+
- 'override FPCOPT+=-Ur -Xs $(FPCCPUOPT) -n'#010+
- 'override FPCOPTDEF+=RELEASE'#010+
- 'endif'#010+
- #010+
- '# Strip'#010+
- 'ifdef STRIP'#010+
- 'override FPCOPT+=-Xs'#010+
- 'endif'#010+
- #010+
- '# Opti','mizer'#010+
- 'ifdef OPTIMIZE'#010+
- 'override FPCOPT+=-O2'#010+
- 'endif'#010+
- #010+
- '# Verbose settings (warning,note,info)'#010+
- 'ifdef VERBOSE'#010+
- 'override FPCOPT+=-vwni'#010+
- 'endif'#010+
- #010+
- '# Needed compiler options'#010+
- 'ifdef COMPILER_OPTIONS'#010+
- 'override FPCOPT+=$(COMPILER_OPTIONS)'#010+
- 'endif'#010+
- 'ifdef COMPILER_U','NITDIR'#010+
- 'override FPCOPT+=$(addprefix -Fu,$(COMPILER_UNITDIR))'#010+
- 'endif'#010+
- 'ifdef COMPILER_LIBRARYDIR'#010+
- 'override FPCOPT+=$(addprefix -Fl,$(COMPILER_LIBRARYDIR))'#010+
- 'endif'#010+
- 'ifdef COMPILER_OBJECTDIR'#010+
- 'override FPCOPT+=$(addprefix -Fo,$(COMPILER_OBJECTDIR))'#010+
- 'end','if'#010+
- 'ifdef COMPILER_INCLUDEDIR'#010+
- 'override FPCOPT+=$(addprefix -Fi,$(COMPILER_INCLUDEDIR))'#010+
- 'endif'#010+
- #010+
- '# Cross compiler utils'#010+
- 'ifdef CROSSBINDIR'#010+
- 'override FPCOPT+=-FD$(CROSSBINDIR)'#010+
- 'endif'#010+
- #010+
- '# Target dirs and the prefix to use for clean/install'#010+
- 'ifdef COMP','ILER_TARGETDIR'#010+
- 'override FPCOPT+=-FE$(COMPILER_TARGETDIR)'#010+
- 'ifeq ($(COMPILER_TARGETDIR),.)'#010+
- 'override TARGETDIRPREFIX='#010+
- 'else'#010+
- 'override TARGETDIRPREFIX=$(COMPILER_TARGETDIR)/'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Unit target dir (default is units/<cpu>-<os>/'#010+
- 'ifdef COMPIL','ER_UNITTARGETDIR'#010+
- 'override FPCOPT+=-FU$(COMPILER_UNITTARGETDIR)'#010+
- 'ifeq ($(COMPILER_UNITTARGETDIR),.)'#010+
- 'override UNITTARGETDIRPREFIX='#010+
- 'else'#010+
- 'override UNITTARGETDIRPREFIX=$(COMPILER_UNITTARGETDIR)/'#010+
- 'endif'#010+
- 'else'#010+
- 'ifdef COMPILER_TARGETDIR'#010+
- 'override COMPIL','ER_UNITTARGETDIR=$(COMPILER_TARGETDIR)'#010+
- 'override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'ifdef CREATESHARED'#010+
- 'override FPCOPT+=-Cg'#010+
- #010+
- 'ifeq ($(CPU_TARGET),i386)'#010+
- 'override FPCOPT+=-Aas'#010+
- 'endif'#010+
- #010+
- 'endif'#010+
- #010+
- '# create always pic'#039'ed code on x86_64',#010+
- 'ifeq ($(findstring 2.0.,$(FPC_VERSION)),)'#010+
- 'ifeq ($(OS_TARGET),linux)'#010+
- 'ifeq ($(CPU_TARGET),x86_64)'#010+
- 'override FPCOPT+=-Cg'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'ifdef LINKSHARED'#010+
- '#!!! deactived for testing override FPCOPT+=-XD'#010+
- 'endif'#010+
- #010+
- #010+
- '[command_libc]'#010+
- '# Add GCC lib p','ath if asked'#010+
- 'ifdef GCCLIBDIR'#010+
- 'override FPCOPT+=-Fl$(GCCLIBDIR)'#010+
- 'endif'#010+
- 'ifdef OTHERLIBDIR'#010+
- 'override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))'#010+
- 'endif'#010+
- #010+
- #010+
- '[command_end]'#010+
- '# Add commandline options last so they can override'#010+
- 'ifdef OPT'#010+
- 'override FPCOPT+=$(OP','T)'#010+
- 'endif'#010+
- #010+
- '# Add defines from FPCOPTDEF to FPCOPT'#010+
- 'ifdef FPCOPTDEF'#010+
- 'override FPCOPT+=$(addprefix -d,$(FPCOPTDEF))'#010+
- 'endif'#010+
- #010+
- '# Was a config file specified ?'#010+
- 'ifdef CFGFILE'#010+
- 'override FPCOPT+=@$(CFGFILE)'#010+
- 'endif'#010+
- #010+
- '# Use the environment to pass commandlin','e options?'#010+
- 'ifdef USEENV'#010+
- 'override FPCEXTCMD:=$(FPCOPT)'#010+
- 'override FPCOPT:=!FPCEXTCMD'#010+
- 'export FPCEXTCMD'#010+
- 'endif'#010+
- #010+
- 'override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)'#010+
- 'override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)'#010+
- #010+
- 'ifneq ($(AFULL_TARGET),$(AFULL_SOUR','CE))'#010+
- 'override ACROSSCOMPILE=1'#010+
- 'endif'#010+
- #010+
- 'ifdef ACROSSCOMPILE'#010+
- 'override FPCOPT+=$(CROSSOPT)'#010+
- 'endif'#010+
- #010+
- '# Compiler commandline'#010+
- 'override COMPILER:=$(FPC) $(FPCOPT)'#010+
- #010+
- '# also call ppas if with command option -s'#010+
- '# but only if the FULL_SOURCE and FULL_TARGE','T are equal'#010+
- 'ifeq (,$(findstring -s ,$(COMPILER)))'#010+
- 'EXECPPAS='#010+
- 'else'#010+
- 'ifeq ($(FULL_SOURCE),$(FULL_TARGET))'#010+
- 'ifdef RUNBATCH'#010+
- 'EXECPPAS:=@$(RUNBATCH) $(PPAS)'#010+
- 'else'#010+
- 'EXECPPAS:=@$(PPAS)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- #010+
- '[loaderrules]'#010+
- '##################################','##################################'+
- '#'#010+
- '# Loaders'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_loaders'#010+
- #010+
- 'ifneq ($(TARGET_LOADERS),)'#010+
- 'override ALLTARGET+=fpc_loaders'#010+
- 'override CLEANTARGET+=fpc_loaders_clean'#010+
- 'ove','rride INSTALLTARGET+=fpc_loaders_install'#010+
- #010+
- 'override LOADEROFILES:=$(addsuffix $(OEXT),$(TARGET_LOADERS))'#010+
- 'endif'#010+
- #010+
- '%$(OEXT): %$(LOADEREXT)'#010+
- 'ifdef COMPILER_UNITTARGETDIR'#010+
- ' $(AS) -o $(COMPILER_UNITTARGETDIR)/$*$(OEXT) $<'#010+
- 'else'#010+
- ' $(AS) -','o $*$(OEXT) $<'#010+
- 'endif'#010+
- #010+
- 'fpc_loaders: $(COMPILER_UNITTARGETDIR) $(LOADEROFILES)'#010+
- #010+
- 'fpc_loaders_clean:'#010+
- 'ifdef COMPILER_UNITTARGETDIR'#010+
+ '#'#013#010+
+ #013#010+
+ '.PHONY: fpc_loaders'#013#010+
+ #013#010+
+ 'ifneq ($(TARGET_LOADERS),)'#013#010+
+ 'override ALLTARGET+=fpc_loaders'#013#010+
+ 'override CLEANTARGET+=fpc_loaders_clean'#013#010+
+ 'override INSTALLTARGET+=fpc_loaders_install'#013#010+
+ #013#010+
+ 'overri','de LOADEROFILES:=$(addsuffix $(OEXT),$(TARGET_LOADERS))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '%$(OEXT): %$(LOADEREXT)'#013#010+
+ 'ifdef COMPILER_UNITTARGETDIR'#013#010+
+ ' $(AS) -o $(COMPILER_UNITTARGETDIR)/$*$(OEXT) $<'#013#010+
+ 'else'#013#010+
+ ' $(AS) -o $*$(OEXT) $<'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_loaders: $(C','OMPILER_UNITTARGETDIR) $(LOADEROFILES)'#013#010+
+ #013#010+
+ 'fpc_loaders_clean:'#013#010+
+ 'ifdef COMPILER_UNITTARGETDIR'#013#010+
' -$(DEL) $(addprefix $(COMPILER_UNITTARGETDIR)/,$(LOADEROFILES)'+
- ')'#010+
- 'else'#010+
- ' -$(DEL) $(LOADEROFILES)'#010+
- 'endif',#010+
- #010+
- 'fpc_loaders_install:'#010+
- ' $(MKDIR) $(INSTALL_UNITDIR)'#010+
- 'ifdef COMPILER_UNITTARGETDIR'#010+
+ ')'#013#010+
+ 'else'#013#010+
+ ' -$(DEL) $(LOADEROFILES)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_loaders_install:'#013#010+
+ ' ',' $(MKDIR) $(INSTALL_UNITDIR)'#013#010+
+ 'ifdef COMPILER_UNITTARGETDIR'#013#010+
' $(INSTALL) $(addprefix $(COMPILER_UNITTARGETDIR)/,$(LOADEROFIL'+
- 'ES)) $(INSTALL_UNITDIR)'#010+
- 'else'#010+
- ' $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)',#010+
- 'endif'#010+
- #010+
- #010+
- '[unitrules]'#010+
- '#####################################################################'#010+
- '# Units'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_units'#010+
- #010+
- 'ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)'#010+
- 'ove','rride ALLTARGET+=fpc_units'#010+
- #010+
- 'override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))'#010+
+ 'ES)) $(INSTALL_UNITDIR)'#013#010+
+ 'else'#013#010+
+ ' $(INSTALL) $(LOADEROFILES) $(INSTALL_UNITDIR)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[unitrules]',#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Units'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_units'#013#010+
+ #013#010+
+ 'ifneq ($(TARGET_UNITS)$(TARGET_IMPLICITUNITS),)'#013#010+
+ 'override ALLTAR','GET+=fpc_units'#013#010+
+ #013#010+
+ 'override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))'#013#010+
'override IMPLICITUNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_IMPLICITU'+
- 'NITS))'#010+
- 'override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)'#010+
- 'override',' CLEANPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)'#010+
- 'endif'#010+
- #010+
- 'fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)'#010+
- #010+
- #010+
- '[exerules]'#010+
- '#####################################################################'#010+
- '# Exes'#010+
- '##################################','##################################'+
- '#'#010+
- #010+
- '.PHONY: fpc_exes'#010+
- #010+
- '# Programs are not needed for a cross installation'#010+
- 'ifndef CROSSINSTALL'#010+
- 'ifneq ($(TARGET_PROGRAMS),)'#010+
- 'override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))'#010+
- 'override EXEOFILES:=$(adds','uffix $(OEXT),$(TARGET_PROGRAMS)) $(addpre'+
+ 'NITS))'#013#010+
+ 'override INSTALLPPUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)'#013#010+
+ 'override CLEANP','PUFILES+=$(UNITPPUFILES) $(IMPLICITUNITPPUFILES)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_units: $(COMPILER_UNITTARGETDIR) $(UNITPPUFILES)'#013#010+
+ #013#010+
+ #013#010+
+ '[exerules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Exes'#013#010+
+ '################################','####################################'+
+ '#'#013#010+
+ #013#010+
+ '.PHONY: fpc_exes'#013#010+
+ #013#010+
+ '# Programs are not needed for a cross installation'#013#010+
+ 'ifndef CROSSINSTALL'#013#010+
+ 'ifneq ($(TARGET_PROGRAMS),)'#013#010+
+ 'override EXEFILES=$(addsuffix $(EXEEXT),$(TARGET_PROGRAMS))'#013#010+
+ 'override EXEOFIL','ES:=$(addsuffix $(OEXT),$(TARGET_PROGRAMS)) $(addpre'+
'fix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_PROGRAMS))'+
') $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_'+
- 'PROGRAMS)))'#010+
- #010+
- 'override ALLTARGET+=fpc_exes'#010+
- 'override INSTALL','EXEFILES+=$(EXEFILES)'#010+
- 'override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)'#010+
- 'ifeq ($(OS_TARGET),os2)'#010+
- 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))'#010+
- 'endif'#010+
- 'ifeq ($(OS_TARGET),emx)'#010+
- 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$','(TARGET_PROGRAMS))'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)'#010+
- #010+
- #010+
- '[rstrules]'#010+
- '#####################################################################'#010+
- '# Resource strings'#010+
- '##############################','######################################'+
- '#'#010+
- #010+
- 'ifdef TARGET_RSTS'#010+
- 'override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))'#010+
- #010+
- 'override CLEANRSTFILES+=$(RSTFILES)'#010+
- 'endif'#010+
- #010+
- #010+
- '[examplerules]'#010+
- '#################################################################','###'+
- '#'#010+
- '# Examples'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_examples'#010+
- #010+
- 'ifneq ($(TARGET_EXAMPLES),)'#010+
- 'HASEXAMPLES=1'#010+
- 'override EXAMPLESOURCEFILES:=$(wildcard $(addsuffix .pp,$(TARGET_EXAMP'+
- 'LES)) $(addsuffix .','pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET'+
- '_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES)))'#010+
- 'override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))'#010+
- 'override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(addp'+
- 'refix ','$(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPL'+
+ 'PROGRAMS)))'#013#010+
+ #013#010+
+ 'override ALLTARGET+=fpc_exes'#013#010+
+ 'ove','rride INSTALLEXEFILES+=$(EXEFILES)'#013#010+
+ 'override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)'#013#010+
+ 'ifeq ($(OS_TARGET),os2)'#013#010+
+ 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_PROGRAMS))'#013+
+ #010+
+ 'endif'#013#010+
+ 'ifeq ($(OS_TARGET),emx)'#013#010+
+ 'override CLEANEXEFILES+=$(add','suffix $(AOUTEXT),$(TARGET_PROGRAMS))'#013+
+ #010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_exes: $(COMPILER_TARGETDIR) $(COMPILER_UNITTARGETDIR) $(EXEFILES)'#013+
+ #010+
+ #013#010+
+ #013#010+
+ '[rstrules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Resource strings'#013#010,
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ 'ifdef TARGET_RSTS'#013#010+
+ 'override RSTFILES=$(addsuffix $(RSTEXT),$(TARGET_RSTS))'#013#010+
+ #013#010+
+ 'override CLEANRSTFILES+=$(RSTFILES)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[examplerules]'#013#010+
+ '#########################','###########################################'+
+ '#'#013#010+
+ '# Examples'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_examples'#013#010+
+ #013#010+
+ 'ifneq ($(TARGET_EXAMPLES),)'#013#010+
+ 'HASEXAMPLES=1'#013#010+
+ 'override EXAMPLESOURCEFILES:=$(wildcard $','(addsuffix .pp,$(TARGET_EXA'+
+ 'MPLES)) $(addsuffix .pas,$(TARGET_EXAMPLES)) $(addsuffix .lpr,$(TARGET'+
+ '_EXAMPLES)) $(addsuffix .dpr,$(TARGET_EXAMPLES)))'#013#010+
+ 'override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(TARGET_EXAMPLES))'#013#010+
+ 'override EXAMPLEOFILES:=$(','addsuffix $(OEXT),$(TARGET_EXAMPLES)) $(ad'+
+ 'dprefix $(STATICLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TARGET_EXAMPL'+
'ES))) $(addprefix $(IMPORTLIBPREFIX),$(addsuffix $(STATICLIBEXT),$(TAR'+
- 'GET_EXAMPLES)))'#010+
- #010+
- 'override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)'#010+
- 'ifeq ($(OS_TARGET),os2)'#010+
- 'override C','LEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#010+
- 'endif'#010+
- 'ifeq ($(OS_TARGET),emx)'#010+
- 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifneq ($(TARGET_EXAMPLEDIRS),)'#010+
- 'HASEXAMPLES=1'#010+
- 'endif'#010+
- #010+
- 'fpc_examples: all $(EX','AMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLED'+
- 'IRS))'#010+
- #010+
- #010+
- '[compilerules]'#010+
- '#####################################################################'#010+
- '# General compile rules'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY',': fpc_all fpc_smart fpc_debug fpc_release fpc_shared'#010+
- #010+
- '$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)'#010+
- ' @$(ECHOREDIR) Compiled > $(FPCMADE)'#010+
- #010+
- 'fpc_all: $(FPCMADE)'#010+
- #010+
- 'fpc_smart:'#010+
- ' $(MAKE) all LINKSMART=1 CREATESMART=1'#010+
- #010+
- 'fpc_debug:'#010+
- ' ',' $(MAKE) all DEBUG=1'#010+
- #010+
- 'fpc_release:'#010+
- ' $(MAKE) all RELEASE=1'#010+
- #010+
+ 'GET_EXAMPLES)))'#013#010+
+ #013#010+
+ 'override CLEANEXEFILES+=$(EXAMPLEFILES)',' $(EXAMPLEOFILES)'#013#010+
+ 'ifeq ($(OS_TARGET),os2)'#013#010+
+ 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#013+
+ #010+
+ 'endif'#013#010+
+ 'ifeq ($(OS_TARGET),emx)'#013#010+
+ 'override CLEANEXEFILES+=$(addsuffix $(AOUTEXT),$(TARGET_EXAMPLES))'#013+
+ #010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifneq ($(TARGE','T_EXAMPLEDIRS),)'#013#010+
+ 'HASEXAMPLES=1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(TARGET_EXAMPLEDIR'+
+ 'S))'#013#010+
+ #013#010+
+ #013#010+
+ '[compilerules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# General compile rules'#013#010+
+ '#######','#############################################################'+
+ '#'#013#010+
+ #013#010+
+ '.PHONY: fpc_all fpc_smart fpc_debug fpc_release fpc_shared'#013#010+
+ #013#010+
+ '$(FPCMADE): $(ALLDEPENDENCIES) $(ALLTARGET)'#013#010+
+ ' @$(ECHOREDIR) Compiled > $(FPCMADE)'#013#010+
+ #013#010+
+ 'fpc_all: $(FPCMADE)'#013,#010+
+ #013#010+
+ 'fpc_smart:'#013#010+
+ ' $(MAKE) all LINKSMART=1 CREATESMART=1'#013#010+
+ #013#010+
+ 'fpc_debug:'#013#010+
+ ' $(MAKE) all DEBUG=1'#013#010+
+ #013#010+
+ 'fpc_release:'#013#010+
+ ' $(MAKE) all RELEASE=1'#013#010+
+ #013#010+
'# General compile rules, available for both possible .pp and .pas exte'+
- 'nsions'#010+
- #010+
- '.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res'#010+
- #010+
- '$(COMPILER_UNITTARGETDIR):'#010+
- ' ',' $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)'#010+
- #010+
- '$(COMPILER_TARGETDIR):'#010+
- ' $(MKDIRTREE) $(COMPILER_TARGETDIR)'#010+
- #010+
- '%$(PPUEXT): %.pp'#010+
- ' $(COMPILER) $<'#010+
- ' $(EXECPPAS)'#010+
- #010+
- '%$(PPUEXT): %.pas'#010+
- ' $(COMPILER) $<'#010+
- ' $(EXECPPAS)'#010+
- #010+
- '%$(','EXEEXT): %.pp'#010+
- ' $(COMPILER) $<'#010+
- ' $(EXECPPAS)'#010+
- #010+
- '%$(EXEEXT): %.pas'#010+
- ' $(COMPILER) $<'#010+
- ' $(EXECPPAS)'#010+
- #010+
- '%$(EXEEXT): %.lpr'#010+
- ' $(COMPILER) $<'#010+
- ' $(EXECPPAS)'#010+
- #010+
- '%$(EXEEXT): %.dpr'#010+
- ' $(COMPILER) $<'#010+
- ' $(EXECPPA','S)'#010+
- #010+
- '%.res: %.rc'#010+
- ' windres -i $< -o $@'#010+
- #010+
- '# Search paths for .ppu, .pp, .pas, .lpr, .dpr'#010+
- 'vpath %.pp $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
- 'vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
- 'vpath %.lpr $(COMPILER_SOURCEDIR) $','(COMPILER_INCLUDEDIR)'#010+
- 'vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#010+
- 'vpath %.inc $(COMPILER_INCLUDEDIR)'#010+
- 'vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)'#010+
- 'vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)'#010+
- #010+
- '[sharedrules]'#010+
- '###########################','#########################################'+
- '#'#010+
- '# Library'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_shared'#010+
- #010+
- 'override INSTALLTARGET+=fpc_shared_install'#010+
- #010+
- 'ifndef SHARED_LIBVERSION'#010+
- 'SHARED_LIBVERSION=$(FPC_VER','SION)'#010+
- 'endif'#010+
- #010+
- 'ifndef SHARED_LIBNAME'#010+
- 'SHARED_LIBNAME=$(PACKAGE_NAME)'#010+
- 'endif'#010+
- #010+
- 'ifndef SHARED_FULLNAME'#010+
+ 'nsions'#013#010+
+ #013#010+
+ '.SUFFI','XES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .lpr .dpr .pp .rc .res'#013+
+ #010+
+ #013#010+
+ '$(COMPILER_UNITTARGETDIR):'#013#010+
+ ' $(MKDIRTREE) $(COMPILER_UNITTARGETDIR)'#013#010+
+ #013#010+
+ '$(COMPILER_TARGETDIR):'#013#010+
+ ' $(MKDIRTREE) $(COMPILER_TARGETDIR)'#013#010+
+ #013#010+
+ '%$(PPUEXT): %.pp'#013#010+
+ ' $(','COMPILER) $<'#013#010+
+ ' $(EXECPPAS)'#013#010+
+ #013#010+
+ '%$(PPUEXT): %.pas'#013#010+
+ ' $(COMPILER) $<'#013#010+
+ ' $(EXECPPAS)'#013#010+
+ #013#010+
+ '%$(EXEEXT): %.pp'#013#010+
+ ' $(COMPILER) $<'#013#010+
+ ' $(EXECPPAS)'#013#010+
+ #013#010+
+ '%$(EXEEXT): %.pas'#013#010+
+ ' $(COMPILER) $<'#013#010+
+ ' $(EXECPPAS)'#013#010+
+ #013#010+
+ '%$(EXE','EXT): %.lpr'#013#010+
+ ' $(COMPILER) $<'#013#010+
+ ' $(EXECPPAS)'#013#010+
+ #013#010+
+ '%$(EXEEXT): %.dpr'#013#010+
+ ' $(COMPILER) $<'#013#010+
+ ' $(EXECPPAS)'#013#010+
+ #013#010+
+ '%.res: %.rc'#013#010+
+ ' windres -i $< -o $@'#013#010+
+ #013#010+
+ '# Search paths for .ppu, .pp, .pas, .lpr, .dpr'#013#010+
+ 'vpath %.pp $(COMPILER_','SOURCEDIR) $(COMPILER_INCLUDEDIR)'#013#010+
+ 'vpath %.pas $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#013#010+
+ 'vpath %.lpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#013#010+
+ 'vpath %.dpr $(COMPILER_SOURCEDIR) $(COMPILER_INCLUDEDIR)'#013#010+
+ 'vpath %.inc $(COMPILER_INCLUDED','IR)'#013#010+
+ 'vpath %$(OEXT) $(COMPILER_UNITTARGETDIR)'#013#010+
+ 'vpath %$(PPUEXT) $(COMPILER_UNITTARGETDIR)'#013#010+
+ #013#010+
+ '[sharedrules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Library'#013#010+
+ '##################################################','##################'+
+ '#'#013#010+
+ #013#010+
+ '.PHONY: fpc_shared'#013#010+
+ #013#010+
+ 'override INSTALLTARGET+=fpc_shared_install'#013#010+
+ #013#010+
+ 'ifndef SHARED_LIBVERSION'#013#010+
+ 'SHARED_LIBVERSION=$(FPC_VERSION)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifndef SHARED_LIBNAME'#013#010+
+ 'SHARED_LIBNAME=$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifndef SHARED_FU','LLNAME'#013#010+
'SHARED_FULLNAME=$(SHAREDLIBPREFIX)$(SHARED_LIBNAME)-$(SHARED_LIBVERSIO'+
- 'N)$(SHAREDLIBEXT)'#010+
- 'endif'#010+
+ 'N)$(SHAREDLIBEXT)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Default sharedlib units are all unit objects'#013#010+
+ 'ifndef SHARED_LIBUNITS'#013#010+
+ 'SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)'#013#010+
+ 'over','ride SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED'+
+ '_LIBUNITS))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_shared:'#013#010+
+ 'ifdef HASSHAREDLIB'#013#010+
+ ' $(MAKE) all CREATESHARED=1 LINKSHARED=1 CREATESMART=1'#013#010+
+ 'ifneq ($(SHARED_BUILD),n)'#013#010+
+ ' $(PPUMOVE) -q $(SHARED_','LIBUNITS) -i$(COMPILER_UNITTARGETDIR)'+
+ ' -o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ ' @$(ECHO) Shared Libraries not supported'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_shared_install:'#013#010+
+ 'ifneq ($(SHARED_BUILD),n)'#013#010+
+ 'ifneq ($(SHARED_LIBUNITS),)'#013#010+
+ 'ifne','q ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)'#013+
#010+
- '# Default sharedlib units are all unit objects'#010+
- 'if','ndef SHARED_LIBUNITS'#010+
- 'SHARED_LIBUNITS:=$(TARGET_UNITS) $(TARGET_IMPLICITUNITS)'#010+
- 'override SHARED_LIBUNITS:=$(filter-out $(INSTALL_BUILDUNIT),$(SHARED_L'+
- 'IBUNITS))'#010+
- 'endif'#010+
- #010+
- 'fpc_shared:'#010+
- 'ifdef HASSHAREDLIB'#010+
- ' $(MAKE) all CREATESHARED=1 LINKSHARE','D=1 CREATESMART=1'#010+
- 'ifneq ($(SHARED_BUILD),n)'#010+
- ' $(PPUMOVE) -q $(SHARED_LIBUNITS) -i$(COMPILER_UNITTARGETDIR) -'+
- 'o$(SHARED_FULLNAME) -d$(COMPILER_UNITTARGETDIR)'#010+
- 'endif'#010+
- 'else'#010+
- ' @$(ECHO) Shared Libraries not supported'#010+
- 'endif'#010+
- #010+
- 'fpc_shared_i','nstall:'#010+
- 'ifneq ($(SHARED_BUILD),n)'#010+
- 'ifneq ($(SHARED_LIBUNITS),)'#010+
- 'ifneq ($(wildcard $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME)),)'#010+
' $(INSTALL) $(COMPILER_UNITTARGETDIR)/$(SHARED_FULLNAME) $(INST'+
- 'ALL_SHAREDDIR)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '[install','rules]'#010+
- '#####################################################################'#010+
- '# Install rules'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall'#010+
- #010+
- 'ifdef INSTALL_UNIT','S'#010+
- 'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))'#010+
- 'endif'#010+
- #010+
- 'ifdef INSTALL_BUILDUNIT'#010+
+ 'ALL_SHAREDDIR)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '[installrules]'#013#010+
+ '####################################################','################'+
+ '#'#013#010+
+ '# Install rules'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_install fpc_sourceinstall fpc_exampleinstall'#013#010+
+ #013#010+
+ 'ifdef INSTALL_UNITS'#013#010+
+ 'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(','INSTALL_UNITS))'#013+
+ #010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef INSTALL_BUILDUNIT'#013#010+
'override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$'+
- '(INSTALLPPUFILES))'#010+
- 'endif'#010+
- #010+
- 'ifdef INSTALLPPUFILES'#010+
- 'override INSTALLPPULINK','FILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPU'+
+ '(INSTALLPPUFILES))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef INSTALLPPUFILES'#013#010+
+ 'override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPP','U'+
'FILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEX'+
'T),$(INSTALLPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEX'+
- 'T),$(STATICLIBEXT),$(INSTALLPPUFILES)))'#010+
- 'ifneq ($(UNITTA','RGETDIRPREFIX),)'#010+
- 'override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(notdir '+
- '$(INSTALLPPUFILES)))'#010+
+ 'T),$(STATICLIBEXT),$(INSTALLPPUFILES)))'#013#010+
+ 'ifneq ($(UNITTARGETDIRPREFIX),)'#013#010+
+ 'override INSTALLPPUFILES:','=$(addprefix $(UNITTARGETDIRPREFIX),$(notdi'+
+ 'r $(INSTALLPPUFILES)))'#013#010+
'override INSTALLPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPR'+
- 'EFIX),$(notdir $(INSTALLPPULINKFILES))))'#010+
- 'endif'#010+
- '# Implicitly in','stall Package.fpc'#010+
- 'override INSTALL_CREATEPACKAGEFPC=1'#010+
- 'endif'#010+
- #010+
- 'ifdef INSTALLEXEFILES'#010+
- 'ifneq ($(TARGETDIRPREFIX),)'#010+
+ 'EFIX),$(notdir $(INSTALLPPULINKFILES))))'#013#010+
+ 'endif'#013#010+
+ '# Implicitly install Package.fpc'#013#010+
+ 'override INSTALL_CRE','ATEPACKAGEFPC=1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef INSTALLEXEFILES'#013#010+
+ 'ifneq ($(TARGETDIRPREFIX),)'#013#010+
'override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(notdir $(IN'+
- 'STALLEXEFILES)))'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'fpc_install: all $(INSTALLTAR','GET)'#010+
- 'ifdef INSTALLEXEFILES'#010+
- ' $(MKDIR) $(INSTALL_BINDIR)'#010+
- '# Compress the exes if upx is defined'#010+
- 'ifdef UPXPROG'#010+
- ' -$(UPXPROG) $(INSTALLEXEFILES)'#010+
- 'endif'#010+
- ' $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)'#010+
- 'endif'#010+
- 'ifdef INSTALL_CR','EATEPACKAGEFPC'#010+
- 'ifdef FPCMAKE'#010+
+ 'STALLEXEFILES)))'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_install: all $(INSTALLTARGET)'#013#010+
+ 'ifdef INSTALLEXEFILES'#013#010,
+ ' $(MKDIR) $(INSTALL_BINDIR)'#013#010+
+ '# Compress the exes if upx is defined'#013#010+
+ 'ifdef UPXPROG'#013#010+
+ ' -$(UPXPROG) $(INSTALLEXEFILES)'#013#010+
+ 'endif'#013#010+
+ ' $(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)'#013#010+
+ 'endif'#013#010+
+ 'ifdef INSTALL_CREATEPACKAGEFPC'#013#010+
+ 'ifde','f FPCMAKE'#013#010+
'# If the fpcpackage variable is set then create and install Package.fp'+
- 'c,'#010+
- '# a safety check is done if Makefile.fpc is available'#010+
- 'ifdef PACKAGE_VERSION'#010+
- 'ifneq ($(wildcard Makefile.fpc),)'#010+
- ' $(FPCMAKE) -p -T$(CP','U_TARGET)-$(OS_TARGET) Makefile.fpc'#010+
- ' $(MKDIR) $(INSTALL_UNITDIR)'#010+
- ' $(INSTALL) Package.fpc $(INSTALL_UNITDIR)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifdef INSTALLPPUFILES'#010+
- ' $(MKDIR) $(INSTALL_UNITDIR)'#010+
- ' $(INSTALL) $(INSTALLPPUFILES',') $(INSTALL_UNITDIR)'#010+
- 'ifneq ($(INSTALLPPULINKFILES),)'#010+
- ' $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)'#010+
- 'endif'#010+
- 'ifneq ($(wildcard $(LIB_FULLNAME)),)'#010+
- ' $(MKDIR) $(INSTALL_LIBDIR)'#010+
- ' $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LIB','DIR)'#010+
- 'ifdef inUnix'#010+
- ' ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)'#010+
- 'endif'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifdef INSTALL_FILES'#010+
- ' $(MKDIR) $(INSTALL_DATADIR)'#010+
- ' $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)'#010+
- 'endif'#010+
- #010+
- 'fpc_sourceinstall: distcl','ean'#010+
- ' $(MKDIR) $(INSTALL_SOURCEDIR)'#010+
- ' $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)'#010+
- #010+
- 'fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))'#010+
- 'ifdef HASEXAMPLES'#010+
- ' $(MKDIR) $(INSTALL_EXAMPLEDIR)'#010+
- 'endif'#010+
- 'ifdef EXAMPLES','OURCEFILES'#010+
- ' $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)'#010+
- 'endif'#010+
- 'ifdef TARGET_EXAMPLEDIRS'#010+
+ 'c,'#013#010+
+ '# a safety check is done if Makefile.fpc is available'#013#010+
+ 'ifdef PACKAGE_VERSION'#013#010+
+ 'ifneq ($(wildcard Makefile.fpc),)'#013#010+
+ ' $(FPCMAKE) -p -T$(CPU_TARGET)-$(OS','_TARGET) Makefile.fpc'#013#010+
+ ' $(MKDIR) $(INSTALL_UNITDIR)'#013#010+
+ ' $(INSTALL) Package.fpc $(INSTALL_UNITDIR)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifdef INSTALLPPUFILES'#013#010+
+ ' $(MKDIR) $(INSTALL_UNITDIR)'#013#010+
+ ' $(INSTALL) $(INSTALLPPUFILES) $(I','NSTALL_UNITDIR)'#013#010+
+ 'ifneq ($(INSTALLPPULINKFILES),)'#013#010+
+ ' $(INSTALL) $(INSTALLPPULINKFILES) $(INSTALL_UNITDIR)'#013#010+
+ 'endif'#013#010+
+ 'ifneq ($(wildcard $(LIB_FULLNAME)),)'#013#010+
+ ' $(MKDIR) $(INSTALL_LIBDIR)'#013#010+
+ ' $(INSTALL) $(LIB_FULLNAME) $(INSTALL_LI','BDIR)'#013#010+
+ 'ifdef inUnix'#013#010+
+ ' ln -sf $(LIB_FULLNAME) $(INSTALL_LIBDIR)/$(LIB_NAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifdef INSTALL_FILES'#013#010+
+ ' $(MKDIR) $(INSTALL_DATADIR)'#013#010+
+ ' $(INSTALL) $(INSTALL_FILES) $(INSTALL_DATADIR)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_sourceins','tall: distclean'#013#010+
+ ' $(MKDIR) $(INSTALL_SOURCEDIR)'#013#010+
+ ' $(COPYTREE) $(BASEDIR)/* $(INSTALL_SOURCEDIR)'#013#010+
+ #013#010+
+ 'fpc_exampleinstall: $(addsuffix _distclean,$(TARGET_EXAMPLEDIRS))'#013#010+
+ 'ifdef HASEXAMPLES'#013#010+
+ ' $(MKDIR) $(INSTALL_EXAMPLEDIR)'#013#010+
+ 'e','ndif'#013#010+
+ 'ifdef EXAMPLESOURCEFILES'#013#010+
+ ' $(COPY) $(EXAMPLESOURCEFILES) $(INSTALL_EXAMPLEDIR)'#013#010+
+ 'endif'#013#010+
+ 'ifdef TARGET_EXAMPLEDIRS'#013#010+
' $(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EX'+
- 'AMPLEDIR)'#010+
- 'endif'#010+
- #010+
- '[distinstallrules]'#010+
- '################################','####################################'+
- '#'#010+
- '# Dist Install'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_distinstall'#010+
- #010+
- 'fpc_distinstall: install exampleinstall'#010+
- #010+
- #010+
- '[zipinstallrules]'#010+
- '###############################','#####################################'+
- '#'#010+
- '# Zip'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall'#010+
- #010+
- '# Temporary path to pack a file, can only use a single de','ep'#010+
- '# subdir, because the deltree can'#039't see the whole tree to remove'#010+
- 'ifndef PACKDIR'#010+
- 'ifndef inUnix'#010+
- 'PACKDIR=$(BASEDIR)/../fpc-pack'#010+
- 'else'#010+
- 'PACKDIR=/tmp/fpc-pack'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Maybe create default zipname from packagename'#010+
- 'ifndef ZIPNAME'#010+
- 'ifdef DIS','T_ZIPNAME'#010+
- 'ZIPNAME=$(DIST_ZIPNAME)'#010+
- 'else'#010+
- 'ZIPNAME=$(PACKAGE_NAME)'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- 'ifndef FULLZIPNAME'#010+
- 'FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)'#010+
- 'endif'#010+
- #010+
- '# ZipTarget'#010+
- 'ifndef ZIPTARGET'#010+
- 'ifdef DIST_ZIPTARGET'#010+
- 'ZIPTARGET=DIST_ZIPTARGET',#010+
- 'else'#010+
- 'ZIPTARGET=install'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Use tar by default under linux'#010+
- 'ifndef USEZIP'#010+
- 'ifdef inUnix'#010+
- 'USETAR=1'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Use a wrapper script by default for Os/2'#010+
- 'ifndef inUnix'#010+
- 'USEZIPWRAPPER=1'#010+
- 'endif'#010+
- #010+
- '# We need to be able to run in the curren','t OS so fix'#010+
- '# the path separator'#010+
- 'ifdef USEZIPWRAPPER'#010+
- 'ZIPPATHSEP=$(PATHSEP)'#010+
- 'ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))'#010+
- 'else'#010+
- 'ZIPPATHSEP=/'#010+
- 'endif'#010+
- #010+
- '# Create commands to create the zip/tar file'#010+
- 'ZIPCMD_CDPACK:=cd $(subst',' /,$(ZIPPATHSEP),$(PACKDIR))'#010+
- 'ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))'#010+
- 'ifdef USETAR'#010+
- 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(TAREXT)'#010+
- 'ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *'#010+
- 'else'#010+
- 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FUL','LZIPNAME)$(ZIPEXT)'#010+
+ 'AMPLEDIR)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '[distinstallrules]'#013#010+
+ '####','################################################################'+
+ '#'#013#010+
+ '# Dist Install'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_distinstall'#013#010+
+ #013#010+
+ 'fpc_distinstall: install exampleinstall'#013#010+
+ #013#010+
+ #013#010+
+ '[zipinstallr','ules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Zip'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall'#013#010+
+ #013#010+
+ '# Temporary p','ath to pack a file, can only use a single deep'#013#010+
+ '# subdir, because the deltree can'#039't see the whole tree to remove'#013+
+ #010+
+ 'ifndef PACKDIR'#013#010+
+ 'ifndef inUnix'#013#010+
+ 'PACKDIR=$(BASEDIR)/../fpc-pack'#013#010+
+ 'else'#013#010+
+ 'PACKDIR=/tmp/fpc-pack'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Maybe create def','ault zipname from packagename'#013#010+
+ 'ifndef ZIPNAME'#013#010+
+ 'ifdef DIST_ZIPNAME'#013#010+
+ 'ZIPNAME=$(DIST_ZIPNAME)'#013#010+
+ 'else'#013#010+
+ 'ZIPNAME=$(PACKAGE_NAME)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifndef FULLZIPNAME'#013#010+
+ 'FULLZIPNAME=$(ZIPCROSSPREFIX)$(ZIPPREFIX)$(ZIPNAME)$(ZIPSUFFIX)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# ZipTa','rget'#013#010+
+ 'ifndef ZIPTARGET'#013#010+
+ 'ifdef DIST_ZIPTARGET'#013#010+
+ 'ZIPTARGET=DIST_ZIPTARGET'#013#010+
+ 'else'#013#010+
+ 'ZIPTARGET=install'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Use tar by default under linux'#013#010+
+ 'ifndef USEZIP'#013#010+
+ 'ifdef inUnix'#013#010+
+ 'USETAR=1'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Use a wrapper script by default for ','Os/2'#013#010+
+ 'ifndef inUnix'#013#010+
+ 'USEZIPWRAPPER=1'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# We need to be able to run in the current OS so fix'#013#010+
+ '# the path separator'#013#010+
+ 'ifdef USEZIPWRAPPER'#013#010+
+ 'ZIPPATHSEP=$(PATHSEP)'#013#010+
+ 'ZIPWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpczip$(SRCBATCHEXT))'#013+
+ #010+
+ 'el','se'#013#010+
+ 'ZIPPATHSEP=/'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Create commands to create the zip/tar file'#013#010+
+ 'ZIPCMD_CDPACK:=cd $(subst /,$(ZIPPATHSEP),$(PACKDIR))'#013#010+
+ 'ZIPCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))'#013#010+
+ 'ifdef USETAR'#013#010+
+ 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)','$(TAREXT)'#013#010+
+ 'ZIPCMD_ZIP:=$(TARPROG) c$(TAROPT)f $(ZIPDESTFILE) *'#013#010+
+ 'else'#013#010+
+ 'ZIPDESTFILE:=$(DIST_DESTDIR)/$(FULLZIPNAME)$(ZIPEXT)'#013#010+
'ZIPCMD_ZIP:=$(subst /,$(ZIPPATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDES'+
- 'TFILE) *'#010+
- 'endif'#010+
- #010+
- 'fpc_zipinstall:'#010+
- ' $(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1'#010+
- ' $(MKDIR) $(DIST_DESTDIR)'#010+
- ' $(DEL) $(Z','IPDESTFILE)'#010+
- 'ifdef USEZIPWRAPPER'#010+
- '# Handle gecho separate as we need to espace \ with \\'#010+
- 'ifneq ($(ECHOREDIR),echo)'#010+
- ' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAPPE'+
- 'R)'#010+
- ' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" ','>> $(ZIPWRAPPE'+
- 'R)'#010+
+ 'TFILE) *'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_zipinstall:'#013#010+
+ ' $(','MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1'#013+
+ #010+
+ ' $(MKDIR) $(DIST_DESTDIR)'#013#010+
+ ' $(DEL) $(ZIPDESTFILE)'#013#010+
+ 'ifdef USEZIPWRAPPER'#013#010+
+ '# Handle gecho separate as we need to espace \ with \\'#013#010+
+ 'ifneq ($(ECHOREDIR),echo)'#013#010+
+ ' $(EC','HOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDPACK))" > $(ZIPWRAP'+
+ 'PER)'#013#010+
+ ' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_ZIP))" >> $(ZIPWRAPPER)'+
+ #013#010+
' $(ECHOREDIR) -e "$(subst \,\\,$(ZIPCMD_CDBASE))" >> $(ZIPWRAPP'+
- 'ER)'#010+
- 'else'#010+
- ' echo $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)'#010+
- ' echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)'#010+
- ' echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)'#010+
- 'endif'#010+
- 'i','fdef inUnix'#010+
- ' /bin/sh $(ZIPWRAPPER)'#010+
- 'else'#010+
- 'ifdef RUNBATCH'#010+
- ' $(RUNBATCH) $(ZIPWRAPPER)'#010+
- 'else'#010+
- ' $(ZIPWRAPPER)'#010+
- 'endif'#010+
- 'endif'#010+
- ' $(DEL) $(ZIPWRAPPER)'#010+
- 'else'#010+
- ' $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)'#010+
- 'endif'#010+
- ' ',' $(DELTREE) $(PACKDIR)'#010+
- #010+
- 'fpc_zipsourceinstall:'#010+
- ' $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=$(ZIP'+
- 'SOURCESUFFIX)'#010+
- #010+
- 'fpc_zipexampleinstall:'#010+
- 'ifdef HASEXAMPLES'#010+
- ' $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=','$('+
- 'ZIPEXAMPLESUFFIX)'#010+
- 'endif'#010+
- #010+
- 'fpc_zipdistinstall:'#010+
- ' $(MAKE) fpc_zipinstall ZIPTARGET=distinstall'#010+
- #010+
- #010+
- '[cleanrules]'#010+
- '#####################################################################'#010+
- '# Clean rules'#010+
- '#########################################','###########################'+
- '#'#010+
- #010+
- '.PHONY: fpc_clean fpc_cleanall fpc_distclean'#010+
- #010+
- 'ifdef EXEFILES'#010+
+ 'ER)'#013#010+
+ 'else'#013#010+
+ ' echo $(ZIPCMD_CDP','ACK) > $(ZIPWRAPPER)'#013#010+
+ ' echo $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)'#013#010+
+ ' echo $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)'#013#010+
+ 'endif'#013#010+
+ 'ifdef inUnix'#013#010+
+ ' /bin/sh $(ZIPWRAPPER)'#013#010+
+ 'else'#013#010+
+ 'ifdef RUNBATCH'#013#010+
+ ' $(RUNBATCH) $(ZIPWRAPPER)'#013#010+
+ 'else'#013#010+
+ ' $(','ZIPWRAPPER)'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ ' $(DEL) $(ZIPWRAPPER)'#013#010+
+ 'else'#013#010+
+ ' $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)'#013#010+
+ 'endif'#013#010+
+ ' $(DELTREE) $(PACKDIR)'#013#010+
+ #013#010+
+ 'fpc_zipsourceinstall:'#013#010+
+ ' $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstal','l ZIPSUFFIX=$(Z'+
+ 'IPSOURCESUFFIX)'#013#010+
+ #013#010+
+ 'fpc_zipexampleinstall:'#013#010+
+ 'ifdef HASEXAMPLES'#013#010+
+ ' $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=$(ZI'+
+ 'PEXAMPLESUFFIX)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_zipdistinstall:'#013#010+
+ ' $(MAKE) fpc_zipinstall ZIPTARGET=disti','nstall'#013#010+
+ #013#010+
+ #013#010+
+ '[cleanrules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Clean rules'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_clean fpc_cleanall fpc_distclean'#013#010+
+ #013#010+
+ 'ifdef E','XEFILES'#013#010+
'override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES'+
- '))'#010+
- 'endif'#010+
- #010+
- 'ifdef CLEAN_PROGRAMS'#010+
- 'override CLEANEXEFILES+=$(addprefix $(TARGETDIRP','REFIX),$(addsuffix $'+
- '(EXEEXT), $(CLEAN_PROGRAMS)))'#010+
- 'endif'#010+
- #010+
- 'ifdef CLEAN_UNITS'#010+
- 'override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))'#010+
- 'endif'#010+
- #010+
- 'ifdef CLEANPPUFILES'#010+
+ '))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef CLEAN_PROGRAMS'#013#010+
+ 'override CLEANEXEFILES+=$(addprefix $(TARGETDIRPREFIX),$(addsuffix $(E'+
+ 'XEEXT), $(CLEAN_PROGRAMS)))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef CLEAN_UNITS'#013,#010+
+ 'override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(CLEAN_UNITS))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'ifdef CLEANPPUFILES'#013#010+
'override CLEANPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)'+
- ') $(ad','dprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$'+
- '(CLEANPPUFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(S'+
- 'TATICLIBEXT),$(CLEANPPUFILES)))'#010+
- 'ifdef DEBUGSYMEXT'#010+
- 'override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEX','T),$(CLEAN'+
- 'PPUFILES))'#010+
- 'endif'#010+
- 'override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUF'+
- 'ILES))'#010+
+ ') $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(C'+
+ 'LEANPP','UFILES))) $(addprefix $(IMPORTLIBPREFIX),$(subst $(PPUEXT),$(S'+
+ 'TATICLIBEXT),$(CLEANPPUFILES)))'#013#010+
+ 'ifdef DEBUGSYMEXT'#013#010+
+ 'override CLEANPPULINKFILES+=$(subst $(PPUEXT),$(DEBUGSYMEXT),$(CLEANPP'+
+ 'UFILES))'#013#010+
+ 'endif'#013#010+
+ 'override CLEANPPUFILES:=$(addprefix $(U','NITTARGETDIRPREFIX),$(CLEANPP'+
+ 'UFILES))'#013#010+
'override CLEANPPULINKFILES:=$(wildcard $(addprefix $(UNITTARGETDIRPREF'+
- 'IX),$(CLEANPPULINKFILES)))'#010+
- 'endif'#010+
- #010+
- 'fpc_clean: $(CLEANTARGET)'#010+
- 'ifdef ','CLEANEXEFILES'#010+
- ' -$(DEL) $(CLEANEXEFILES)'#010+
- 'endif'#010+
- 'ifdef CLEANPPUFILES'#010+
- ' -$(DEL) $(CLEANPPUFILES)'#010+
- 'endif'#010+
- 'ifneq ($(CLEANPPULINKFILES),)'#010+
- ' -$(DEL) $(CLEANPPULINKFILES)'#010+
- 'endif'#010+
- 'ifdef CLEANRSTFILES'#010+
- ' -$(DEL) $(addprefix $(UNITT','ARGETDIRPREFIX),$(CLEANRSTFILES))'+
- #010+
- 'endif'#010+
- 'ifdef CLEAN_FILES'#010+
- ' -$(DEL) $(CLEAN_FILES)'#010+
- 'endif'#010+
- 'ifdef LIB_NAME'#010+
- ' -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)'#010+
- 'endif'#010+
+ 'IX),$(CLEANPPULINKFILES)))'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_clean: $(CLEANTARGET)'#013#010+
+ 'ifdef CLEANEXEFILES'#013#010+
+ ' -$(DEL) $(CLEANEXEFILES)'#013#010+
+ 'endif'#013#010+
+ 'ifdef',' CLEANPPUFILES'#013#010+
+ ' -$(DEL) $(CLEANPPUFILES)'#013#010+
+ 'endif'#013#010+
+ 'ifneq ($(CLEANPPULINKFILES),)'#013#010+
+ ' -$(DEL) $(CLEANPPULINKFILES)'#013#010+
+ 'endif'#013#010+
+ 'ifdef CLEANRSTFILES'#013#010+
+ ' -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))'#013+
+ #010+
+ 'endif'#013#010+
+ 'ifdef CLE','AN_FILES'#013#010+
+ ' -$(DEL) $(CLEAN_FILES)'#013#010+
+ 'endif'#013#010+
+ 'ifdef LIB_NAME'#013#010+
+ ' -$(DEL) $(LIB_NAME) $(LIB_FULLNAME)'#013#010+
+ 'endif'#013#010+
' -$(DEL) $(FPCMADE) Package.fpc $(PPAS) script.res link.res $(F'+
- 'PCEXTFILE)',' $(REDIRFILE)'#010+
- ' -$(DEL) *$(ASMEXT) *_ppas$(BATCHEXT)'#010+
- #010+
- 'fpc_cleanall: $(CLEANTARGET)'#010+
- 'ifdef CLEANEXEFILES'#010+
- ' -$(DEL) $(CLEANEXEFILES)'#010+
- 'endif'#010+
- 'ifdef COMPILER_UNITTARGETDIR'#010+
- 'ifdef CLEANPPUFILES'#010+
- ' -$(DEL) $(CLEANPPUFILES)'#010+
- 'endif'#010+
- 'ifne','q ($(CLEANPPULINKFILES),)'#010+
- ' -$(DEL) $(CLEANPPULINKFILES)'#010+
- 'endif'#010+
- 'ifdef CLEANRSTFILES'#010+
- ' -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))'#010+
- 'endif'#010+
- 'endif'#010+
- 'ifdef CLEAN_FILES'#010+
- ' -$(DEL) $(CLEAN_FILES)'#010+
- 'endif'#010+
- ' -$(DELT','REE) units'#010+
- ' -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIB'+
- 'EXT) *$(SHAREDLIBEXT) *$(PPLEXT)'#010+
- 'ifneq ($(PPUEXT),.ppu)'#010+
- ' -$(DEL) *.o *.ppu *.a'#010+
- 'endif'#010+
- ' -$(DELTREE) *$(SMARTEXT)'#010+
- ' -$(DEL) fpcmade.* Package.','fpc $(PPAS) script.res link.res $('+
- 'FPCEXTFILE) $(REDIRFILE)'#010+
- ' -$(DEL) *_ppas$(BATCHEXT)'#010+
- 'ifdef AOUTEXT'#010+
- ' -$(DEL) *$(AOUTEXT)'#010+
- 'endif'#010+
- 'ifdef DEBUGSYMEXT'#010+
- ' -$(DEL) *$(DEBUGSYMEXT)'#010+
- 'endif'#010+
- #010+
- 'fpc_distclean: cleanall'#010+
- #010+
- #010+
- '[baseinforules]'#010,
- '#####################################################################'#010+
- '# Base info rules'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_baseinfo'#010+
- #010+
- 'override INFORULES+=fpc_baseinfo'#010+
- #010+
- 'fpc_baseinfo:'#010+
- ' @$(','ECHO)'#010+
- ' @$(ECHO) == Package info =='#010+
- ' @$(ECHO) Package Name..... $(PACKAGE_NAME)'#010+
- ' @$(ECHO) Package Version.. $(PACKAGE_VERSION)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) == Configuration info =='#010+
- ' @$(ECHO)'#010+
- ' @$(EC','HO) FPC.......... $(FPC)'#010+
- ' @$(ECHO) FPC Version.. $(FPC_VERSION)'#010+
- ' @$(ECHO) Source CPU... $(CPU_SOURCE)'#010+
- ' @$(ECHO) Target CPU... $(CPU_TARGET)'#010+
- ' @$(ECHO) Source OS.... $(OS_SOURCE)'#010+
- ' @$(ECHO) Target OS...','. $(OS_TARGET)'#010+
- ' @$(ECHO) Full Source.. $(FULL_SOURCE)'#010+
- ' @$(ECHO) Full Target.. $(FULL_TARGET)'#010+
- ' @$(ECHO) SourceSuffix. $(SOURCESUFFIX)'#010+
- ' @$(ECHO) TargetSuffix. $(TARGETSUFFIX)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) ','== Directory info =='#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Basedir......... $(BASEDIR)'#010+
- ' @$(ECHO) FPCDir.......... $(FPCDIR)'#010+
- ' @$(ECHO) CrossBinDir..... $(CR','OSSBINDIR)'#010+
- ' @$(ECHO) UnitsDir........ $(UNITSDIR)'#010+
- ' @$(ECHO) PackagesDir..... $(PACKAGESDIR)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) GCC library..... $(GCCLIBDIR)'#010+
- ' @$(ECHO) Other library... $(OTHERLIBDIR)'#010+
- ' @$(ECHO)'#010,
- ' @$(ECHO) == Tools info =='#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) As........ $(AS)'#010+
- ' @$(ECHO) Ld........ $(LD)'#010+
- ' @$(ECHO) Ar........ $(AR)'#010+
- ' @$(ECHO) Rc........ $(RC)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Mv........ $(','MVPROG)'#010+
- ' @$(ECHO) Cp........ $(CPPROG)'#010+
- ' @$(ECHO) Rm........ $(RMPROG)'#010+
- ' @$(ECHO) GInstall.. $(GINSTALL)'#010+
- ' @$(ECHO) Echo...... $(ECHO)'#010+
- ' @$(ECHO) Shell..... $(SHELL)'#010+
- ' @$(ECHO) Date...... $(DATE)'#010+
- ' ',' @$(ECHO) FPCMake... $(FPCMAKE)'#010+
- ' @$(ECHO) PPUMove... $(PPUMOVE)'#010+
- ' @$(ECHO) Upx....... $(UPXPROG)'#010+
- ' @$(ECHO) Zip....... $(ZIPPROG)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) == Object info =='#010+
- ' @$(ECHO)'#010+
- ' @$(','ECHO) Target Loaders........ $(TARGET_LOADERS)'#010+
- ' @$(ECHO) Target Units.......... $(TARGET_UNITS)'#010+
- ' @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)'#010+
- ' @$(ECHO) Target Programs....... $(TARGET_PROGRAMS)'#010+
- ' @$','(ECHO) Target Dirs........... $(TARGET_DIRS)'#010+
- ' @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)'#010+
- ' @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Clean Units......... $(CLEAN_UNITS)'#010,
- ' @$(ECHO) Clean Files......... $(CLEAN_FILES)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Install Units....... $(INSTALL_UNITS)'#010+
- ' @$(ECHO) Install Files....... $(INSTALL_FILES)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) == Install info =='#010+
- ' ',' @$(ECHO)'#010+
- ' @$(ECHO) DateStr.............. $(DATESTR)'#010+
- ' @$(ECHO) ZipName.............. $(ZIPNAME)'#010+
- ' @$(ECHO) ZipPrefix............ $(ZIPPREFIX)'#010+
- ' @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)'#010+
- ' @$(EC','HO) ZipSuffix............ $(ZIPSUFFIX)'#010+
- ' @$(ECHO) FullZipName.......... $(FULLZIPNAME)'#010+
- ' @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)'#010+
- ' ',' @$(ECHO) Install binary dir... $(INSTALL_BINDIR)'#010+
- ' @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)'#010+
- ' @$(ECHO) Install units dir.... $(INSTALL_UNITDIR)'#010+
- ' @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)'#010+
- ' @$(','ECHO) Install doc dir...... $(INSTALL_DOCDIR)'#010+
- ' @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)'#010+
- ' @$(ECHO) Install data dir..... $(INSTALL_DATADIR)'#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Dist destination dir. $(DIST_DESTDIR)',#010+
- ' @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)'#010+
- ' @$(ECHO)'#010+
- #010+
- '[inforules]'#010+
- '#####################################################################'#010+
- '# Info rules'#010+
- '#####################################################################'#010,
- #010+
- '.PHONY: fpc_info'#010+
- #010+
- 'fpc_info: $(INFORULES)'#010+
- #010+
- '[makefilerules]'#010+
- '#####################################################################'#010+
- '# Rebuild Makefile'#010+
- '#####################################################################'#010+
- #010+
- '.PHONY: fpc_makefile ','fpc_makefiles fpc_makefile_sub1 fpc_makefile_su'+
- 'b2 \'#010+
- ' fpc_makefile_dirs'#010+
- #010+
- 'fpc_makefile:'#010+
- ' $(FPCMAKE) -w -T$(OS_TARGET) Makefile.fpc'#010+
- #010+
- 'fpc_makefile_sub1:'#010+
- 'ifdef TARGET_DIRS'#010+
- ' $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.','fpc,$(TAR'+
- 'GET_DIRS))'#010+
- 'endif'#010+
- 'ifdef TARGET_EXAMPLEDIRS'#010+
+ 'PCEXTFILE) $(REDIRFILE)'#013#010+
+ ' -$(DEL) *$(ASMEXT) *','_ppas$(BATCHEXT)'#013#010+
+ #013#010+
+ 'fpc_cleanall: $(CLEANTARGET)'#013#010+
+ 'ifdef CLEANEXEFILES'#013#010+
+ ' -$(DEL) $(CLEANEXEFILES)'#013#010+
+ 'endif'#013#010+
+ 'ifdef COMPILER_UNITTARGETDIR'#013#010+
+ 'ifdef CLEANPPUFILES'#013#010+
+ ' -$(DEL) $(CLEANPPUFILES)'#013#010+
+ 'endif'#013#010+
+ 'ifneq ($(CLEANPPULINKFILES),)'#013#010+
+ ' ',' -$(DEL) $(CLEANPPULINKFILES)'#013#010+
+ 'endif'#013#010+
+ 'ifdef CLEANRSTFILES'#013#010+
+ ' -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))'#013+
+ #010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'ifdef CLEAN_FILES'#013#010+
+ ' -$(DEL) $(CLEAN_FILES)'#013#010+
+ 'endif'#013#010+
+ ' -$(DELTREE) units'#013#010+
+ ' -$','(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICL'+
+ 'IBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)'#013#010+
+ 'ifneq ($(PPUEXT),.ppu)'#013#010+
+ ' -$(DEL) *.o *.ppu *.a'#013#010+
+ 'endif'#013#010+
+ ' -$(DELTREE) *$(SMARTEXT)'#013#010+
+ ' -$(DEL) fpcmade.* Package.fpc $(PPAS) scri','pt.res link.res $('+
+ 'FPCEXTFILE) $(REDIRFILE)'#013#010+
+ ' -$(DEL) *_ppas$(BATCHEXT)'#013#010+
+ 'ifdef AOUTEXT'#013#010+
+ ' -$(DEL) *$(AOUTEXT)'#013#010+
+ 'endif'#013#010+
+ 'ifdef DEBUGSYMEXT'#013#010+
+ ' -$(DEL) *$(DEBUGSYMEXT)'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ 'fpc_distclean: cleanall'#013#010+
+ #013#010+
+ #013#010+
+ '[baseinforules]'#013#010+
+ '###','#################################################################'+
+ '#'#013#010+
+ '# Base info rules'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_baseinfo'#013#010+
+ #013#010+
+ 'override INFORULES+=fpc_baseinfo'#013#010+
+ #013#010+
+ 'fpc_baseinfo:'#013#010+
+ ' ',' @$(ECHO)'#013#010+
+ ' @$(ECHO) == Package info =='#013#010+
+ ' @$(ECHO) Package Name..... $(PACKAGE_NAME)'#013#010+
+ ' @$(ECHO) Package Version.. $(PACKAGE_VERSION)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) == Configuration info =='#013#010+
+ ' @$(ECHO)'#013#010,
+ ' @$(ECHO) FPC.......... $(FPC)'#013#010+
+ ' @$(ECHO) FPC Version.. $(FPC_VERSION)'#013#010+
+ ' @$(ECHO) Source CPU... $(CPU_SOURCE)'#013#010+
+ ' @$(ECHO) Target CPU... $(CPU_TARGET)'#013#010+
+ ' @$(ECHO) Source OS.... $(OS_SOURCE)'#013#010+
+ ' @$(E','CHO) Target OS.... $(OS_TARGET)'#013#010+
+ ' @$(ECHO) Full Source.. $(FULL_SOURCE)'#013#010+
+ ' @$(ECHO) Full Target.. $(FULL_TARGET)'#013#010+
+ ' @$(ECHO) SourceSuffix. $(SOURCESUFFIX)'#013#010+
+ ' @$(ECHO) TargetSuffix. $(TARGETSUFFIX)'#013#010+
+ ' @$(E','CHO)'#013#010+
+ ' @$(ECHO) == Directory info =='#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) Required pkgs... $(REQUIRE_PACKAGES)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) Basedir......... $(BASEDIR)'#013#010+
+ ' @$(ECHO) FPCDir.......... $(FPCDIR)'#013#010+
+ ' @','$(ECHO) CrossBinDir..... $(CROSSBINDIR)'#013#010+
+ ' @$(ECHO) UnitsDir........ $(UNITSDIR)'#013#010+
+ ' @$(ECHO) PackagesDir..... $(PACKAGESDIR)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) GCC library..... $(GCCLIBDIR)'#013#010+
+ ' @$(ECHO) Other library.','.. $(OTHERLIBDIR)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) == Tools info =='#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) As........ $(AS)'#013#010+
+ ' @$(ECHO) Ld........ $(LD)'#013#010+
+ ' @$(ECHO) Ar........ $(AR)'#013#010+
+ ' @$(ECHO) Rc........ $(RC)'#013#010+
+ ' ',' @$(ECHO)'#013#010+
+ ' @$(ECHO) Mv........ $(MVPROG)'#013#010+
+ ' @$(ECHO) Cp........ $(CPPROG)'#013#010+
+ ' @$(ECHO) Rm........ $(RMPROG)'#013#010+
+ ' @$(ECHO) GInstall.. $(GINSTALL)'#013#010+
+ ' @$(ECHO) Echo...... $(ECHO)'#013#010+
+ ' @$(ECHO) Shell....','. $(SHELL)'#013#010+
+ ' @$(ECHO) Date...... $(DATE)'#013#010+
+ ' @$(ECHO) FPCMake... $(FPCMAKE)'#013#010+
+ ' @$(ECHO) PPUMove... $(PPUMOVE)'#013#010+
+ ' @$(ECHO) Upx....... $(UPXPROG)'#013#010+
+ ' @$(ECHO) Zip....... $(ZIPPROG)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' ','@$(ECHO) == Object info =='#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) Target Loaders........ $(TARGET_LOADERS)'#013#010+
+ ' @$(ECHO) Target Units.......... $(TARGET_UNITS)'#013#010+
+ ' @$(ECHO) Target Implicit Units. $(TARGET_IMPLICITUNITS)'#013#010+
+ ' @','$(ECHO) Target Programs....... $(TARGET_PROGRAMS)'#013#010+
+ ' @$(ECHO) Target Dirs........... $(TARGET_DIRS)'#013#010+
+ ' @$(ECHO) Target Examples....... $(TARGET_EXAMPLES)'#013#010+
+ ' @$(ECHO) Target ExampleDirs.... $(TARGET_EXAMPLEDIRS)'#013#010+
+ ' ',' @$(ECHO)'#013#010+
+ ' @$(ECHO) Clean Units......... $(CLEAN_UNITS)'#013#010+
+ ' @$(ECHO) Clean Files......... $(CLEAN_FILES)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) Install Units....... $(INSTALL_UNITS)'#013#010+
+ ' @$(ECHO) Install Files....... $(IN','STALL_FILES)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) == Install info =='#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) DateStr.............. $(DATESTR)'#013#010+
+ ' @$(ECHO) ZipName.............. $(ZIPNAME)'#013#010+
+ ' @$(ECHO) ZipPrefix............ $(ZIPPRE','FIX)'#013#010+
+ ' @$(ECHO) ZipCrossPrefix....... $(ZIPCROSSPREFIX)'#013#010+
+ ' @$(ECHO) ZipSuffix............ $(ZIPSUFFIX)'#013#010+
+ ' @$(ECHO) FullZipName.......... $(FULLZIPNAME)'#013#010+
+ ' @$(ECHO) Install FPC Package.. $(INSTALL_FPCPACKAGE)'#013#010+
+ ' ',' @$(ECHO)'#013#010+
+ ' @$(ECHO) Install base dir..... $(INSTALL_BASEDIR)'#013#010+
+ ' @$(ECHO) Install binary dir... $(INSTALL_BINDIR)'#013#010+
+ ' @$(ECHO) Install library dir.. $(INSTALL_LIBDIR)'#013#010+
+ ' @$(ECHO) Install units dir.... $(INST','ALL_UNITDIR)'#013#010+
+ ' @$(ECHO) Install source dir... $(INSTALL_SOURCEDIR)'#013#010+
+ ' @$(ECHO) Install doc dir...... $(INSTALL_DOCDIR)'#013#010+
+ ' @$(ECHO) Install example dir.. $(INSTALL_EXAMPLEDIR)'#013#010+
+ ' @$(ECHO) Install data dir..... $(','INSTALL_DATADIR)'#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) Dist destination dir. $(DIST_DESTDIR)'#013#010+
+ ' @$(ECHO) Dist zip name........ $(DIST_ZIPNAME)'#013#010+
+ ' @$(ECHO)'#013#010+
+ #013#010+
+ '[inforules]'#013#010+
+ '#########################################################','###########'+
+ '#'#013#010+
+ '# Info rules'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_info'#013#010+
+ #013#010+
+ 'fpc_info: $(INFORULES)'#013#010+
+ #013#010+
+ '[makefilerules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# Reb','uild Makefile'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '.PHONY: fpc_makefile fpc_makefiles fpc_makefile_sub1 fpc_makefile_sub2'+
+ ' \'#013#010+
+ ' fpc_makefile_dirs'#013#010+
+ #013#010+
+ 'fpc_makefile:'#013#010+
+ ' $(FPCMAKE) -w -T$(OS_TARGE','T) Makefile.fpc'#013#010+
+ #013#010+
+ 'fpc_makefile_sub1:'#013#010+
+ 'ifdef TARGET_DIRS'#013#010+
' $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARGE'+
- 'T_EXAMPLEDIRS))'#010+
- 'endif'#010+
- #010+
+ 'T_DIRS))'#013#010+
+ 'endif'#013#010+
+ 'ifdef TARGET_EXAMPLEDIRS'#013#010+
+ ' $(FPCMAKE) -w -T$(OS_TARGET) $(addsuffix /Makefile.fpc,$(TARG',
+ 'ET_EXAMPLEDIRS))'#013#010+
+ 'endif'#013#010+
+ #013#010+
'fpc_makefile_sub2: $(addsuffix _makefile_dirs,$(TARGET_DIRS) $(TARGET_'+
- 'EXAMPLEDIRS))'#010+
- #010+
- 'fpc_makefil','e_dirs: fpc_makefile_sub1 fpc_makefile_sub2'#010+
- #010+
- 'fpc_makefiles: fpc_makefile fpc_makefile_dirs'#010+
- #010+
- '[localmakefile]'#010+
- '#####################################################################'#010+
- '# Local Makefile'#010+
- '#############################################','#######################'+
- '#'#010+
- #010+
- 'ifneq ($(wildcard fpcmake.loc),)'#010+
- 'include fpcmake.loc'#010+
- 'endif'#010+
- #010+
- #010+
- '[userrules]'#010+
- '#####################################################################'#010+
- '# Users rules'#010+
- '#########################################################','###########'+
- '#'#010+
- #010+
- '[lclrules]'#010+
- '#####################################################################'#010+
- '# LCL Rules'#010+
- '#####################################################################'#010+
- #010+
- '# LCL Platform'#010+
- 'ifndef LCL_PLATFORM'#010+
- 'ifneq ($(findstring $(OS_TA','RGET),win32 win64),)'#010+
- 'LCL_PLATFORM=win32'#010+
- 'else'#010+
- 'LCL_PLATFORM=gtk'#010+
- 'endif'#010+
- 'endif'#010+
- 'export LCL_PLATFORM'#010+
- #010+
- '# Check if the specified LCLDIR is correct'#010+
- 'ifdef LCLDIR'#010+
- 'override LCLDIR:=$(subst \,/,$(LCLDIR))'#010+
- 'ifeq ($(wildcard $(LCLDIR)/units/$(LCL_PLATFORM))',',)'#010+
- 'override LCLDIR=wrong'#010+
- 'endif'#010+
- 'else'#010+
- 'override LCLDIR=wrong'#010+
- 'endif'#010+
- #010+
- '# Check if the default LCLDIR is correct'#010+
- 'ifdef DEFAULT_LCLDIR'#010+
- 'override LCLDIR:=$(subst \,/,$(DEFAULT_LCLDIR))'#010+
- 'ifeq ($(wildcard $(LCLDIR)/units/$(LCL_PLATFORM)),)'#010+
- 'override LCLD','IR=wrong'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Check for development version'#010+
- 'ifeq ($(LCLDIR),wrong)'#010+
+ 'EXAMPLEDIRS))'#013#010+
+ #013#010+
+ 'fpc_makefile_dirs: fpc_makefile_sub1 fpc_makefile_sub2'#013#010+
+ #013#010+
+ 'fpc_makefiles: fpc_makefile fpc_makefile_dirs'#013#010+
+ #013#010+
+ '[localmakefile]'#013#010+
+ '##','##################################################################'+
+ '#'#013#010+
+ '# Local Makefile'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ 'ifneq ($(wildcard fpcmake.loc),)'#013#010+
+ 'include fpcmake.loc'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ #013#010+
+ '[userrules]'#013#010+
+ '#','###################################################################'+
+ '#'#013#010+
+ '# Users rules'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '[lclrules]'#013#010+
+ '#####################################################################'#013,
+ #010+
+ '# LCL Rules'#013#010+
+ '#####################################################################'#013+
+ #010+
+ #013#010+
+ '# LCL Platform'#013#010+
+ 'ifndef LCL_PLATFORM'#013#010+
+ 'ifneq ($(findstring $(OS_TARGET),win32 win64),)'#013#010+
+ 'LCL_PLATFORM=win32'#013#010+
+ 'else'#013#010+
+ 'LCL_PLATFORM=gtk'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ 'export LC','L_PLATFORM'#013#010+
+ #013#010+
+ '# Check if the specified LCLDIR is correct'#013#010+
+ 'ifdef LCLDIR'#013#010+
+ 'override LCLDIR:=$(subst \,/,$(LCLDIR))'#013#010+
+ 'ifeq ($(wildcard $(LCLDIR)/units/$(LCL_PLATFORM)),)'#013#010+
+ 'override LCLDIR=wrong'#013#010+
+ 'endif'#013#010+
+ 'else'#013#010+
+ 'override LCLDIR=wrong'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Chec','k if the default LCLDIR is correct'#013#010+
+ 'ifdef DEFAULT_LCLDIR'#013#010+
+ 'override LCLDIR:=$(subst \,/,$(DEFAULT_LCLDIR))'#013#010+
+ 'ifeq ($(wildcard $(LCLDIR)/units/$(LCL_PLATFORM)),)'#013#010+
+ 'override LCLDIR=wrong'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Check for development version'#013#010+
+ 'ifeq ($(','LCLDIR),wrong)'#013#010+
'override LCLDIR=$(subst /units/$(LCL_PLATFORM),,$(firstword $(wildcard'+
- ' $(addsuffix /units/$(LCL_PLATFORM),$(BASEDIR)/lcl $(BASEDIR)))))'#010+
- 'ifeq ($(LCLDIR),)'#010+
- 'override ','LCLDIR=wrong'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Check for release version'#010+
- 'ifeq ($(LCLDIR),wrong)'#010+
+ ' $(addsuffix /units/$(LCL_PLATFORM),$(BASEDIR)/lcl $(BASEDIR)))))'#013#010+
+ 'ifeq ($(LCLDIR),)'#013#010+
+ 'override LCLDIR=wrong'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Check for release version'#013#010,
+ 'ifeq ($(LCLDIR),wrong)'#013#010+
'override LCLDIR=$(subst /units/$(LCL_PLATFORM),,$(firstword $(wildcard'+
- ' $(addsuffix /lib/lazarus/units/$(LCL_PLATFORM),/usr/local /usr))))'#010+
- 'ifeq ($(LCLDIR),)'#010+
- 'overrid','e LCLDIR=wrong'#010+
- 'endif'#010+
- 'endif'#010+
- #010+
- '# Generate dirs'#010+
- 'override LCLUNITDIR:=$(wildcard $(LCLDIR)/units/$(LCL_PLATFORM) $(LCLD'+
- 'IR)/units)'#010+
+ ' $(addsuffix /lib/lazarus/units/$(LCL_PLATFORM),/usr/local /usr))))'#013+
+ #010+
+ 'ifeq ($(LCLDIR),)'#013#010+
+ 'override LCLDIR=wrong'#013#010+
+ 'endif'#013#010+
+ 'endif'#013#010+
+ #013#010+
+ '# Generate dirs'#013#010+
+ 'ov','erride LCLUNITDIR:=$(wildcard $(LCLDIR)/units/$(LCL_PLATFORM) $(LC'+
+ 'LDIR)/units)'#013#010+
'override LCLCOMPONENTDIR:=$(wildcard $(LCLDIR)/.. $(LCLDIR)/../compone'+
- 'nts $(LCLDIR)/components)'#010+
- 'export LCLDIR LCLUN','ITDIR LCLCOMPONENTDIR'#010+
- #010+
- '# Add LCL dirs to paths'#010+
- 'override REQUIRE_PACKAGESDIR+=$(LCLCOMPONENTDIR)'#010+
- 'override COMPILER_UNITDIR+=$(LCLUNITDIR)'#010+
- #010+
- '[lclinforules]'#010+
- '#####################################################################'#010+
- '# LCL Info rules'#010,
- '#####################################################################'#010+
- 'override INFORULES+=lclinfo'#010+
- #010+
- '.PHONY: lclinfo'#010+
- #010+
- 'lclinfo:'#010+
- ' @$(ECHO) == LCL info =='#010+
- ' @$(ECHO)'#010+
- ' @$(ECHO) Platform............. $(LCL_PLATFORM)'#010+
- ' @','$(ECHO) LCLDIR............... $(LCLDIR)'#010+
- ' @$(ECHO) LCL Unit dir......... $(LCLUNITDIR)'#010+
- ' @$(ECHO) LCL Component dir.... $(LCLCOMPONENTDIR)'#010+
- ' @$(ECHO)'#010
+ 'nts $(LCLDIR)/components)'#013#010+
+ 'export LCLDIR LCLUNITDIR LCLCOMPONENTDIR'#013#010+
+ #013#010+
+ '# Add LCL dirs to p','aths'#013#010+
+ 'override REQUIRE_PACKAGESDIR+=$(LCLCOMPONENTDIR)'#013#010+
+ 'override COMPILER_UNITDIR+=$(LCLUNITDIR)'#013#010+
+ #013#010+
+ '[lclinforules]'#013#010+
+ '#####################################################################'#013+
+ #010+
+ '# LCL Info rules'#013#010+
+ '###################################','#################################'+
+ '#'#013#010+
+ 'override INFORULES+=lclinfo'#013#010+
+ #013#010+
+ '.PHONY: lclinfo'#013#010+
+ #013#010+
+ 'lclinfo:'#013#010+
+ ' @$(ECHO) == LCL info =='#013#010+
+ ' @$(ECHO)'#013#010+
+ ' @$(ECHO) Platform............. $(LCL_PLATFORM)'#013#010+
+ ' @$(ECHO) LCLDIR...........','.... $(LCLDIR)'#013#010+
+ ' @$(ECHO) LCL Unit dir......... $(LCLUNITDIR)'#013#010+
+ ' @$(ECHO) LCL Component dir.... $(LCLCOMPONENTDIR)'#013#010+
+ ' @$(ECHO)'#013#010
);
diff --git a/utils/fpcm/fpcmake.ini b/utils/fpcm/fpcmake.ini
index 2af8bdcf36..5dadf31056 100644
--- a/utils/fpcm/fpcmake.ini
+++ b/utils/fpcm/fpcmake.ini
@@ -972,6 +972,13 @@ SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
+# wii
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
+
else
# long version for 1.0.x - target specific extensions
diff --git a/utils/fpcm/fpcmmain.pp b/utils/fpcm/fpcmmain.pp
index 1a33c06ff4..bed704d682 100644
--- a/utils/fpcm/fpcmmain.pp
+++ b/utils/fpcm/fpcmmain.pp
@@ -70,7 +70,8 @@ interface
o_linux,o_go32v2,o_win32,o_os2,o_freebsd,o_beos,o_haiku,o_netbsd,
o_amiga,o_atari, o_solaris, o_qnx, o_netware, o_openbsd,o_wdosx,
o_palmos,o_macos,o_darwin,o_emx,o_watcom,o_morphos,o_netwlibc,
- o_win64,o_wince,o_gba,o_nds,o_embedded,o_symbian,o_nativent,o_iphonesim
+ o_win64,o_wince,o_gba,o_nds,o_embedded,o_symbian,o_nativent,o_iphonesim,
+ o_wii
);
TTargetSet=array[tcpu,tos] of boolean;
@@ -93,7 +94,7 @@ interface
'amiga','atari','solaris', 'qnx', 'netware','openbsd','wdosx',
'palmos','macos','darwin','emx','watcom','morphos','netwlibc',
'win64','wince','gba','nds','embedded','symbian','nativent',
- 'iphonesim'
+ 'iphonesim', 'wii'
);
OSSuffix : array[TOS] of string=(
@@ -101,7 +102,7 @@ interface
'_amiga','_atari','_solaris', '_qnx', '_netware','_openbsd','_wdosx',
'_palmos','_macos','_darwin','_emx','_watcom','_morphos','_netwlibc',
'_win64','_wince','_gba','_nds','_embedded','_symbian','_nativent',
- '_iphonesim'
+ '_iphonesim','_wii'
);
{ This table is kept OS,Cpu because it is easier to maintain (PFV) }
@@ -136,7 +137,8 @@ interface
{ embedded }( true, true, true, true, true, true, true, true, true , false, false, false, false, false),
{ symbian } ( true, false, false, false, false, true, false, false, false, false, false, false, false, false),
{ nativent }( true, false, false, false, false, false, false, false, false, false, false, false, false, false),
- { iphonesim }( true, false, false, false, false, false, false, false, false, false, false, false, false, false)
+ { iphonesim }( true, false, false, false, false, false, false, false, false, false, false, false, false, false),
+ { wii } ( false, false, true, false, false, false, false, false, false, false, false, false, false, false)
);
type
diff --git a/utils/fpcmkcfg/Makefile b/utils/fpcmkcfg/Makefile
index ed8b3b7504..60675318b2 100644
--- a/utils/fpcmkcfg/Makefile
+++ b/utils/fpcmkcfg/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/03/25]
#
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
+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 powerpc-wii 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
@@ -375,6 +375,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_PROGRAMS+=fpcmkcfg
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_PROGRAMS+=fpcmkcfg
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_PROGRAMS+=fpcmkcfg
endif
@@ -799,6 +802,11 @@ ifeq ($(OS_TARGET),NativeNT)
SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
else
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
@@ -1412,6 +1420,11 @@ REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_FCL-BASE=1
REQUIRE_PACKAGES_FCL-PROCESS=1
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_FCL-BASE=1
+REQUIRE_PACKAGES_FCL-PROCESS=1
+endif
ifeq ($(FULL_TARGET),sparc-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_FCL-BASE=1
@@ -2184,7 +2197,7 @@ ifneq ($(wildcard fpcmake.loc),)
include fpcmake.loc
endif
.NOTPARALLEL:
-fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc
+fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc fppkg.inc default.inc
ifneq ($(DATA2INC),)
fpccfg.inc: fpc.cft
$(DATA2INC) -b -s fpc.cft fpccfg.inc DefaultConfig
diff --git a/utils/fpcmkcfg/Makefile.fpc b/utils/fpcmkcfg/Makefile.fpc
index 5a18307e5d..f211736be9 100644
--- a/utils/fpcmkcfg/Makefile.fpc
+++ b/utils/fpcmkcfg/Makefile.fpc
@@ -29,7 +29,7 @@ build=n
# due to overwriting each other's link.res file
.NOTPARALLEL:
-fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc
+fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc fppkg.inc default.inc
ifneq ($(DATA2INC),)
fpccfg.inc: fpc.cft
diff --git a/utils/fpcmkcfg/default.cft b/utils/fpcmkcfg/default.cft
index 17a58e5ebf..cdaac120ed 100644
--- a/utils/fpcmkcfg/default.cft
+++ b/utils/fpcmkcfg/default.cft
@@ -1,8 +1,7 @@
[Defaults]
ConfigVersion=4
-GlobalInstallDir=%basepath%
-LocalInstallDir={LocalRepository}lib/%fpcversion%/
+GlobalPrefix=%GlobalPrefix%
+LocalPrefix={LocalRepository}
Compiler=%fpcbin%
OS=%fpctargetos%
CPU=%fpctarget%
-Version=%fpcversion%
diff --git a/utils/fpcmkcfg/default.inc b/utils/fpcmkcfg/default.inc
index 33ad846110..da75ad6df5 100644
--- a/utils/fpcmkcfg/default.inc
+++ b/utils/fpcmkcfg/default.inc
@@ -5,10 +5,9 @@ const fppkg_default : array[0..0,1..240] of char=(
{$endif Delphi}
'[Defaults]'#010+
'ConfigVersion=4'#010+
- 'GlobalInstallDir=%basepath%'#010+
- 'LocalInstallDir={LocalRepository}lib/%fpcversion%/'#010+
+ 'GlobalPrefix=%GlobalPrefix%'#010+
+ 'LocalPrefix={LocalRepository}'#010+
'Compiler=%fpcbin%'#010+
'OS=%fpctargetos%'#010+
- 'CPU=%fpctarget%'#010+
- 'Version=%fpcversion%'#010
+ 'CPU=%fpctarget%'#010
);
diff --git a/utils/fpcmkcfg/fpc.cft b/utils/fpcmkcfg/fpc.cft
index aec969a906..681514f179 100644
--- a/utils/fpcmkcfg/fpc.cft
+++ b/utils/fpcmkcfg/fpc.cft
@@ -29,11 +29,17 @@
# For a debug version compile with debuginfo and all codegeneration checks on
#IFDEF DEBUG
- -glh
+ -gl
-Crtoi
#WRITE Compiling Debug Version
#ENDIF
+# assembling
+#ifdef darwin
+# use pipes instead of temporary files for assembling
+-ap
+#endif
+
# ----------------
# Parsing switches
# ----------------
@@ -62,17 +68,23 @@
# -Sc supports operators like C (*=,+=,/= and -=)
# -Sa include assertion code.
# -Sd same as -Mdelphi
-# -Se<x> compiler stops after the <x> errors (default is 1)
+# -Se<x> error options. <x> is a combination of the following:
+# <n> : compiler stops after <n> errors (default is 1)
+# w : compiler stops also after warnings
+# n : compiler stops also after notes
+# h : compiler stops also after hints
# -Sg allow LABEL and GOTO
# -Sh Use ansistrings
# -Si support C++ styled INLINE
+# -Sk load fpcylix unit
# -SI<x> set interface style to <x>
-# -SIcomCOM compatible interface (default)
-# -SIcorbaCORBA compatible interface
+# -SIcom COM compatible interface (default)
+# -SIcorba CORBA compatible interface
# -Sm support macros like C (global)
# -So same as -Mtp
# -Sp same as -Mgpc
# -Ss constructor name must be init (destructor must be done)
+# -Sx enable exception keywords (default in Delphi/ObjFPC modes)
#
# Allow goto, inline, C-operators, C-vars
-Sgic
@@ -95,18 +107,22 @@
#-Cr
#-Ct
-# Optimizer switches for i386 compiler
+# Optimizer switches
# -Os generate smaller code
-# -O1 level 1 optimizations (quick optimizations)
-# -O2 level 2 optimizations (-O1 + slower optimizations)
-# -O3 level 3 optimizations (same as -O2u)
# -Oa=N set alignment to N
-# -OoX switch on optimalization X.
-# -OoNOX switch off optimalization X.
-# X is one of REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASMCSE LOOPUNROLL
-# -OpCPU set target processor.
-# CPU is one of 386, PENTIUM, PENTIUM2, PENTIUM3, PENTIUM4, PENTIUMM
-
+# -O1 level 1 optimizations (quick optimizations, debuggable)
+# -O2 level 2 optimizations (-O1 + optimizations which make debugging more difficult)
+# -O3 level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster)
+# -Oo<x> switch on optimalization x. See fpc -i for possible values
+# -OoNO<x> switch off optimalization x. See fpc -i for possible values
+# -Op<x> set target cpu for optimizing, see fpc -i for possible values
+
+#ifdef darwin
+#ifdef cpui386
+-Cppentiumm
+-Oppentiumm
+#endif
+#endif
# -----------------------
# Set Filenames and Paths
@@ -123,20 +139,23 @@
#-Fr%basepath%/msg/errorr.msg
# searchpath for units and other system dependent things
--Fu%basepath%/units/$FPCTARGET/
--Fu%basepath%/units/$FPCTARGET/*
--Fu%basepath%/units/$FPCTARGET/rtl
+-Fu%basepath%/units/$fpctarget
+-Fu%basepath%/units/$fpctarget/*
+-Fu%basepath%/units/$fpctarget/rtl
-#IFDEF FPCAPACHE_1_13
--Fu%basepath%/units/$FPCTARGET/httpd13/
+#IFDEF FPCAPACHE_1_3
+-Fu%basepath%/units/$fpctarget/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
--Fu%basepath%/units/$FPCTARGET/httpd20
+-Fu%basepath%/units/$fpctarget/httpd20
#ELSE
--Fu%basepath%/units/$FPCTARGET/httpd22
+-Fu%basepath%/units/$fpctarget/httpd22
#ENDIF
#ENDIF
+# searchpath for fppkg user-specific packages
+-Fu%localbasepath%/units/$FPCTARGET/*
+
# path to the gcclib
%gcclibpath%
@@ -192,15 +211,16 @@
# e : Show errors (default) d : Show debug info
# w : Show warnings u : Show unit info
# n : Show notes t : Show tried/used files
-# h : Show hints m : Show defined macros
-# i : Show general info p : Show compiled procedures
+# h : Show hints s : Show time stamps
+# i : Show general info q : Show message numbers
# l : Show linenumbers c : Show conditionals
# a : Show everything 0 : Show nothing (except errors)
-# b : Show all procedure r : Rhide/GCC compatibility mode
-# declarations if an error x : Executable info (Win32 only)
-# occurs
+# b : Write file names messages r : Rhide/GCC compatibility mode
+# with full path x : Executable info (Win32 only)
+# v : write fpcdebug.txt with p : Write tree.log with parse tree
+# lots of debugging info
#
-# Display Info, Warnings, Notes and Hints
+# Display Info, Warnings and Notes
-viwn
# If you don't want so much verbosity use
#-vw
diff --git a/utils/fpcmkcfg/fpccfg.inc b/utils/fpcmkcfg/fpccfg.inc
index 4a06799117..6d0f2ae532 100644
--- a/utils/fpcmkcfg/fpccfg.inc
+++ b/utils/fpcmkcfg/fpccfg.inc
@@ -1,7 +1,7 @@
{$ifdef Delphi}
-const DefaultConfig : array[0..23] of string[240]=(
+const DefaultConfig : array[0..25] of string[240]=(
{$else Delphi}
-const DefaultConfig : array[0..23,1..240] of char=(
+const DefaultConfig : array[0..25,1..240] of char=(
{$endif Delphi}
'#'#010+
'# Config file generated by fpcmkcfg on %BUILDDATE% - %BUILDTIME%'#010+
@@ -36,59 +36,73 @@ const DefaultConfig : array[0..23,1..240] of char=(
'# For a debug version compile with debuginfo and all codegeneration ch'+
'ecks on'#010+
'#IFDEF DEBUG'#010+
- ' -glh'#010+
+ ' -gl'#010+
' -Crtoi'#010+
- ' #WRITE Compiling Debug Vers','ion'#010+
+ ' #WRITE Compiling Debug Versi','on'#010+
'#ENDIF'#010+
#010+
+ '# assembling'#010+
+ '#ifdef darwin'#010+
+ '# use pipes instead of temporary files for assembling'#010+
+ '-ap'#010+
+ '#endif'#010+
+ #010+
'# ----------------'#010+
'# Parsing switches'#010+
'# ----------------'#010+
#010+
'# Pascal language mode'#010+
'# -Mfpc free pascal dialect (default)'#010+
- '# -Mobjfpc switch some Delphi 2 extensions on'#010+
- '# -Mdelphi tries to be Delphi compatibl','e'#010+
+ '# ','-Mobjfpc switch some Delphi 2 extensions on'#010+
+ '# -Mdelphi tries to be Delphi compatible'#010+
'# -Mtp tries to be TP/BP 7.0 compatible'#010+
'# -Mgpc tries to be gpc compatible'#010+
- '# -Mmacpas tries to be compatible to the macintosh pascal diale'+
- 'cts'#010+
+ '# -Mmacpas tries to be compatible to the ma','cintosh pascal dia'+
+ 'lects'#010+
'#'#010+
'# Turn on Object Pascal extensions by default'#010+
'#-Mobjfpc'#010+
#010+
- '# Assembl','er reader mode'#010+
+ '# Assembler reader mode'#010+
'# -Rdefault use default assembler'#010+
'# -Ratt read AT&T style assembler'#010+
'# -Rintel read Intel style assembler'#010+
'#'#010+
- '# All assembler blocks are AT&T styled by default'#010+
+ '# ','All assembler blocks are AT&T styled by default'#010+
'#-Ratt'#010+
#010+
'# Semantic checking'#010+
- '# -S2 ',' same as -Mobjfpc'#010+
+ '# -S2 same as -Mobjfpc'#010+
'# -Sc supports operators like C (*=,+=,/= and -=)'#010+
'# -Sa include assertion code.'#010+
- '# -Sd same as -Mdelphi'#010+
- '# -Se<x> compiler stops after the <x> errors (default is 1)'#010+
- '# -Sg ',' allow LABEL and GOTO'#010+
+ '# -Sd same as',' -Mdelphi'#010+
+ '# -Se<x> error options. <x> is a combination of the following'+
+ ':'#010+
+ '# <n> : compiler stops after <n> errors (default is 1)'#010+
+ '# w : compiler stops also after warnings'#010+
+ '# n : compiler stops also after no','tes'#010+
+ '# h : compiler stops also after hints'#010+
+ '# -Sg allow LABEL and GOTO'#010+
'# -Sh Use ansistrings'#010+
'# -Si support C++ styled INLINE'#010+
- '# -SI<x> set interface style to <x>'#010+
- '# -SIcomCOM compatible interface (default)'#010+
- '# -SIcorbaCORBA compatible inter','face'#010+
+ '# -Sk load fpcylix unit'#010+
+ '# -SI<x> set interface sty','le to <x>'#010+
+ '# -SIcom COM compatible interface (default)'#010+
+ '# -SIcorba CORBA compatible interface'#010+
'# -Sm support macros like C (global)'#010+
'# -So same as -Mtp'#010+
'# -Sp same as -Mgpc'#010+
- '# -Ss constructor name must be init (destructor must be do'+
- 'ne)'#010+
+ '# -Ss ',' constructor name must be init (destructor must be '+
+ 'done)'#010+
+ '# -Sx enable exception keywords (default in Delphi/ObjFPC '+
+ 'modes)'#010+
'#'#010+
'# Allow goto, inline, C-operators, C-vars'#010+
- '-Sgic',#010+
+ '-Sgic'#010+
#010+
'# ---------------'#010+
'# Code generation'#010+
- '# ---------------'#010+
+ '# ---------------'#010,
#010+
'# Uncomment the next line if you always want static/dynamic units by d'+
'efault'#010+
@@ -97,32 +111,40 @@ const DefaultConfig : array[0..23,1..240] of char=(
'#-CD'#010+
#010+
'# Set the default heapsize to 8Mb'#010+
- '#-Ch800','0000'#010+
+ '#-Ch8000000'#010+
#010+
- '# Set default codegeneration checks (iocheck, overflow, range, stack)'#010+
+ '# Set default codegeneration checks (iocheck, over','flow, range, stack'+
+ ')'#010+
'#-Ci'#010+
'#-Co'#010+
'#-Cr'#010+
'#-Ct'#010+
#010+
- '# Optimizer switches for i386 compiler'#010+
+ '# Optimizer switches'#010+
'# -Os generate smaller code'#010+
- '# -O1 level 1 optimizations (quick optimizations)'#010+
- '# -O2 ',' level 2 optimizations (-O1 + slower optimizations)'#010+
- '# -O3 level 3 optimizations (same as -O2u)'#010+
'# -Oa=N set alignment to N'#010+
- '# -OoX switch on optimalization X. '#010+
- '# -OoNOX switch off optimalization X.'#010+
- '# X is o','ne of REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASM'+
- 'CSE LOOPUNROLL'#010+
- '# -OpCPU set target processor.'#010+
- '# CPU is one of 386, PENTIUM, PENTIUM2, PENTIUM3, PENTIUM4'+
- ', PENTIUMM '#010+
- #010+
- #010+
- '# -----------------------'#010+
+ '# -O1 level 1 optimizations (quick optimizations, debuggable)'#010+
+ '# -O2 level 2 optimizations (-O1 + ','optimizations which make d'+
+ 'ebugging more difficult)'#010+
+ '# -O3 level 3 optimizations (-O2 + optimizations which also may'+
+ ' make the program slower rather than faster)'#010+
+ '# -Oo<x> switch on optimalization x. See fpc -i for possible value'+
+ 's'#010+
+ '# ','-OoNO<x> switch off optimalization x. See fpc -i for possible va'+
+ 'lues'#010+
+ '# -Op<x> set target cpu for optimizing, see fpc -i for possible va'+
+ 'lues'#010+
+ #010+
+ '#ifdef darwin'#010+
+ '#ifdef cpui386'#010+
+ '-Cppentiumm'#010+
+ '-Oppentiumm'#010+
+ '#endif'#010+
+ '#endif'#010+
+ #010+
+ '# -----------------------',#010+
'# Set Filenames and Paths'#010+
- '# ------','-----------------'#010+
+ '# -----------------------'#010+
#010+
'# Both slashes and backslashes are allowed in paths'#010+
#010+
@@ -130,43 +152,46 @@ const DefaultConfig : array[0..23,1..240] of char=(
'erride'#010+
'# the default language'#010+
'#-Fr%basepath%/msg/errore.msg'#010+
- '#-Fr%basepath%/msg/errorn.msg'#010+
- '#-Fr%bas','epath%/msg/errores.msg'#010+
+ '#-F','r%basepath%/msg/errorn.msg'#010+
+ '#-Fr%basepath%/msg/errores.msg'#010+
'#-Fr%basepath%/msg/errord.msg'#010+
'#-Fr%basepath%/msg/errorr.msg'#010+
#010+
'# searchpath for units and other system dependent things'#010+
- '-Fu%basepath%/units/$FPCTARGET/'#010+
- '-Fu%basepath%/units/$FPCTARGET/*'#010+
- '-Fu%basepath%/units/$FPCTARGET/rtl',#010+
+ '-Fu%basepath%/units/$fpctarget'#010+
+ '-Fu%basepath%/units/$fpctarget/*'#010,
+ '-Fu%basepath%/units/$fpctarget/rtl'#010+
#010+
- '#IFDEF FPCAPACHE_1_13'#010+
- '-Fu%basepath%/units/$FPCTARGET/httpd13/'#010+
+ '#IFDEF FPCAPACHE_1_3'#010+
+ '-Fu%basepath%/units/$fpctarget/httpd13/'#010+
'#ELSE'#010+
'#IFDEF FPCAPACHE_2_0'#010+
- '-Fu%basepath%/units/$FPCTARGET/httpd20'#010+
+ '-Fu%basepath%/units/$fpctarget/httpd20'#010+
'#ELSE'#010+
- '-Fu%basepath%/units/$FPCTARGET/httpd22'#010+
+ '-Fu%basepath%/units/$fpctarget/httpd22'#010+
'#ENDIF'#010+
'#ENDIF'#010+
#010+
+ '# searchpath for ','fppkg user-specific packages'#010+
+ '-Fu%localbasepath%/units/$FPCTARGET/*'#010+
+ #010+
'# path to the gcclib'#010+
'%gcclibpath%'#010+
#010+
- '# searchpath fo','r libraries'#010+
+ '# searchpath for libraries'#010+
'#-Fl%basepath%/lib'#010+
'#-Fl/lib;/usr/lib'#010+
#010+
'# searchpath for tools'#010+
'-FD%basepath%/bin/$FPCTARGET'#010+
#010+
- '%NEEDCROSSBINUTILSIFDEF%'#010+
+ '%NEEDCROSSBINUTILSI','FDEF%'#010+
#010+
'# binutils prefix for cross compiling'#010+
'#IFDEF FPC_CROSSCOMPILING'#010+
'#IFDEF NEEDCROSSBINUTILS'#010+
' -XP$FPCTARGET-'#010+
- '#ENDI','F'#010+
+ '#ENDIF'#010+
'#ENDIF'#010+
#010+
#010+
@@ -174,16 +199,17 @@ const DefaultConfig : array[0..23,1..240] of char=(
'# Linking'#010+
'# -------------'#010+
#010+
- '# generate always debugging information for GDB (slows down the compil'+
- 'ing'#010+
+ '# generate always debugging information for GDB (slows down the comp','i'+
+ 'ling'#010+
'# process)'#010+
'# -gc generate checks for pointers'#010+
'# -gd use dbx'#010+
'# -gg use gsym'#010+
- '#',' -gh use heap trace unit (for memory leak debugging)'#010+
- '# -gl use line info unit to show more info for backtraces'#010+
+ '# -gh use heap trace unit (for memory leak debugging)'#010+
+ '# -gl use line info unit to show more info fo','r backtrace'+
+ 's'#010+
'# -gv generates programs tracable with valgrind'#010+
- '# -gw generate dwarf debugging in','fo'#010+
+ '# -gw generate dwarf debugging info'#010+
'#'#010+
'# Enable debuginfo and use the line info unit by default'#010+
'#-gl'#010+
@@ -191,7 +217,7 @@ const DefaultConfig : array[0..23,1..240] of char=(
'# always pass an option to the linker'#010+
'#-k-s'#010+
#010+
- '# Always strip debuginfo from the executable'#010+
+ '# Always ','strip debuginfo from the executable'#010+
'-Xs'#010+
#010+
#010+
@@ -199,26 +225,28 @@ const DefaultConfig : array[0..23,1..240] of char=(
'# Miscellaneous'#010+
'# -------------'#010+
#010+
- '# Write always a nice FPC l','ogo ;)'#010+
+ '# Write always a nice FPC logo ;)'#010+
'-l'#010+
#010+
'# Verbosity'#010+
'# e : Show errors (default) d : Show debug info'#010+
- '# w : Show warnings u : Show unit info'#010+
+ '# w : Show warnings u',' : Show unit info'#010+
'# n : Show notes t : Show tried/used files'#010+
- '# h : Show hints ',' m : Show defined macros'#010+
- '# i : Show general info p : Show compiled procedures'#010+
- '# l : Show linenumbers c : Show conditionals'#010+
+ '# h : Show hints s : Show time stamps'#010+
+ '# i : Show general info q : Show message numbers'#010+
+ '# l : Show linenumbers ',' c : Show conditionals'#010+
'# a : Show everything 0 : Show nothing (except errors'+
')'#010+
- '# b : ','Show all procedure r : Rhide/GCC compatibility m'+
- 'ode'#010+
- '# declarations if an error x : Executable info (Win32 only'+
- ')'#010+
- '# occurs'#010+
+ '# b : Write file names messages r : Rhide/GCC compatibility mod'+
+ 'e'#010+
+ '# with full path x : Executable info (Win32 on','l'+
+ 'y)'#010+
+ '# v : write fpcdebug.txt with p : Write tree.log with parse t'+
+ 'ree'#010+
+ '# lots of debugging info'#010+
'#'#010+
- '# Display Info, Warnings, Notes and Hints'#010+
+ '# Display Info, Warnings and Notes'#010+
'-viwn'#010+
- '# If you don'#039't want so much verbosity u','se'#010+
+ '# If you don'#039't want so much verbosity use'#010+
'#-vw'#010
);
diff --git a/utils/fpcmkcfg/fpcfg.inc b/utils/fpcmkcfg/fpcfg.inc
index 935c9c3f8d..571f574ce5 100644
--- a/utils/fpcmkcfg/fpcfg.inc
+++ b/utils/fpcmkcfg/fpcfg.inc
@@ -1,53 +1,50 @@
{$ifdef Delphi}
-const fpcfg : array[0..3] of string[240]=(
+const fpcfg : array[0..2] of string[240]=(
{$else Delphi}
-const fpcfg : array[0..3,1..240] of char=(
+const fpcfg : array[0..2,1..240] of char=(
{$endif Delphi}
- '#IFDEF NORMAL'#013#010+
- ' -Ci'#013#010+
- ' -XS'#013#010+
- ' -T%fpctargetos%'#013#010+
- ' -Sg'#013#010+
- ' -O1'#013#010+
- ' -Oppentium3'#013#010+
- ' -Ratt'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl'#013#010+
- ' -g-'#013#010+
- ' -p-'#013,#010+
- ' -b-'#013#010+
- '#ENDIF'#013#010+
- #013#010+
- '#IFDEF DEBUG'#013#010+
- ' -Ci'#013#010+
- ' -XS'#013#010+
- ' -T%fpctargetos%'#013#010+
- ' -Sg'#013#010+
- ' -Cr'#013#010+
- ' -Co'#013#010+
- ' -Oppentium3'#013#010+
- ' -Ratt'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctarg','etos%\rtl'#013#010+
- ' -g'#013#010+
- ' -p-'#013#010+
- ' -b-'#013#010+
- '#ENDIF'#013#010+
- #013#010+
- '#IFDEF RELEASE'#013#010+
- ' -XS'#013#010+
- ' -T%fpctargetos%'#013#010+
- ' -Sg'#013#010+
- ' -O2'#013#010+
- ' -Oppentium3'#013#010+
- ' -Ratt'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
- ' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
- ' -Fu%basepath%\units\%fpctarge','t%-%fpctargetos%\rtl'#013#010+
- ' -g-'#013#010+
- ' -p-'#013#010+
- ' -b-'#013#010+
- '#ENDIF'#013#010
+ '#IFDEF NORMAL'#010+
+ ' -Ci'#010+
+ ' -XS'#010+
+ ' -T%fpctargetos%'#010+
+ ' -Sg'#010+
+ ' -O1'#010+
+ ' -Fu%basepath%\units\$fpctarget'#010+
+ ' -Fu%basepath%\units\$fpctarget\*'#010+
+ ' -Fu%basepath%\units\$fpctarget\rtl'#010+
+ '%GCCLIBPATH%'#010+
+ ' -g-'#010+
+ ' -p-'#010+
+ ' -b-'#010+
+ '#ENDIF'#010+
+ #010+
+ '#IFDEF DEBUG'#010+
+ ' -Ci'#010+
+ ' -XS'#010+
+ ' -T%fpctargetos%'#010+
+ ' -Sg'#010+
+ ' -Cr'#010+
+ ' ','-Co'#010+
+ ' -Fu%basepath%\units\$fpctarget'#010+
+ ' -Fu%basepath%\units\$fpctarget\*'#010+
+ ' -Fu%basepath%\units\$fpctarget\rtl'#010+
+ '%GCCLIBPATH%'#010+
+ ' -g'#010+
+ ' -p-'#010+
+ ' -b-'#010+
+ '#ENDIF'#010+
+ #010+
+ '#IFDEF RELEASE'#010+
+ ' -XS'#010+
+ ' -T%fpctargetos%'#010+
+ ' -Sg'#010+
+ ' -O2'#010+
+ ' -Fu%basepath%\units\$fpctarget'#010+
+ ' -Fu%basepath%\units','\$fpctarget\*'#010+
+ ' -Fu%basepath%\units\$fpctarget\rtl'#010+
+ '%GCCLIBPATH%'#010+
+ ' -g-'#010+
+ ' -p-'#010+
+ ' -b-'#010+
+ '#ENDIF'#010
);
diff --git a/utils/fpcmkcfg/fpcmkcfg.pp b/utils/fpcmkcfg/fpcmkcfg.pp
index c3db7676fe..7694c4dad5 100644
--- a/utils/fpcmkcfg/fpcmkcfg.pp
+++ b/utils/fpcmkcfg/fpcmkcfg.pp
@@ -16,7 +16,14 @@
**********************************************************************}
program fpcmkcfg;
-uses SysUtils,Classes,fpTemplate, process;
+uses
+ SysUtils,
+ Classes,
+{$ifdef unix}
+ baseunix,
+{$endif}
+ fpTemplate,
+ process;
{
The inc files must be built from a template with the data2inc
@@ -56,6 +63,8 @@ Resourcestring
// SUsage70 = ' -l filename read name/value pairs from filename';
SUsage70 = ' -m show builtin macros and exit.';
SUsage80 = ' -b show builtin template and exit.';
+ SUsage84 = ' -s skip the creation of a backup-file.';
+ SUsage87 = ' -p force directory creation.';
SUsage90 = ' -v be verbose.';
Susage100 = ' -0 use built in fpc.cfg template (default)';
Susage110 = ' -1 use built in fp.cfg template';
@@ -66,22 +75,38 @@ Resourcestring
SErrArgExpected = 'Error: Option "%s" requires an argument.';
SErrIncompletePair = 'Error: Incomplete name-value pair "%s".';
SErrNoSuchFile = 'Error: File "%s" does not exist.';
+ SErrNoSuchDirectory = 'Error: Directory of file "%s" does not exists. User -p to force creation.';
SErrBackupFailed = 'Error: Backup of file "%s" to "%s" failed.';
SErrDelBackupFailed = 'Error: Delete of old backup file "%s" failed.';
+ SErrCreateDirFailed = 'Error: Could not create the directory for file "%s".';
+
SWarnIgnoringFile = 'Warning: Ignoring non-existent file: ';
SWarnIgnoringPair = 'Warning: Ignoring wrong name/value pair: ';
SWarngccNotFound = 'Warning: Could not find gcc. Unable to determine the gcclib path.';
+ SBackupCreated = 'Saved old "%s" to "%s"';
+
Var
Verbose : Boolean;
SkipBackup : Boolean;
+ CreateDir: Boolean;
Cfg : TStringList;
TemplateParser: TTemplateParser;
TemplateFileName,
OutputFileName : String;
IDEBuildin : Integer;
+function IsSuperUser:boolean;
+begin
+{$ifdef unix}
+ result:=(fpGetUID=0);
+{$else unix}
+ result:=false;
+{$endif unix}
+end;
+
+
function GetDefaultLocalRepository: string;
begin
@@ -92,6 +117,27 @@ begin
{$ENDIF Unix}
end;
+function GetDefaultLocalBasepath: string;
+
+begin
+{$IFDEF Unix}
+ result := '~/.fppkg'+PathDelim+'lib'+PathDelim+'fpc'+PathDelim+'$fpcversion';
+{$ELSE Unix}
+ result := '$LOCAL_APPDATA'+PathDelim+'FreePascal'+PathDelim+'fppkg';
+{$ENDIF Unix}
+end;
+
+function GetDefaultCompilerConfigDir: string;
+
+begin
+{$IFDEF Unix}
+ if IsSuperUser then
+ result := '/etc/fppkg/'
+ else
+{$ENDIF}
+ result := '{LocalRepository}config/';
+end;
+
function GetDefaultNeedCrossBinutilsIfdef: string;
begin
@@ -246,11 +292,14 @@ begin
TemplateParser.Values['FPCVERSION'] := BuildVersion;
TemplateParser.Values['FPCTARGET'] := BuildTarget;
TemplateParser.Values['FPCTARGETOS'] := BuildOSTarget;
+ TemplateParser.Values['FPCBIN'] := 'fpc';
TemplateParser.Values['PWD'] := GetCurrentDir;
TemplateParser.Values['BUILDDATE'] := DateToStr(Date);
TemplateParser.Values['BUILDTIME'] := TimeToStr(Time);
TemplateParser.Values['LOCALREPOSITORY'] := GetDefaultLocalRepository;
+ TemplateParser.Values['LOCALBASEPATH'] := GetDefaultLocalBasepath;
+ TemplateParser.Values['COMPILERCONFIGDIR'] := GetDefaultCompilerConfigDir;
TemplateParser.Values['NEEDCROSSBINUTILSIFDEF'] := GetDefaultNeedCrossBinutilsIfdef;
TemplateParser.Values['GCCLIBPATH'] := GetDefaultGCCDIR;
@@ -277,6 +326,8 @@ begin
Writeln(SUsage60);
Writeln(SUsage70);
Writeln(SUsage80);
+ Writeln(SUsage84);
+ Writeln(SUsage87);
Writeln(SUsage90);
Writeln(SUsage100);
Writeln(SUsage110);
@@ -353,6 +404,9 @@ Var
begin
I:=1;
+ ShowBuiltinCommand := False;
+ SkipBackup := False;
+ CreateDir := False;
While( I<=ParamCount) do
begin
S:=Paramstr(i);
@@ -372,6 +426,7 @@ begin
'u' : TemplateParser.Values[GetOptArg]:='';
'o' : OutputFileName:=GetoptArg;
's' : SkipBackup:=True;
+ 'p' : CreateDir:=True;
'0' : IDEBuildin:=0;
'1' : IDEBuildin:=1;
'2' : IDEBuildin:=2;
@@ -437,6 +492,24 @@ begin
begin
Writeln(StdErr,Format(SErrBackupFailed,[OutputFileName,BFN]));
Halt(1);
+ end
+ else
+ Writeln(Format(SBackupCreated,[ExtractFileName(OutputFileName),ExtractFileName(BFN)]));
+ end;
+ if (OutputFileName<>'') and not DirectoryExists(ExtractFilePath(OutputFileName)) then
+ begin
+ if CreateDir then
+ begin
+ if not ForceDirectories(ExtractFilePath(OutputFileName)) then
+ begin
+ Writeln(StdErr,Format(SErrCreateDirFailed,[OutputFileName]));
+ Halt(1);
+ end;
+ end
+ else
+ begin
+ Writeln(StdErr,Format(SErrNoSuchDirectory,[OutputFileName]));
+ Halt(1);
end;
end;
Assign(Fout,OutputFileName);
diff --git a/utils/fpcmkcfg/fpinc.cfg b/utils/fpcmkcfg/fpinc.cfg
index 5ba8b875c3..f96db36889 100644
--- a/utils/fpcmkcfg/fpinc.cfg
+++ b/utils/fpcmkcfg/fpinc.cfg
@@ -4,11 +4,10 @@
-T%fpctargetos%
-Sg
-O1
- -Oppentium3
- -Ratt
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl
+ -Fu%basepath%\units\$fpctarget
+ -Fu%basepath%\units\$fpctarget\*
+ -Fu%basepath%\units\$fpctarget\rtl
+%GCCLIBPATH%
-g-
-p-
-b-
@@ -21,11 +20,10 @@
-Sg
-Cr
-Co
- -Oppentium3
- -Ratt
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl
+ -Fu%basepath%\units\$fpctarget
+ -Fu%basepath%\units\$fpctarget\*
+ -Fu%basepath%\units\$fpctarget\rtl
+%GCCLIBPATH%
-g
-p-
-b-
@@ -36,11 +34,10 @@
-T%fpctargetos%
-Sg
-O2
- -Oppentium3
- -Ratt
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*
- -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl
+ -Fu%basepath%\units\$fpctarget
+ -Fu%basepath%\units\$fpctarget\*
+ -Fu%basepath%\units\$fpctarget\rtl
+%GCCLIBPATH%
-g-
-p-
-b-
diff --git a/utils/fpcmkcfg/fppkg.cfg b/utils/fpcmkcfg/fppkg.cfg
index 870c574322..517f0fc7ad 100644
--- a/utils/fpcmkcfg/fppkg.cfg
+++ b/utils/fpcmkcfg/fppkg.cfg
@@ -3,7 +3,7 @@ ConfigVersion=4
LocalRepository=%LocalRepository%
BuildDir={LocalRepository}build/
ArchivesDir={LocalRepository}archives/
-CompilerConfigDir={LocalRepository}config/
+CompilerConfigDir=%CompilerConfigDir%
RemoteMirrors=http://www.freepascal.org/repository/mirrors.xml
RemoteRepository=auto
CompilerConfig=default
diff --git a/utils/fpcmkcfg/fppkg.inc b/utils/fpcmkcfg/fppkg.inc
index 01a76f4317..ebda2123bf 100644
--- a/utils/fpcmkcfg/fppkg.inc
+++ b/utils/fpcmkcfg/fppkg.inc
@@ -8,9 +8,9 @@ const fppkg : array[0..1,1..240] of char=(
'LocalRepository=%LocalRepository%'#010+
'BuildDir={LocalRepository}build/'#010+
'ArchivesDir={LocalRepository}archives/'#010+
- 'CompilerConfigDir={LocalRepository}config/'#010+
+ 'CompilerConfigDir=%CompilerConfigDir%'#010+
'RemoteMirrors=http://www.freepascal.org/repository/mirrors.xml'#010+
- 'R','emoteRepository=auto'#010+
+ 'Remote','Repository=auto'#010+
'CompilerConfig=default'#010+
'FPMakeCompilerConfig=default'#010+
'Downloader=lnet'#010
diff --git a/utils/fpdoc/dglobals.pp b/utils/fpdoc/dglobals.pp
index 29b6bf8f54..e85689dce2 100644
--- a/utils/fpdoc/dglobals.pp
+++ b/utils/fpdoc/dglobals.pp
@@ -792,7 +792,7 @@ var
end
else
if cls<>result then
- writeln(cls.name,'''s dependancy ' ,clname,' could not be resolved');
+ writeln(cls.name,'''s dependency ' ,clname,' could not be resolved');
end;
function CreateAliasType (alname,clname : string;parentclass:TPasClassType; out cl2 :TPasClassType):TPasAliasType;
diff --git a/utils/fppkg/fprepos.pp b/utils/fppkg/fprepos.pp
index 4cafaee54e..1ace7ae5cc 100644
--- a/utils/fppkg/fprepos.pp
+++ b/utils/fppkg/fprepos.pp
@@ -37,7 +37,7 @@ Type
linux,go32v2,win32,os2,freebsd,beos,netbsd,
amiga,atari, solaris, qnx, netware, openbsd,wdosx,
palmos,macos,darwin,emx,watcom,morphos,netwlibc,
- win64,wince,gba,nds,embedded,symbian
+ win64,wince,gba,nds,embedded,symbian,haiku
);
TOSes = Set of TOS;
diff --git a/utils/fppkg/pkgoptions.pp b/utils/fppkg/pkgoptions.pp
index 54e10ad04a..d00ab7969c 100644
--- a/utils/fppkg/pkgoptions.pp
+++ b/utils/fppkg/pkgoptions.pp
@@ -331,8 +331,8 @@ procedure TGlobalOptions.LoadGlobalFromFile(const AFileName: String);
Var
Ini : TMemIniFile;
begin
+ Ini:=TMemIniFile.Create(AFileName);
try
- Ini:=TMemIniFile.Create(AFileName);
FConfigFileName:=AFileName;
With Ini do
begin
@@ -379,8 +379,8 @@ Var
begin
if FileExists(AFileName) then
BackupFile(AFileName);
+ Ini:=TIniFile.Create(AFileName);
try
- Ini:=TIniFile.Create(AFileName);
With Ini do
begin
WriteInteger(SDefaults,KeyConfigVersion,CurrentConfigVersion);
@@ -630,8 +630,8 @@ procedure TCompilerOptions.LoadCompilerFromFile(const AFileName: String);
Var
Ini : TMemIniFile;
begin
+ Ini:=TMemIniFile.Create(AFileName);
try
- Ini:=TMemIniFile.Create(AFileName);
FConfigFilename:=AFileName;
With Ini do
begin
@@ -664,8 +664,8 @@ Var
begin
if FileExists(AFileName) then
BackupFile(AFileName);
+ Ini:=TIniFile.Create(AFileName);
try
- Ini:=TIniFile.Create(AFileName);
With Ini do
begin
WriteInteger(SDefaults,KeyConfigVersion,CurrentConfigVersion);