fix problems with extern C and epics headers in different EPICS versions
This commit is contained in:
@ -26,10 +26,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define STREAM_MAJOR 2
|
#define STREAM_MAJOR 2
|
||||||
#define STREAM_MINOR 8
|
#define STREAM_MINOR 8
|
||||||
|
|
||||||
@ -47,6 +43,10 @@ extern "C" {
|
|||||||
#include "epicsVersion.h"
|
#include "epicsVersion.h"
|
||||||
#ifdef BASE_VERSION
|
#ifdef BASE_VERSION
|
||||||
#define EPICS_3_13
|
#define EPICS_3_13
|
||||||
|
/* EPICS 3.13 include files are not C++ ready. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef epicsExportSharedSymbols
|
#ifdef epicsExportSharedSymbols
|
||||||
@ -71,7 +71,13 @@ extern "C" {
|
|||||||
# include <shareLib.h>
|
# include <shareLib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#ifdef EPICS_3_13
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
typedef ptrdiff_t ssize_t;
|
typedef ptrdiff_t ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -85,6 +91,10 @@ extern const char StreamVersion [];
|
|||||||
|
|
||||||
typedef long (*streamIoFunction) (dbCommon*, format_t*);
|
typedef long (*streamIoFunction) (dbCommon*, format_t*);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
long streamInit(int after);
|
long streamInit(int after);
|
||||||
long streamInitRecord(dbCommon *record,
|
long streamInitRecord(dbCommon *record,
|
||||||
const struct link *ioLink,
|
const struct link *ioLink,
|
||||||
@ -97,6 +107,10 @@ long streamPrintf(dbCommon *record, format_t *format, ...);
|
|||||||
ssize_t streamScanfN(dbCommon *record, format_t *format,
|
ssize_t streamScanfN(dbCommon *record, format_t *format,
|
||||||
void*, size_t maxStringSize);
|
void*, size_t maxStringSize);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* backward compatibility stuff */
|
/* backward compatibility stuff */
|
||||||
#define streamScanf(record, format, value) \
|
#define streamScanf(record, format, value) \
|
||||||
streamScanfN(record, format, value, MAX_STRING_SIZE)
|
streamScanfN(record, format, value, MAX_STRING_SIZE)
|
||||||
@ -110,8 +124,4 @@ ssize_t streamScanfN(dbCommon *record, format_t *format,
|
|||||||
#include "epicsExport.h"
|
#include "epicsExport.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user