~mingw-w64/mingw-w64/experimental

« back to all changes in this revision

Viewing changes to ros-privexp/mingw-w64-crt/testcases/t_fctptr.c

  • Committer: NightStrike
  • Date: 2010-08-11 22:20:57 UTC
  • Revision ID: svn-v4:4407c894-4637-0410-b4f5-ada5f102cad1:experimental:3266
Branch for adding option for supporting ros

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdlib.h>
 
2
#include <malloc.h>
 
3
 
 
4
void *(*my_malloc)(size_t) = malloc;
 
5
void (*my_free)(void *) = free;
 
6
 
 
7
int main()
 
8
{
 
9
  void *p = (*my_malloc) (1024);
 
10
  if (!p) abort();
 
11
  (*my_free)(p);
 
12
  return 0;
 
13
}
 
14