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: Mike Frysinger
Subject: Re: [Acl-devel] [RFC] Add attribute visibility("default") to API functions
Date: Mon, 15 Feb 2016 12:51:50 -0500

On 15 Feb 2016 19:40, Yury Usishchev wrote:
> 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:)

the tests look harmless, but should be fine.  pushed now.

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

to make things nicer, i'm thinking it'd be best if libacl/libacl.h had
the acl/libacl.h include.  all the files in libacl/ have to include that
already.

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

same here ... i think having the include in libacl/libacl.h is OK.
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

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