[Toybox] Autogeneration of FLAG_x macros.
Georgi Chorbadzhiyski
gf at unixsol.org
Tue Apr 24 03:27:23 PDT 2012
Around 04/12/2012 02:19 PM, Rob Landley scribbled:
> I've also pondered having the script generate FLAG_n macros inside an
> #ifdef block in the header, but #ifdef what? If I "#define TOY echo"
> how do I do an #if with a string compare in it? (I don't want to
> #define using_echo or similar, I want to #define TT this.TOY to at least
> not _increase_ the number of separate things you have to set up in a
> command's header block. It'd be nice if I could temporarily #define
> main TOY##_main to eliminate another instance too.)
>
> Sigh. I'm going to have to use enums, aren't I?
Whats wrong with enums? Kernel devs prefer them over defines.
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
1335263243.0
More information about the Toybox
mailing list