=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: winedbg: Respect TMPDIR environment variable.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Sep 17 14:07:09 CDT 2014
Module: wine
Branch: master
Commit: 613d1715a4f7663f7f160d82602c88ce2b032205
URL: http://source.winehq.org/git/wine.git/?a=commit;h=613d1715a4f7663f7f160d82602c88ce2b032205
Author: André Hentschel <nerv at dawncrow.de>
Date: Tue Sep 16 21:25:06 2014 +0200
winedbg: Respect TMPDIR environment variable.
---
programs/winedbg/gdbproxy.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c
index 0865f44..d7596a0 100644
--- a/programs/winedbg/gdbproxy.c
+++ b/programs/winedbg/gdbproxy.c
@@ -2342,11 +2342,13 @@ static BOOL gdb_exec(const char* wine_path, unsigned port, unsigned flags)
{
char buf[MAX_PATH];
int fd;
- const char* gdb_path;
+ const char *gdb_path, *tmp_path;
FILE* f;
if (!(gdb_path = getenv("WINE_GDB"))) gdb_path = "gdb";
- strcpy(buf,"/tmp/winegdb.XXXXXX");
+ if (!(tmp_path = getenv("TMPDIR"))) tmp_path = "/tmp";
+ strcpy(buf, tmp_path);
+ strcat(buf, "/winegdb.XXXXXX");
fd = mkstemps(buf, 0);
if (fd == -1) return FALSE;
if ((f = fdopen(fd, "w+")) == NULL) return FALSE;
More information about the wine-cvs
mailing list