Git Product home page Git Product logo

Comments (13)

skliper avatar skliper commented on July 22, 2024

Imported from trac issue 8. Created by jphickey on 2014-12-30T19:34:31, last modified: 2019-03-05T14:57:55

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by jphickey on 2015-01-26 14:00:03:

Pushed branch "trac-8-extern_decl_cleanups" to address this

Commit [changeset:62ec03db]

Ensure that all functions/variables that are referenced from a ".c" file other than the file containing the implementation/instantiation are properly prototyped in a header file.

The following rule was used to determine where the prototype/declaration should reside:

  • For symbols that are only referenced within the same core app (e.g. ES calling another function within ES), place the declaration in a header file within the same core app. This also applies to symbols referenced from the unit test of the same app.
  • For symbols that are referenced by other CFE core applications but not outside CFE core, place the declaration in a newly introduced "private" directory under the existing "inc" directory. Note that placing it here rather than in a separate directory such as "private_inc" allows the existing makefiles to find the new files without modifying include search paths.
  • For symbols that are referenced outside CFE core, place the declaration in the public "inc" directory under the corresponding module.

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by jphickey on 2015-01-26 14:05:13:

Important note regarding merging of the basic fix above:

An additional branch "merge-8+1-cmake_plus_refactor" is also pushed to reflect the merge between this fix and trac #32 (new build/cmake files).

Commit [changeset:ddecc89b]

This basically removes some extra items that had been required to make the build work without the trac 8 change in place. They become unnecessary after trac 8 is merged in.

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by glimes on 2015-02-11 11:50:53:

Current version is [changeset:642acb9] plus [changeset:ddecc89b] merged in [changeset:e7a6636]

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by jphickey on 2015-04-06 11:17:06:

This is ready for review/merge

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by acudmore on 2015-04-06 14:24:18:

I think the reasoning is good, recommend accept.

Do you think anyone will confuse the inc/private files with the subsystem private headers? ( cfe_sb_priv.h? )

Could the private files implemented with a name and excluded from apps using a #ifdef guard?
( keeping them more consistent with the cfe_*_priv.h files )

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by jphickey on 2015-04-06 14:37:29:

With respect to an #ifdef guard --

Actually my original version of this fix had this, the make script would define the CFE_CORE macro when compiling the core apps, and the private include files started in an #ifndef that would error out if someone tried to include them from somewhere else.

The only problem with this approach is that it broke the non-CMake build using the old makefiles, as these did not define the CFE_CORE macro. However they could probably be fixed to do so.

The other option is to put these into a directory at the same level as the "inc" (such as "private_inc") but this also requires a fix to both sets of makefiles to add another -I to the compiler command, and I think there are too many of these already.

At the end of the day I decided it was best to just leave well enough alone. With the way it is now, if someone includes this in an app they actually have to write {{{ #include "private/something.h" }}} which should set off some red flags that this is possibly a bad idea. If the code happens to work anyway, then that is OK, but they will be using it "at their own risk"....

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by jwilmot on 2015-04-06 15:12:34:

Concur. Need to apply this solution to SBN which needs private headers.

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by glimes on 2015-04-07 12:50:15:

Tested changesets [changeset:642acb9] [changeset:ddecc89] [changeset:e7a6636] as part of the ic-2015-03-10 merge.

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by glimes on 2015-04-07 13:46:01:

Will retain these changesets in the merge; a new trac ticket will be opened
to track any further incremental improvemtns.

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by glimes on 2015-04-13 15:13:24:

Part of integration candidate 2015-03-10,
committed to cFS CFE Development branch on 2015-04-10
as part of merge [changeset:7d6f6d0].

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by glimes on 2016-02-16 13:16:45:

Susie confirmed these tickets have been approved for CFE 6.5

from cfe.

skliper avatar skliper commented on July 22, 2024

Trac comment by jhageman on 2019-03-05 14:57:55:

Milestone renamed

from cfe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.