* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
#include <setjmp.h>
#ifndef _WIN32
#include <signal.h>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
+#include <sys/types.h>
#if UNIT_TESTING
extern void* _test_malloc(const size_t size, const char* file, const int line);
// A calculator example used to demonstrate the cmockery testing library.
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <assert.h>
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
!ENDIF # EXAMPLE_SOURCE_DIRECTORY
# Compiler flags and commands.
-CC_COMMAND=$(CC) /nologo /c /D_WIN32_WINNT=0x501 \
+CC_COMMAND=$(CC) /nologo /c /D_WIN32_WINNT=0x501 /DHAVE_MALLOC_H \
/I$(LIBRARY_SOURCE_DIRECTORY)\google $(CFLAGS) $(**) /Fo$(@)
CC_COMMAND_UNIT_TEST=$(CC_COMMAND) /DUNIT_TESTING=1 \
/I$(EXAMPLE_SOURCE_DIRECTORY)