* Lennart Poettering <[email protected]> [2010-03-09 16:58:12]:

> On Tue, 09.03.10 20:15, Balbir Singh ([email protected]) wrote:
> 
> > 
> > * Lennart Poettering <[email protected]> [2010-03-09 14:08:45]:
> > 
> > > On Mon, 08.03.10 12:45, Jan Safranek ([email protected]) wrote:
> > > 
> > > > Remove GNU_SOURCE from public headers, it has unpredictable 
> > > > consequences on
> > > > applications using libcgroup.h
> > > 
> > > Instead of defining _GNU_SOURCE on your own it is probably a much better
> > > idea to use AC_USE_SYSTEM_EXTENSIONS in configure.ac.
> > >
> > 
> > My concern is that AC_USE_SYSTEM_EXTENSIONS is like a big tap, it
> > enables loads of other things like
> > 
> > _ALL_SOURCE
> > _POSIX_PTHREAD_SEMANTICS
> > _TANDEM_SOURCE
> > 
> > Am I missing something? 
> 
> Sure, but where's the problem with this?
> 
> libcg is Linux-specific anyway. AC_USE_SYSTEM_EXTENSIONS enables the
> full Linux API. Every single API call there is on Linux. And for
> something that is Linux-specific anyway, this should be the exact right
> thing to do.
> 

There is no bloat due to header expansion, namespace collision issues,
etc? Does it make sense to enable things like _TANDEM_SOURCE, etc?

The option would generate code like this

/* Enable extensions on AIX 3, Interix.  */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris.  */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop.  */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris.  */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif

I am not strongly opposing, just asking if that is a sane thing to do.

> Only if you care about portability to non-Linux systems it makes
> sense to limit yourself to a minimal, portable API subset. But that is
> clearly not the case here.
>

Yep, we are Linux specific and will be that way unless someone decides
to port cgroup to another OS :)

-- 
        Three Cheers,
        Balbir

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to