diff options
author | Juanma Barranquero <[email protected]> | 2010-10-08 12:14:47 +0200 |
---|---|---|
committer | Juanma Barranquero <[email protected]> | 2010-10-08 12:14:47 +0200 |
commit | 4628bef1eea0f60e846fe6b6591725aa92952de9 (patch) | |
tree | 9d137b8e0964c0b1ebc4afb4e743e35b807d048d /lib-src/emacsclient.c | |
parent | 24ac444fbe5d76a7cf09a62b741b9e956ab90d3e (diff) | |
parent | 2b7c934285417d2eac7a3c603231d22ce7e212d8 (diff) |
Merge changes from emacs-23 branch.
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r-- | lib-src/emacsclient.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index b20710e110..b60b266180 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1223,7 +1223,18 @@ set_local_socket (void) { 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", |