nemerle / dcc

This is a heavily updated version of the old DOS executable decompiler DCC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use of malloc.h

Godzil opened this issue · comments

Some files (like pasehdr.cpp, makedsig.cpp and control.cpp) use the windows only malloc.h header file.
On UNIX-y Linux or Mac OS X, this header is non existent as malloc is normally defined in stdlib.h

I never understood why Microsoft have done that, but it would be nice to explicitely not try to add the malloc.h file if trying to compile on another system than Windows

A simple

#ifdef WIN32
#include <malloc.h>
#endif

should be enough

I don't think those includes are needed/used anyway, will remove them outright, thanks.