After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563046 - Solaris fix for preprocessor problem
Solaris fix for preprocessor problem
Status: RESOLVED FIXED
Product: ORBit2
Classification: Deprecated
Component: IDL compiler
2.14.x
Other Solaris
: Normal normal
: ---
Assigned To: ORBit maintainers
ORBit maintainers
: 558796 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-12-02 23:16 UTC by Thomas Klausner
Modified: 2010-03-27 19:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Patch fixing the problem; for details ask Jonathan. (803 bytes, patch)
2008-12-02 23:17 UTC, Thomas Klausner
none Details | Review
Patch against trunk of a few minutes ago, as requested. (835 bytes, patch)
2008-12-03 09:06 UTC, Thomas Klausner
none Details | Review
Patch reworked as suggested by Michael Meeks (1.45 KB, patch)
2009-03-07 03:57 UTC, Thomas Klausner
none Details | Review

Description Thomas Klausner 2008-12-02 23:16:48 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.
Comment 1 Thomas Klausner 2008-12-02 23:17:20 UTC
Created attachment 123841 [details] [review]
Patch fixing the problem; for details ask Jonathan.
Comment 2 Jules Colding 2008-12-03 08:37:18 UTC
The patch is some 150 lines of. Could you please make a patch relative to current trunk and re-submit?

Thanks
Comment 3 Thomas Klausner 2008-12-03 09:06:13 UTC
Created attachment 123856 [details] [review]
Patch against trunk of a few minutes ago, as requested.
Comment 4 Michael Meeks 2008-12-03 09:56:11 UTC
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.
Comment 5 Thomas Klausner 2009-03-07 03:57:18 UTC
Created attachment 130226 [details] [review]
Patch reworked as suggested by Michael Meeks

Compile-tested only, please check before committing this.
Comment 6 Thomas Klausner 2009-03-07 03:58:13 UTC
Forgot to mention, patch is against ORBit2-2.14.17.
Comment 7 Kjartan Maraas 2009-10-02 10:22:24 UTC
Michael, is this ok to commit?
Comment 8 Michael Meeks 2009-10-23 11:57:12 UTC
Sure - if it passes 'make check' it's perfect :-)

Thanks.
Comment 9 Kjartan Maraas 2009-10-28 09:37:50 UTC
Passes make check on Linux at least. Commited.
Comment 10 André Klapper 2010-03-27 19:24:37 UTC
*** Bug 558796 has been marked as a duplicate of this bug. ***