diff options
author | Pete Batard <pbatard@gmail.com> | 2010-02-24 23:41:45 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-02-24 23:41:45 +0000 |
commit | 810785d970bf160537238df0994f692c566dc9e1 (patch) | |
tree | d12e853d673c95edaaf3883c15c7518ec29d675c /examples/dpfp.c | |
parent | 8121a13b6a64d08c880ad91680a4cc57625f6739 (diff) | |
parent | f2297884fa8831e8e58b914c700aafe125ea89e5 (diff) | |
download | libusb-a159.tar.gz |
merged with master's r175a159
Diffstat (limited to 'examples/dpfp.c')
-rw-r--r-- | examples/dpfp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/dpfp.c b/examples/dpfp.c index bd9702a..e218246 100644 --- a/examples/dpfp.c +++ b/examples/dpfp.c @@ -416,7 +416,9 @@ static void sighandler(int signum) int main(void) { +#ifndef __MINGW32__ struct sigaction sigact; +#endif int r = 1; r = libusb_init(NULL); @@ -456,12 +458,17 @@ int main(void) if (r < 0) goto out_deinit; +#ifndef __MINGW32__ sigact.sa_handler = sighandler; sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; sigaction(SIGINT, &sigact, NULL); sigaction(SIGTERM, &sigact, NULL); sigaction(SIGQUIT, &sigact, NULL); +#else + signal(SIGINT, sighandler); + signal(SIGTERM, sighandler); +#endif while (!do_exit) { r = libusb_handle_events(NULL); |