Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.24
diff -u -r1.24 configure.in
--- configure.in	2000/08/14 16:46:18	1.24
+++ configure.in	2000/08/14 16:58:01
@@ -1431,6 +1431,10 @@
 dnl dynamic loading
 dnl ---------------
 L=N
+LINKMODS=NOLINKMODS
+MOD_EXPORT=
+MOD_IMPORT_VARIABLE=
+MOD_IMPORT_FUNCTION=
 aixdynamic=no
 hpuxdynamic=no
 if test "$ac_cv_func_dlopen"  != yes ||
@@ -1477,6 +1481,7 @@
 elif test "x$ac_cv_cygwin" = xyes; then
   DL_EXT="${DL_EXT=dll}"
   DLLD="${DLLD=dllwrap}"
+  DLLDFLAGS="${DLLDFLAGS=--export-all-symbols}"
   zsh_cv_func_dlsym_needs_underscore=no
   DLLDFLAGS=${DLLDFLAGS=}
   EXTRA_LDFLAGS=${EXTRA_LDFLAGS=}
@@ -1486,6 +1491,10 @@
   zsh_cv_sys_dynamic_strip_exe="${zsh_cv_sys_dynamic_strip_exe=yes}"
   zsh_cv_sys_dynamic_strip_lib="${zsh_cv_sys_dynamic_strip_lib=yes}"
   zsh_cv_sys_dynamic_broken="${zsh_cv_sys_dynamic_broken=no}"
+  LINKMODS=LINKMODS
+  MOD_EXPORT="__attribute__((__dllexport__))"
+  MOD_IMPORT_VARIABLE="__attribute__((__dllimport__))"
+  MOD_IMPORT_FUNCTION=
 elif test "x$dynamic" = xyes; then
   AC_CACHE_CHECK(if your system use ELF binaries,
    zsh_cv_sys_elf,
@@ -1694,7 +1703,10 @@
 AC_SUBST(EXPOPT)dnl
 AC_SUBST(IMPOPT)dnl
 AC_SUBST(L)dnl
-AC_SUBST(RTLD_GLOBAL_OK)dnl
+AC_SUBST(LINKMODS)dnl
+AC_SUBST(MOD_EXPORT)dnl
+AC_SUBST(MOD_IMPORT_VARIABLE)dnl
+AC_SUBST(MOD_IMPORT_FUNCTION)dnl
 
 CLEAN_MK="${srcdir}/Config/clean.mk"
 CONFIG_MK="${srcdir}/Config/config.mk"
Index: Src/mkmakemod.sh
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/mkmakemod.sh,v
retrieving revision 1.3
diff -u -r1.3 mkmakemod.sh
--- Src/mkmakemod.sh	2000/08/07 17:17:05	1.3
+++ Src/mkmakemod.sh	2000/08/14 16:58:02
@@ -73,15 +73,6 @@
     s,\(.\)/$,\1,
 '
 
-CYGWIN=no
-if uname -s > /dev/null 2>&1; then
-    case `uname -s` in
-	CYGWIN* )
-	    CYGWIN=yes
-	;;
-    esac
-fi
-
 # decide which stages to process
 first_stage=true
 second_stage=true
@@ -202,7 +193,6 @@
 	exportdeps=
 	imports=
 	q_moddeps=
-	dllname=
 	for dep in $moddeps; do
 	    q_dep=`echo $dep | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
 	    q_moddeps="$q_moddeps $q_dep"
@@ -222,9 +212,6 @@
 			zsh/main )
 			    mdll="\$(dir_top)/Src/libzsh-\$(VERSION).\$(DL_EXT) "
 			;;
-			zsh/$mddname )
-			    mdll=
-			;;
 			* )
 			    mdll="${depbase}.\$(DL_EXT) "
 			;;
@@ -245,9 +232,6 @@
 			zsh/main )
 			    mdll="\$(dir_top)/Src/libzsh-\$(VERSION).\$(DL_EXT) "
 			;;
-			zsh/$mddname )
-			    mdll=
-			;;
 			* )
 			    mdll="\$(dir_top)/$loc/${depbase}.\$(DL_EXT) "
 			;;
@@ -272,9 +256,6 @@
 			zsh/main )
 			    mdll="\$(dir_top)/Src/libzsh-\$(VERSION).\$(DL_EXT) "
 			;;
-			zsh/$mddname )
-			    mdll=
-			;;
 			* )
 			    mdll="\$(dir_top)/$loc/${depbase}.\$(DL_EXT) "
 			;;
@@ -288,20 +269,15 @@
 	    modhdeps="$modhdeps $mdh"
 	    exportdeps="$exportdeps $export"
 	    imports="$imports \$(IMPOPT)$export"
-	    if test $CYGWIN = yes -a -n "$mdll"; then
-		case "$mododeps" in
-		    *" $mdll "* )
-			:
-		    ;;
-		    * )
-			mododeps="$mododeps $mdll"
-		    ;;
-		esac
-	    fi
+	    case "$mododeps " in
+		*" $mdll "* )
+		    :
+		;;
+		* )
+		    mododeps="$mododeps $mdll"
+		;;
+	    esac
 	done
-	if test $CYGWIN = yes; then
-		dllname="--dllname $q_name"
-	fi
 
 	echo "##### ===== DEPENDENCIES GENERATED FROM ${mddname}.mdd ===== #####"
 	echo
@@ -312,8 +288,8 @@
 	echo "INCS_${mddname} = \$(EPRO_${mddname}) $otherincs"
 	echo "EXPIMP_${mddname} = $imports \$(EXPOPT)$mddname.export"
 	echo "NXPIMP_${mddname} ="
-	echo "DEPMODS_${mddname} = $mododeps"
-	echo "DLLNAME_${mddname} = $dllname"
+	echo "LINKMODS_${mddname} = $mododeps"
+	echo "NOLINKMODS_${mddname} = "
 	echo
 	echo "proto.${mddname}: \$(EPRO_${mddname})"
 	echo "\$(SYMS_${mddname}): \$(PROTODEPS)"
@@ -338,9 +314,9 @@
 	    echo "uninstall.modules.${mddname}:"
 	    echo "	rm -f \$(DESTDIR)\$(MODDIR)/${name}.\$(DL_EXT)"
 	    echo
-	    echo "${mddname}.\$(DL_EXT): \$(MODDOBJS_${mddname}) ${mddname}.export $exportdeps \$(DEPMODS_${mddname})"
+	    echo "${mddname}.\$(DL_EXT): \$(MODDOBJS_${mddname}) ${mddname}.export $exportdeps \$(@LINKMODS@_${mddname})"
 	    echo '	rm -f $@'
-	    echo "	\$(DLLINK) \$(@E@XPIMP_$mddname) \$(@E@NTRYOPT) \$(DLLNAME_${mddname}) \$(MODDOBJS_${mddname}) \$(DEPMODS_${mddname}) \$(LIBS) "
+	    echo "	\$(DLLINK) \$(@E@XPIMP_$mddname) \$(@E@NTRYOPT) \$(MODDOBJS_${mddname}) \$(@LINKMODS@_${mddname}) \$(LIBS) "
 	    echo
 	fi
 	echo "${mddname}.mdhi: ${mddname}.mdhs \$(INCS_${mddname})"
@@ -368,30 +344,16 @@
 	echo "	    echo '#define have_${q_name}_module'; \\"
 	echo "	    echo; \\"
 	echo "	    echo '# ifndef IMPORTING_MODULE_${q_name}'; \\"
-	if test $CYGWIN = yes; then
-	    echo "	    echo '#  ifdef MODULE'; \\"
-	    echo "	    echo '#   define boot_ __attribute__((__dllexport__)) boot_${q_name}'; \\"
-	    echo "	    echo '#   define cleanup_ __attribute__((__dllexport__)) cleanup_${q_name}'; \\"
-	    echo "	    echo '#   define setup_ __attribute__((__dllexport__)) setup_${q_name}'; \\"
-	    echo "	    echo '#   define finish_ __attribute__((__dllexport__)) finish_${q_name}'; \\"
-	    echo "	    echo '#  else /* MODULE */'; \\"
-	    echo "	    echo '#   define boot_ boot_${q_name}'; \\"
-	    echo "	    echo '#   define cleanup_ cleanup_${q_name}'; \\"
-	    echo "	    echo '#   define setup_ setup_${q_name}'; \\"
-	    echo "	    echo '#   define finish_ finish_${q_name}'; \\"
-	    echo "	    echo '#  endif /* MODULE */'; \\"
-	else
-	    echo "	    if test @SHORTBOOTNAMES@ = yes; then \\"
-	    echo "		echo '#  ifndef MODULE'; \\"
-	    echo "	    fi; \\"
-	    echo "	    echo '#   define boot_ boot_${q_name}'; \\"
-	    echo "	    echo '#   define cleanup_ cleanup_${q_name}'; \\"
-	    echo "	    echo '#   define setup_ setup_${q_name}'; \\"
-	    echo "	    echo '#   define finish_ finish_${q_name}'; \\"
-	    echo "	    if test @SHORTBOOTNAMES@ = yes; then \\"
-	    echo "		echo '#  endif /* !MODULE */'; \\"
-	    echo "	    fi; \\"
-	fi
+	echo "	    if test @SHORTBOOTNAMES@ = yes; then \\"
+	echo "		echo '#  ifndef MODULE'; \\"
+	echo "	    fi; \\"
+	echo "	    echo '#   define boot_ boot_${q_name}'; \\"
+	echo "	    echo '#   define cleanup_ cleanup_${q_name}'; \\"
+	echo "	    echo '#   define setup_ setup_${q_name}'; \\"
+	echo "	    echo '#   define finish_ finish_${q_name}'; \\"
+	echo "	    if test @SHORTBOOTNAMES@ = yes; then \\"
+	echo "		echo '#  endif /* !MODULE */'; \\"
+	echo "	    fi; \\"
 	echo "	    echo '# endif /* !IMPORTING_MODULE_${q_name} */'; \\"
 	echo "	    echo; \\"
 	if test -n "$moddeps"; then (
@@ -416,26 +378,25 @@
 	    echo "	    echo; \\"
 	fi
 	if test -n "$proto"; then
-	    if test "$CYGWIN" = yes; then
-		echo "	    echo '# ifndef IMPORTING_MODULE_${q_name} '; \\"
-		echo "	    echo '#  undef mod_import_variable'; \\"
-		echo "	    echo '#  define mod_import_variable'; \\"
-		echo "	    echo '# endif /* IMPORTING_MODULE_${q_name} */'; \\"
-	    fi
+	    echo "	    echo '# undef mod_import_variable'; \\"
+	    echo "	    echo '# undef mod_import_function'; \\"
+	    echo "	    echo '# if defined(IMPORTING_MODULE_${q_name}) &&  defined(MODULE)'; \\"
+	    echo "	    echo '#  define mod_import_variable @MOD_IMPORT_VARIABLE@'; \\"
+	    echo "	    echo '#  define mod_import_function @MOD_IMPORT_FUNCTION@'; \\"
+	    echo "	    echo '# else'; \\"
+	    echo "	    echo '#  define mod_import_function'; \\"
+	    echo "	    echo '#  define mod_import_variable'; \\"
+	    echo "	    echo '# endif /* IMPORTING_MODULE_${q_name} && MODULE */'; \\"
 	    echo "	    for epro in \$(EPRO_${mddname}); do \\"
 	    echo "		echo '# include \"'\$\$epro'\"'; \\"
 	    echo "	    done; \\"
-	    if test "$CYGWIN" = yes; then
-		echo "	    echo '# ifndef IMPORTING_MODULE_${q_name} '; \\"
-		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 '# undef mod_import_variable'; \\"
+	    echo "	    echo '# define mod_import_variable'; \\"
+	    echo "	    echo '# undef mod_import_variable'; \\"
+	    echo "	    echo '# define mod_import_variable'; \\"
+	    echo "	    echo '# ifndef mod_export'; \\"
+	    echo "	    echo '#  define mod_export @MOD_EXPORT@'; \\"
+	    echo "	    echo '# endif /* mod_export */'; \\"
 	    echo "	    echo; \\"
 	fi
 	echo "	    echo '#endif /* !have_${q_name}_module */'; \\"
@@ -472,17 +433,15 @@
 	    echo "	false # should only happen with make -n"
 	    echo
 	fi
-	if test "$CYGWIN" = yes; then
-	    for mdll in $remote_modules; do
-		echo "$mdll: FORCE"
-		echo "	@cd @%@ && \$(MAKE) \$(MAKEDEFS) @%@$mdll"
-		echo
-	    done | sed 's,^\(.*\)@%@\(.*\)@%@\(.*\)/\([^/]*\)$,\1\3\2\4,'
-	    if test -n "$other_modules"; then
-		echo "${other_modules}:" | sed 's,^ ,,'
-		echo "	false # should only happen with make -n"
-		echo
-	    fi
+	for mdll in $remote_modules; do
+	    echo "$mdll: FORCE"
+	    echo "	@cd @%@ && \$(MAKE) \$(MAKEDEFS) @%@$mdll"
+	    echo
+	done | sed 's,^\(.*\)@%@\(.*\)@%@\(.*\)/\([^/]*\)$,\1\3\2\4,'
+	if test -n "$other_modules"; then
+	    echo "${other_modules}:" | sed 's,^ ,,'
+	    echo "	false # should only happen with make -n"
+	    echo
 	fi
     fi
 
Index: Src/zsh.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.h,v
retrieving revision 1.21
diff -u -r1.21 zsh.h
--- Src/zsh.h	2000/08/10 16:19:12	1.21
+++ Src/zsh.h	2000/08/14 16:58:08
@@ -1681,20 +1681,6 @@
 typedef unsigned char * (*ZleReadFn) _((char *, char *, int));
 
 /***************************************/
-/* Pseudo-keyword to mark exportedness */
-/***************************************/
-
-#if defined(__CYGWIN__) && defined(MODULE)
-#define mod_export __attribute__((__dllexport__))
-#define mod_import_variable __attribute__((__dllimport__))
-#define mod_import_function
-#else
-#define mod_export
-#define mod_import_variable
-#define mod_import_function
-#endif
-
-/***************************************/
 /* Hooks in core.                      */
 /***************************************/
 
