From: simon Date: Sun, 6 Feb 2005 13:33:41 +0000 (+0000) Subject: The pty backend won't _always_ be running under X, so it should be X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/c13772b1ab493bfc92760c9c45c6aa5c58074ab1 The pty backend won't _always_ be running under X, so it should be possible to compile it without the WINDOWID variable. git-svn-id: svn://svn.tartarus.org/sgt/putty@5259 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/uxpty.c b/unix/uxpty.c index 10dfe10c..42354846 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -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;