From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26023 invoked from network); 7 Aug 2000 16:02:38 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Aug 2000 16:02:38 -0000 Received: (qmail 4202 invoked by alias); 7 Aug 2000 16:02:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12555 Received: (qmail 4178 invoked from network); 7 Aug 2000 16:02:01 -0000 Date: Mon, 07 Aug 2000 17:01:27 +0100 From: Peter Stephenson Subject: PATCH: static cygwin compilation To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0FYX00DQNJ6FNV@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT 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 Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070