Re: /bzr/squid3/trunk/ r9551: Add libgen.h to configure checks

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 3 Mar 2009 11:27:59 +1300 (NZDT)

> On 03/02/2009 07:11 AM, Kinkie wrote:
>> On Mon, Mar 2, 2009 at 2:54 PM, Kinkie <gkinkie_at_gmail.com> wrote:
>>
>>> This causes problems on Linux: the basename call included in libgen.h
>>> takes a non-const argument, and thus has issues when the argument is a
>>> string constant and issues warnings which fail the build.
>>> The version in string.h instead works.
>>>
>>> From the comment in Linux' libgen.h:
>>>
>>> /* Return final component of PATH.
>>>
>>> This is the weird XPG version of this function. It sometimes will
>>> modify its argument. Therefore we normally use the GNU version (in
>>> <string.h>) and only if this header is included make the XPG
>>> version available under the real name. */
>>>
>>>
>>> In other words, including libgen.h in Linux is bad. How to more
>>> cleanly detect this and react is not totally clear to me...
>>>
>>
>> Ok, a workable trick may be to use:
>> #if !__linux__ && HAVE_LIBGEN_H
>> #include <libgen.h>
>> #endif
>>
> Since the controversial basename() usage in HERE has been removed, we no
> longer need libgen.h, right? Should it be removed from Debug.h and
> configure.in?
>
> Thank you,
>
> Alex.
>

Hmm, yeah. I dropped it from 3.1 I think, will do a full replacement today
for HEAD to see how that goes.

Amos
Received on Mon Mar 02 2009 - 22:29:15 MST

This archive was generated by hypermail 2.2.0 : Tue Mar 03 2009 - 12:00:03 MST