Re: Should we define _GNU_SOURCE (was Re: GNOME CVS: gnome-common kmaraas)




Raja R Harinath <harinath@cs.umn.edu> writes:

> Miguel de Icaza <miguel@nuclecu.unam.mx> writes:
> > What does _GNU_SOURCE do to our code?
> 
> It only makes a difference on GLIBC systems, and enables GNU specific
> extensions in the libc.  Essentially, it allows the system headers to
> declare more utility functions: `strndup' for example.
> 
> It shouldn't affect our code unless there are name clashes with
> functions in GLIBC.

Doesn't this tend to reduce portability? I.e, someone casually
uses strndup, after a release, it is found that it doesn't
exist on most systems, and needs to be added to libsupport or
replaced.

Perhaps this doesn't matter too much for GNOME, though, since
its portability goals are fairly limited. 

Regards,
                                        Owen

[
What I find somewhat annoying about glibc, is that once you
use -ansi as a compilation flag, there is no simple way
of getting the default "everything but _GNU_SOURCE" behavior.
]



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