1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-09 23:28:06 -05:00

The pty backend won't _always_ be running under X, so it should be

possible to compile it without the WINDOWID variable.

[originally from svn r5259]
This commit is contained in:
Simon Tatham 2005-02-06 13:33:41 +00:00
parent fd961b398a
commit 3fb9e2326d

View File

@ -522,7 +522,9 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
{
int slavefd;
pid_t pid, pgrp;
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
long windowid;
#endif
pty_frontend = frontend;
*backend_handle = NULL; /* we can't sensibly use this, sadly */
@ -569,7 +571,9 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
}
#endif
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
windowid = get_windowid(pty_frontend);
#endif
/*
* Fork and execute the command.
@ -612,11 +616,13 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
sprintf(term_env_var, "TERM=%s", cfg->termtype);
putenv(term_env_var);
}
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
{
char windowid_env_var[40];
sprintf(windowid_env_var, "WINDOWID=%ld", windowid);
putenv(windowid_env_var);
}
#endif
{
char *e = cfg->environmt;
char *var, *varend, *val, *varval;