[PATCH] argp: Do not override GCC keywords with macros [BZ #16907]

Florian Weimer fweimer@redhat.com
Mon Aug 15 06:36:00 GMT 2016


On 08/15/2016 04:18 AM, Paul Eggert wrote:
> Florian Weimer wrote:
>> This commit does not sync with gnulib because gnulib has started to use
>> _GL_* macros in the header file, which are arguably in the gnulib
>> implementation space and not suitable for an installed glibc header
>> file.
>
> I'd rather keep the files in sync if possible. How about if we rename
> the affected macro from _GL_ATTRIBUTE_FORMAT to __attribute_format__ (or
> whatever other name you like that is in the glibc space? That way,
> Gnulib can stay in sync better.

Hmm.

I found this in the gnulib version:

#if !_LIBC || defined __USE_EXTERN_INLINES

# if !_LIBC
#  define __argp_usage argp_usage
#  define __argp_state_help argp_state_help
#  define __option_is_short _option_is_short
#  define __option_is_end _option_is_end
#ifndef _GL_INLINE_HEADER_BEGIN
  #error "Please include config.h first."
#endif
_GL_INLINE_HEADER_BEGIN

This will result in an #error if the installed header <argp.h> is used 
by applications.

So full synchronization is currently not possible anyway.

Florian



More information about the Libc-alpha mailing list