about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Completion/Unix/Type/_groups4
-rw-r--r--Src/Modules/socket.c2
-rw-r--r--Src/Modules/tcp.c2
-rw-r--r--Src/Zle/zle_params.c4
5 files changed, 16 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 433cab71d..49356ab94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-03-03  Oliver Kiddle  <opk@zsh.org>
+
+	* 19525: Completion/Unix/Type/_groups: complete groups using
+	lookupd on Mac OS X
+
+	* 19525: Src/Modules/socket.c, Src/Modules/tcp.c,
+	Src/Zle/zle_params.c: suppress a few compiler warnings
+
 2004-03-03  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Config/version.mk: zsh 4.2.0-pre-2.
@@ -16,7 +24,7 @@
 2004-03-01  Peter Stephenson  <pws@csr.com>
 
 	* 19512: INSTALL, configure.ac, Src/Modules/pcre.mdd:
-	Reqire --enable-pcre in order to avoid problems with libpcre.so
+	Require --enable-pcre in order to avoid problems with libpcre.so
 	availability.
 
 2004-03-01  Oliver Kiddle  <opk@zsh.org>
diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups
index b6d599c28..6ba32f4f0 100644
--- a/Completion/Unix/Type/_groups
+++ b/Completion/Unix/Type/_groups
@@ -6,7 +6,9 @@ _tags groups || return 1
 
 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)}%%:*}:#+}}
diff --git a/Src/Modules/socket.c b/Src/Modules/socket.c
index cca980845..ace990ab4 100644
--- a/Src/Modules/socket.c
+++ b/Src/Modules/socket.c
@@ -171,7 +171,7 @@ bin_zsocket(char *nam, char **args, Options ops, int func)
 	    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);
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index 8e42ead55..453f7bf21 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -515,7 +515,7 @@ bin_ztcp(char *nam, char **args, Options ops, int func)
 	    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);
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c
index 0d7b20119..4eb2d455b 100644
--- a/Src/Zle/zle_params.c
+++ b/Src/Zle/zle_params.c
@@ -365,7 +365,7 @@ set_cutbuffer(Param pm, char *x)
 	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 @@ set_killring(Param pm, char **x)
 	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);