From b0d03532fc2a4b65fbb4a7274948bc2b37733326 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Thu, 28 Apr 2011 00:41:43 +0200 Subject: [PATCH] use sig_atomic_t in signals --- aucat/aucat.c | 4 ++-- aucat/conf.h | 2 +- aucat/listen.c | 1 + aucat/pipe.c | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aucat/aucat.c b/aucat/aucat.c index 66c7284..d021a1d 100644 --- a/aucat/aucat.c +++ b/aucat/aucat.c @@ -69,9 +69,9 @@ #endif #ifdef DEBUG -int debug_level = 0; +volatile sig_atomic_t debug_level = 0; #endif -volatile int quit_flag = 0; +volatile sig_atomic_t quit_flag = 0; /* * SIGINT handler, it raises the quit flag. If the flag is already set, diff --git a/aucat/conf.h b/aucat/conf.h index 92bdef7..26f39ee 100644 --- a/aucat/conf.h +++ b/aucat/conf.h @@ -27,7 +27,7 @@ * 3 - structural changes (new aproc structures and files stream params changes) * 4 - data blocks and messages */ -extern int debug_level; +extern volatile sig_atomic_t debug_level; #endif /* diff --git a/aucat/listen.c b/aucat/listen.c index ca830d5..c0cc63a 100644 --- a/aucat/listen.c +++ b/aucat/listen.c @@ -16,6 +16,7 @@ */ #include #include +#include #include #include diff --git a/aucat/pipe.c b/aucat/pipe.c index 065f6f0..8390092 100644 --- a/aucat/pipe.c +++ b/aucat/pipe.c @@ -16,6 +16,7 @@ #include #include +#include #include #include