fix export prefix and make shared library world readable

This commit is contained in:
andyh2
2019-11-07 16:27:00 -05:00
parent c273054159
commit cbd028653d
2 changed files with 5 additions and 4 deletions

View File

@@ -57,6 +57,7 @@ messaging.so: $(OBJS)
ar -x $(YAML_LIB);
$(CXX) -shared $(LDFLAGS) $^ $(LDLIBS) libs_so/*.o -o '$@'
chmod 644 '$@'
rm -r libs_so
%.a: $(OBJS)

View File

@@ -50,19 +50,19 @@ Poller * Poller::create(std::vector<SubSocket*> sockets){
return p;
}
extern "C" Context * msgq_context_create() {
extern "C" Context * messaging_context_create() {
return Context::create();
}
extern "C" SubSocket * msgq_subsocket_create(Context* context, const char* endpoint) {
extern "C" SubSocket * messaging_subsocket_create(Context* context, const char* endpoint) {
return SubSocket::create(context, std::string(endpoint));
}
extern "C" PubSocket * msgq_pubsocket_create(Context* context, const char* endpoint) {
extern "C" PubSocket * messaging_pubsocket_create(Context* context, const char* endpoint) {
return PubSocket::create(context, std::string(endpoint));
}
extern "C" Poller * msgq_poller_create(SubSocket** sockets, int size) {
extern "C" Poller * messaging_poller_create(SubSocket** sockets, int size) {
std::vector<SubSocket*> socketsVec(sockets, sockets + size);
return Poller::create(socketsVec);
}