Adapt mingw-build of libtommath.dll to respect internal symbols too
diff --git a/makefile.mingw b/makefile.mingw
index 20b2ffe..0ff00bc 100644
--- a/makefile.mingw
+++ b/makefile.mingw
@@ -78,7 +78,7 @@ $(LIBMAIN_S): $(OBJECTS)
#Create DLL + import library libtommath.dll.a
$(LIBMAIN_D) $(LIBMAIN_I): $(OBJECTS)
- $(CC) -s -shared -o $(LIBMAIN_D) $^ -Wl,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBMAIN_I) $(LTM_LDFLAGS)
+ $(CC) -s -shared -o $(LIBMAIN_D) $^ tommath.def -Wl,--out-implib=$(LIBMAIN_I) $(LTM_LDFLAGS)
$(STRIP) -S $(LIBMAIN_D)
#Build test suite
diff --git a/tommath_private.h b/tommath_private.h
index a6fd3e1..d87ee9b 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -16,7 +16,7 @@
* as a shared object. By default, symbols are visible.
* On Win32 a .def file must be used to specify the exported symbols.
*/
-#if defined(__GNUC__) && __GNUC__ >= 4
+#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(_WIN32)
# define MP_PRIVATE __attribute__ ((visibility ("hidden")))
#else
# define MP_PRIVATE