Mail Archives: djgpp/1997/08/26/09:56:08
kifox wrote:
>
> Just how difficult would it be to modify/rewrite a C program that was
> intented to be complied with say bcc so it could be complied with DJGPP?
>
Depends on how much compiler-specific stuff is contained
in the program. Most TurboC program simply require
recompiling. Direct video access is forbidden, but can be
archieved with macros and little manual fixing.
BGI can be simply recompiled with grx & bgi2grx.
Turbo Vision is ported, but might require a bunch of
#pragma pack(1) at the right places.
Most trouble are different sizes of integers and subtle
bugs, where sizeof(int)==sizeof(ushort) in bcc, which is
complete rubbish in gcc. That one took me some hours
when I recompiled the TurboVision help compiler, that
gave me some occasional crashes and mostly unusable
help files. Anyway, gcc tracks NULL pointer accesses and
such much more stringent than bcc. For the datasizes I'd
recommend -Wall and -pedantic (not fool proof, but helps a lot)
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -