-
Notifications
You must be signed in to change notification settings - Fork 290
Hide all symbols except explicitly exported with CASS_EXPORT. #355
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,4 +77,20 @@ struct StaticNextPow2 { | |
enum { value = StaticNextPow2Helper<8 * sizeof(size_t) - 1, N>::value }; | ||
}; | ||
|
||
#if !defined(CASS_STATIC) | ||
# if (defined(WIN32) || defined(_WIN32)) | ||
# if defined(CASS_BUILDING) | ||
# define CASS_IMPL_EXPORT __declspec(dllexport) | ||
# else | ||
# define CASS_IMPL_EXPORT __declspec(dllexport) | ||
# endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The if and else bodies are identical. Why have this if for CASS_BUILDING? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code copied from include/cassandra.h. In commit fb4c1a6 the message says that it solves some Windows warnings. But I can rewrite this code with single #define. |
||
# elif (defined(__SUNPRO_C) || defined(__SUNPRO_CC)) && !defined(CASS_STATIC) | ||
# define CASS_IMPL_EXPORT __global | ||
# elif (defined(__GNUC__) && __GNUC__ >= 4) || defined(__INTEL_COMPILER) | ||
# define CASS_IMPL_EXPORT __attribute__ ((visibility("default"))) | ||
# endif | ||
#else | ||
#define CASS_IMPL_EXPORT | ||
#endif | ||
|
||
#endif |
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.
I'm pretty sure the
#else
should be__declspec(dllimport)
. This is an existing typo. Let me do some research.