From 211d6b75aa9db4d5863fb6849bd65e5d1d24b57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 5 Dec 1996 20:27:44 -0800 Subject: [PATCH] more fixes for HP-UX Rev: src/global.h:1.4 Rev: src/interpret.c:1.17 Rev: src/lex.c:1.9 Rev: src/modules/files/file.c:1.17 Rev: src/object.h:1.5 Rev: src/signal_handler.c:1.5 Rev: src/signal_handler.h:1.2 Rev: src/stralloc.h:1.5 Rev: src/time_stuff.h:1.3 --- src/global.h | 7 +++++++ src/interpret.c | 4 ++-- src/lex.c | 8 ++++---- src/modules/files/file.c | 4 ++-- src/object.h | 3 +++ src/signal_handler.c | 2 +- src/signal_handler.h | 2 +- src/stralloc.h | 3 +++ src/time_stuff.h | 3 ++- 9 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/global.h b/src/global.h index fe1b58951e..f8ad1bff3f 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 4ba4882ba9..ca5fe2b401 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 1192a19dd3..7f26c52d6c 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 25081c1df7..54e6113bf8 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 b7ff6fb774..ad712df3dd 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 c45cecf272..809edf05dd 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 97d20daec4..cee27e5423 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 6b3575679b..df72713612 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 f268a4154a..9e10b88754 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; -- GitLab