Re: [PATCH] virthread: include config.h in the header file

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

 



On Wed, Aug 07, 2013 at 11:11:20AM -0400, Paul Moore wrote:
> The virthread.h header file includes platform specific header files
> that help define the thread implementation, see code snippet below.
> 
>   # ifdef WIN32
>   #  include "virthreadwin32.h"
>   # elif defined HAVE_PTHREAD_MUTEXATTR_INIT
>   #  include "virthreadpthread.h"
>   # else
>   #  error "Either pthreads or Win32 threads are required"
>   # endif
> 
> Unfortunately, virthread.h does not include config.h so every source
> file which includes virthread.h must also include config.h, regardless
> of if the source file directly needs definitions in config.h.  This
> patch adds config.h to virthread.h in an effort to help simplify
> things.

Every single .c files is mandated to include <config.h> as its first
header file, so .h files never need include it themselves. We enforce
this rule via 'make syntax-check'.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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