[U-Boot] lib_generic/zlib.c breaks when DEBUG are defined

Gao Ya'nan abutter.gao at gmail.com
Thu Sep 3 01:06:01 CEST 2009


Sorry for my poor English and poor information.

Before meeting this broken, I used U-boot-v2009.06, and no compiling errors.

Then I changed to U-boot-v2009.08, and lib_generic/zlib.c is broken
because of finding no stdio.h and fprintf function when debug function
enabled. So I checked the source code and found that the DEBUG macro
in zlib.c conflict with my global DEBUG macro, and the DEBUG of zlib.c
in U-boot-v2009.06 is DEBUG_ZLIB.

And I'm thinking whether it is right to add a global DEBUG macro in
PLATFORM_CPPFLAGS.

Thanks.

2009/9/2 Wolfgang Denk <wd at denx.de>:
> Dear "Gao Ya'nan",
>
> In message <d15e5cf90909020602m24eefa3dsd8a57b2c70fb22d3 at mail.gmail.com> you wrote:
>> ======================
>> 84 /* Diagnostic functions */
>> 85 #ifdef DEBUG
>> 86 #include <stdio.h>
>> ======================
>>
>> And
>>
>> ======================
>> 1992 #ifdef DEBUG
>> 1993
>> 1994 #ifndef verbose
>> 1995 #define verbose 0
>> 1996 #endif
>> ======================
>
> I'm not sure what exactly you want to tell us. If you see a problem
> and have a fix for it, then please prepare a patch. See
> http://www.denx.de/wiki/U-Boot/Patches for details.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> It is much easier to suggest solutions when you know nothing
>


More information about the U-Boot mailing list