Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Cygwin compilation



This fixes up some exported data symbols to stop dllwrap complaining
that it had to work it out for itself, although it got them right.

One case where the version of dllwrap I have (2.13.90) didn't get it
right is that when it linked modules against zsh.dll it somehow missed
the last function symbol in alphabetic order, in this case zwarnnam, and
thought it had to import that as a data symbol, with catastrophic
results.  I confirmed this by adding a dummy exported function
zz_plural_z_alpha, which fixed the problem.  Has anyone else encountered
this?  Maybe Christopher is lurking.

One exported data symbol I haven't fixed up is the carefully named
global variable `c' in zle_main.c.  Apparently this needs to be exported
so that complist.c can see it (in msearch(), not to be confused with a
zillion other uses of the variable name `c' in that file).  I haven't
fixed this because I'm desperately hoping for someone to tell me it's
not true.

Index: Src/lex.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/lex.c,v
retrieving revision 1.25
diff -u -r1.25 lex.c
--- Src/lex.c	17 Jul 2003 09:44:39 -0000	1.25
+++ Src/lex.c	7 Aug 2003 16:37:20 -0000
@@ -44,7 +44,7 @@
 /**/
 mod_export int tok;
 /**/
-int tokfd;
+mod_export int tokfd;
 
 /* lexical analyzer error flag */
  
Index: Src/math.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/math.c,v
retrieving revision 1.18
diff -u -r1.18 math.c
--- Src/math.c	10 Mar 2003 15:24:08 -0000	1.18
+++ Src/math.c	7 Aug 2003 16:37:20 -0000
@@ -40,7 +40,7 @@
 /* integer zero */
 
 /**/
-mnumber zero_mnumber;
+mod_export mnumber zero_mnumber;
 
 /* last input base we used */
 
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.63
diff -u -r1.63 compcore.c
--- Src/Zle/compcore.c	4 Jul 2002 09:29:22 -0000	1.63
+++ Src/Zle/compcore.c	7 Aug 2003 16:37:20 -0000
@@ -277,7 +277,7 @@
 /* This holds the end-position of the last string inserted into the line. */
 
 /**/
-int lastend;
+mod_export int lastend;
 
 #define inststr(X) inststrlen((X),1,-1)
 
Index: Src/Zle/zle_main.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v
retrieving revision 1.34
diff -u -r1.34 zle_main.c
--- Src/Zle/zle_main.c	22 May 2003 09:48:29 -0000	1.34
+++ Src/Zle/zle_main.c	7 Aug 2003 16:37:20 -0000
@@ -107,9 +107,9 @@
 /* the status line, and its length */
 
 /**/
-char *statusline;
+mod_export char *statusline;
 /**/
-int statusll;
+mod_export int statusll;
 
 /* The current history line and cursor position for the top line *
  * on the buffer stack.                                          */


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author