-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all struct and typedefs to separate header #13
base: master
Are you sure you want to change the base?
Move all struct and typedefs to separate header #13
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
@JackLivio @jacobkeeler please review |
src/bson_fwd.h
Outdated
@@ -0,0 +1,75 @@ | |||
#ifndef BSON_FWD_H | |||
#define BSON_FWD_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe bson_common.h
would be a better name? Otherwise, the change looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jacobkeeler fixed in
98d6cd6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header guards should be changed accordingly
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