This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add test for linking against most static libraries


On Fri, 28 Oct 2016, Florian Weimer wrote:

> On 10/28/2016 07:33 PM, Joseph Myers wrote:
> 
> > > I'm going to commit the following immediate fix:
> > > 
> > > 2016-10-28  Carlos O'Donell  <carlos@redhat.com>
> > > 
> > > 	* elf/Makefile (CFALGS-tst-linkall-static): Define.
> > 
> > That's not the right fix.  The right way to address such issues is a
> > wrapper header in include/.
> 
> Is this for installed headers only?

<crypt.h> is an installed header.  We want glibc source files and tests to 
include installed headers via the same paths a normal program built with 
installed headers would, so #include <crypt.h> not #include 
<crypt/crypt.h>.  The way we achieve this is through the wrappers in 
include/, some of them trivial (e.g. cpio.h, an example of a wrapper added 
for testcase use for a similar issue), some less trivial.

> I've been using the <crypt/crypt.h> style for internal headers.

That may be reasonable if a file in one directory wants to include an 
internal header from another (though I'd think an internal header used in 
more than one directory should move to include/), but this isn't a case of 
an internal header.  It should have a wrapper that does #include 
<crypt/crypt.h>, so nothing other than the wrapper needs to use that path.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]