diff --git a/configure.in b/configure.in index 2d9b01399..2990c101c 100644 --- a/configure.in +++ b/configure.in @@ -133,7 +133,7 @@ AC_SEARCH_LIBS(tputs,ncurses termcap,AC_DEFINE(HAVE_TERMCAP), AC_HEADER_DIRENT -AC_CHECK_HEADERS(ctype.h unistd.h pwd.h fcntl.h) +AC_CHECK_HEADERS(ctype.h unistd.h pwd.h fcntl.h string.h) AC_HEADER_SYS_WAIT AC_HEADER_STAT diff --git a/src/frontend/aspice.c b/src/frontend/aspice.c index 86a36d8f7..f00e7048b 100644 --- a/src/frontend/aspice.c +++ b/src/frontend/aspice.c @@ -176,6 +176,14 @@ sigchild(void) * whether the exit was normal or not. */ +#if defined(__NetBSD__) + pid_t status; +#else + union wait status; +#endif + + + void ft_checkkids(void) { @@ -191,7 +199,7 @@ ft_checkkids(void) here = TRUE; while (numchanged > 0) { - pid = wait((union wait *) NULL); + pid = wait((&status); if (pid == -1) { fprintf(cp_err, "ft_checkkids: Internal Error: should be %d jobs done but there aren't any.\n", diff --git a/src/frontend/terminal.c b/src/frontend/terminal.c index 75f98ef48..00325fe18 100644 --- a/src/frontend/terminal.c +++ b/src/frontend/terminal.c @@ -24,6 +24,10 @@ Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group #endif #endif +#ifdef HAVE_TERMCAP +#include +#endif + #include #include diff --git a/src/maths/poly/polyfit.c b/src/maths/poly/polyfit.c index 07fc6f7a0..86e2e98a0 100644 --- a/src/maths/poly/polyfit.c +++ b/src/maths/poly/polyfit.c @@ -1,5 +1,9 @@ +#include #include +#ifdef HAVE_STRING_H +#include +#endif #include "polyfit.h" #include "polyeval.h" diff --git a/src/misc/Makefile.am b/src/misc/Makefile.am index 866b54ed3..2aa0cf0e7 100644 --- a/src/misc/Makefile.am +++ b/src/misc/Makefile.am @@ -16,7 +16,7 @@ libmisc_a_SOURCES = \ printnum.c \ printnum.h \ string.c \ - string.h \ + stringutil.h \ terminal.c \ terminal.h \ tilde.c \ diff --git a/src/misc/mktemp.c b/src/misc/mktemp.c index 252e12706..6aa03b7ae 100644 --- a/src/misc/mktemp.c +++ b/src/misc/mktemp.c @@ -9,13 +9,17 @@ Copyright 1990 Regents of the University of California. All rights reserved. */ #include "ngspice.h" -#include "stdio.h" +#include #include "mktemp.h" #ifdef HAVE_UNISTD_H #include #endif +#ifdef HAVE_STRING_H +#include +#endif + #ifndef TEMPFORMAT #define TEMPFORMAT "temp%s%d" #endif diff --git a/src/misc/string.c b/src/misc/string.c index 54e114762..e0c9a7642 100644 --- a/src/misc/string.c +++ b/src/misc/string.c @@ -7,9 +7,14 @@ Copyright 1990 Regents of the University of California. All rights reserved. */ #include +#include + +#ifdef HAVE_STRING_H +#include +#endif + #include "ngspice.h" -#include "stdio.h" -#include "string.h" +#include "stringutil.h" int prefix(register char *p, register char *s) diff --git a/src/misc/tilde.c b/src/misc/tilde.c index dd6d0bbc5..ece5fde70 100644 --- a/src/misc/tilde.c +++ b/src/misc/tilde.c @@ -2,11 +2,12 @@ Copyright 1991 Regents of the University of California. All rights reserved. **********/ - #include -#include "ngspice.h" -#include +#include +#ifdef HAVE_STRING_H #include +#endif +#include "ngspice.h" #include "tilde.h" #ifdef HAVE_PWD_H diff --git a/src/spicelib/devices/ltra/ltraset.c b/src/spicelib/devices/ltra/ltraset.c index 99e24560b..a93c1c348 100644 --- a/src/spicelib/devices/ltra/ltraset.c +++ b/src/spicelib/devices/ltra/ltraset.c @@ -235,11 +235,11 @@ LTRAunsetup(inModel, ckt) for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { if (here->LTRAbrEq1) { - CKTdltNNum(ckt, (void *) here->LTRAbrEq1); + CKTdltNNum(ckt, here->LTRAbrEq1); here->LTRAbrEq1 = 0; } if (here->LTRAbrEq2) { - CKTdltNNum(ckt, (void *) here->LTRAbrEq2); + CKTdltNNum(ckt, here->LTRAbrEq2); here->LTRAbrEq2 = 0; } }