Re: [PATCH v2] virsh: workaround readline prototypes warnings

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

 



  Ján Tomko wrote:

> >> What is the purpose of checking for stdarg.h?
> >
> >As the commit message says: "... and add a check for stdarg.h so readline headers
> >use proper rl_message declaration." I thought that's enough details, but
> >obviously it's not as you're asking :-)
> >
> 
> I skipped that part of the commit message. I did not expect that other
> checks would be influenced by this AC_CHECK_HEADERS.
> 
> >The thing is that there's a following code in readline.h:
> >
> >#if defined (USE_VARARGS) && defined (PREFER_STDARG)
> >extern int rl_message (const char *, ...)  __attribute__((__format__ (printf, 1, 2)));
> >#else
> >extern int rl_message ();
> >#endif
> >
> >The latter generates the described warning and the former does not.
> >
> >PREFER_STDARG and USE_VARARGS come from another readline header,
> >rlstdc.h, and it contains the following:
> >
> >#if defined (__STDC__) && defined (HAVE_STDARG_H)
> >#  define PREFER_STDARG
> >#  define USE_VARARGS
> >#else
> >#  if defined (HAVE_VARARGS_H)
> >#    define PREFER_VARARGS
> >#    define USE_VARARGS
> >#  endif
> >#endif
> >
> >So we need to have HAVE_STDARG_H defined to have a proper declaration.
> >
> >How do you like if I rephrase it like "... and add a check for stdarg.h so
> >we have HAVE_STDARG_H defined that's needed by the readline headers to use
> >proper rl_message declaration"?
> >
> 
> Yes, that is clear enough even for me :)
> 
> Jan

Pushed with the commit message updated, thanks!

Roman Bogorodskiy

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux