[Gambas-devel] Gambas DNS resolution working in Windows, patch, new screenshot

Benoit Minisini gambas at ...1...
Wed Feb 16 10:54:36 CET 2005


On Tuesday 15 February 2005 20:24, Brandon Bergren wrote:
> On Tue, 15 Feb 2005, Laurent Carlier wrote:
> > Le Mardi 15 Février 2005 19:33, Brandon Bergren a écrit :
> >
> > The perhaps a better way to do #if..#endif :
> >
> > #ifdef __sun__
> > ...
> > #elif defined(__CYGWIN__)
> > ...
> > #else
> > ...
> > #endif
> >
> > Regards,
> >
> > --
> >
> > Laurent Carlier
>
> I thought I was clear enough about it being a dirty hack. ;P
>
> Actually, the RIGHT way is to include config.h and get defs off of THAT.
> Then you can have conditionals based on CAPABILITIES, not PLATFORMS.
> That's what config.h was designed to do, no?
>
> --Brandon

Theoretically, but I found easier to maintain code with #ifdef on platforms 
instead of capabilities.

So I added to config.h platform constants, defined in 'acinclude.m4'. They 
are: OS_LINUX, OS_FREEBSD, OS_CYGWIN, OS_SOLARIS, OS_MACOSX.

Please use them!

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list