\q{User-supplied GSSAPI library} option in the preference list to
make sure it is selected before anything else.
+On Windows, such libraries are files with a \I{DLL}\cw{.dll}
+extension, and must have been built in the same way as the PuTTY
+executable you're running; if you have a 32-bit DLL, you must run a
+32-bit version of PuTTY, and the same with 64-bit (see
+\k{faq-32bit-64bit}). On Unix, shared libraries generally have a
+\cw{.so} extension.
+
\H{config-ssh-tty} The TTY panel
The TTY panel lets you configure the remote pseudo-terminal.
Currently, release versions of PuTTY tools only run on Windows
systems and Unix.
-As of 0.68, the supplied PuTTY executables run on versions of
-Windows from XP onwards, up to and including Windows 10; and we
-know of no reason why PuTTY should not continue to work on
-future versions of Windows.
-
-The 32-bit Windows executables we provide for the \q{\i{x86}}
-processor architecture should also work fine on 64-bit processors
-that are backward-compatible with that architecture. The 64-bit
-executables will only work on 64-bit versions of Windows. They
-will run somewhat faster than 32-bit executables would on the
-same processor, but will consume slightly more memory.
+As of 0.68, the supplied PuTTY executables run on versions of Windows
+from XP onwards, up to and including Windows 10; and we know of no
+reason why PuTTY should not continue to work on future versions of
+Windows. We provide 32-bit and 64-bit Windows executables; see
+\k{faq-32bit-64bit} for discussion of the compatibility issues around
+that.
(We used to also provide executables for Windows for the Alpha
processor, but stopped after 0.58 due to lack of interest.)
\S{faq-wince}{Question} Will there be a port to Windows CE or PocketPC?
-We have done some work on such a port, but it only reached an early
+We once did some work on such a port, but it only reached an early
stage, and certainly not a useful one. It's no longer being actively
worked on.
-However, there's a third-party port at
-\W{http://www.pocketputty.net/}\c{http://www.pocketputty.net/}.
-
\S{faq-win31}{Question} Is there a port to \i{Windows 3.1}?
PuTTY is a 32-bit application from the ground up, so it won't run on
You can ask PuTTY to delete all this data; see \k{faq-cleanup}.
-On Unix, PuTTY stores all of this data in a directory \cw{~/.putty}.
+On Unix, PuTTY stores all of this data in a directory \cw{~/.putty}
+by default.
\H{faq-howto} HOWTO questions
\c pscp "local file" user@host:
\c pscp user@host:"remote file" .
+\S{faq-32bit-64bit}{Question} Should I run the 32-bit or the
+64-bit version?
+
+If you're not sure, the \I{32-bit Windows}32-bit version is generally
+the safe option. It will run perfectly well on all processors and on
+all versions of Windows that PuTTY supports. PuTTY doesn't require to
+run as a 64-bit application to work well, and having a 32-bit PuTTY on
+a 64-bit system isn't likely to cause you any trouble.
+
+The 64-bit version (first released in 0.68) will only run if you have
+a 64-bit processor \e{and} a \I{64-bit Windows}64-bit edition of
+Windows (both of these things are likely to be true of any recent
+Windows PC). It will run somewhat faster (in particular, the
+cryptography will be faster, especially during link setup), but it
+will consume slightly more memory.
+
+If you need to use an external \i{DLL} for GSSAPI authentication, that
+DLL may only be available in a 32-bit or 64-bit form, and that will
+dictate the version of PuTTY you need to use. (You will probably know
+if you're doing this; see \k{config-ssh-auth-gssapi-libraries} in the
+documentation.)
+
\H{faq-trouble} Troubleshooting
\S{faq-incorrect-mac}{Question} Why do I see \q{Incorrect MAC
\IM{SYSTEM32} \cw{SYSTEM32} directory, on Windows
+\IM{32-bit Windows} 32-bit Windows
+\IM{32-bit Windows} Windows, 32-bit
+\IM{32-bit Windows} x86 (32-bit processor architecture)
\IM{64-bit Windows} 64-bit Windows
\IM{64-bit Windows} Windows, 64-bit
* directive we don't know about, we should panic and die rather
* than run any risk.
*/
-static char *dupvprintf_inner(char *buf, int oldlen, int oldsize,
+static char *dupvprintf_inner(char *buf, int oldlen, int *oldsize,
const char *fmt, va_list ap)
{
- int len, size;
+ int len, size, newsize;
- size = oldsize - oldlen;
+ assert(*oldsize >= oldlen);
+ size = *oldsize - oldlen;
if (size == 0) {
size = 512;
- buf = sresize(buf, oldlen + size, char);
+ newsize = oldlen + size;
+ buf = sresize(buf, newsize, char);
+ } else {
+ newsize = *oldsize;
}
while (1) {
if (len >= 0 && len < size) {
/* This is the C99-specified criterion for snprintf to have
* been completely successful. */
+ *oldsize = newsize;
return buf;
} else if (len > 0) {
/* This is the C99 error condition: the returned length is
* buffer wasn't big enough, so we enlarge it a bit and hope. */
size += 512;
}
- buf = sresize(buf, oldlen + size, char);
+ newsize = oldlen + size;
+ buf = sresize(buf, newsize, char);
}
}
char *dupvprintf(const char *fmt, va_list ap)
{
- return dupvprintf_inner(NULL, 0, 0, fmt, ap);
+ int size = 0;
+ return dupvprintf_inner(NULL, 0, &size, fmt, ap);
}
char *dupprintf(const char *fmt, ...)
{
}
void strbuf_catfv(strbuf *buf, const char *fmt, va_list ap)
{
- buf->s = dupvprintf_inner(buf->s, buf->len, buf->size, fmt, ap);
+ buf->s = dupvprintf_inner(buf->s, buf->len, &buf->size, fmt, ap);
buf->len += strlen(buf->s + buf->len);
}
void strbuf_catf(strbuf *buf, const char *fmt, ...)
if (dirh == NULL) {
printf("Unable to open %s: %s\n", dir, fxp_error());
+ return 0;
} else {
nnames = namesize = 0;
ournames = NULL;
SOCKET s = p_socket(AF_INET, SOCK_DGRAM, 0);
DWORD retbytes;
+ SetHandleInformation((HANDLE)s, HANDLE_FLAG_INHERIT, 0);
+
if (p_WSAIoctl &&
p_WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0,
local_interfaces, sizeof(local_interfaces),
goto ret;
}
+ SetHandleInformation((HANDLE)s, HANDLE_FLAG_INHERIT, 0);
+
if (sock->oobinline) {
BOOL b = TRUE;
p_setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (void *) &b, sizeof(b));
return (Socket) ret;
}
+ SetHandleInformation((HANDLE)s, HANDLE_FLAG_INHERIT, 0);
+
ret->oobinline = 0;
p_setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *)&on, sizeof(on));