[PR PATCH] Make several libraries private.

Jelmer Vernooń≥ jelmer at samba.org
Mon Jan 4 11:12:48 UTC 2016


On Mon, Jan 04, 2016 at 08:48:55AM +0100, Stefan Metzmacher wrote:
> >>> ---
> >>> lib/util/time_basic.h | 3 +--
> >>> 1 file changed, 1 insertion(+), 2 deletions(-)
> >>>
> >>> diff --git a/lib/util/time_basic.h b/lib/util/time_basic.h
> >>> index d485399..87e6303 100644
> >>> --- a/lib/util/time_basic.h
> >>> +++ b/lib/util/time_basic.h
> >>> @@ -24,8 +24,7 @@
> >>> #ifndef _SAMBA_TIME_BASIC_H_
> >>> #define _SAMBA_TIME_BASIC_H_
> >>>
> >>> -#include "replace.h"
> >>> -#include "system/time.h"
> >>> +#include <system/time.h>
> >>
> >> system/time.h is also from libreplace, if you want to avoid it
> >> we may just add a forward declaration for "struct timeval;"
> >> and don't include any header.
> > Done.
> 
> Thanks! The only remaining thing in the new patch is
> time_basic.c should use #include "system/time.h" instead of
> #include <system/time.h>
Done.

> >> >From 0a0d14e54ec11a2b49eac916221da1440da19ed2 Mon Sep 17 00:00:00 2001
> >>> From: Jelmer Vernooij <jelmer at jelmer.uk>
> >>> Date: Mon, 28 Dec 2015 22:21:11 +0000
> >>> Subject: [PATCH 11/11] Add a new header file for functions in lib/util/util.c.
> >>>
> >>> This allows public headers to not include samba_util.h, but rather
> >>> specific header files under lib/util.
> >>
> >> This commit contains more than adding lib/util/util.h,
> >> also as there're only dump_data_* functions in there,
> >> should we name it dump_data.h?
> 
> What about the change into dump_data.h?
> I think it would be a much better name than util.h.
The same applies to the name of the C file that these functions live
in. I think renaming that is orthogonal to this change.

> >> I guess some of it belongs to "Make libcli-smb-raw private, for now."
> >> and some is completely unrelated and should be in separate commits.
> >>
> >> Why are you changing bld.SAMBA_LIBRARY('errors') from a private library
> >> into a public one?
> > It is actually public, since its headers are installed. Other
> > libraries use it and expose parts of it in (e.g. the NTSTATUS type).
> 
> Ah, ok.
> 
> Doesn't the same apply to tevent-util? tevent_ntstatus.h is used
> in the pidl generated code. So we can't make tevent-util private.
> 
> I think it would be good to have a small program that is build at the
> end of the samba-libs autobuild target that makes use of all public headers
> and libraries which are used by known external consumers.
Ah, I hadn't considered they use it. I'll exclude the tevent-util
change.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160104/1c91e276/signature.sig>


More information about the samba-technical mailing list