zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: static cygwin compilation
@ 2000-08-07 16:01 Peter Stephenson
  2000-08-07 16:22 ` Andrej Borsenkow
  2000-08-14  5:55 ` Andrej Borsenkow
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Stephenson @ 2000-08-07 16:01 UTC (permalink / raw)
  To: Zsh hackers list

I can't get dynamic linking on cygwin to work, and the problem is somewhere
in the middle of dllwrap which is giving no help, so I won't be able to
debug this any time soon.

Static linking is now broken:  the following seems to fix it up.  However,
I won't be able to tell if this re-breaks dynamic compilation.  If I've
understood the meaning of MODULE correctly, it shouldn't.

Index: Src/mkmakemod.sh
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/mkmakemod.sh,v
retrieving revision 1.2
diff -u -r1.2 mkmakemod.sh
--- Src/mkmakemod.sh	2000/08/02 18:01:51	1.2
+++ Src/mkmakemod.sh	2000/08/07 14:54:39
@@ -427,8 +427,13 @@
 	    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; \\"
Index: Src/zsh.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.h,v
retrieving revision 1.18
diff -u -r1.18 zsh.h
--- Src/zsh.h	2000/08/02 18:01:51	1.18
+++ Src/zsh.h	2000/08/07 14:54:39
@@ -1681,7 +1681,7 @@
 /* Pseudo-keyword to mark exportedness */
 /***************************************/
 
-#ifdef __CYGWIN__
+#if defined(__CYGWIN__) && defined(MODULE)
 #define mod_export __attribute__((__dllexport__))
 #define mod_import_variable __attribute__((__dllimport__))
 #define mod_import_function

-- 
Peter Stephenson <pws@csr.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-08-14  5:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-07 16:01 PATCH: static cygwin compilation Peter Stephenson
2000-08-07 16:22 ` Andrej Borsenkow
2000-08-07 17:11   ` Andrej Borsenkow
2000-08-14  5:55 ` Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).