Appiled some of dan's patches.

This commit is contained in:
pnenzi 2001-02-11 00:47:21 +00:00
parent 8aa1dc20a8
commit 317c6a2415
9 changed files with 37 additions and 11 deletions

View File

@ -133,7 +133,7 @@ AC_SEARCH_LIBS(tputs,ncurses termcap,AC_DEFINE(HAVE_TERMCAP),
AC_HEADER_DIRENT 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_SYS_WAIT
AC_HEADER_STAT AC_HEADER_STAT

View File

@ -176,6 +176,14 @@ sigchild(void)
* whether the exit was normal or not. * whether the exit was normal or not.
*/ */
#if defined(__NetBSD__)
pid_t status;
#else
union wait status;
#endif
void void
ft_checkkids(void) ft_checkkids(void)
{ {
@ -191,7 +199,7 @@ ft_checkkids(void)
here = TRUE; here = TRUE;
while (numchanged > 0) { while (numchanged > 0) {
pid = wait((union wait *) NULL); pid = wait((&status);
if (pid == -1) { if (pid == -1) {
fprintf(cp_err, fprintf(cp_err,
"ft_checkkids: Internal Error: should be %d jobs done but there aren't any.\n", "ft_checkkids: Internal Error: should be %d jobs done but there aren't any.\n",

View File

@ -24,6 +24,10 @@ Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group
#endif #endif
#endif #endif
#ifdef HAVE_TERMCAP
#include <termcap.h>
#endif
#include <ngspice.h> #include <ngspice.h>
#include <cpdefs.h> #include <cpdefs.h>

View File

@ -1,5 +1,9 @@
#include <config.h>
#include <math.h> #include <math.h>
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "polyfit.h" #include "polyfit.h"
#include "polyeval.h" #include "polyeval.h"

View File

@ -16,7 +16,7 @@ libmisc_a_SOURCES = \
printnum.c \ printnum.c \
printnum.h \ printnum.h \
string.c \ string.c \
string.h \ stringutil.h \
terminal.c \ terminal.c \
terminal.h \ terminal.h \
tilde.c \ tilde.c \

View File

@ -9,13 +9,17 @@ Copyright 1990 Regents of the University of California. All rights reserved.
*/ */
#include "ngspice.h" #include "ngspice.h"
#include "stdio.h" #include <stdio.h>
#include "mktemp.h" #include "mktemp.h"
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifndef TEMPFORMAT #ifndef TEMPFORMAT
#define TEMPFORMAT "temp%s%d" #define TEMPFORMAT "temp%s%d"
#endif #endif

View File

@ -7,9 +7,14 @@ Copyright 1990 Regents of the University of California. All rights reserved.
*/ */
#include <config.h> #include <config.h>
#include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "ngspice.h" #include "ngspice.h"
#include "stdio.h" #include "stringutil.h"
#include "string.h"
int int
prefix(register char *p, register char *s) prefix(register char *p, register char *s)

View File

@ -2,11 +2,12 @@
Copyright 1991 Regents of the University of California. All rights reserved. Copyright 1991 Regents of the University of California. All rights reserved.
**********/ **********/
#include <config.h> #include <config.h>
#include "ngspice.h" #include <stdio.h>
#include <stdio.h> #ifdef HAVE_STRING_H
#include <string.h> #include <string.h>
#endif
#include "ngspice.h"
#include "tilde.h" #include "tilde.h"
#ifdef HAVE_PWD_H #ifdef HAVE_PWD_H

View File

@ -235,11 +235,11 @@ LTRAunsetup(inModel, ckt)
for (here = model->LTRAinstances; here != NULL; for (here = model->LTRAinstances; here != NULL;
here = here->LTRAnextInstance) { here = here->LTRAnextInstance) {
if (here->LTRAbrEq1) { if (here->LTRAbrEq1) {
CKTdltNNum(ckt, (void *) here->LTRAbrEq1); CKTdltNNum(ckt, here->LTRAbrEq1);
here->LTRAbrEq1 = 0; here->LTRAbrEq1 = 0;
} }
if (here->LTRAbrEq2) { if (here->LTRAbrEq2) {
CKTdltNNum(ckt, (void *) here->LTRAbrEq2); CKTdltNNum(ckt, here->LTRAbrEq2);
here->LTRAbrEq2 = 0; here->LTRAbrEq2 = 0;
} }
} }