All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] RFA: libfdt: using missing type uintptr_t
@ 2008-08-20  0:40 Jerry Van Baren
  2008-08-20  1:11 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Jerry Van Baren @ 2008-08-20  0:40 UTC (permalink / raw)
  To: u-boot

Hello all,  I have a Request For Advice.

I've pulled down the dtc/libfdt updates and applied them to my personal 
working git repository.  It turns out that David Gibson added a use of 
the typedef "uintptr_t" found in linux-land in /usr/include/stdint.h.

<http://thread.gmane.org/gmane.linux.ports.ppc64.devel/43379>

The problem is, currently u-boot doesn't have stdint.h.  It looks like 
we have three options:
1) Hack in the typedef for uintptr_t into "libfdt_env.h"
2) Add the linux stdint.h to u-boot
3) Find an alternative for uintptr_t and convince David and Jon that it 
is A Better Thing to use.

As I see it, #3 is extremely unlikely, especially since David is using 
uintptr_t for exactly the purpose for which it was created.  #1 is, 
well, a hack.  #2 (add linux' stdint.h to u-boot) seems like the best 
approach, but my initial try caused redefinitions between stdint.h and 
types.h as well as missing files:
   #include <features.h>
   #include <bits/wchar.h>
   #include <bits/wordsize.h>
Sigh.

At this point, adding stdint.h seems to be the best option.  Anybody 
have a better approach?

Thanks,
gvb

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] RFA: libfdt: using missing type uintptr_t
  2008-08-20  0:40 [U-Boot] RFA: libfdt: using missing type uintptr_t Jerry Van Baren
@ 2008-08-20  1:11 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2008-08-20  1:11 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 19, 2008 at 08:40:27PM -0400, Jerry Van Baren wrote:
> Hello all,  I have a Request For Advice.
>
> I've pulled down the dtc/libfdt updates and applied them to my personal  
> working git repository.  It turns out that David Gibson added a use of  
> the typedef "uintptr_t" found in linux-land in /usr/include/stdint.h.
>
> <http://thread.gmane.org/gmane.linux.ports.ppc64.devel/43379>
>
> The problem is, currently u-boot doesn't have stdint.h.  It looks like  
> we have three options:
> 1) Hack in the typedef for uintptr_t into "libfdt_env.h"

This doesn't strike me as a hack.  It's exactly the sort of thing that
libfdt_env.h is for.  In fact, I think I already did this when I
updated the in-kernel dtc/libfdt to a recent version (the kernel has a
stdint.h, but the bootwrapper environment doesn't, or not a complete
one).

> 2) Add the linux stdint.h to u-boot

Doesn't have to be the Linux one, though that's probably easy as any.
Any more-or-less C99ish stdint.h will do.

> 3) Find an alternative for uintptr_t and convince David and Jon that it  
> is A Better Thing to use.
>
> As I see it, #3 is extremely unlikely, especially since David is using  
> uintptr_t for exactly the purpose for which it was created.  #1 is,  
> well, a hack.  #2 (add linux' stdint.h to u-boot) seems like the best  
> approach, but my initial try caused redefinitions between stdint.h and  
> types.h as well as missing files:
>   #include <features.h>
>   #include <bits/wchar.h>
>   #include <bits/wordsize.h>
> Sigh.
>
> At this point, adding stdint.h seems to be the best option.  Anybody  
> have a better approach?
>
> Thanks,
> gvb
>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-20  1:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-20  0:40 [U-Boot] RFA: libfdt: using missing type uintptr_t Jerry Van Baren
2008-08-20  1:11 ` David Gibson

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.