From 660fd7c1d4c27c3dead276fd09e4cf2978727b30 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 22 May 2001 02:14:47 +0000 Subject: [PATCH] Update the mingw build to not require cygwin files. --- tgt-null/null.c | 7 +++++-- tgt-stub/stub.c | 7 +++++-- tgt-verilog/verilog.c | 7 +++++-- tgt-vvp/vvp.c | 4 ++-- vpi/sys_table.c | 7 +++++-- vpip/vpi_systask.c | 7 +++++-- vvm/ivl_dlfcn.h | 7 +++++-- vvp/compile.cc | 18 +++++++++++++++++- vvp/ivl_dlfcn.h | 7 +++++-- vvp/vpi_modules.cc | 12 ++++++++++-- 10 files changed, 64 insertions(+), 19 deletions(-) diff --git a/tgt-null/null.c b/tgt-null/null.c index cc96345b5..f6bbe2d3a 100644 --- a/tgt-null/null.c +++ b/tgt-null/null.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: null.c,v 1.3 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: null.c,v 1.4 2001/05/22 02:14:47 steve Exp $" #endif /* @@ -32,13 +32,16 @@ int target_design(ivl_design_t des) return 0; } -#if defined(__MINGW32__) || defined (__CYGWIN32__) +#if defined (__CYGWIN32__) #include DECLARE_CYGWIN_DLL(DllMain); #endif /* * $Log: null.c,v $ + * Revision 1.4 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.3 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/tgt-stub/stub.c b/tgt-stub/stub.c index 9babfd3f2..b1250c286 100644 --- a/tgt-stub/stub.c +++ b/tgt-stub/stub.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: stub.c,v 1.41 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: stub.c,v 1.42 2001/05/22 02:14:47 steve Exp $" #endif /* @@ -543,13 +543,16 @@ int target_design(ivl_design_t des) return 0; } -#if defined(__MINGW32__) || defined (__CYGWIN32__) +#if defined (__CYGWIN32__) #include DECLARE_CYGWIN_DLL(DllMain); #endif /* * $Log: stub.c,v $ + * Revision 1.42 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.41 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/tgt-verilog/verilog.c b/tgt-verilog/verilog.c index 001d1f60b..46d980896 100644 --- a/tgt-verilog/verilog.c +++ b/tgt-verilog/verilog.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: verilog.c,v 1.22 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: verilog.c,v 1.23 2001/05/22 02:14:47 steve Exp $" #endif /* @@ -434,13 +434,16 @@ int target_design(ivl_design_t des) } -#if defined(__MINGW32__) || defined (__CYGWIN32__) +#if defined (__CYGWIN32__) #include DECLARE_CYGWIN_DLL(DllMain); #endif /* * $Log: verilog.c,v $ + * Revision 1.23 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.22 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/tgt-vvp/vvp.c b/tgt-vvp/vvp.c index 22664211e..8242852a0 100644 --- a/tgt-vvp/vvp.c +++ b/tgt-vvp/vvp.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vvp.c,v 1.7 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: vvp.c,v 1.8 2001/05/22 02:14:47 steve Exp $" #endif /* @@ -83,7 +83,7 @@ int target_design(ivl_design_t des) return rc; } -#if defined(__MINGW32__) || defined (__CYGWIN32__) +#if defined (__CYGWIN32__) #include DECLARE_CYGWIN_DLL(DllMain); #endif diff --git a/vpi/sys_table.c b/vpi/sys_table.c index 8ae47fdcd..d9d5565fb 100644 --- a/vpi/sys_table.c +++ b/vpi/sys_table.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: sys_table.c,v 1.10 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: sys_table.c,v 1.11 2001/05/22 02:14:47 steve Exp $" #endif #include "vpi_user.h" @@ -40,13 +40,16 @@ void (*vlog_startup_routines[])() = { 0 }; -#if defined(__MINGW32__) || defined (__CYGWIN32__) +#if defined (__CYGWIN32__) #include DECLARE_CYGWIN_DLL(DllMain); #endif /* * $Log: sys_table.c,v $ + * Revision 1.11 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.10 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/vpip/vpi_systask.c b/vpip/vpi_systask.c index 28c91b7d5..4b0b2851d 100644 --- a/vpip/vpi_systask.c +++ b/vpip/vpi_systask.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_systask.c,v 1.2 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: vpi_systask.c,v 1.3 2001/05/22 02:14:47 steve Exp $" #endif # include "vpi_priv.h" @@ -118,13 +118,16 @@ const struct __vpirt *vpip_get_sysfunc_rt(void) return &vpip_sysfunc_rt; } -#if defined(__MINGW32__) || defined (__CYGWIN32__) +#if defined (__CYGWIN32__) #include DECLARE_CYGWIN_DLL(DllMain); #endif /* * $Log: vpi_systask.c,v $ + * Revision 1.3 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.2 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/vvm/ivl_dlfcn.h b/vvm/ivl_dlfcn.h index cdd93b3bb..8924bbaaf 100644 --- a/vvm/ivl_dlfcn.h +++ b/vvm/ivl_dlfcn.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: ivl_dlfcn.h,v 1.2 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: ivl_dlfcn.h,v 1.3 2001/05/22 02:14:47 steve Exp $" #endif #if defined(__MINGW32__) @@ -45,7 +45,7 @@ inline void ivl_dlclose(ivl_dll_t dll) { (void)FreeLibrary((HINSTANCE)dll);} inline const char *dlerror(void) -{ static char s[30]; sprintf(s,"DLError:%l", GetLastError()); return s;} +{ static char s[30]; sprintf(s,"DLError:%ld", GetLastError()); return s;} #elif defined(HAVE_DLFCN_H) inline ivl_dll_t ivl_dlopen(const char*name) @@ -77,6 +77,9 @@ inline const char*dlerror(void) /* * $Log: ivl_dlfcn.h,v $ + * Revision 1.3 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.2 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/vvp/compile.cc b/vvp/compile.cc index 93d95e415..b40167361 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: compile.cc,v 1.65 2001/05/20 00:46:12 steve Exp $" +#ident "$Id: compile.cc,v 1.66 2001/05/22 02:14:47 steve Exp $" #endif # include "compile.h" @@ -36,6 +36,10 @@ # include # include +#ifdef __MINGW32__ +#include +#endif + unsigned compile_errors = 0; /* @@ -215,6 +219,15 @@ void compile_init(void) void compile_load_vpi_module(char*name) { +#ifdef __MINGW32__ + char module_path[4096], *s; + GetModuleFileName(NULL,module_path,1024); + /* Get to the end. Search back twice for backslashes */ + s = module_path + strlen(module_path); + while (*s != '\\') s--; s--; + while (*s != '\\') s--; + strcpy(s,"\\lib\\ivl"); +#endif vpip_load_module(name, module_path); free(name); } @@ -1193,6 +1206,9 @@ vvp_ipoint_t debug_lookup_functor(const char*name) /* * $Log: compile.cc,v $ + * Revision 1.66 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.65 2001/05/20 00:46:12 steve * Add support for system function calls. * diff --git a/vvp/ivl_dlfcn.h b/vvp/ivl_dlfcn.h index cdd93b3bb..8924bbaaf 100644 --- a/vvp/ivl_dlfcn.h +++ b/vvp/ivl_dlfcn.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: ivl_dlfcn.h,v 1.2 2001/05/20 15:09:40 steve Exp $" +#ident "$Id: ivl_dlfcn.h,v 1.3 2001/05/22 02:14:47 steve Exp $" #endif #if defined(__MINGW32__) @@ -45,7 +45,7 @@ inline void ivl_dlclose(ivl_dll_t dll) { (void)FreeLibrary((HINSTANCE)dll);} inline const char *dlerror(void) -{ static char s[30]; sprintf(s,"DLError:%l", GetLastError()); return s;} +{ static char s[30]; sprintf(s,"DLError:%ld", GetLastError()); return s;} #elif defined(HAVE_DLFCN_H) inline ivl_dll_t ivl_dlopen(const char*name) @@ -77,6 +77,9 @@ inline const char*dlerror(void) /* * $Log: ivl_dlfcn.h,v $ + * Revision 1.3 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.2 2001/05/20 15:09:40 steve * Mingw32 support (Venkat Iyer) * diff --git a/vvp/vpi_modules.cc b/vvp/vpi_modules.cc index a3debee64..1db05e6c6 100644 --- a/vvp/vpi_modules.cc +++ b/vvp/vpi_modules.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vpi_modules.cc,v 1.3 2001/03/23 02:40:22 steve Exp $" +#ident "$Id: vpi_modules.cc,v 1.4 2001/05/22 02:14:47 steve Exp $" #endif # include "config.h" @@ -30,7 +30,12 @@ typedef void (*vlog_startup_routines_t)(void); void vpip_load_module(const char*name, const char*path) { char buf[4096]; - sprintf(buf, "%s/%s.vpi", path, name); +#ifdef __MINGW32__ + char sep = '\\'; +#else + char sep = '/'; +#endif + sprintf(buf, "%s%c%s.vpi", path, sep, name); //printf("Load %s...\n", buf); ivl_dll_t dll = ivl_dlopen(buf); @@ -54,6 +59,9 @@ void vpip_load_module(const char*name, const char*path) /* * $Log: vpi_modules.cc,v $ + * Revision 1.4 2001/05/22 02:14:47 steve + * Update the mingw build to not require cygwin files. + * * Revision 1.3 2001/03/23 02:40:22 steve * Add the :module header statement. *