rpmsq.c   rpmsq.c 
skipping to change at line 283 skipping to change at line 283
#include "debug.h" #include "debug.h"
#define _RPMSQ_DEBUG 0 #define _RPMSQ_DEBUG 0
/*@unchecked@*/ /*@unchecked@*/
int _rpmsq_debug = _RPMSQ_DEBUG; int _rpmsq_debug = _RPMSQ_DEBUG;
/* XXX __OpenBSD__ insque(3) needs rock->q_forw initialized. */ /* XXX __OpenBSD__ insque(3) needs rock->q_forw initialized. */
/*@unchecked@*/ /*@unchecked@*/
/*@-fullinitblock @*/ /*@-fullinitblock @*/
static struct rpmsqElem rpmsqRock = { .q_forw = &rpmsqRock }; static struct rpmsqElem rpmsqRock = { &rpmsqRock, NULL };
/*@=fullinitblock @*/ /*@=fullinitblock @*/
/*@-compmempass@*/ /*@-compmempass@*/
/*@unchecked@*/ /*@unchecked@*/
rpmsq rpmsqQueue = &rpmsqRock; rpmsq rpmsqQueue = &rpmsqRock;
/*@=compmempass@*/ /*@=compmempass@*/
int rpmsqInsert(void * elem, void * prev) int rpmsqInsert(void * elem, void * prev)
{ {
rpmsq sq = (rpmsq) elem; rpmsq sq = (rpmsq) elem;
skipping to change at line 470 skipping to change at line 470
/* XXX Don't set a signal handler if already SIG_IGN */ /* XXX Don't set a signal handler if already SIG_IGN */
(void) sigaction(tbl->signum, NULL, &tbl->oact); (void) sigaction(tbl->signum, NULL, &tbl->oact);
if (tbl->oact.sa_handler == SIG_IGN) if (tbl->oact.sa_handler == SIG_IGN)
continue; continue;
(void) sigemptyset (&sa.sa_mask); (void) sigemptyset (&sa.sa_mask);
sa.sa_flags = SA_SIGINFO; sa.sa_flags = SA_SIGINFO;
#if defined(__LCLINT__) /* XXX glibc has union to track handler prot otype. */ #if defined(__LCLINT__) /* XXX glibc has union to track handler prot otype. */
sa.sa_handler = (handler != NULL ? handler : tbl->handler); sa.sa_handler = (handler != NULL ? handler : tbl->handler);
#else #else
sa.sa_sigaction = (void *) (handler != NULL ? handler : tbl- >handler); sa.sa_sigaction = (void (*)(int, siginfo_t*, void*)) (handle r != NULL ? handler : tbl->handler);
#endif #endif
if (sigaction(tbl->signum, &sa, &tbl->oact) < 0) { if (sigaction(tbl->signum, &sa, &tbl->oact) < 0) {
xx = SUB_REF(tbl); xx = SUB_REF(tbl);
break; break;
} }
tbl->active = 1; /* XXX just in case */ tbl->active = 1; /* XXX just in case */
if (handler != NULL) if (handler != NULL)
tbl->handler = handler; tbl->handler = handler;
} }
} else { /* Disable. */ } else { /* Disable. */
skipping to change at line 739 skipping to change at line 739
/*@globals rpmsigTbl @*/ /*@globals rpmsigTbl @*/
/*@modifies rpmsigTbl @*/ /*@modifies rpmsigTbl @*/
{ {
#if defined(WITH_PTHREADS) #if defined(WITH_PTHREADS)
int oldtype; int oldtype;
#endif #endif
int status = -1; int status = -1;
pid_t pid = 0; pid_t pid = 0;
pid_t result; pid_t result;
sigset_t newMask, oldMask; sigset_t newMask, oldMask;
rpmsq sq = memset(alloca(sizeof(*sq)), 0, sizeof(*sq)); rpmsq sq = (rpmsq) memset(alloca(sizeof(*sq)), 0, sizeof(*sq));
int xx; int xx;
#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP #ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
INIT_LOCK (); INIT_LOCK ();
#endif #endif
xx = DO_LOCK (); xx = DO_LOCK ();
if (ADD_REF (rpmsigTbl_sigchld) == 0) { if (ADD_REF (rpmsigTbl_sigchld) == 0) {
if (rpmsqEnable(SIGINT, NULL) < 0) { if (rpmsqEnable(SIGINT, NULL) < 0) {
xx = SUB_REF (rpmsigTbl_sigchld); xx = SUB_REF (rpmsigTbl_sigchld);
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/