Fix GitHub issue #324 - replace __CYGWIN32__ with __CYGWIN__.
__CYGWIN32__ is not defined when building with the 64-bit Cygwin toolchain. According to the Cygwin FAQ, __CYGWIN__ has been defined since 1998, so this should still work for users on 32-bit systems.
This commit is contained in:
parent
cb3469cf51
commit
cf44f05cd3
|
|
@ -2360,7 +2360,7 @@ extern const char* ivl_type_prop_name(ivl_type_t net, int idx);
|
|||
extern ivl_type_t ivl_type_prop_type(ivl_type_t net, int idx);
|
||||
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
# define DLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define DLLEXPORT
|
||||
|
|
|
|||
2
main.cc
2
main.cc
|
|
@ -68,7 +68,7 @@ extern "C" int optind;
|
|||
extern "C" const char*optarg;
|
||||
#endif
|
||||
|
||||
#if defined(__CYGWIN32__) && !defined(HAVE_GETOPT_H)
|
||||
#if defined(__CYGWIN__) && !defined(HAVE_GETOPT_H)
|
||||
extern "C" int getopt(int argc, char*argv[], const char*fmt);
|
||||
extern "C" int optind;
|
||||
extern "C" const char*optarg;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
# include "vpi_user.h"
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
# define DLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define DLLEXPORT
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ typedef struct t_tfcell
|
|||
*/
|
||||
extern s_tfcell veriusertfs[];
|
||||
extern void veriusertfs_register_table(p_tfcell vtable);
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
extern __declspec(dllexport) void (*vlog_startup_routines[])(void);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
|
||||
#include "vpi_user.h"
|
||||
#include <assert.h>
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ vpiHandle vpi_register_systf(const struct t_vpi_systf_data*ss)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
vpip_routines_s vpi_routines = {
|
||||
.register_cb = vpi_register_cb,
|
||||
.remove_cb = vpi_remove_cb,
|
||||
|
|
@ -240,7 +240,7 @@ bool load_vpi_module(const char*path)
|
|||
return false;
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
void*function = ivl_dlsym(dll, "vpip_set_callback");
|
||||
if (function == 0) {
|
||||
cerr << "warning: '" << path << "' has no vpip_set_callback()" << endl;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
# define DLLEXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define DLLEXPORT
|
||||
|
|
@ -676,7 +676,7 @@ extern void vpip_count_drivers(vpiHandle ref, unsigned idx,
|
|||
# define _vpi_at_APV 6
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
/*
|
||||
* In Linux, when loaded, a shared library can automatically bind to functions
|
||||
* provided by its client. In Windows, a DLL can only do this statically at
|
||||
|
|
@ -731,7 +731,7 @@ typedef struct {
|
|||
|
||||
extern DLLEXPORT PLI_UINT32 vpip_set_callback(vpip_routines_s*routines, PLI_UINT32 version);
|
||||
|
||||
#endif // defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#endif // defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
|
||||
EXTERN_C_END
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
static ivl_dll_t*dll_list = 0;
|
||||
static unsigned dll_list_cnt = 0;
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
typedef PLI_UINT32 (*vpip_set_callback_t)(vpip_routines_s*, PLI_UINT32);
|
||||
#endif
|
||||
typedef void (*vlog_startup_routines_t)(void);
|
||||
|
|
@ -218,7 +218,7 @@ void vpip_load_module(const char*name)
|
|||
return;
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
void*function = ivl_dlsym(dll, "vpip_set_callback");
|
||||
if (function == 0) {
|
||||
fprintf(stderr, "%s: no vpip_set_callback()\n", name);
|
||||
|
|
|
|||
|
|
@ -1702,7 +1702,7 @@ extern "C" void vpip_count_drivers(vpiHandle ref, unsigned idx,
|
|||
rfp->node->count_drivers(idx, counts);
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
vpip_routines_s vpi_routines = {
|
||||
.register_cb = vpi_register_cb,
|
||||
.remove_cb = vpi_remove_cb,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ typedef struct __vpiArray* vvp_array_t;
|
|||
* header file elsewhere.
|
||||
*/
|
||||
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN32__)
|
||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||
extern vpip_routines_s vpi_routines;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue