Re: [libvirt] [PATCH] HACKING: add a section on preprocessor conventions

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

 



On Tue, Mar 02, 2010 at 04:23:29PM -0700, Eric Blake wrote:
> * HACKING: Document recently-discussed style issues.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
> 
> Turn recent discussions:
> https://www.redhat.com/archives/libvir-list/2010-March/msg00058.html
> https://www.redhat.com/archives/libvir-list/2010-March/msg00120.html
> 
> into policy, so I don't keep debating style points ;)
> 
> Can wait till after 0.7.7 (particularly since the vararg macro
> series is also waiting).
> 
>  HACKING |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/HACKING b/HACKING
> index be8725d..50b24ee 100644
> --- a/HACKING
> +++ b/HACKING
> @@ -102,6 +102,17 @@ Usually they're in macro definitions or strings, and should be converted
>  anyhow.
> 
> 
> +Preprocessor
> +============
> +For variadic macros, stick with C99 syntax:
> +
> +#define vshPrint(_ctl, ...)   fprintf(stdout, __VA_ARGS__)
> +
> +Use parenthesis when checking if a macro is defined:
> +
> +#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_FALLOCATE)
> +
> +
>  C types
>  =======
>  Use the right type.

  ACK, to be pushed along the other ones after 0.7.7 is out,

    thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]