summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2010-09-10 15:01:29 +0300
committerTiago Vignatti <tiago.vignatti@nokia.com>2010-09-10 21:49:28 +0300
commita9e6080dc94633a4f497535f619a14fd8b566645 (patch)
treea64477b464d0de524e16e615a3fb96cec00dc2b1
parent648c8871c92727d7b6b16859f27f12266a06a16e (diff)
os/xfree86: remove macro checking for POSIX symbols
We assume already that our X implementation is POSIX compliant anyway. So remove those redundant checking. SA_SIGINFO is left there. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r--hw/xfree86/common/xf86Init.c10
-rw-r--r--hw/xfree86/parser/write.c4
-rw-r--r--os/osinit.c6
-rw-r--r--os/utils.c21
4 files changed, 0 insertions, 41 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 3c7fbcb64..877ebabf3 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -314,18 +314,10 @@ InstallSignalHandlers(void)
signal(SIGEMT, SIG_DFL);
#endif
signal(SIGFPE, SIG_DFL);
-#ifdef SIGBUS
signal(SIGBUS, SIG_DFL);
-#endif
-#ifdef SIGSYS
signal(SIGSYS, SIG_DFL);
-#endif
-#ifdef SIGXCPU
signal(SIGXCPU, SIG_DFL);
-#endif
-#ifdef SIGXFSZ
signal(SIGXFSZ, SIG_DFL);
-#endif
}
}
@@ -863,9 +855,7 @@ OsVendorInit(void)
{
static Bool beenHere = FALSE;
-#ifdef SIGCHLD
signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */
-#endif
if (!beenHere) {
umask(022);
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index 083203c05..eea3f0693 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -157,9 +157,7 @@ xf86writeConfigFile (const char *filename, XF86ConfigPtr cptr)
#if !defined(HAS_SAVED_IDS_AND_SETEUID)
/* Need to fork to change ruid without loosing euid */
-#ifdef SIGCHLD
csig = signal(SIGCHLD, SIG_DFL);
-#endif
switch ((pid = fork()))
{
case -1:
@@ -180,9 +178,7 @@ xf86writeConfigFile (const char *filename, XF86ConfigPtr cptr)
p = waitpid(pid, &status, 0);
} while (p == -1 && errno == EINTR);
}
-#ifdef SIGCHLD
signal(SIGCHLD, csig);
-#endif
if (p != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0)
return 1; /* success */
else
diff --git a/os/osinit.c b/os/osinit.c
index 32747df52..de815c6cd 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -168,15 +168,9 @@ OsInit(void)
struct sigaction act, oact;
int i;
int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS,
-#ifdef SIGSYS
SIGSYS,
-#endif
-#ifdef SIGXCPU
SIGXCPU,
-#endif
-#ifdef SIGXFSZ
SIGXFSZ,
-#endif
#ifdef SIGEMT
SIGEMT,
#endif
diff --git a/os/utils.c b/os/utils.c
index f30674ba5..4486db137 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1122,10 +1122,7 @@ XNFstrdup(const char *s)
}
-#ifdef SIGVTALRM
#define SMART_SCHEDULE_POSSIBLE
-#endif
-
#ifdef SMART_SCHEDULE_POSSIBLE
#define SMART_SCHEDULE_SIGNAL SIGALRM
#define SMART_SCHEDULE_TIMER ITIMER_REAL
@@ -1211,30 +1208,18 @@ OsBlockSignals (void)
sigset_t set;
sigemptyset (&set);
-#ifdef SIGALRM
sigaddset (&set, SIGALRM);
-#endif
-#ifdef SIGVTALRM
sigaddset (&set, SIGVTALRM);
-#endif
#ifdef SIGWINCH
sigaddset (&set, SIGWINCH);
#endif
#ifdef SIGIO
sigaddset (&set, SIGIO);
#endif
-#ifdef SIGTSTP
sigaddset (&set, SIGTSTP);
-#endif
-#ifdef SIGTTIN
sigaddset (&set, SIGTTIN);
-#endif
-#ifdef SIGTTOU
sigaddset (&set, SIGTTOU);
-#endif
-#ifdef SIGCHLD
sigaddset (&set, SIGCHLD);
-#endif
sigprocmask (SIG_BLOCK, &set, &PreviousSignalMask);
}
#endif
@@ -1280,21 +1265,17 @@ int
System(char *command)
{
int pid, p;
-#ifdef SIGCHLD
void (*csig)(int);
-#endif
int status;
if (!command)
return 1;
-#ifdef SIGCHLD
csig = signal(SIGCHLD, SIG_DFL);
if (csig == SIG_ERR) {
perror("signal");
return -1;
}
-#endif
#ifdef DEBUG
ErrorF("System: `%s'\n", command);
@@ -1317,12 +1298,10 @@ System(char *command)
}
-#ifdef SIGCHLD
if (signal(SIGCHLD, csig) == SIG_ERR) {
perror("signal");
return -1;
}
-#endif
return p == -1 ? -1 : status;
}