From 537c0d8bdf7f98146d9cb0f2b15239647f2f7cdc Mon Sep 17 00:00:00 2001 From: kingdl802 Date: Thu, 9 Apr 2009 15:51:59 +0000 Subject: [PATCH] Make this c header file c++ compatible. --- bacnet-stack/include/datalink.h | 8 ++++++++ bacnet-stack/include/keylist.h | 8 ++++++++ bacnet-stack/include/objects.h | 5 ----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/bacnet-stack/include/datalink.h b/bacnet-stack/include/datalink.h index 892999a1..5c0e2cd0 100644 --- a/bacnet-stack/include/datalink.h +++ b/bacnet-stack/include/datalink.h @@ -88,6 +88,10 @@ #define MAX_HEADER (8) #define MAX_MPDU (MAX_HEADER+MAX_PDU) +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + int datalink_send_pdu( BACNET_ADDRESS * dest, BACNET_NPDU_DATA * npdu_data, @@ -108,6 +112,10 @@ extern void datalink_set_interface( char *ifname); extern void datalink_set( char *datalink_string); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif #endif diff --git a/bacnet-stack/include/keylist.h b/bacnet-stack/include/keylist.h index 951a3ddb..c21a5ba6 100644 --- a/bacnet-stack/include/keylist.h +++ b/bacnet-stack/include/keylist.h @@ -53,6 +53,10 @@ typedef struct Keylist { } KEYLIST_TYPE; typedef KEYLIST_TYPE *OS_Keylist; +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* returns head of the list or NULL on failure. */ OS_Keylist Keylist_Create( void); @@ -109,4 +113,8 @@ KEY Keylist_Next_Empty_Key( int Keylist_Count( OS_Keylist list); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/bacnet-stack/include/objects.h b/bacnet-stack/include/objects.h index 7a47a083..622bf01d 100644 --- a/bacnet-stack/include/objects.h +++ b/bacnet-stack/include/objects.h @@ -84,9 +84,4 @@ typedef struct object_device_t { uint32_t Database_Revision; } OBJECT_DEVICE_T; - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ #endif