Move all struct and typedefs to separate header#13
Open
LuxoftAKutsan wants to merge 2 commits intosmartdevicelink:masterfrom
Open
Move all struct and typedefs to separate header#13LuxoftAKutsan wants to merge 2 commits intosmartdevicelink:masterfrom
LuxoftAKutsan wants to merge 2 commits intosmartdevicelink:masterfrom
Conversation
According to C standard : ISO/IEC 9899:1999 + TC3 6.2.6/6: ``` The following identifiers have no linkage: an identifier declared to be anything other than an object or a function [...] ``` ISO/IEC 9899:1999 + TC3 6.2.6/6: ``` If an identifier has no linkage, there shall be no more than one declaration of the identifier (in a declarator or type specifier) with the same scope and in the same name space, except for tags as specified in 6.7.2.3. ``` Typedefs cannot be defined multiple times. Because of that bson_c_lib failes to compile with gcc4.4.2
Contributor
Author
|
@JackLivio @jacobkeeler please review |
jacobkeeler
requested changes
Mar 2, 2018
| @@ -0,0 +1,75 @@ | |||
| #ifndef BSON_FWD_H | |||
| #define BSON_FWD_H | |||
Contributor
There was a problem hiding this comment.
Maybe bson_common.h would be a better name? Otherwise, the change looks good
jacobkeeler
requested changes
Mar 6, 2018
Contributor
jacobkeeler
left a comment
There was a problem hiding this comment.
In addition, you need to add this new header to the include_HEADERS variable in src/Makefile.am, then rerun autoreconf -vfi to apply the changes.
| @@ -0,0 +1,75 @@ | |||
| #ifndef BSON_FWD_H | |||
| #define BSON_FWD_H | |||
Contributor
There was a problem hiding this comment.
Header guards should be changed accordingly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to C standard :
ISO/IEC 9899:1999 + TC3 6.2.6/6:
ISO/IEC 9899:1999 + TC3 6.2.6/6:
Typedefs cannot be defined multiple times.
Because of that bson_c_lib failes to compile with gcc4.4.2