Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Rebuilding from CVS on Snow Leopard
- X-seq: zsh-workers 27294
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Rebuilding from CVS on Snow Leopard
- Date: Tue, 29 Sep 2009 07:44:59 -0700
- In-reply-to: <C9CC3A8A-BF22-46DD-A618-BFD7687F746F@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <090927225016.ZM17646@xxxxxxxxxxxxxxxxxxxxxx> <C9CC3A8A-BF22-46DD-A618-BFD7687F746F@xxxxxxxxxxxxxxxxx>
On Sep 29, 9:05pm, Jun T. wrote:
} Subject: Re: Rebuilding from CVS on Snow Leopard
}
} I think it would be better to use sizeof(soun.sun_path) in place
} of UNIX_PATH_MAX. Or use sizeof(soun.sun_path)-1 so that sun_path
} is always null terminated.
How about this, then?
Index: socket.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/Modules/socket.c,v
retrieving revision 1.9
diff -c -r1.9 socket.c
--- socket.c 26 Nov 2007 17:38:14 -0000 1.9
+++ socket.c 29 Sep 2009 14:42:00 -0000
@@ -34,7 +34,7 @@
#include <sys/un.h>
#ifndef UNIX_PATH_MAX
-# define UNIX_PATH_MAX 108
+# define UNIX_PATH_MAX (sizeof(soun.sun_path)-1)
#endif
/*
(Or the equivalent without the dependency on the local variable name
"soun".)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author