This helps with compilations on ancient Sun compilers.
git-svn-id: svn://svn.tartarus.org/sgt/putty@7126
cda61777-01e9-0310-a592-
d414129be87e
if (!is_private) {
return fopen(filename.path, mode);
} else {
+ int fd;
assert(mode[0] == 'w'); /* is_private is meaningless for read */
- int fd = open(filename.path, O_WRONLY | O_CREAT | O_TRUNC,
+ fd = open(filename.path, O_WRONLY | O_CREAT | O_TRUNC,
0700);
if (fd < 0)
return NULL;
/*
* Handle data from a local tty in PARMRK format.
*/
-static void from_tty(void *buf, unsigned len)
+static void from_tty(void *vbuf, unsigned len)
{
- char *p, *q, *end;
+ char *p, *q, *end, *buf = vbuf;
static enum {NORMAL, FF, FF00} state = NORMAL;
p = buf; end = buf + len;