bug-gnulib
[Top][All Lists]
Advanced

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

Re: Moving (initially function) attribute macros into a separate gnulib


From: Pádraig Brady
Subject: Re: Moving (initially function) attribute macros into a separate gnulib module
Date: Sun, 10 Jul 2011 23:09:26 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 10/07/11 10:56, James Youngman wrote:
> I just went to use some function attributes in findutils and noticed
> that information about which versions of GCC support various
> attributes is spread throughout gnulib.  While a number of headers
> define convenience macros (usually starting _GL_ATTRIBUTE_) there are
> a couple of naming inconsistencies (two names used for the same
> attribute, typically).
> 
> I propose to move all of these definitions into a separate module,
> except for any definitions that need to stay as they are in order to
> stay in sync with glibc:
> 
> $ for h in $(grep -l 'define.*_GL_ATTRIBUTE' lib/*.[hc]) ; do grep -q
> 'This file is part of the GNU C Library' $h || echo $h; done
> lib/di-set.h
> lib/hash.h
> lib/ignore-value.h
> lib/ino-map.h
> lib/openat.h
> lib/safe-alloc.h
> lib/sigpipe-die.h
> lib/stdio.in.h
> lib/stdlib.in.h
> lib/string.in.h
> lib/vasnprintf.h
> lib/version-etc.h
> lib/xalloc.h
> lib/xmemdup0.h
> lib/xprintf.h
> lib/xstrtol.h
> lib/xvasprintf.h
> 
> Since this involves touching a number of files, I thought it would be
> useful to get some feedback on the idea in advance rather than just
> send a patch for review.

I like it.
The fact that macros with the same funcionality but different names
have already been defined, suggests this is worthwhile.
It would also result is less duplication  of the GNUC_PREREQ stuff.

thanks,
Pádraig.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]