zsh-workers
 help / color / mirror / code / Atom feed
* building latest sources
@ 2004-03-02 18:17 Oliver Kiddle
  2004-03-02 18:29 ` Peter Stephenson
  2004-03-03 18:52 ` Wayne Davison
  0 siblings, 2 replies; 3+ messages in thread
From: Oliver Kiddle @ 2004-03-02 18:17 UTC (permalink / raw)
  To: Zsh workers

I tried compiling the latest sources on a few of the SourceForge
compile farm machines.

On Mac OS X, it built fine. make test has one problem I couldn't work
out and I'm not sure why it failed to load zpty because I could load it
manually. The patch below suppresses a couple of compiler warnings and
adjusts _groups to use the netinfo database.

On Solaris 9, there were no problems except those caused by their
installation of GNU libiconv being found at linktime but not runtime.

NetBSD built and tested fine. I got warnings there and MacOS X for
implicit declaration of function 'ioctl'. Should we be including
sys/ioctl.h more widely?

Oliver

Index: Completion/Unix/Type/_groups
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_groups,v
retrieving revision 1.3
diff -u -r1.3 _groups
--- Completion/Unix/Type/_groups	18 Feb 2004 12:45:36 -0000	1.3
+++ Completion/Unix/Type/_groups	2 Mar 2004 18:04:35 -0000
@@ -6,7 +6,9 @@
 
 if ! zstyle -a ":completion:${curcontext}:" groups groups; then
   (( $+_cache_groups )) ||
-      if (( ${+commands[getent]} )); then
+      if [[ $OSTYPE = darwin* ]]; then
+        : ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups lookupd -q group)"}:#name*}##*: }}
+      elif (( ${+commands[getent]} )); then
         : ${(A)_cache_groups:=${${(s: :)$(_call_program groups getent group 2>/dev/null)}%%:*}}
       else
         : ${(A)_cache_groups:=${${${(s: :)$(</etc/group)}%%:*}:#+}}
Index: Src/Modules/socket.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/socket.c,v
retrieving revision 1.4
diff -u -r1.4 socket.c
--- Src/Modules/socket.c	22 May 2003 09:48:29 -0000	1.4
+++ Src/Modules/socket.c	2 Mar 2004 18:04:36 -0000
@@ -171,7 +171,7 @@
 	    tv.tv_sec = 0;
 	    tv.tv_usec = 0;
 	    
-	    if (ret = select(lfd+1, &rfds, NULL, NULL, &tv)) return 1;
+	    if ((ret = select(lfd+1, &rfds, NULL, NULL, &tv))) return 1;
 	    else if (ret == -1)
 	    {
 		zwarnnam(nam, "select error: %e", NULL, errno);
Index: Src/Modules/tcp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.c,v
retrieving revision 1.37
diff -u -r1.37 tcp.c
--- Src/Modules/tcp.c	29 Oct 2003 19:17:48 -0000	1.37
+++ Src/Modules/tcp.c	2 Mar 2004 18:04:36 -0000
@@ -515,7 +515,7 @@
 	    tv.tv_sec = 0;
 	    tv.tv_usec = 0;
 	    
-	    if (ret = select(lfd+1, &rfds, NULL, NULL, &tv)) return 1;
+	    if ((ret = select(lfd+1, &rfds, NULL, NULL, &tv))) return 1;
 	    else if (ret == -1)
 	    {
 		zwarnnam(nam, "select error: %e", NULL, errno);
Index: Src/Zle/zle_params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_params.c,v
retrieving revision 1.12
diff -u -r1.12 zle_params.c
--- Src/Zle/zle_params.c	15 Dec 2003 22:45:29 -0000	1.12
+++ Src/Zle/zle_params.c	2 Mar 2004 18:04:36 -0000
@@ -365,7 +365,7 @@
 	free(cutbuf.buf);
     cutbuf.flags = 0;
     if (x) {
-	unmetafy(x, &cutbuf.len);
+	unmetafy(x, (int *)&cutbuf.len);
 	cutbuf.buf = zalloc(cutbuf.len);
 	memcpy((char *)cutbuf.buf, x, cutbuf.len);
 	free(x);
@@ -420,7 +420,7 @@
 	for (p = x; *p; p++) {
 	    int len = strlen(*p);
 	    kptr = kring + kpos;
-	    unmetafy(*p, &kptr->len);
+	    unmetafy(*p, (int *)&kptr->len);
 	    kptr->buf = (char *)zalloc(kptr->len);
 	    memcpy(kptr->buf, *p, kptr->len);
 	    zfree(*p, len+1);


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

* Re: building latest sources
  2004-03-02 18:17 building latest sources Oliver Kiddle
@ 2004-03-02 18:29 ` Peter Stephenson
  2004-03-03 18:52 ` Wayne Davison
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 2004-03-02 18:29 UTC (permalink / raw)
  To: Zsh workers

Oliver Kiddle wrote:
> On Solaris 9, there were no problems except those caused by their
> installation of GNU libiconv being found at linktime but not runtime.

We could start using libtool, but it doesn't necessarily fix up all
the necessary -rpath stuff.

> NetBSD built and tested fine. I got warnings there and MacOS X for
> implicit declaration of function 'ioctl'. Should we be including
> sys/ioctl.h more widely?

Yes, probably.  It should be easy using configure, although as it's
quite low level there's a possibility that it clashes with something.

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


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: building latest sources
  2004-03-02 18:17 building latest sources Oliver Kiddle
  2004-03-02 18:29 ` Peter Stephenson
@ 2004-03-03 18:52 ` Wayne Davison
  1 sibling, 0 replies; 3+ messages in thread
From: Wayne Davison @ 2004-03-03 18:52 UTC (permalink / raw)
  To: Zsh workers

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

On Tue, Mar 02, 2004 at 07:17:21PM +0100, Oliver Kiddle wrote:
> -	unmetafy(x, &cutbuf.len);
> +	unmetafy(x, (int *)&cutbuf.len);
[...]
> -	    unmetafy(*p, &kptr->len);
> +	    unmetafy(*p, (int *)&kptr->len);

You can't just cast away an error like that.  This code was (and is)
improperly assuming that an int can be put into a size_t memory
location.  Attached is my fix.

..wayne..

[-- Attachment #2: size.patch --]
[-- Type: text/plain, Size: 842 bytes --]

--- Src/Zle/zle_params.c	3 Mar 2004 11:05:46 -0000	1.13
+++ Src/Zle/zle_params.c	3 Mar 2004 18:30:10 -0000
@@ -365,7 +365,9 @@ set_cutbuffer(Param pm, char *x)
 	free(cutbuf.buf);
     cutbuf.flags = 0;
     if (x) {
-	unmetafy(x, (int *)&cutbuf.len);
+	int n;
+	unmetafy(x, &n);
+	cutbuf.len = n;
 	cutbuf.buf = zalloc(cutbuf.len);
 	memcpy((char *)cutbuf.buf, x, cutbuf.len);
 	free(x);
@@ -418,9 +420,10 @@ set_killring(Param pm, char **x)
 	kringsize = arrlen(x);
 	kring = (Cutbuffer)zshcalloc(kringsize * sizeof(struct cutbuffer));
 	for (p = x; *p; p++) {
-	    int len = strlen(*p);
+	    int n, len = strlen(*p);
 	    kptr = kring + kpos;
-	    unmetafy(*p, (int *)&kptr->len);
+	    unmetafy(*p, &n);
+	    kptr->len = n;
 	    kptr->buf = (char *)zalloc(kptr->len);
 	    memcpy(kptr->buf, *p, kptr->len);
 	    zfree(*p, len+1);

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

end of thread, other threads:[~2004-03-03 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-02 18:17 building latest sources Oliver Kiddle
2004-03-02 18:29 ` Peter Stephenson
2004-03-03 18:52 ` Wayne Davison

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).