File: c_lgcc3.cpp

package info (click to toggle)
sam2p 0.44-13-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,268 kB
  • ctags: 3,184
  • sloc: cpp: 14,125; ansic: 9,026; tcl: 973; sh: 555; makefile: 242; perl: 67
file content (31 lines) | stat: -rw-r--r-- 933 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* c_lgcc3.cpp -- make g++-3.2 programs linkable with gcc-2.95
 * by pts@fazekas.hu at Wed Dec 11 16:33:03 CET 2002
 *
 * This file is not sam2p-specific. See also AC_PTS_GCC_LINKS_CXX in file
 * aclocal.m4.
 */

#include <stdio.h>
#include <stdlib.h>

/* vvv make these a macro to make them fast */
#define XMALLOC_CODE() (unsigned len) { \
  void *p=malloc(len); \
  if (p==0) { fputs("out of memory\n",stderr); abort(); } \
  return p; \
}
#define XFREE_CODE() (void* p) { if (p!=0) free(p); }

/* at Wed Dec 11 16:31:42 CET 2002
 * This helper is here for gcc-2.95: c_lgcc3.cpp should be compiled by
 * gcc-2.95, remaining files are compiled by g++-3.2
 */
void* __cxa_pure_virtual=0;
extern "C" void  _ZdlPv (void*);
extern "C" void* _Znwj (unsigned);
extern "C" void  _ZdaPv (void*);
extern "C" void* _Znaj (unsigned);
void  _ZdlPv XFREE_CODE()
void* _Znwj  XMALLOC_CODE()
void  _ZdaPv XFREE_CODE()
void* _Znaj  XMALLOC_CODE()