From 8a5de8c36aef610ecae1ee69b392523ad1242d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Tue, 23 Sep 2003 22:52:52 +0000 Subject: [PATCH] support for C++ backends git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1539 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- src/register.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/register.h b/src/register.h index 2b5f86926..d7f03d274 100644 --- a/src/register.h +++ b/src/register.h @@ -2,7 +2,7 @@ * Hamlib Interface - plugin registration * Copyright (c) 2003 by Stephane Fillod * - * $Id: register.h,v 1.1 2003-04-16 22:30:38 fillods Exp $ + * $Id: register.h,v 1.2 2003-09-23 22:52:52 fillods Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -19,6 +19,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ +#ifndef _REGISTER_H +#define _REGISTER_H 1 #ifdef HAVE_CONFIG_H #include "config.h" @@ -27,23 +29,30 @@ #include #include +#ifdef __cplusplus +#define EXTERN_C extern "C" +#else +#define EXTERN_C extern +#endif + #ifdef DECLARE_INITRIG_BACKEND #undef DECLARE_INITRIG_BACKEND #endif -#define DECLARE_INITRIG_BACKEND(backend) extern BACKEND_EXPORT(int) initrigs1_##backend(void *be_handle) +#define DECLARE_INITRIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) initrigs1_##backend(void *be_handle) #ifdef DECLARE_PROBERIG_BACKEND #undef DECLARE_PROBERIG_BACKEND #endif -#define DECLARE_PROBERIG_BACKEND(backend) extern BACKEND_EXPORT(rig_model_t) probeallrigs1_##backend(port_t *port, rig_probe_func_t cfunc, rig_ptr_t data) +#define DECLARE_PROBERIG_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rig_model_t) probeallrigs1_##backend(port_t *port, rig_probe_func_t cfunc, rig_ptr_t data) #ifdef DECLARE_INITROT_BACKEND #undef DECLARE_INITROT_BACKEND #endif -#define DECLARE_INITROT_BACKEND(backend) extern BACKEND_EXPORT(int) initrots1_##backend(void *be_handle) +#define DECLARE_INITROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(int) initrots1_##backend(void *be_handle) #ifdef DECLARE_PROBEROT_BACKEND #undef DECLARE_PROBEROT_BACKEND #endif -#define DECLARE_PROBEROT_BACKEND(backend) extern BACKEND_EXPORT(rot_model_t) probeallrots1_##backend(port_t *port, rig_probe_func_t cfunc, rig_ptr_t data) +#define DECLARE_PROBEROT_BACKEND(backend) EXTERN_C BACKEND_EXPORT(rot_model_t) probeallrots1_##backend(port_t *port, rig_probe_func_t cfunc, rig_ptr_t data) +#endif /* _REGISTER_H */