acl-devel
[Top][All Lists]
Advanced

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

Re: [Acl-devel] [RFC] Add attribute visibility("default") to API functio


From: Yury Usishchev
Subject: Re: [Acl-devel] [RFC] Add attribute visibility("default") to API functions
Date: Mon, 15 Feb 2016 19:40:52 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mike Frysinger <address@hidden> writes:
> On 15 Feb 2016 16:02, Yury Usishchev wrote:
>> While 'include/acl.h' is working well with new approach, I have problems 
>> with declarations from 'include/libacl.h'.
>> Last header is also public, and it is not included into source files during 
>> build. So now I'm getting errors like
>> 
>> acl/build/../tools/chacl.c:275: undefined reference to `acl_entries'
>> 
> every file should be including config.h first.  it's actually an error
> that we haven't been doing this ... it just hasn't bitten us in a way
> that we noticed before, so we've continued to be lazy about it :).  an
> example of this being bad is that config.h does things like:
> # define _ALL_SOURCE 1
> # define _GNU_SOURCE 1
> # define _POSIX_PTHREAD_SEMANTICS 1
> # define _TANDEM_SOURCE 1
> # define __EXTENSIONS__ 1
>
> and those must come before you include any system header file in order
> for them to work properly.
>
> if you wanted to send a patch that deleted the config.h include from
> the misc.h and moved it to the start of every file, that'd be fine.
> do it as a sep patch so it won't be controversial :).
> -mike

Hello Mike!

I prepared 4 patches:

0001-Rework-config.h-usage.patch - move #include "config.h" from misc.h to 
every source file.
  Note that I had to change 'libacl/perm_copy.h' as it is included first in 
many sources by build command.
  Also I patched sources in 'test' directory, and I am not sure if it should be 
done:)

0002-Add-acl-libacl.h-include-where-needed.patch
  To address problem with undefined reference I added explicit #include 
<acl/libacl.h> to each source file with
  definitions of functions declared in 'include/libacl.h'.

0003-Add-sys-acl.h-include-where-needed.patch
  Same for 'sys/acl.h'.
  This patch is not required, in all cases it was included implicitly by 
#include "libacl.h" or #include <acl/libacl.h>
  Also this patch may look better if merged with previous one.

0004-Add-visibility-default-attribute-for-api-functions.patch
  Change of visibility, as discussed previously :)

Can you review them please?

BR,
Yury Usishchev

Attachment: 0001-Rework-config.h-usage.patch
Description: 0001-Rework-config.h-usage.patch

Attachment: 0002-Add-acl-libacl.h-include-where-needed.patch
Description: 0002-Add-acl-libacl.h-include-where-needed.patch

Attachment: 0003-Add-sys-acl.h-include-where-needed.patch
Description: 0003-Add-sys-acl.h-include-where-needed.patch

Attachment: 0004-Add-visibility-default-attribute-for-api-functions.patch
Description: 0004-Add-visibility-default-attribute-for-api-functions.patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]