ANSIfication of function-pointers and declarations. Also, make sure to

return something if RETSIGTYPE is not void, in functions that are defined as
returning RETSIGTYPE.
This commit is contained in:
Thomas Wouters 2000-07-22 23:51:19 +00:00
parent 0796b00279
commit 2c46eaf8e9
1 changed files with 5 additions and 2 deletions

View File

@ -38,7 +38,7 @@ extern Function *rl_event_hook;
#endif #endif
/* Pointers needed from outside (but not declared in a header file). */ /* Pointers needed from outside (but not declared in a header file). */
extern int (*PyOS_InputHook)(); extern int (*PyOS_InputHook)(void);
extern char *(*PyOS_ReadlineFunctionPointer)(char *); extern char *(*PyOS_ReadlineFunctionPointer)(char *);
@ -431,6 +431,9 @@ static RETSIGTYPE
onintr(int sig) onintr(int sig)
{ {
longjmp(jbuf, 1); longjmp(jbuf, 1);
#if RETSIGTYPE != void
return 0;
#endif
} }
@ -441,7 +444,7 @@ call_readline(char *prompt)
{ {
size_t n; size_t n;
char *p, *q; char *p, *q;
RETSIGTYPE (*old_inthandler)(); RETSIGTYPE (*old_inthandler)(int);
old_inthandler = signal(SIGINT, onintr); old_inthandler = signal(SIGINT, onintr);
if (setjmp(jbuf)) { if (setjmp(jbuf)) {
#ifdef HAVE_SIGRELSE #ifdef HAVE_SIGRELSE