aboutsummaryrefslogtreecommitdiff
path: root/src/xz/signals.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-09-19 09:47:30 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-09-19 09:47:30 +0300
commite599bba4216c0edb8cc8f40adad3a6dba88685f4 (patch)
treed52c699f599e276ff65302e5854a26998da1a928 /src/xz/signals.h
parentFix incorrect use of "restrict". (diff)
downloadxz-e599bba4216c0edb8cc8f40adad3a6dba88685f4.tar.xz
Various changes.
Separate a few reusable components from XZ Utils specific code. The reusable code is now in "tuklib" modules. A few more could be separated still, e.g. bswap.h. Fix some bugs in lzmainfo. Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol for help. Add OpenVMS support into physmem. Add a few #ifdefs to ease building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the original patch.
Diffstat (limited to 'src/xz/signals.h')
-rw-r--r--src/xz/signals.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/xz/signals.h b/src/xz/signals.h
index 48945b22..7603d803 100644
--- a/src/xz/signals.h
+++ b/src/xz/signals.h
@@ -21,8 +21,10 @@ extern volatile sig_atomic_t user_abort;
extern void signals_init(void);
-#ifndef _WIN32
-
+#if defined(_WIN32) || defined(__VMS)
+# define signals_block() do { } while (0)
+# define signals_unblock() do { } while (0)
+#else
/// Block the signals which don't have SA_RESTART and which would just set
/// user_abort to true. This is handy when we don't want to handle EINTR
/// and don't want SA_RESTART either.
@@ -30,15 +32,12 @@ extern void signals_block(void);
/// Unblock the signals blocked by signals_block().
extern void signals_unblock(void);
+#endif
+#ifdef _WIN32
+# define signals_exit() do { } while (0)
+#else
/// If user has sent us a signal earlier to terminate the process,
/// re-raise that signal to actually terminate the process.
extern void signals_exit(void);
-
-#else
-
-#define signals_block() do { } while (0)
-#define signals_unblock() do { } while (0)
-#define signals_exit() do { } while (0)
-
#endif