curl-library
Re: Problems with CURL_CHECK_OPENSSL_API_HEADERS on Solaris
Date: Tue, 27 Sep 2011 12:00:14 -0500
On Mon, Sep 26, 2011 at 11:20:42PM +0200, Yang Tse wrote:
> 2011/9/26 Albert Chin wrote:
>
> > CURL_CHECK_OPENSSL_API_HEADERS in m4/curl-openssl.m4 doesn't work
> > correctly when using the Sun C compiler. [...]
> > [...]
> > to remove the whitespace in curl_cv_have_def_OPENSSL_VERSION_NUMBER or
> > eat the whitespace in CURL_CHECK_DEF in acinclude.m4:
> > tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
> > "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
> > "$SED" 's/.*CURL_DEF_TOKEN[[ ]]//' 2>/dev/null | \
> > "$SED" 's/[["]][[ ]]*[["]]//g' 2>/dev/null`
> > would become:
> > tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \
> > "$GREP" CURL_DEF_TOKEN 2>/dev/null | \
> > "$SED" 's/.*CURL_DEF_TOKEN[[ ]][[ ]]*//' 2>/dev/null | \
> > "$SED" 's/[["]][[ ]]*[["]]//g' 2>/dev/null`
>
> Given that the origin of the problem is that somehow preprocessing
> makes white space get 'inserted' before the actual value of #define'd
> symbol and given that macro CURL_CHECK_DEF is used in other places, I
> believe that your second option fix is the way to go.
>
> Have you concluded where does the extra white space come from? Is it
> actually the preprocessor or something else?
It comes from the preprocessor.
$ cc -E conftest.c 2>/dev/null | grep CURL_DEF_TOKEN
CURL_DEF_TOKEN 0x1000005fL
-- albert chin (china_at_thewrittenword.com) ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-09-27