summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-04-25 16:03:00 -0700
committerAdam Jackson <ajax@redhat.com>2017-04-26 17:30:12 -0400
commitc7be7a688a78a34f61b90c0d95914e14b90b0cdc (patch)
tree5cf003d980077243b9a8e74983fd2d06357730de /os
parentace6bfd5901e19045371f9bd18b997b37f55b589 (diff)
Use #ifdef instead of #if for features to make Meson easier.
We mostly use #ifdef throughout the tree, and this lets the generated config.h files just be #define TOKEN instead of #define TOKEN 1. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'os')
-rw-r--r--os/utils.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/os/utils.c b/os/utils.c
index 226b9c817..611e8ac23 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1008,7 +1008,7 @@ ProcessCommandLine(int argc, char *argv[])
#endif
else if (strcmp(argv[i], "-dumbSched") == 0) {
InputThreadEnable = FALSE;
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
SmartScheduleSignalEnable = FALSE;
#endif
}
@@ -1210,7 +1210,7 @@ XNFstrdup(const char *s)
void
SmartScheduleStopTimer(void)
{
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
struct itimerval timer;
if (!SmartScheduleSignalEnable)
@@ -1226,7 +1226,7 @@ SmartScheduleStopTimer(void)
void
SmartScheduleStartTimer(void)
{
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
struct itimerval timer;
if (!SmartScheduleSignalEnable)
@@ -1239,7 +1239,7 @@ SmartScheduleStartTimer(void)
#endif
}
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
static void
SmartScheduleTimer(int sig)
{
@@ -1287,7 +1287,7 @@ SmartSchedulePause(void)
void
SmartScheduleInit(void)
{
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
if (SmartScheduleEnable() < 0) {
perror("sigaction for smart scheduler");
SmartScheduleSignalEnable = FALSE;
@@ -1444,7 +1444,7 @@ Popen(const char *command, const char *type)
}
/* Ignore the smart scheduler while this is going on */
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
if (SmartSchedulePause() < 0) {
close(pdes[0]);
close(pdes[1]);
@@ -1459,7 +1459,7 @@ Popen(const char *command, const char *type)
close(pdes[0]);
close(pdes[1]);
free(cur);
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
if (SmartScheduleEnable() < 0)
perror("signal");
#endif
@@ -1636,7 +1636,7 @@ Pclose(void *iop)
/* allow EINTR again */
OsReleaseSignals();
-#if HAVE_SETITIMER
+#ifdef HAVE_SETITIMER
if (SmartScheduleEnable() < 0) {
perror("signal");
return -1;