about summary refs log tree commit diff
path: root/Src/mkmakemod.sh
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-08-07 17:17:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-08-07 17:17:05 +0000
commita021f6329be43973cf4d9e9248daa915235dda9e (patch)
tree5916b451c43fdc3a320b7376c2b78905e6978444 /Src/mkmakemod.sh
parent1d2948c2da8c19f681daa26da2fc312b5fc697a2 (diff)
downloadzsh-a021f6329be43973cf4d9e9248daa915235dda9e.tar.gz
zsh-a021f6329be43973cf4d9e9248daa915235dda9e.tar.xz
zsh-a021f6329be43973cf4d9e9248daa915235dda9e.zip
12555: fix static linking on cygwin
Diffstat (limited to 'Src/mkmakemod.sh')
-rw-r--r--Src/mkmakemod.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/Src/mkmakemod.sh b/Src/mkmakemod.sh
index 6c9e8bcf1..0e8702ce3 100644
--- a/Src/mkmakemod.sh
+++ b/Src/mkmakemod.sh
@@ -427,8 +427,13 @@ if $first_stage; then
 	    echo "	    done; \\"
 	    if test "$CYGWIN" = yes; then
 		echo "	    echo '# ifndef IMPORTING_MODULE_${q_name} '; \\"
-		echo "	    echo '#  undef mod_import_variable'; \\"
-		echo "	    echo '#  define mod_import_variable __attribute__((__dllimport__))'; \\"
+		echo "      echo '#  ifdef MODULE'; \\"
+		echo "	    echo '#   undef mod_import_variable'; \\"
+		echo "	    echo '#   define mod_import_variable __attribute__((__dllimport__))'; \\"
+		echo "      echo '#  else /* MODULE */'; \\"
+		echo "      echo '#   undef mod_import_variable'; \\"
+		echo "      echo '#   define mod_import_variable'; \\"
+		echo "      echo '#  endif /* MODULE */'; \\"
 		echo "	    echo '# endif /* IMPORTING_MODULE_${q_name} */'; \\"
 	    fi
 	    echo "	    echo; \\"