diff --git a/defs.h b/defs.h index 4a8351fe..27062774 100644 --- a/defs.h +++ b/defs.h @@ -11,6 +11,13 @@ #ifndef PUTTY_DEFS_H #define PUTTY_DEFS_H +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + typedef struct conf_tag Conf; typedef struct backend_tag Backend; typedef struct terminal_tag Terminal; diff --git a/misc.h b/misc.h index 271d34f1..c4da3d6d 100644 --- a/misc.h +++ b/misc.h @@ -13,13 +13,6 @@ #include /* for va_list */ #include /* for struct tm */ -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - unsigned long parse_blocksize(const char *bs); char ctrlparse(char *s, char **next); diff --git a/portfwd.c b/portfwd.c index 2512415c..f2652557 100644 --- a/portfwd.c +++ b/portfwd.c @@ -8,13 +8,6 @@ #include "putty.h" #include "ssh.h" -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - struct PortForwarding { const struct plug_function_table *fn; /* the above variable absolutely *must* be the first in this structure */ diff --git a/raw.c b/raw.c index fbc9018d..d0840a1a 100644 --- a/raw.c +++ b/raw.c @@ -8,13 +8,6 @@ #include "putty.h" -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - #define RAW_MAX_BACKLOG 4096 typedef struct raw_backend_data { diff --git a/rlogin.c b/rlogin.c index cd6260d2..ccb75119 100644 --- a/rlogin.c +++ b/rlogin.c @@ -9,13 +9,6 @@ #include "putty.h" -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - #define RLOGIN_MAX_BACKLOG 4096 typedef struct rlogin_tag { diff --git a/ssh.c b/ssh.c index b4482753..f220d5df 100644 --- a/ssh.c +++ b/ssh.c @@ -25,13 +25,6 @@ #define GSS_CTXT_MAYFAIL (1<<3) /* Context may expire during handshake */ #endif -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - /* * Packet type contexts, so that ssh2_pkt_type can correctly decode * the ambiguous type numbers back into the correct type strings. diff --git a/sshzlib.c b/sshzlib.c index 60447fdf..855ddd86 100644 --- a/sshzlib.c +++ b/sshzlib.c @@ -41,6 +41,8 @@ #include #include +#include "defs.h" + #ifdef ZLIB_STANDALONE /* @@ -57,13 +59,15 @@ #define sresize(x, n, type) ( (type *) realloc((x), (n) * sizeof(type)) ) #define sfree(x) ( free((x)) ) -#else -#include "ssh.h" -#endif - #ifndef FALSE #define FALSE 0 -#define TRUE (!FALSE) +#endif +#ifndef TRUE +#define TRUE 1 +#endif + +#else +#include "ssh.h" #endif /* ---------------------------------------------------------------------- diff --git a/telnet.c b/telnet.c index 8d03cb7b..0857113c 100644 --- a/telnet.c +++ b/telnet.c @@ -8,13 +8,6 @@ #include "putty.h" -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - #define IAC 255 /* interpret as command: */ #define DONT 254 /* you are not to use option */ #define DO 253 /* please, you use option */ diff --git a/unix/uxpty.c b/unix/uxpty.c index a6069ce6..7aaad8ac 100644 --- a/unix/uxpty.c +++ b/unix/uxpty.c @@ -29,13 +29,6 @@ #include #endif -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - /* updwtmpx() needs the name of the wtmp file. Try to find it. */ #ifndef WTMPX_FILE #ifdef _PATH_WTMPX