cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Potential Fix to libcurl 7.28.1 HPUX11.11 rw_lock.h compiler error developed

From: Michael Wood <esiotrot_at_gmail.com>
Date: Wed, 12 Dec 2012 15:25:20 +0200

Hi

On 12 December 2012 14:58, Yang Tse <yangsita_at_gmail.com> wrote:
> On Wed, Dec 12, 2012 at 7:59 AM, Frank Chang <frank_chang91_at_hotmail.com> wrote:
>> Yang Tse and Dan Fandrich, Thank you for your help .I just developed a
>> potential fix to the nasty rw_lock.h problem.on HPUX 11.11. curl 7.28.1
>> compiles and links successfully if you use the following fix.
>>
>> For example if you go lib/gopher.c and add #define TRUE 1 before #include
>> <net/if.h
>>
>> #ifdef HAVE_NET_IF_H
>> #define TRUE 1
>> #include <net/if.h>
>> #endif
>
> Additionally in other post contents of rw_lock.h read like:
>
>> #ifndef _KERNEL
>> #ifndef TRUE
>> #define TRUE 1
>> #define FALSE 0
>> #else
>> #if ((TRUE != 1) || (FALSE != 0))
>> This is probably not a good thing....
>> #endif
>> #endif /* !TRUE */
>> #endif /* !_KERNEL */
>
> As you have already seen, compilation fails due to combined factors
> somehow _KERNEL has been defined and additionally statement "#if
> ((TRUE != 1) || (FALSE != 0))" is also true.

That's an #ifNdef _KERNEL, not #ifdef.

So the question is rather what is defining TRUE to something other than 1?

-- 
Michael Wood <esiotrot_at_gmail.com>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-12