* [U-Boot] getline prototype issue
@ 2013-07-30 21:12 York Sun
2013-07-30 21:17 ` Simon Glass
0 siblings, 1 reply; 5+ messages in thread
From: York Sun @ 2013-07-30 21:12 UTC (permalink / raw)
To: u-boot
Simon,
Your patch
commit 669dfc2ed8d853d6bcdcafa1de6aca22929465e5
Author: Simon Glass <sjg@chromium.org>
Date: Mon Mar 11 06:30:27 2013 +0000
fdt: Ensure that libfdt_env.h comes from U-Boot
adds libfdt_env.h to HOSTCPPFLAGS. The causes a problem with one of our
older hosts. On the old hosts, getline prototype is protected by
#ifdef __USE_GNU
This should be OK if the C file has #define _GNU_SOURCE. However,
because of your patch, the stdio.h is included before _GNU_SOURCE is
defined. The result is warnings like this
aisimage.c: In function ?aisimage_generate?:
aisimage.c:313: warning: implicit declaration of function ?getline?
kwbimage.c: In function ?kwdimage_set_ext_header?:
kwbimage.c:236: warning: implicit declaration of function ?getline?
imximage.c: In function ?parse_cfg_file?:
imximage.c:430: warning: implicit declaration of function ?getline?
pblimage.c: In function ?pbl_parser?:
pblimage.c:137: warning: implicit declaration of function ?getline?
ublimage.c: In function ?parse_cfg_file?:
ublimage.c:179: warning: implicit declaration of function ?getline?
York
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] getline prototype issue
2013-07-30 21:12 [U-Boot] getline prototype issue York Sun
@ 2013-07-30 21:17 ` Simon Glass
2013-07-30 21:29 ` York Sun
0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2013-07-30 21:17 UTC (permalink / raw)
To: u-boot
Hi York,
On Tue, Jul 30, 2013 at 3:12 PM, York Sun <yorksun@freescale.com> wrote:
> Simon,
>
> Your patch
>
> commit 669dfc2ed8d853d6bcdcafa1de6aca22929465e5
> Author: Simon Glass <sjg@chromium.org>
> Date: Mon Mar 11 06:30:27 2013 +0000
>
> fdt: Ensure that libfdt_env.h comes from U-Boot
>
> adds libfdt_env.h to HOSTCPPFLAGS. The causes a problem with one of our
> older hosts. On the old hosts, getline prototype is protected by
>
> #ifdef __USE_GNU
>
> This should be OK if the C file has #define _GNU_SOURCE. However,
> because of your patch, the stdio.h is included before _GNU_SOURCE is
> defined. The result is warnings like this
>
> aisimage.c: In function ?aisimage_generate?:
> aisimage.c:313: warning: implicit declaration of function ?getline?
> kwbimage.c: In function ?kwdimage_set_ext_header?:
> kwbimage.c:236: warning: implicit declaration of function ?getline?
> imximage.c: In function ?parse_cfg_file?:
> imximage.c:430: warning: implicit declaration of function ?getline?
> pblimage.c: In function ?pbl_parser?:
> pblimage.c:137: warning: implicit declaration of function ?getline?
> ublimage.c: In function ?parse_cfg_file?:
> ublimage.c:179: warning: implicit declaration of function ?getline?
>
I took a quick look at this. It seems that many of the host C files in
tools/ define _GNU_SOURCE. Should we just move that #define to the Makefile?
Regards,
Simon
>
> York
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] getline prototype issue
2013-07-30 21:17 ` Simon Glass
@ 2013-07-30 21:29 ` York Sun
2013-07-30 21:38 ` York Sun
0 siblings, 1 reply; 5+ messages in thread
From: York Sun @ 2013-07-30 21:29 UTC (permalink / raw)
To: u-boot
On 07/30/2013 02:17 PM, Simon Glass wrote:
> Hi York,
>
> On Tue, Jul 30, 2013 at 3:12 PM, York Sun <yorksun@freescale.com
> <mailto:yorksun@freescale.com>> wrote:
>
> Simon,
>
> Your patch
>
> commit 669dfc2ed8d853d6bcdcafa1de6aca22929465e5
> Author: Simon Glass <sjg at chromium.org <mailto:sjg@chromium.org>>
> Date: Mon Mar 11 06:30:27 2013 +0000
>
> fdt: Ensure that libfdt_env.h comes from U-Boot
>
> adds libfdt_env.h to HOSTCPPFLAGS. The causes a problem with one of our
> older hosts. On the old hosts, getline prototype is protected by
>
> #ifdef __USE_GNU
>
> This should be OK if the C file has #define _GNU_SOURCE. However,
> because of your patch, the stdio.h is included before _GNU_SOURCE is
> defined. The result is warnings like this
>
> aisimage.c: In function ?aisimage_generate?:
> aisimage.c:313: warning: implicit declaration of function ?getline?
> kwbimage.c: In function ?kwdimage_set_ext_header?:
> kwbimage.c:236: warning: implicit declaration of function ?getline?
> imximage.c: In function ?parse_cfg_file?:
> imximage.c:430: warning: implicit declaration of function ?getline?
> pblimage.c: In function ?pbl_parser?:
> pblimage.c:137: warning: implicit declaration of function ?getline?
> ublimage.c: In function ?parse_cfg_file?:
> ublimage.c:179: warning: implicit declaration of function ?getline?
>
>
> I took a quick look at this. It seems that many of the host C files in
> tools/ define _GNU_SOURCE. Should we just move that #define to the Makefile?
>
Adding -D_GNU_SOURCE in Makefile can fix this problem.
York
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] getline prototype issue
2013-07-30 21:29 ` York Sun
@ 2013-07-30 21:38 ` York Sun
2013-07-30 21:47 ` Simon Glass
0 siblings, 1 reply; 5+ messages in thread
From: York Sun @ 2013-07-30 21:38 UTC (permalink / raw)
To: u-boot
On 07/30/2013 02:29 PM, York Sun wrote:
> On 07/30/2013 02:17 PM, Simon Glass wrote:
>> Hi York,
>>
>> On Tue, Jul 30, 2013 at 3:12 PM, York Sun <yorksun@freescale.com
>> <mailto:yorksun@freescale.com>> wrote:
>>
>> Simon,
>>
>> Your patch
>>
>> commit 669dfc2ed8d853d6bcdcafa1de6aca22929465e5
>> Author: Simon Glass <sjg at chromium.org <mailto:sjg@chromium.org>>
>> Date: Mon Mar 11 06:30:27 2013 +0000
>>
>> fdt: Ensure that libfdt_env.h comes from U-Boot
>>
>> adds libfdt_env.h to HOSTCPPFLAGS. The causes a problem with one of our
>> older hosts. On the old hosts, getline prototype is protected by
>>
>> #ifdef __USE_GNU
>>
>> This should be OK if the C file has #define _GNU_SOURCE. However,
>> because of your patch, the stdio.h is included before _GNU_SOURCE is
>> defined. The result is warnings like this
>>
>> aisimage.c: In function ?aisimage_generate?:
>> aisimage.c:313: warning: implicit declaration of function ?getline?
>> kwbimage.c: In function ?kwdimage_set_ext_header?:
>> kwbimage.c:236: warning: implicit declaration of function ?getline?
>> imximage.c: In function ?parse_cfg_file?:
>> imximage.c:430: warning: implicit declaration of function ?getline?
>> pblimage.c: In function ?pbl_parser?:
>> pblimage.c:137: warning: implicit declaration of function ?getline?
>> ublimage.c: In function ?parse_cfg_file?:
>> ublimage.c:179: warning: implicit declaration of function ?getline?
>>
>>
>> I took a quick look at this. It seems that many of the host C files in
>> tools/ define _GNU_SOURCE. Should we just move that #define to the Makefile?
>>
>
> Adding -D_GNU_SOURCE in Makefile can fix this problem.
>
Are you going to send out a patch soon?
York
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] getline prototype issue
2013-07-30 21:38 ` York Sun
@ 2013-07-30 21:47 ` Simon Glass
0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2013-07-30 21:47 UTC (permalink / raw)
To: u-boot
On Tue, Jul 30, 2013 at 3:38 PM, York Sun <yorksun@freescale.com> wrote:
> On 07/30/2013 02:29 PM, York Sun wrote:
> > On 07/30/2013 02:17 PM, Simon Glass wrote:
> >> Hi York,
> >>
> >> On Tue, Jul 30, 2013 at 3:12 PM, York Sun <yorksun@freescale.com
> >> <mailto:yorksun@freescale.com>> wrote:
> >>
> >> Simon,
> >>
> >> Your patch
> >>
> >> commit 669dfc2ed8d853d6bcdcafa1de6aca22929465e5
> >> Author: Simon Glass <sjg at chromium.org <mailto:sjg@chromium.org>>
> >> Date: Mon Mar 11 06:30:27 2013 +0000
> >>
> >> fdt: Ensure that libfdt_env.h comes from U-Boot
> >>
> >> adds libfdt_env.h to HOSTCPPFLAGS. The causes a problem with one of
> our
> >> older hosts. On the old hosts, getline prototype is protected by
> >>
> >> #ifdef __USE_GNU
> >>
> >> This should be OK if the C file has #define _GNU_SOURCE. However,
> >> because of your patch, the stdio.h is included before _GNU_SOURCE is
> >> defined. The result is warnings like this
> >>
> >> aisimage.c: In function ?aisimage_generate?:
> >> aisimage.c:313: warning: implicit declaration of function ?getline?
> >> kwbimage.c: In function ?kwdimage_set_ext_header?:
> >> kwbimage.c:236: warning: implicit declaration of function ?getline?
> >> imximage.c: In function ?parse_cfg_file?:
> >> imximage.c:430: warning: implicit declaration of function ?getline?
> >> pblimage.c: In function ?pbl_parser?:
> >> pblimage.c:137: warning: implicit declaration of function ?getline?
> >> ublimage.c: In function ?parse_cfg_file?:
> >> ublimage.c:179: warning: implicit declaration of function ?getline?
> >>
> >>
> >> I took a quick look at this. It seems that many of the host C files in
> >> tools/ define _GNU_SOURCE. Should we just move that #define to the
> Makefile?
> >>
> >
> > Adding -D_GNU_SOURCE in Makefile can fix this problem.
> >
>
> Are you going to send out a patch soon?
>
No, but if you do a patch and cc me I will Ack it :-) Sorry but I can't
actually test this case here.
Regards,
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-07-30 21:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30 21:12 [U-Boot] getline prototype issue York Sun
2013-07-30 21:17 ` Simon Glass
2013-07-30 21:29 ` York Sun
2013-07-30 21:38 ` York Sun
2013-07-30 21:47 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox