* [U-Boot-Users] [PATCH] AVR32: Change prototype of memset
[not found] <46C9BA81.1080803@indefia.com>
@ 2007-08-27 13:07 ` Haavard Skinnemoen
2007-08-27 13:17 ` Hans-Christian Egtvedt
2007-08-27 13:33 ` Wolfgang Denk
0 siblings, 2 replies; 5+ messages in thread
From: Haavard Skinnemoen @ 2007-08-27 13:07 UTC (permalink / raw)
To: u-boot
[Adding u-boot-users to Cc]
On Mon, 20 Aug 2007 19:00:01 +0300
Semih Hazar <semih.hazar@indefia.com> wrote:
> Signed-off-by: Semih Hazar <semih.hazar@indefia.com>
> ---
>
> The current top of the git tree doesn't compile. This patch changes
> the prototype according to other architectures.
Indeed. Wonder why a file compiled for the _host_ starts pulling in
avr32-specific include files...
Anyway, I've applied your patch since it fixes the build. But I can't
help but wonder if using target-specific headers when compiling stuff
for the host is a disaster waiting to happen...
Here's the error message:
gcc -g -Wall -pedantic -idirafter /home/hskinnemoen/git/u-boot/include -idirafter /home/hskinnemoen/git/u-boot/include2 -idirafter /home/hskinnemoen/git/u-boot/include -DTEXT_BASE=0x00000000 -DUSE_HOSTCC -O -c -o sha1.o sha1.c
In file included from /home/hskinnemoen/git/u-boot/include/linux/string.h:21,
from sha1.c:32:
/home/hskinnemoen/git/u-boot/include/asm/string.h:26: error: expected declaration specifiers or ?...? before ?size_t?
sha1.c: In function ?sha1_hmac?:
sha1.c:323: error: too many arguments to function ?memset?
sha1.c:324: error: too many arguments to function ?memset?
sha1.c:344: error: too many arguments to function ?memset?
sha1.c:345: error: too many arguments to function ?memset?
sha1.c:346: error: too many arguments to function ?memset?
sha1.c:347: error: too many arguments to function ?memset?
and below is the fix. Any reason why sha1.c includes <linux/string.h>
instead of just <string.h>?
Thanks for the patch!
Haavard
> include/asm-avr32/string.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-avr32/string.h b/include/asm-avr32/string.h
> index 8b05d1a..58582a3 100644
> --- a/include/asm-avr32/string.h
> +++ b/include/asm-avr32/string.h
> @@ -23,6 +23,6 @@
> #define __ASM_AVR32_STRING_H
>
> #define __HAVE_ARCH_MEMSET
> -extern void *memset(void *s, int c, size_t n);
> +extern void *memset(void *s, int c, __kernel_size_t n);
>
> #endif /* __ASM_AVR32_STRING_H */
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [PATCH] AVR32: Change prototype of memset
2007-08-27 13:07 ` [U-Boot-Users] [PATCH] AVR32: Change prototype of memset Haavard Skinnemoen
@ 2007-08-27 13:17 ` Hans-Christian Egtvedt
2007-08-27 13:33 ` Wolfgang Denk
1 sibling, 0 replies; 5+ messages in thread
From: Hans-Christian Egtvedt @ 2007-08-27 13:17 UTC (permalink / raw)
To: u-boot
On Mon, 2007-08-27 at 15:07 +0200, Haavard Skinnemoen wrote:
> [Adding u-boot-users to Cc]
>
> On Mon, 20 Aug 2007 19:00:01 +0300
> Semih Hazar <semih.hazar@indefia.com> wrote:
>
> > Signed-off-by: Semih Hazar <semih.hazar@indefia.com>
> > ---
> >
> > The current top of the git tree doesn't compile. This patch changes
> > the prototype according to other architectures.
>
> Indeed. Wonder why a file compiled for the _host_ starts pulling in
> avr32-specific include files...
>
> Anyway, I've applied your patch since it fixes the build. But I can't
> help but wonder if using target-specific headers when compiling stuff
> for the host is a disaster waiting to happen...
It is, Qtopia4 in Buildroot had a similar problem and crashed horribly
when I tried compiling it for AVR32 arch.
<cut error message and patch>
--
With kind regards,
Hans-Christian Egtvedt, Applications Engineer
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [PATCH] AVR32: Change prototype of memset
2007-08-27 13:07 ` [U-Boot-Users] [PATCH] AVR32: Change prototype of memset Haavard Skinnemoen
2007-08-27 13:17 ` Hans-Christian Egtvedt
@ 2007-08-27 13:33 ` Wolfgang Denk
2007-08-27 13:52 ` Håvard Skinnemoen
1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2007-08-27 13:33 UTC (permalink / raw)
To: u-boot
In message <20070827150751.109ac984@dhcp-255-175.norway.atmel.com> you wrote:
> W0FkZGluZyB1LWJvb3QtdXNlcnMgdG8gQ2NdCgpPbiBNb24sIDIwIEF1ZyAyMDA3IDE5OjAwOjAx
> ICswMzAwClNlbWloIEhhemFyIDxzZW1paC5oYXphckBpbmRlZmlhLmNvbT4gd3JvdGU6Cgo+IFNp
> Z25lZC1vZmYtYnk6IFNlbWloIEhhemFyIDxzZW1paC5oYXphckBpbmRlZmlhLmNvbT4KPiAtLS0K
...
Please post plain text only.
> and below is the fix. Any reason why sha1.c includes <linux/string.h>
> instead of just <string.h>?
Because there is no "include/string.h" in U-Boot.
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
An Elephant is a mouse with an Operating System. - Knuth
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [PATCH] AVR32: Change prototype of memset
2007-08-27 13:33 ` Wolfgang Denk
@ 2007-08-27 13:52 ` Håvard Skinnemoen
2007-08-27 15:36 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Håvard Skinnemoen @ 2007-08-27 13:52 UTC (permalink / raw)
To: u-boot
On 8/27/07, Wolfgang Denk <wd@denx.de> wrote:
> In message <20070827150751.109ac984@dhcp-255-175.norway.atmel.com> you wrote:
> > W0FkZGluZyB1LWJvb3QtdXNlcnMgdG8gQ2NdCgpPbiBNb24sIDIwIEF1ZyAyMDA3IDE5OjAwOjAx
> > ICswMzAwClNlbWloIEhhemFyIDxzZW1paC5oYXphckBpbmRlZmlhLmNvbT4gd3JvdGU6Cgo+IFNp
> > Z25lZC1vZmYtYnk6IFNlbWloIEhhemFyIDxzZW1paC5oYXphckBpbmRlZmlhLmNvbT4KPiAtLS0K
> ...
>
> Please post plain text only.
Argh...wonder how that happened. Claws Mail claims that it sent plain
text, or at least something close:
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
but after receiving it through the list, that somehow got turned into
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
I guess something on the way decided that quoted-printable is
unacceptable and turned it into base64...
> > and below is the fix. Any reason why sha1.c includes <linux/string.h>
> > instead of just <string.h>?
>
> Because there is no "include/string.h" in U-Boot.
But there's usually a /usr/include/string.h installed with the host
toolchain, no?
Haavard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] [PATCH] AVR32: Change prototype of memset
2007-08-27 13:52 ` Håvard Skinnemoen
@ 2007-08-27 15:36 ` Wolfgang Denk
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2007-08-27 15:36 UTC (permalink / raw)
To: u-boot
In message <1defaf580708270652j3bec3783s909fde25f9951f94@mail.gmail.com> you wrote:
>
> > > and below is the fix. Any reason why sha1.c includes <linux/string.h>
> > > instead of just <string.h>?
> >
> > Because there is no "include/string.h" in U-Boot.
>
> But there's usually a /usr/include/string.h installed with the host
> toolchain, no?
Sure. But sha1.c is (also) compiled and linked into the U-Boot
binary, and thus it must never reference any headers from the host
system.
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
Good manners are the settled medium of social, as specie is of
commercial, life; returns are equally expected for both.
- Lord Chesterfield _Letters to his Son_, 25 December 1753
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-27 15:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <46C9BA81.1080803@indefia.com>
2007-08-27 13:07 ` [U-Boot-Users] [PATCH] AVR32: Change prototype of memset Haavard Skinnemoen
2007-08-27 13:17 ` Hans-Christian Egtvedt
2007-08-27 13:33 ` Wolfgang Denk
2007-08-27 13:52 ` Håvard Skinnemoen
2007-08-27 15:36 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.