Export symbols in order to support shared libraries (#54)

* Add BAC_ROUTING compile definition

* Reorder cmake

* Fix OpenSSL support: support both 1.0 and 1.1t pus

* Explicitly export symbols, hidden by default

* Build shared libraries on travis using cmake

* Learn Makefile about static library

* Fix build using mingw with cmake

* Do not cleanup twice or after potential free
This commit is contained in:
Anonymous Maarten
2020-03-06 22:42:03 +01:00
committed by GitHub
parent bb5fafc06a
commit 4a916468c6
174 changed files with 2200 additions and 91 deletions
+14
View File
@@ -24,6 +24,7 @@
#ifndef KEYLIST_H
#define KEYLIST_H
#include "bacnet/bacnet_stack_exports.h"
#include "key.h"
/* This is a key sorted linked list data library that */
@@ -48,68 +49,81 @@ extern "C" {
#endif /* __cplusplus */
/* returns head of the list or NULL on failure. */
BACNET_STACK_EXPORT
OS_Keylist Keylist_Create(
void);
/* delete specified list */
/* note: you should pop all the nodes off the list first. */
BACNET_STACK_EXPORT
void Keylist_Delete(
OS_Keylist list);
/* inserts a node into its sorted position */
/* returns the index where it was added */
BACNET_STACK_EXPORT
int Keylist_Data_Add(
OS_Keylist list,
KEY key,
void *data);
/* deletes a node specified by its key */
BACNET_STACK_EXPORT
/* returns the data from the node */
void *Keylist_Data_Delete(
OS_Keylist list,
KEY key);
/* deletes a node specified by its index */
BACNET_STACK_EXPORT
/* returns the data from the node */
void *Keylist_Data_Delete_By_Index(
OS_Keylist list,
int index);
/* returns the data from last node, and removes it from the list */
BACNET_STACK_EXPORT
void *Keylist_Data_Pop(
OS_Keylist list);
/* returns the data from the node specified by key */
BACNET_STACK_EXPORT
void *Keylist_Data(
OS_Keylist list,
KEY key);
/* returns the index from the node specified by key */
BACNET_STACK_EXPORT
int Keylist_Index(
OS_Keylist list,
KEY key);
/* returns the data specified by key */
BACNET_STACK_EXPORT
void *Keylist_Data_Index(
OS_Keylist list,
int index);
/* return the key at the given index */
BACNET_STACK_EXPORT
KEY Keylist_Key(
OS_Keylist list,
int index);
/* returns the next empty key from the list */
BACNET_STACK_EXPORT
KEY Keylist_Next_Empty_Key(
OS_Keylist list,
KEY key);
/* returns the number of items in the list */
BACNET_STACK_EXPORT
int Keylist_Count(
OS_Keylist list);
#ifdef TEST
#include "ctest.h"
BACNET_STACK_EXPORT
void testKeyList(
Test * pTest);
#endif