From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: converting from other DOS compliers to DJGPP Date: Tue, 26 Aug 1997 10:35:13 +0200 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 36 Message-ID: <34029541.F9B223C1@LSTM.Ruhr-UNI-Bochum.De> References: <5tt4tk$5b6 AT winter DOT news DOT erols DOT com> NNTP-Posting-Host: c64.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 * *************************************************************