Mercurial > dwindows
changeset 2244:a1ac35abd5fd
Make sure domain socket paths have a trailing DIRSEP... fixes an issue on Windows 10.
The NTFS junction used for domain sockets on Windows 10 were going into the directory
above the TEMP directory due to a missing trailing directory separator.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 19 Jan 2021 16:36:58 +0000 |
parents | 8f9ffba67b7c |
children | a0c386cd332b |
files | dwcompat.h |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/dwcompat.h Tue Jan 19 14:07:47 2021 +0000 +++ b/dwcompat.h Tue Jan 19 16:36:58 2021 +0000 @@ -157,7 +157,7 @@ #define BKS_TABBEDDIALOG 0x0800 #endif -#define PIPEROOT "\\socket\\" +#define PIPEROOT "\\socket" #endif /* __EMX__ || __IBMC__ */ #if defined(__OS2__) && (defined(__IBMC__) || defined(__WATCOMC__)) @@ -215,7 +215,7 @@ #include <sys/un.h> #elif defined(_MSC_VER) && _MSC_VER >= 1912 #include <afunix.h> -#define PIPEROOT getenv("TEMP") ? getenv("TEMP") : "C:\\Windows\\Temp\\" +#define PIPEROOT getenv("TEMP") ? getenv("TEMP") : "C:\\Windows\\Temp" #else #define NO_DOMAIN_SOCKETS #endif @@ -309,10 +309,10 @@ #endif #ifndef PIPEROOT -#define PIPEROOT "/tmp/" +#define PIPEROOT "/tmp" #endif -#define PIPENAME "%s" __TARGET__ "%d-%d" +#define PIPENAME "%s%s" __TARGET__ "%d-%d" /* Compatibility layer for IBM C/Winsock * Now using macros so we can allow cross @@ -407,7 +407,7 @@ { \ memset(&un, 0, sizeof(un)); \ un.sun_family=AF_UNIX; \ - sprintf(un.sun_path, PIPENAME, PIPEROOT, (int)getpid(), pipes[1]); \ + sprintf(un.sun_path, PIPENAME, PIPEROOT, DIRSEP, (int)getpid(), pipes[1]); \ unlink(un.sun_path); \ bind(tmpsock, (struct sockaddr *)&un, sizeof(un)); \ listen(tmpsock, 0); \