I just prefer to try best to avoiding conflicting with other things(even with systems as poor as win32). A prefix of module name is the best solution, I think, especially if using some normally used terms.
2009/9/30 David Brownell <davi...@pacbell.net> > On Tuesday 29 September 2009, simon qian wrote: > > OUTPUT doesn't conflict with system header files. > > I checked in a fix. > > > > But I recommend to use MODULE_XXXXX to define a macro, > > so it will never conflict with anything. > > After all, IN, OUT, OUTPUT, INPUT and COUNTER are > > commonly used. > > The real bug here is that the MinGW system headers > (or is it Win32?) chose to pollute global namespaces. > > The general policy is that *system* code should be > clearly split out from application code, using such > name prefixes. A name like "OUT" doesn't look even > vaguely system-specific ... a classic app-space name. > > Another general policy is that system headers should > not pull in unrelated crap. Like, say, DCE ... which > isn't even used by OpenOCD. > > Yeah, I know it's unrealistic to expect standard > coding discipline from the Win32 system headers. But > it's fair to point out the root causes of bugs. ;) > > - Dave > > > -- Best Regards, SimonQian http://www.SimonQian.com
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development