kopia lustrzana https://github.com/Hamlib/Hamlib
Test for cygwin to avoid Linux specific code
Compile failed on Cygwin looking for Linux specific header files. Add a preprocessor test for cygwin to only compile Windows compatible code.Hamlib-3.0
rodzic
0f2a53581b
commit
6e104f14f2
|
@ -28,6 +28,7 @@
|
|||
#define G313_MODES (RIG_MODE_NONE)
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef __CYGWIN__
|
||||
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#include <windows.h>
|
||||
|
@ -642,7 +643,7 @@ int g313_get_conf(RIG *rig, token_t token, char *val)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
/* end _WIN32 */
|
||||
/* end _WIN32 and __CYGWIN__ */
|
||||
#else
|
||||
|
||||
/* linux, maybe other posix */
|
||||
|
@ -1148,4 +1149,5 @@ const struct rig_caps g313_caps =
|
|||
.get_info = g313_get_info,
|
||||
};
|
||||
|
||||
#endif /* not __CYGWIN__ */
|
||||
#endif /* not _WIN32 */
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#ifndef _WIN32
|
||||
#ifndef __CYGWIN__
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
@ -168,4 +169,5 @@ void UninitAPI(void)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* not __CYGWIN__ */
|
||||
#endif /* not _WIN32 */
|
||||
|
|
|
@ -246,10 +246,18 @@ DECLARE_INITRIG_BACKEND(winradio)
|
|||
|
||||
/* Receivers with DLL only available under Windows */
|
||||
#ifdef _WIN32
|
||||
#ifdef __CYGWIN__
|
||||
rig_register(&g303_caps);
|
||||
rig_register(&g305_caps);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Not available on MS Windows */
|
||||
#ifndef _WIN32
|
||||
#ifndef __CYGWIN__
|
||||
rig_register(&g313_caps);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue