svn commit: trunk/busybox/util-linux

Denis Vlasenko vda.linux at googlemail.com
Wed Sep 20 23:53:53 PDT 2006


On Wednesday 20 September 2006 19:25, Rob Landley wrote:
> > No, not in applet. "linenumber" can be declared in a library header
> > (libc or any other external library a programs compiles against)
> > as a global variable. Just like FILE *stdout.
> 
> You're replacing a #declare with an enum, at the global level, in an applet.  
> I see no reason to do this.

Ok, an example:

#include <libio.h>
[
inside libio.h:
#define _IO_ferror_unlocked(fp) (((fp)->flags & _IO_ERR_SEEN) != 0)
]
....
....
....
#ifdef CONFIG_FOO
int flags;
#else
#define flags 0
#endif
...

	if (_IO_ferror_unlocked(stdio))  // cryptic error messags from gcc
		bad();


enum would work here just fine.
--
vda


More information about the busybox mailing list