[U-Boot] [PATCH 1/2] Update i386 code (sc520_cdp)
Wolfgang Denk
wd at denx.de
Tue Sep 9 23:32:03 CEST 2008
Dear "Graeme Russ",
In message <d66caabb0809090408l32562cfch7672814b944dbede at mail.gmail.com> you wrote:
>
> >> @@ -40,7 +40,7 @@
> >> #include <lmb.h>
> >> #include <linux/string.h>
> >> #include <asm/u-boot.h>
> >> -
> >> +#include <asm/string.h>
> >> #else
> >
> > Including <asm/string.h> seems bogus to me as this is already done in
> > <linux/string.h> which is included just two lines above. Please
> > check.
>
> I've rechecked, but removing this include results in an implicit
> declaration of function 'strncpy' on line 401 of /include/image.h
But this makes no sense to me. That's the relevant code from
"include/linux/string.h":
18 /*
19 * Include machine specific inline routines
20 */
21 #include <asm/string.h>
22
23 #ifndef __HAVE_ARCH_STRCPY
24 extern char * strcpy(char *,const char *);
25 #endif
26 #ifndef __HAVE_ARCH_STRNCPY
27 extern char * strncpy(char *,const char *, __kernel_size_t);
28 #endif
You include <linux/string.h>, which in turn unconditionally includes
<asm/string.h>, so including <asm/string.h> another time in makes no
sense to me.
Can you please dig a bit deeper what's happening there? "gcc -E"
might help...
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
Life is a game. Money is how we keep score. - Ted Turner
More information about the U-Boot
mailing list