Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311420 - Move CONFIG_MAIN into main.c
Summary: Move CONFIG_MAIN into main.c
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.3   Edit
Assignee: Project Inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 15:34 EDT by Doug Schaefer CLA
Modified: 2013-06-05 06:25 EDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (4.79 KB, patch)
2010-05-03 15:35 EDT, Doug Schaefer CLA
no flags Details | Diff
Proposed patch 2. (4.58 KB, patch)
2010-05-03 15:37 EDT, Doug Schaefer CLA
mober.at+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Schaefer CLA 2010-05-03 15:34:59 EDT
The CDT indexer is really confused when parsing config.h. There is a chunk of code there that is only processed when included from main.c. In general, it's confusing to the reader of a header file if it is included multiple times in a project with a different set of conditional blocks enabled. It is also bad style to put function implementations into header files.

This patch moves that code into main.c. It doesn't appear to be called from anywhere else.
Comment 1 Doug Schaefer CLA 2010-05-03 15:35:49 EDT
Created attachment 166860 [details]
Proposed patch
Comment 2 Doug Schaefer CLA 2010-05-03 15:37:25 EDT
Comment on attachment 166860 [details]
Proposed patch

whoops, left some test code there. Will resubmit in a sec.
Comment 3 Doug Schaefer CLA 2010-05-03 15:37:59 EDT
Created attachment 166861 [details]
Proposed patch 2.
Comment 4 Eugene Tarassov CLA 2010-05-05 15:14:05 EDT
Fixed:
1. Service initialization code moved from config.h into separate file: main/services.c
2. Created file main/services-ext.h to allow user extensions of services initialization code.

Thanks.
Comment 5 Martin Oberhuber CLA 2010-05-28 13:57:42 EDT
Eugene, did you actually use Doug's patch to fix this?

If not, then please change the flag to iplog- on the patch.
Comment 6 Doug Schaefer CLA 2010-05-28 13:59:22 EDT
Yeah, sorry. I'm not sure why I turned it on. Habit I guess :).
Comment 7 Martin Oberhuber CLA 2010-05-28 14:08:54 EDT
Bulk update: Marking all TCF fixes from the Helios period (2009-06-29 until 2010-06-01) as target 3.2 since they go through release review along with the TM 3.2 release.
Comment 8 Martin Oberhuber CLA 2010-05-28 14:40:11 EDT
Comment on attachment 166861 [details]
Proposed patch 2.

Marking iplog- since the contribution was not used.
Comment 9 Doug Schaefer CLA 2011-05-17 10:48:15 EDT
Moving bugs to new home for IP log.
Comment 10 Martin Oberhuber CLA 2013-06-05 06:25:23 EDT
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3