# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1611074218 0 # Node ID a1ac35abd5fdc09f8a578a9beb7dca09d4a64e30 # Parent 8f9ffba67b7c5f1b6eff3560f8513b607e60ebfe 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. diff -r 8f9ffba67b7c -r a1ac35abd5fd dwcompat.h --- 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 #elif defined(_MSC_VER) && _MSC_VER >= 1912 #include -#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); \