Commit b336bfcd authored by Glenn Morris's avatar Glenn Morris

Close bug#3992.

* lib-src/emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back
DARWIN_USER_TEMP_DIR.
parent 55586d2a
2010-10-01 Glenn Morris <rgm@gnu.org>
* emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back
DARWIN_USER_TEMP_DIR. (Bug#3992)
2010-05-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.2 released.
......
......@@ -1249,7 +1249,18 @@ set_local_socket ()
{
tmpdir = egetenv ("TMPDIR");
if (!tmpdir)
tmpdir = "/tmp";
{
#ifdef DARWIN_OS
size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL, (size_t) 0);
if (n > 0)
{
tmpdir = alloca (n);
confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
}
else
#endif
tmpdir = "/tmp";
}
socket_name = alloca (strlen (tmpdir) + strlen (server_name)
+ EXTRA_SPACE);
sprintf (socket_name, "%s/emacs%d/%s",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment