Ticket #19823: patch-malloc_check.diff

File patch-malloc_check.diff, 1.5 KB (added by pope (K. Adam Christensen), 15 years ago)
  • src/cmockery.c

    diff -uNr cmockery-0.1.2.orig/src/cmockery.c cmockery-0.1.2/src/cmockery.c
     
    1313 * See the License for the specific language governing permissions and
    1414 * limitations under the License.
    1515 */
     16#ifdef HAVE_CONFIG_H
     17#include "config.h"
     18#endif
     19#ifdef HAVE_MALLOC_H
    1620#include <malloc.h>
     21#endif
    1722#include <setjmp.h>
    1823#ifndef _WIN32
    1924#include <signal.h>
  • src/example/allocate_module.c

    diff -uNr cmockery-0.1.2.orig/src/example/allocate_module.c cmockery-0.1.2/src/example/allocate_module.c
     
    1313 * See the License for the specific language governing permissions and
    1414 * limitations under the License.
    1515 */
     16#ifdef HAVE_CONFIG_H
     17#include "config.h"
     18#endif
     19#ifdef HAVE_MALLOC_H
    1620#include <malloc.h>
     21#endif
     22#include <sys/types.h>
    1723
    1824#if UNIT_TESTING
    1925extern void* _test_malloc(const size_t size, const char* file, const int line);
  • src/example/calculator.c

    diff -uNr cmockery-0.1.2.orig/src/example/calculator.c cmockery-0.1.2/src/example/calculator.c
     
    1616
    1717// A calculator example used to demonstrate the cmockery testing library.
    1818
     19#ifdef HAVE_CONFIG_H
     20#include "config.h"
     21#endif
    1922#include <assert.h>
     23#ifdef HAVE_MALLOC_H
    2024#include <malloc.h>
     25#endif
    2126#include <stdio.h>
    2227#include <stdlib.h>
    2328#include <string.h>