From 5db86a59145dde506b45771d208f1dfea3e72f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Fri, 15 Jun 2001 06:59:47 +0000 Subject: [PATCH] further win32 porting git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@552 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- include/hamlib/rig.h | 12 ++++++++++-- include/hamlib/rig_dll.h | 13 ++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index ac98fcb9b..2fb0eb683 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -5,7 +5,7 @@ * will be used for obtaining rig capabilities. * * - * $Id: rig.h,v 1.39 2001-06-12 23:59:21 f4cfe Exp $ + * $Id: rig.h,v 1.40 2001-06-15 06:59:47 f4cfe Exp $ * * * This program is free software; you can redistribute it and/or @@ -31,6 +31,9 @@ #include /* required for FILE definition */ #include /* required for struct timeval */ +#if defined(__CYGWIN__) || defined(_WIN32) +#include /* HANDLE definition */ +#endif /* __BEGIN_DECLS should be used at the beginning of your declarations, * so that C++ compilers don't mangle their names. Use __END_DECLS at @@ -846,7 +849,7 @@ typedef struct { } type; int fd; FILE *stream; -#ifdef _WIN32 +#if defined(__CYGWIN__) || defined(_WIN32) HANDLE handle; /* for serial special handling (PTT,DCD,..) */ #endif @@ -959,6 +962,11 @@ struct rig_state { */ rig_ptr_t priv; + /* + * internal use by hamlib++ for event handling + */ + rig_ptr_t obj; + /* etc... */ }; diff --git a/include/hamlib/rig_dll.h b/include/hamlib/rig_dll.h index ac97cabfa..c71624648 100644 --- a/include/hamlib/rig_dll.h +++ b/include/hamlib/rig_dll.h @@ -1,4 +1,4 @@ -/* $Id: rig_dll.h,v 1.1 2001-06-12 23:59:21 f4cfe Exp $ */ +/* $Id: rig_dll.h,v 1.2 2001-06-15 06:59:47 f4cfe Exp $ */ #if defined(__CYGWIN__) @@ -6,6 +6,9 @@ # if defined(HAMLIB_STATIC) # undef HAMLIB_STATIC # endif +# if defined(ALL_STATIC) +# undef ALL_STATIC +# endif # endif # undef HAMLIB_IMPEXP # undef HAMLIB_API @@ -14,9 +17,9 @@ # if defined(HAMLIB_DLL) /* building a DLL */ # define HAMLIB_IMPEXP __declspec(dllexport) -# elif defined(HAMLIB_STATIC) +# elif defined(HAMLIB_STATIC) || defined(ALL_STATIC) /* building or linking to a static library */ -# define HAMLIB_IMPEXP /* nothing */ +# define HAMLIB_IMPEXP # else /* linking to the DLL */ # define HAMLIB_IMPEXP __declspec(dllimport) @@ -28,10 +31,10 @@ /* Take care of non-cygwin platforms */ #if !defined(HAMLIB_IMPEXP) -# define HAMLIB_IMPEXP /* nothing */ +# define HAMLIB_IMPEXP #endif #if !defined(HAMLIB_API) -# define HAMLIB_API /* nothing */ +# define HAMLIB_API #endif #if !defined(HAMLIB_EXPORT) # define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API