From 7f6257952401f0bfbd0b89b706e6a1582ec031d3 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Wed, 26 Oct 2011 20:33:31 +0100 Subject: [PATCH] Fix for tf_getlongsimtime link error on MinGW/Cygwin. MinGW and Cygwin don't currently support weak function definitions. For these platforms, make tf_getlongsimtime a strong symbol. --- libveriuser/getsimtime.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libveriuser/getsimtime.c b/libveriuser/getsimtime.c index 866d17b31..e016af08e 100644 --- a/libveriuser/getsimtime.c +++ b/libveriuser/getsimtime.c @@ -85,10 +85,13 @@ PLI_INT32 tf_getlongtime(PLI_INT32 *high) /* * This function is not defined in the IEE standard, but is provided for - * compatibility with other simulators. Make it a weak symbol just in - * case the user has defined their own function for this. + * compatibility with other simulators. On platforms that support this, + * make it a weak symbol just in case the user has defined their own + * function for this. */ +#if !defined(__CYGWIN__) && !defined(__MINGW32__) PLI_INT32 tf_getlongsimtime(PLI_INT32 *high) __attribute__ ((weak)); +#endif PLI_INT32 tf_getlongsimtime(PLI_INT32 *high) { s_vpi_time timerec;