[dtrace-discuss] dpp(1) - a modest proposal
Rich Morin
rdm at cfcl.com
Mon Dec 17 22:24:25 PST 2007
I have regaled this list before with the portability problems
of cpp(1). So, I won't recapitulate them here, let alone add
the new ones I've found. Just take it as given that cpp is a
very messy corner of Unix that has been abused by legions of
compiler writers for their own peculiar purposes.
That being the case, DTrace is simply begging for problems if
it continues to rely on whatever version of cpp the OS offers.
Each Unix variant it visits will produce new, interesting bugs
that will consume hours of developer time to work around.
Fortunately, none of this is necessary. cpp isn't, after all,
a particularly complicated piece of code. Why not replicate
the parts D needs, discard the rest, and call the result dpp?
When someone uses the appropriate option, run dpp instead of
cpp. And be _sure_ to let programmers call dpp separately, so
that they can view how their macros are being expanded!
-r
--
http://www.cfcl.com/rdm Rich Morin
http://www.cfcl.com/rdm/resume rdm at cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841
Technical editing and writing, programming, and web development
More information about the dtrace-discuss
mailing list