Re: MIN/MAX



Miroslaw Dobrzanski-Neumann <mne mosaic-ag com> writes:

> Hi,
> 
> should MIX/MAX/ABS/TRUE/FALSE macros in gmacros.h be renamed to G_MIN/...
> they would follow then the naming convention in the library

Not at this point, no. While we wouldn't add anything in the global namespace
at this point, we can't rename / remove the existing ones.

I think the original idea of putting these in the global namespace is
that it was pretty likely that any macro of that name would be the same
thign.

Plus, G_TRUE, G_FALSE would have been incredibly ugly to have all over
the place...
 
> /usr/include/sys/param.h on osf4 defines them also without undef before.
> digital c compiler does not like redifinition of macros.
> On the other hand any header file included after glib.h can accidently
> redefine this common macros to something one does not expect

For this reason, I always try to include headers in the order:

 [ system headers ] 

 [ Glib headers ]
 
 [ GTK+ headers ]
 
 [ Application headers ]

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]