diff mbox series

[27/67] replication: add include directory header

Message ID 1525376963-79623-28-git-send-email-mst@redhat.com
State New
Headers show
Series include path cleanup | expand

Commit Message

Michael S. Tsirkin May 3, 2018, 7:51 p.m. UTC
This way it is easier to find using standard rules.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/replication.h | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 include/replication.h

Comments

Daniel P. Berrangé May 4, 2018, 9:29 a.m. UTC | #1
On Thu, May 03, 2018 at 10:51:05PM +0300, Michael S. Tsirkin wrote:
> This way it is easier to find using standard rules.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>  include/replication.h | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 100644 include/replication.h
> 
> diff --git a/include/replication.h b/include/replication.h
> new file mode 100644
> index 0000000..2f40e8e
> --- /dev/null
> +++ b/include/replication.h
> @@ -0,0 +1 @@
> +#include_next "../replication.h"

I think this is really crazy. If we want the headers to be accessible
via the include/ directory, lets move them to the include/ directory,
not create wrappers that point back to the source directory.

Regards,
Daniel
Michael S. Tsirkin May 4, 2018, 2:52 p.m. UTC | #2
On Fri, May 04, 2018 at 10:29:24AM +0100, Daniel P. Berrangé wrote:
> On Thu, May 03, 2018 at 10:51:05PM +0300, Michael S. Tsirkin wrote:
> > This way it is easier to find using standard rules.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >  include/replication.h | 1 +
> >  1 file changed, 1 insertion(+)
> >  create mode 100644 include/replication.h
> > 
> > diff --git a/include/replication.h b/include/replication.h
> > new file mode 100644
> > index 0000000..2f40e8e
> > --- /dev/null
> > +++ b/include/replication.h
> > @@ -0,0 +1 @@
> > +#include_next "../replication.h"
> 
> I think this is really crazy. If we want the headers to be accessible
> via the include/ directory, lets move them to the include/ directory,
> not create wrappers that point back to the source directory.
> 
> Regards,
> Daniel

True. I did that initially. However I think maintainers should do this
otherwise this amounts to moving internal headers to include/ wholesale.

At least this patch will stop proliferation of new headers in source
directories.

And with these patches external headers in source directory are
easy to identify.

> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Daniel P. Berrangé May 4, 2018, 3:04 p.m. UTC | #3
On Fri, May 04, 2018 at 05:52:39PM +0300, Michael S. Tsirkin wrote:
> On Fri, May 04, 2018 at 10:29:24AM +0100, Daniel P. Berrangé wrote:
> > On Thu, May 03, 2018 at 10:51:05PM +0300, Michael S. Tsirkin wrote:
> > > This way it is easier to find using standard rules.
> > > 
> > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > ---
> > >  include/replication.h | 1 +
> > >  1 file changed, 1 insertion(+)
> > >  create mode 100644 include/replication.h
> > > 
> > > diff --git a/include/replication.h b/include/replication.h
> > > new file mode 100644
> > > index 0000000..2f40e8e
> > > --- /dev/null
> > > +++ b/include/replication.h
> > > @@ -0,0 +1 @@
> > > +#include_next "../replication.h"
> > 
> > I think this is really crazy. If we want the headers to be accessible
> > via the include/ directory, lets move them to the include/ directory,
> > not create wrappers that point back to the source directory.
> > 
> > Regards,
> > Daniel
> 
> True. I did that initially. However I think maintainers should do this
> otherwise this amounts to moving internal headers to include/ wholesale.

Your change amounts the very same thing IMHO. A #include will find the
"internal" header via include/... If the header is currently used from
outside its source dir, then it is defacto not an internal header any
more, so we should just move it.  If some subset of the header is
internal, the maintainer can decide to separate the internal vs shared
bits later if desired.

Regards,
Daniel
diff mbox series

Patch

diff --git a/include/replication.h b/include/replication.h
new file mode 100644
index 0000000..2f40e8e
--- /dev/null
+++ b/include/replication.h
@@ -0,0 +1 @@ 
+#include_next "../replication.h"