Lars Gullik Bjønnes wrote: > Sure it is nice to compile on more than one compiler... but if the > result is muddier code then I am not sure about the gain. (and not > that I have not said that this is the case, just a thing to watch out > for. and we already see quite a bit of preprocessors tokens entering > code...)
Sorry, Lars, but to quote Asger, that is just FUD. Try: $ grep -r '#if' src | \ grep -v ChangeLog | \ grep -v 'config\.h' | \ grep -v ':#ifndef .*_H$' | \ grep -v WITH_WARNINGS | \ grep -v _GLIBCPP_CONCEPT_CHECKS | \ grep -v '#if [01]' | \ grep -v '__cplusplus' > preproc.txt The resulting file is 300+ lines long and, of those 300+ lines, these ones are relatively new: src/lyx_main.C:#ifdef SIGHUP src/buffer.C:#ifdef USE_COMPRESSION src/lyxlex_pimpl.C:#ifdef USE_COMPRESSION src/lyxlex_pimpl.h:#ifdef USE_COMPRESSION src/frontends/qt2/QPrefs.C:#if defined(__CYGWIN__) || defined(__CYGWIN32__) src/frontends/qt2/QPrefsDialog.C:#if defined(__CYGWIN__) || defined(__CYGWIN32__) src/frontends/xforms/FormPreferences.C:#if defined(__CYGWIN__) || defined(__CYGWIN32__) src/support/package.C.in:#if defined (USE_WINDOWS_PACKAGING) || defined (USE_MACOSX_PACKAGING) The USE_COMPRESSION stuff should probably have been there from the beginning, the __CYGWIN__ stuff in the preferences dialog is Kayvan's "let the user decide how paths are output under Cygwin" stuff and the PACKAGING stuff is, well, packaging. The only preprocessor token that's left is the SIGHUP define. That doesn't seem to me to be muddying the source particularly. -- Angus