1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-21 04:55:02 -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; int slavefd;
pid_t pid, pgrp; pid_t pid, pgrp;
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
long windowid; long windowid;
#endif
pty_frontend = frontend; pty_frontend = frontend;
*backend_handle = NULL; /* we can't sensibly use this, sadly */ *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 #endif
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
windowid = get_windowid(pty_frontend); windowid = get_windowid(pty_frontend);
#endif
/* /*
* Fork and execute the command. * 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); sprintf(term_env_var, "TERM=%s", cfg->termtype);
putenv(term_env_var); putenv(term_env_var);
} }
#ifndef NOT_X_WINDOWS /* for Mac OS X native compilation */
{ {
char windowid_env_var[40]; char windowid_env_var[40];
sprintf(windowid_env_var, "WINDOWID=%ld", windowid); sprintf(windowid_env_var, "WINDOWID=%ld", windowid);
putenv(windowid_env_var); putenv(windowid_env_var);
} }
#endif
{ {
char *e = cfg->environmt; char *e = cfg->environmt;
char *var, *varend, *val, *varval; char *var, *varend, *val, *varval;