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> 2003-07-17 Steven Borley <sjb@salix.demon.co.uk>
* src/frontend/resource.c src/frontend/parser/complete.c * 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: dnl Check for a few mathematical functions:
AC_CHECK_FUNCS(erfc logb scalb scalbn asinh acosh atanh) 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:) AC_MSG_RESULT(Checking for the presence of the Garbage Collector:)
dnl Check for the garbage collector: dnl Check for the garbage collector:
AC_CHECK_LIB(gc,GC_malloc,AC_DEFINE(HAVE_LIBGC) LIBS="$LIBS -lgc") AC_CHECK_LIB(gc,GC_malloc,AC_DEFINE(HAVE_LIBGC) LIBS="$LIBS -lgc")
fi
dnl Check for the asprintf function: dnl Check for the asprintf function:
AC_CHECK_FUNCS(asprintf) AC_CHECK_FUNCS(asprintf)

View File

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