add extern "C" to all header files

pull/31/head
Hans-Erik Floryd 2016-02-16 13:35:19 +01:00
parent 185a0ce5ae
commit bec50c277a
9 changed files with 79 additions and 0 deletions

View File

@ -42,6 +42,11 @@
#ifndef _osal_defs_
#define _osal_defs_
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef PACKED
#ifdef _MSC_VER
#define PACKED_BEGIN __pragma(pack(push, 1))
@ -58,4 +63,8 @@
#define OSAL_THREAD_FUNC void
#define OSAL_THREAD_FUNC_RT void
#ifdef __cplusplus
}
#endif
#endif

View File

@ -42,6 +42,11 @@
#ifndef _osal_defs_
#define _osal_defs_
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef PACKED
#define PACKED_BEGIN
#define PACKED __attribute__((__packed__))
@ -53,4 +58,8 @@
#define OSAL_THREAD_FUNC void
#define OSAL_THREAD_FUNC_RT void
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,6 +21,11 @@
#ifndef _osal_
#define _osal_
#ifdef __cplusplus
extern "C"
{
#endif
#include "osal_defs.h"
#include <stdint.h>
@ -58,4 +63,8 @@ void osal_time_diff(ec_timet *start, ec_timet *end, ec_timet *diff);
int osal_thread_create(void *thandle, int stacksize, void *func, void *param);
int osal_thread_create_rt(void *thandle, int stacksize, void *func, void *param);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -21,6 +21,11 @@
#ifndef _osal_defs_
#define _osal_defs_
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef PACKED
#define PACKED_BEGIN
#define PACKED __attribute__((__packed__))
@ -31,4 +36,8 @@
#define OSAL_THREAD_FUNC void
#define OSAL_THREAD_FUNC_RT void
#ifdef __cplusplus
}
#endif
#endif

View File

@ -41,6 +41,11 @@
#ifndef _osal_defs_
#define _osal_defs_
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef PACKED
#define PACKED_BEGIN __pragma(pack(push, 1))
#define PACKED
@ -51,4 +56,8 @@
#define OSAL_THREAD_FUNC void
#define OSAL_THREAD_FUNC_RT void
#ifdef __cplusplus
}
#endif
#endif

View File

@ -47,6 +47,10 @@
#ifndef _oshw_
#define _oshw_
#ifdef __cplusplus
extern "C" {
#endif
#include "ethercattype.h"
#include "nicdrv.h"
#include "ethercatmain.h"
@ -56,4 +60,8 @@ uint16 oshw_ntohs(uint16 networkshort);
ec_adaptert * oshw_find_adapters(void);
void oshw_free_adapters(ec_adaptert * adapter);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -47,6 +47,10 @@
#ifndef _oshw_
#define _oshw_
#ifdef __cplusplus
extern "C"
{
#endif
#include <kern.h>
#include "ethercattype.h"
@ -60,4 +64,8 @@ uint16 oshw_ntohs(uint16 network);
ec_adaptert * oshw_find_adapters(void);
void oshw_free_adapters(ec_adaptert * adapter);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -47,6 +47,11 @@
#ifndef _oshw_
#define _oshw_
#ifdef __cplusplus
extern "C"
{
#endif
#include "ethercattype.h"
#include "nicdrv.h"
#include "ethercatmain.h"
@ -56,4 +61,8 @@ uint16 oshw_ntohs (uint16 networkshort);
ec_adaptert * oshw_find_adapters (void);
void oshw_free_adapters (ec_adaptert * adapter);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -51,6 +51,11 @@
#ifndef _ethercatconfiglist_
#define _ethercatconfiglist_
#ifdef __cplusplus
extern "C"
{
#endif
/*
explanation of dev:
1: static device with no IO mapping ie EK1100
@ -90,4 +95,8 @@ ec_configlist_t ec_configlist[] = {
{/*Man=*/EC_CONFIGEND,/*ID=*/0x00000000,/*Name=*/"" ,/*dtype=*/0,/*Ibits=*/ 0,/*Obits=*/ 0,/*SM2a*/ 0,/*SM2f*/ 0,/*SM3a*/ 0,/*SM3f*/ 0,/*FM0ac*/0,/*FM1ac*/0}
};
#ifdef __cplusplus
}
#endif
#endif