Indy and fpc (Indy10, first results)

Giganews Newsgroups
Subject: Indy and fpc (Indy10, first results)
Posted by:  Marco van de Voort (marc…
Date: Sun, 8 Feb 2004

New thread, because the other thread evolved in a different direction.

I restarted porting using Indy10, advised by chat, and with some things
already fixed FPC side (TOwnedCollection mostly)

With a 12kb context patch, I can compile System and Core under FPC/win32.
See summary of contents below.

Only exceptions are the *dsn* files,idantifreeze and idregistercore in

The (GNU unified) patch is at http:/

The patch is meant as discussion piece, to show concretely what needs
modification to get Indy compiling. Everything is negotiable.

FPC/win32 port of Indy 10, snapshot of feb 7th

Directory System:
6kb FPC patch (12kb including context) in total.
- addition of FPC specific defines to the inc
- ifdef linux is nested inside {$ifndef FPC}.
- ifdef linux block gets {$ifdef Linux} {$define Unix} added.
    Typical use is e.g. for idglobal.pas : GPathDelim.
- temporarily removal of {$if's in ifdef linux, adding a space to
    a //$if.  Should be fixed FPC compiler side in time.
- introduction of USE_RAISELASTOSERROR (FPC has RaiseLastWin32Error in
    a different unit, and doesn't implement any VCL version fully, so I
    choose not to simply define VCL60, since that might have other
    consequences) I lean towards using a properties system for defines,
    just like already used for compiler features (overloading, default
    params etc)

Other System/ files:
- Several Receive and ReceiveFrom methods in the IDStack hierarchy wrote to
    a CONST buffer parameter. Changed to VAR. Also one of the same category
    in IDGlobal (copytidbytes). (idsockhandle)
- One small temporary workaround for a FPC compiler problem (assigning
      "pointer" to array of pchar) in idstackwindows.pas. This doesn't
      really need fixing Indy side, but isn't a beauty, so you might want
    to check it.
- Two occurances of RaiseLastWin32Error fixed to use USE_RAISELASTOSERROR

Directory core:
  no modifications (except copy of System/

Non working files in Core:
idregistercore.pas dependss on idant
idantrifreeze depends on forms.
All DSN files except one that only contained resources, due to Visual VCL usage. (Forms, Dsgintf)

I also tried to compile idsupercore/, but FPC has a problem with idfiber
    that needs to be fixed first. (small issue with reintroduce and
    overriding constructors)

Of course this is all just to get it compiling, and not yet "running".

However from experience, to get things compiling are the largest set
of changes.