]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
KFW win-mac.h fixes
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Wed, 6 Jun 2012 22:22:22 +0000 (18:22 -0400)
committerTom Yu <tlyu@mit.edu>
Mon, 23 Jul 2012 19:01:03 +0000 (15:01 -0400)
kfw: add int16_t, uint16_t typedefs to win-mac.h
uint16_t is used in chpw.c

include stdlib.h, crtdbg.h in win-mac.h

Allows leak-tracking using built-in msvc tools on windows.
crtdbg.h needs to come _after_ stdlib.h, but _before_ checking for
strdup.  Define DEBUG and CRTDBG_MAP_ALLOC for full tracking.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
(cherry picked from commit 0a27c56e300990909317630e626ccdd8ae8e7f41)

ticket: 7204
version_fixed: 1.10.3
status: resolved

src/include/win-mac.h

index 82d3ff736d1df0100782f9349066fd242a6bce2b..e84e172fa8669e12f6d428a9494d1b2f8c0c5f89 100644 (file)
 #include <windows.h>
 
 #else /* ! RES_ONLY */
+#include <stdlib.h>
+#ifdef DEBUG
+#include <crtdbg.h>
+#endif
 
 /* To ensure backward compatibility of the ABI use 32-bit time_t on
  * 32-bit Windows.
@@ -76,6 +80,8 @@ typedef unsigned long    u_long;      /* Not part of sys/types.h on the pc */
 typedef unsigned int     u_int;
 typedef unsigned short   u_short;
 typedef unsigned char    u_char;
+typedef unsigned short   uint16_t;
+typedef short            int16_t;
 typedef unsigned int     uint32_t;
 typedef int              int32_t;
 #if _INTEGRAL_MAX_BITS >= 64