1 /* c_lgcc3.cpp -- make g++-3.2 programs linkable with gcc-2.95
2  * by pts@fazekas.hu at Wed Dec 11 16:33:03 CET 2002
3  *
4  * This file is not sam2p-specific. See also AC_PTS_GCC_LINKS_CXX in file
5  * aclocal.m4.
6  */
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 
11 /* vvv make these a macro to make them fast */
12 #define XMALLOC_CODE() (unsigned len) { \
13   void *p=malloc(len); \
14   if (p==0) { fputs("out of memory\n",stderr); abort(); } \
15   return p; \
16 }
17 #define XFREE_CODE() (void* p) { if (p!=0) free(p); }
18 
19 /* at Wed Dec 11 16:31:42 CET 2002
20  * This helper is here for gcc-2.95: c_lgcc3.cpp should be compiled by
21  * gcc-2.95, remaining files are compiled by g++-3.2
22  */
23 void* __cxa_pure_virtual=0;
24 extern "C" void  _ZdlPv (void*);
25 extern "C" void* _Znwj (unsigned);
26 extern "C" void  _ZdaPv (void*);
27 extern "C" void* _Znaj (unsigned);
28 void  _ZdlPv XFREE_CODE()
29 void* _Znwj  XMALLOC_CODE()
30 void  _ZdaPv XFREE_CODE()
31 void* _Znaj  XMALLOC_CODE()
32