GNOME Bugzilla – Bug 563046
Solaris fix for preprocessor problem
Last modified: 2010-03-27 19:24:37 UTC
pkgsrc: pragma fix for some solaris compiler's preprocessor. originally from Jonathan Perkin <sketch@NetBSD.org> in 2004: Sunpro (and possibly other compilers') preprocessor takes the input of "#pragma<space>foo..." and outputs "#pragma<tab>foo...", breaking the ORBit preprocessor which only looks for the former. Ensure the latter case is handled. Fixes build on Solaris/Sunpro.
Created attachment 123841 [details] [review] Patch fixing the problem; for details ask Jonathan.
The patch is some 150 lines of. Could you please make a patch relative to current trunk and re-submit? Thanks
Created attachment 123856 [details] [review] Patch against trunk of a few minutes ago, as requested.
Good grief - the patch will work of course; but if you find yourself cutting pasting& minorly tweaking ~10+ lines of code, it might be better to cut your hand off instead ;-) Can we instead re-write it to test initially for ^#pragma, then [isspace()]* then include_defs and have a single code-path for both space and tab delimiting ? That would I guess make it more generic, more robust - and (critically) maintainable :-) Thanks.
Created attachment 130226 [details] [review] Patch reworked as suggested by Michael Meeks Compile-tested only, please check before committing this.
Forgot to mention, patch is against ORBit2-2.14.17.
Michael, is this ok to commit?
Sure - if it passes 'make check' it's perfect :-) Thanks.
Passes make check on Linux at least. Commited.
*** Bug 558796 has been marked as a duplicate of this bug. ***