Skip to content
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

protobuf-c-rpc.h has no C++ header guard (extern "C") #18

Open
carlbakerhp opened this issue Sep 14, 2019 · 0 comments
Open

protobuf-c-rpc.h has no C++ header guard (extern "C") #18

carlbakerhp opened this issue Sep 14, 2019 · 0 comments

Comments

@carlbakerhp
Copy link

carlbakerhp commented Sep 14, 2019

When I currently include protobuf-c-rpc.h, I'm forced to externally bracket it with:

#ifdef __cplusplus
extern "C" {
#endif
#include <protobuf-c-rpc/protobuf-c-rpc.h>
#ifdef __cplusplus
}
#endif

This could be remedied by adding something like this before the #includes in protobuf-c-rpc.h:

#if defined(__cplusplus) && !defined(PROTOBUF_C__BEGIN_DECLS)
# define PROTOBUF_C__BEGIN_DECLS	extern "C" {
# define PROTOBUF_C__END_DECLS		}
#else
# define PROTOBUF_C__BEGIN_DECLS
# define PROTOBUF_C__END_DECLS
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant