From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Rebuilding from CVS on Snow Leopard
Date: Tue, 29 Sep 2009 07:44:59 -0700 [thread overview]
Message-ID: <090929074459.ZM19743@torch.brasslantern.com> (raw)
In-Reply-To: <C9CC3A8A-BF22-46DD-A618-BFD7687F746F@kba.biglobe.ne.jp>
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".)
next prev parent reply other threads:[~2009-09-29 14:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-28 5:50 Bart Schaefer
2009-09-29 12:05 ` Jun T.
2009-09-29 14:32 ` Peter Stephenson
2009-09-29 14:44 ` Bart Schaefer [this message]
2009-09-29 16:55 ` Jun T.
2009-09-29 17:23 ` Jun T.
2009-09-29 17:41 ` Mikael Magnusson
2009-09-30 16:11 ` Jun T.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=090929074459.ZM19743@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).