From eb3efe7864a7e89f9e6b58ad407ebaf696d15a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20R.=20Sede=C3=B1o?= Date: Sat, 30 Jan 2010 19:51:09 -0500 Subject: [PATCH 01/13] Use C99 for uint32_t in unix port --- ssh.h | 6 +++++- unix/unix.h | 4 ++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/ssh.h b/ssh.h index 2e9194f..c8ce726 100644 --- a/ssh.h +++ b/ssh.h @@ -71,8 +71,12 @@ unsigned char *rsa_public_blob(struct RSAKey *key, int *len); int rsa_public_blob_len(void *data, int maxlen); void freersakey(struct RSAKey *key); -typedef unsigned int word32; +#ifndef PUTTY_UINT32_DEFINED +/* This makes assumptions about the int type. */ typedef unsigned int uint32; +#define PUTTY_UINT32_DEFINED +#endif +typedef uint32 word32; unsigned long crc32_compute(const void *s, size_t len); unsigned long crc32_update(unsigned long crc_input, const void *s, size_t len); diff --git a/unix/unix.h b/unix/unix.h index 0e61faa..f635747 100644 --- a/unix/unix.h +++ b/unix/unix.h @@ -6,6 +6,7 @@ #endif #include /* for FILENAME_MAX */ +#include /* C99 int types */ #include "charset.h" struct Filename { @@ -24,6 +25,9 @@ typedef int OSSocket; extern Backend pty_backend; +typedef uint32_t uint32; /* C99: uint32_t defined in stdint.h */ +#define PUTTY_UINT32_DEFINED + /* * Under GTK, we send MA_CLICK _and_ MA_2CLK, or MA_CLICK _and_ * MA_3CLK, when a button is pressed for the second or third time. -- 1.6.6