Fix debug build.

This commit is contained in:
Aaron Giles 2010-01-04 00:06:45 +00:00
parent a1cdc22b5a
commit 13c6148885

View File

@ -61,14 +61,17 @@ extern int utf8_main(int argc, char *argv[]);
#undef wmain #undef wmain
#endif #endif
#ifdef MALLOC_DEBUG
extern void check_unfreed_mem(void);
extern int winalloc_in_main_code;
#endif
extern "C" int _tmain(int argc, TCHAR **argv) extern "C" int _tmain(int argc, TCHAR **argv)
{ {
int i, rc; int i, rc;
char **utf8_argv; char **utf8_argv;
#ifdef MALLOC_DEBUG #ifdef MALLOC_DEBUG
{
extern int winalloc_in_main_code;
winalloc_in_main_code = TRUE; winalloc_in_main_code = TRUE;
#endif #endif
@ -92,12 +95,8 @@ extern "C" int _tmain(int argc, TCHAR **argv)
free(utf8_argv); free(utf8_argv);
#ifdef MALLOC_DEBUG #ifdef MALLOC_DEBUG
{ check_unfreed_mem();
void check_unfreed_mem(void);
check_unfreed_mem();
}
winalloc_in_main_code = FALSE; winalloc_in_main_code = FALSE;
}
#endif #endif
return rc; return rc;