Re: Difference between Windows and Linux GCC compiler
Hi,
Yes, I don't much like the #if's in my code either. Especially if there are
exceptions for multiple systems it makes the code hard to read, although it
makes it easy to use the same code between g++ and VC++ since I don't have
to do something special. But indeed for parts where you get multiple #if's
for various systems it would be nicer to put the difference in the make
files instead of the code.
Regards, Ron AF Greve
http://informationsuperhighway.eu
"REH" <spamjunk@stny.rr.com> wrote in message
news:80a53a6e-1d73-4ee4-946e-a525d439b728@h21g2000yqa.googlegroups.com...
On Jul 31, 6:19 am, "Ron AF Greve" <me@localhost> wrote:
Sorry., forgot this one
#ifdef WIN32
if( ioctlsocket( Socket, FIONBIO, &True ) ) //; // Hope this works
(undocumented)?
{
int Error = WSAGetLastError();
}
#else
fcntl( Socket, F_SETFD, O_NONBLOCK | fcntl( Socket, F_GETFD ) );
#endif
What I've done for systems I have to build on multiple targets is
define a common interface, and have the build system pull in the
appropriate library. It's much cleaner and easiler to maintain
(especially when it comes the adding a new target).
REH