2003-07-17 Stefan Jones <stefan.jones@multigig.com>

* configure.in src/xspice/xspice.c :
	Fix compile problems with garbage collector
This commit is contained in:
stefanjones 2003-07-17 08:46:03 +00:00
parent 5dae1f7d32
commit 4982ca39dd
3 changed files with 28 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2003-07-17 Stefan Jones <stefan.jones@multigig.com>
* configure.in src/xspice/xspice.c :
Fix compile problems with garbage collector
2003-07-17 Steven Borley <sjb@salix.demon.co.uk>
* src/frontend/resource.c src/frontend/parser/complete.c

View File

@ -292,9 +292,12 @@ AC_CHECK_HEADERS(float.h limits.h values.h)
dnl Check for a few mathematical functions:
AC_CHECK_FUNCS(erfc logb scalb scalbn asinh acosh atanh)
if test "$TCL_PACKAGE_PATH" = ""
then
AC_MSG_RESULT(Checking for the presence of the Garbage Collector:)
dnl Check for the garbage collector:
AC_CHECK_LIB(gc,GC_malloc,AC_DEFINE(HAVE_LIBGC) LIBS="$LIBS -lgc")
fi
dnl Check for the asprintf function:
AC_CHECK_FUNCS(asprintf)

View File

@ -8,8 +8,9 @@
void *tcalloc(size_t a, size_t b){
return tmalloc(a*b);
}
int MIFunsetup(GENmodel *model, CKTcircuit *ckt){
return 0;
static void *empty(void){
return NULL;
}
struct coreInfo_t coreInfo =
@ -18,7 +19,7 @@ struct coreInfo_t coreInfo =
MIFgetMod,
MIFgetValue,
MIFsetup,
MIFunsetup,
(int (*)(GENmodel *, CKTcircuit *))empty,
MIFload,
MIFmParam,
MIFask,
@ -57,14 +58,24 @@ struct coreInfo_t coreInfo =
cm_complex_subtract,
cm_complex_multiply,
cm_complex_divide,
NULL,
NULL,
NULL,
(FILE *(*)(void))empty,
(FILE *(*)(void))empty,
(FILE *(*)(void))empty,
#ifndef HAVE_LIBGC
tmalloc,
tcalloc,
trealloc,
txfree,
tmalloc,
trealloc,
txfree
(char *(*)(int))tmalloc,
(char *(*)(char *,int))trealloc,
(void (*)(char *))txfree
#else
GC_malloc,
tcalloc,
GC_realloc,
(void (*)(void *))empty,
(char *(*)(int))GC_malloc,
(char *(*)(char *,int))GC_realloc,
(void (*)(char *))empty
#endif
};