diff --git a/src/global.h b/src/global.h index fe1b58951eb457802b92014f5608ddf7bdf7e418..f8ad1bff3f572435e5d88da4b1a8137c0fc890ff 100644 --- a/src/global.h +++ b/src/global.h @@ -17,9 +17,16 @@ #define NO_FIX_MALLOC #endif +#ifndef STRUCT_PROGRAM_DECLARED +#define STRUCT_PROGRAM_DECLARED struct program; +#endif + struct function; +#ifndef STRUCT_SVALUE_DECLARED +#define STRUCT_SVALUE_DECLARED struct svalue; +#endif struct sockaddr; struct object; struct array; diff --git a/src/interpret.c b/src/interpret.c index 4ba4882ba93e283ae2d58bc71d49437fa6820563..ca5fe2b401efe37ea733f8fad074c9b49e418571 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: interpret.c,v 1.16 1996/12/05 03:23:48 per Exp $"); +RCSID("$Id: interpret.c,v 1.17 1996/12/06 04:26:56 hubbe Exp $"); #include "interpret.h" #include "object.h" #include "program.h" @@ -901,7 +901,7 @@ static void eval_instruction(unsigned char *pc) do_return: #if defined(DEBUG) && defined(GC2) if(d_flag > 2) do_gc(); - check_signals(); + check_threads_etc(); #endif /* fall through */ diff --git a/src/lex.c b/src/lex.c index 1192a19dd35406fc0464626ce985e71db3586acc..7f26c52d6ceb3c718778b3e4cd0376678e34ce54 100644 --- a/src/lex.c +++ b/src/lex.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: lex.c,v 1.8 1996/11/28 03:07:14 hubbe Exp $"); +RCSID("$Id: lex.c,v 1.9 1996/12/06 04:26:57 hubbe Exp $"); #include "language.h" #include "array.h" #include "lex.h" @@ -557,7 +557,7 @@ static struct inputstate *memory_inputstate(INT32 size) struct inputstate *i; if(!size) size=10000; i=new_inputstate(); - i->data=xalloc(size); + i->data=(unsigned char *)xalloc(size); i->buflen=size; i->pos=size; i->ungetstr=memory_ungetstr; @@ -597,7 +597,7 @@ static struct inputstate *prot_memory_inputstate(char *data,INT32 len) { struct inputstate *i; i=new_inputstate(); - i->data=data; + i->data=(unsigned char *)data; i->buflen=len; i->dont_free_data=1; i->pos=0; @@ -619,7 +619,7 @@ static int file_getc() got=read(istate->fd, buf, READAHEAD); if(got > 0) { - default_ungetstr(buf, got); + default_ungetstr((char *)buf, got); return istate->my_getc(); } else if(got==0 || errno != EINTR) diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 25081c1df7bb0406140d78baccabe271c879e56c..54e6113bf8136190f6ac47293fc2c84d11f9d672 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -6,7 +6,7 @@ #define READ_BUFFER 16384 #include "global.h" -RCSID("$Id: file.c,v 1.16 1996/12/04 08:18:14 per Exp $"); +RCSID("$Id: file.c,v 1.17 1996/12/06 04:27:44 hubbe Exp $"); #include "types.h" #include "interpret.h" #include "svalue.h" @@ -252,7 +252,7 @@ static struct pike_string *do_read(int fd, i=read(fd, str->str+bytes_read, r); THREADS_DISALLOW(); - check_signals(); + check_signals(0,0,0); if(i>0) { diff --git a/src/object.h b/src/object.h index b7ff6fb7745529ee52491cca05c380472d29c5ae..ad712df3ddf6039691b90534f446ed52d6705ae9 100644 --- a/src/object.h +++ b/src/object.h @@ -11,6 +11,9 @@ /* a destructed object has no program */ +#ifndef STRUCT_OBJECT_DECLARED +#define STRUCT_OBJECT_DECLARED +#endif struct object { INT32 refs; /* Reference count, must be first. */ diff --git a/src/signal_handler.c b/src/signal_handler.c index c45cecf272f9ac616eea3036c89ee78a73f9a6b0..809edf05ddbab1096396708a29391602da040162 100644 --- a/src/signal_handler.c +++ b/src/signal_handler.c @@ -236,7 +236,7 @@ static int signalling=0; static void unset_signalling(void *notused) { signalling=0; } -void check_signals() +void check_signals(struct callback *foo, void *bar, void *gazonk) { ONERROR ebuf; #ifdef DEBUG diff --git a/src/signal_handler.h b/src/signal_handler.h index 97d20daec416b4c512dcdbdf49e0a4937eb747d1..cee27e54239318dc4a796ff045ca1550dd1f1f8a 100644 --- a/src/signal_handler.h +++ b/src/signal_handler.h @@ -8,7 +8,7 @@ /* Prototypes begin here */ struct sigdesc; -void check_signals(); +void check_signals(struct callback *foo, void *bar, void *gazonk); void init_signals(); void exit_signals(); /* Prototypes end here */ diff --git a/src/stralloc.h b/src/stralloc.h index 6b3575679b894eb83acec63b5959f9ee09ff7a48..df7271361223e7dbdd47d5cf90c7dd1e086df409 100644 --- a/src/stralloc.h +++ b/src/stralloc.h @@ -9,6 +9,9 @@ #define STRINGS_ARE_SHARED +#ifndef STRUCT_PIKE_STRING_DECLARED +#define STRUCT_PIKE_STRING_DECLARED +#endif struct pike_string { SIZE_T refs; diff --git a/src/time_stuff.h b/src/time_stuff.h index f268a4154a80e22f3f40157708ecf200d2bbd8fa..9e10b88754771a82e396aa5c8dac2666e3a9c57e 100644 --- a/src/time_stuff.h +++ b/src/time_stuff.h @@ -52,10 +52,11 @@ } \ } while(0) -#ifndef HAVE_STRUCT_TIMEVAL #ifndef STRUCT_TIMEVAL_DECLARED #define STRUCT_TIMEVAL_DECLARED #endif + +#ifndef HAVE_STRUCT_TIMEVAL struct timeval { long tv_sec;