Skip to contentSkip to conversation

patch to common.h

U-Boot-Users Josh Fryman 2 participants 2 messages Feb 21, 2004 – Feb 24, 2004

lore
Share & tools
lore
#0 lore raw

here's a small patch that permits stringification in an ISO C portable way. eg, you can have

  #define FOO	xyzabc

and someplace else call

Xstr(FOO)

which will literally be replaced with

"xyzabc"

this was very useful in a couple of key places in some other patches and new-platform support.

-josh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.E
Type: application/octet-stream
Size: 487 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20040221/62840c85/attachment.obj

#1 lore raw
Quoted 6 lines · In message <[email protected]> you wrote:

here's a small patch that permits stringification in an ISO C portable way. eg, you can have

  #define FOO	xyzabc
Quoted 7 lines

and someplace else call

Xstr(FOO)

which will literally be replaced with

"xyzabc"

This is nothing new.

Quoted 2 lines

this was very useful in a couple of key places in some other patches and new-platform support.

Where exactly is it needed? I can see zero reference in the existing code.

I will not add dead code just for the fun of it. Rejected.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Successful and fortunate crime is called virtue.             - Seneca