signal got sigactions args. But it seems to me that

the whole _POSIX_SOURCE construction should is
wrong somehow.

svn path=/trunk/kdegraphics/kdvi/; revision=51331
remotes/origin/kdvi-2.0
Matthias Hoelzer-Kluepfel 26 years ago
parent 2a2c25ca6f
commit fc3feb7552
  1. 11
      psgs.cpp

@ -288,14 +288,19 @@ read_from_gs() {
static Boolean sigpipe_error = False; static Boolean sigpipe_error = False;
/* ARGSUSED */ /* ARGSUSED */
#ifdef _POSIX_SOURCE
static void gs_sigpipe_handler(int sig, int code, sigcontext *scp, char *addr) static void gs_sigpipe_handler(int sig, int code, sigcontext *scp, char *addr)
{ {
sigpipe_error = True; sigpipe_error = True;
} }
#ifdef _POSIX_SOURCE
static struct sigaction sigpipe_handler_struct; static struct sigaction sigpipe_handler_struct;
/* initialized to {gs_sigpipe_handler, (sigset_t) 0, 0} in initGS */ /* initialized to {gs_sigpipe_handler, (sigset_t) 0, 0} in initGS */
#else
static void gs_sigpipe_handler2(int sig)
{
sigpipe_error = true;
}
#endif #endif
/* /*
@ -308,7 +313,7 @@ static void send(char *cp, int len)
#ifdef _POSIX_SOURCE #ifdef _POSIX_SOURCE
struct sigaction orig; struct sigaction orig;
#else #else
void (*orig)(); void (*orig)(int);
#endif #endif
#ifdef STREAMSCONN #ifdef STREAMSCONN
int retval; int retval;
@ -318,7 +323,7 @@ static void send(char *cp, int len)
#ifdef _POSIX_SOURCE #ifdef _POSIX_SOURCE
(void) sigaction(SIGPIPE, &sigpipe_handler_struct, &orig); (void) sigaction(SIGPIPE, &sigpipe_handler_struct, &orig);
#else #else
orig = signal(SIGPIPE, gs_sigpipe_handler); orig = signal(SIGPIPE, gs_sigpipe_handler2);
#endif #endif
sigpipe_error = False; sigpipe_error = False;
GS_sending = True; GS_sending = True;

Loading…
Cancel
Save