[PR PATCH] Make several libraries private.

Stefan Metzmacher metze at samba.org
Mon Jan 4 07:48:55 UTC 2016

Hi Jelmer,

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

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

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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160104/391ff28e/signature-0001.sig>

More information about the samba-technical mailing list