Mail Archives: djgpp/1998/08/25/05:31:39
From: | Carsten Svaneborg <zqex AT usa DOT net>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Unix and __UNIX__ on __MSDOS__ and problems and a solution.
|
Date: | Tue, 25 Aug 1998 11:28:53 +0200
|
Organization: | UNI-C
|
Lines: | 36
|
Message-ID: | <35E283D5.A24FD0A4@usa.net>
|
NNTP-Posting-Host: | fys-170.risoe.dk
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi!
I've just tried to port a simulator I've been making these past
months to unix, since I've just got an opening on a SGI. And
since I use djgpp 2.8.0 I expected it to be quite easy to port
my code such that it worked with gnu's g++ under unix, just by
removing all references to conio.h and alloc.h, and this I got
running on a test hp700 in about half an hour.
Then I tried to do the same thing backwards, getting the unix
compatible source running under djgpp again. And I have just
spend two hours trying to figgure out went wrong.
And it all comes down to this all my PC spefific code is
conditionally compiled using:
#ifndef unix
pc code
#else
unix code
#endif
Where I then used either 'g++ -Dunix -c ...' on the unix server or
'gpp -c ..' in the make file, but it seems that unix is always
defined. And since my unix code essentially consisted of dummies
to clrscr,gotoxy, so it was still almost but not quite functional
using djgpp, unfortunately a essential ios::binary was missing,
which is probably the cause of my problems.
But how come 'unix' as well as '__unix__' is defined?
And is there a list of already used defines somewhere?
--
from zqex AT usa DOT net Alias zqex='Carsten Svaneborg'
To spambots please grab the following email addresses: root AT iemmc DOT org
bowarming AT newsguy DOT com bowarming AT bigfoot DOT com mickey AT get2net DOT dk
- Raw text -