[patch] WORDSIZE dependant printf length modifiers

Jason Schoon floydpink at gmail.com
Wed Apr 5 16:37:30 UTC 2006


On 4/5/06, Bernhard Fischer <rep.nop at aon.at> wrote:
>
> On Wed, Apr 05, 2006 at 01:23:09PM +0200, Aurelien Jacobs wrote:
> >On Wed, 5 Apr 2006 13:08:31 +0200
> >Bernhard Fischer <rep.nop at aon.at> wrote:
> >
> >> On Wed, Apr 05, 2006 at 10:30:15AM +0200, Bernhard Fischer wrote:
> >> >Hi,
> >> >
> >> >single-applet buildlog for trunk, r14744
> >>
> >> The attached proposed patch would use the proper length modifiers
> >> depending on the wordsize.
> >>
> >> The reasoning behind this is that uintmax_t depends on the wordsize.
> >>
> >> Comments? Ok for trunk?
> >
> >Why not using the standard C99 macros defined in inttypes.h instead
> >of redifining your owns ?
> >PRIuMAX should be fine for uintmax_t.
>
> Yes, that's even better.
>

In that case, <inttypes.h> needs to be included (at least for me).

--- busybox/coreutils/stat.c    2006-04-05 11:33:13.000000000 -0500
+++ busybox/coreutils/stat.c.patched    2006-04-05 11:33:44.000000000 -0500
@@ -25,6 +25,7 @@
  */

 #include <stdio.h>
+#include <inttypes.h>
 #include <sys/types.h>
 #include <pwd.h>
 #include <grp.h>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20060405/4cd25ce7/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stat_include.patch
Type: text/x-patch
Size: 265 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060405/4cd25ce7/attachment.bin 


More information about the busybox mailing list