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

From: Kinkie <gkinkie_at_gmail.com>
Date: Mon, 2 Mar 2009 14:54:54 +0100

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

   Kinkie

On Sun, Mar 1, 2009 at 12:12 PM, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
> ------------------------------------------------------------
> revno: 9551
> committer: Amos Jeffries <squid3_at_treenet.co.nz>
> branch nick: trunk
> timestamp: Mon 2009-03-02 00:12:42 +1300
> message:
>  Add libgen.h to configure checks
> modified:
>  configure.in
>  errors/Makefile.am
>
> === modified file 'configure.in'
> --- a/configure.in      2009-02-27 15:34:07 +0000
> +++ b/configure.in      2009-03-01 11:12:42 +0000
> @@ -2229,6 +2229,7 @@
>        ip_nat.h \
>        ipl.h \
>        libc.h \
> +       libgen.h \
>        limits.h \
>        malloc.h \
>        math.h \
>
> === modified file 'errors/Makefile.am'
> --- a/errors/Makefile.am        2009-02-28 13:38:11 +0000
> +++ b/errors/Makefile.am        2009-03-01 11:12:42 +0000
> @@ -146,7 +146,7 @@
>        cp -p $(srcdir)/errorpage.css  $(distdir)/errorpage.css
>
>  translate:
> -       @if test -f $(top_srcdir)/errors/en.po; then \
> +       @if ! test -f $(top_srcdir)/errors/en.po; then \
>          echo "Translation is not currently possible."; \
>          exit 0; \
>        fi; \
>
>
>

-- 
    /kinkie
Received on Mon Mar 02 2009 - 13:55:03 MST

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